1
/* This file is part of MAUS: http:// micewww.pp.rl.ac.uk:8080/projects/maus
3
* MAUS is free software: you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License as published by
5
* the Free Software Foundation, either version 3 of the License, or
6
* (at your option) any later version.
8
* MAUS is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with MAUS. If not, see <http:// www.gnu.org/licenses/>.
20
#include "Recon/Global/Track.hh"
22
#include "Interface/Squeak.hh"
28
Track::Track() : std::vector<TrackPoint>(), particle_id_(0)
31
Track::Track(const int particle_id)
32
: std::vector<TrackPoint>(), particle_id_(particle_id)
35
Track::Track(const std::vector<TrackPoint>& tracks,
36
const int particle_id)
37
: std::vector<TrackPoint>(tracks), particle_id_(particle_id)
40
Track::Track(const Track & original_instance)
41
: std::vector<TrackPoint>(original_instance),
42
particle_id_(original_instance.particle_id_)
48
int Track::particle_id() const {
52
void Track::set_particle_id(const int particle_id) {
53
particle_id_ = particle_id;
56
std::ostream& operator<<(std::ostream& out, const Track& track) {
58
for (size_t index = 0; index < track.size(); ++index) {
59
out << std::endl << track[index];