~mwinter4/maus/ckov-update

« back to all changes in this revision

Viewing changes to src/common_cpp/Recon/Global/TrackPoint.hh

  • Committer: Chris Rogers
  • Date: 2013-03-19 14:21:55 UTC
  • mfrom: (659.1.63 release-candidate)
  • Revision ID: chris.rogers@stfc.ac.uk-20130319142155-65vwtifralro5ukv
Tags: MAUS-v0.5.1
MAUS-v0.5.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 */
50
50
class TrackPoint : public MAUS::PhaseSpaceVector {
51
51
 public:
52
 
  /* @brief     Construct with all elements initialized to zero and phase space type
53
 
   *        temporal.
 
52
  /* @brief  Construct with all elements initialized to zero and
 
53
   *         phase space type temporal.
54
54
   */
55
55
  TrackPoint();
56
56
 
62
62
   */
63
63
  explicit TrackPoint(const PhaseSpaceVector & original_instance,
64
64
                      const double z = 0.0,
65
 
                      const Particle::ID pid = Particle::kNone);
 
65
                      const MAUS::DataStructure::Global::PID pid =
 
66
                      MAUS::DataStructure::Global::kNoPID);
66
67
 
67
68
  /* @brief  Vector<double> copy constructor.
68
69
   */
69
70
  explicit TrackPoint(const Vector<double> & original_instance,
70
71
                      const double z = 0.0,
71
 
                      const Particle::ID pid = Particle::kNone);
 
72
                      const MAUS::DataStructure::Global::PID pid =
 
73
                      MAUS::DataStructure::Global::kNoPID);
72
74
 
73
 
  /* @brief Create with coordinates from an array.
74
 
     Order is t, E, x, Px, y, Py.
 
75
  /* @brief Create with coordinates from an array.  Order is t, E, x,
 
76
   *        Px, y, Py.
75
77
   */
76
78
  explicit TrackPoint(double const * const array, const double z = 0.0);
77
79
 
78
 
  /* @brief     Reconstructed track point constructor. The track point was not
79
 
   * generated by a detector, so an uncertanty matrix must be supplied. The
80
 
   * detector_id field is set to Detector::None. 
 
80
  /* @brief  Reconstructed track point constructor. The track point
 
81
   *         was not generated by a detector, so an uncertanty matrix
 
82
   *         must be supplied. The detector_id field is set to
 
83
   *         kUndefined.
81
84
   */
82
85
  TrackPoint(const double time, const double energy,
83
86
             const double x, const double px,
84
87
             const double y, const double py,
85
88
             const CovarianceMatrix & uncertainties, const double z = 0.0);
86
89
 
87
 
  /* @brief     Detector-generated track point constructor. The Detector reference
88
 
   * is used to copy it's ID and uncertainty matrix.
 
90
  /* @brief  Detector-generated track point constructor. The Detector
 
91
   *         reference is used to copy it's ID and uncertainty matrix.
89
92
   * 
90
93
   */
91
94
  TrackPoint(const double time, const double energy,
93
96
             const double y, const double py,
94
97
             const Detector & detector, const double z = 0.0);
95
98
 
96
 
  /* @brief     This constructor is used when to create well-defined particle tracks
97
 
   * for simulating through MICE.
 
99
  /* @brief  This constructor is used when to create well-defined
 
100
   *         particle tracks for simulating through MICE.
98
101
   */
99
102
  TrackPoint(const double time, const double energy,
100
103
             const double x, const double px,
101
104
             const double y, const double py,
102
 
             const Particle::ID particle_id, const double z = 0.0);
 
105
             const MAUS::DataStructure::Global::PID particle_id,
 
106
             const double z = 0.0);
103
107
 
104
108
  ~TrackPoint();
105
109
 
109
113
 
110
114
  const bool operator!=(const TrackPoint& rhs) const;
111
115
 
112
 
  /* @brief Determines if the track point occurs earlier in time than another.
 
116
  /* @brief  Determines if the track point occurs earlier in time than
 
117
   *         another.
113
118
   */
114
119
  const bool operator<(const TrackPoint& rhs) const;
115
120
 
116
 
  /* @brief Determines if the track point occurs later in time than another.
 
121
  /* @brief  Determines if the track point occurs later in time than
 
122
   *         another.
117
123
   */
118
124
  const bool operator>(const TrackPoint& rhs) const;
119
125
 
121
127
  //       Accessors
122
128
  // *************************
123
129
 
124
 
  void set_particle_id(const Particle::ID id);
125
 
  Particle::ID particle_id() const;
 
130
  void set_particle_id(const MAUS::DataStructure::Global::PID id);
 
131
  MAUS::DataStructure::Global::PID particle_id() const;
126
132
 
127
 
  void set_detector_id(const Detector::ID id);
128
 
  Detector::ID detector_id() const;
 
133
  void set_detector_id(const MAUS::DataStructure::Global::DetectorPoint id);
 
134
  MAUS::DataStructure::Global::DetectorPoint detector_id() const;
129
135
 
130
136
  void set_uncertainties(const CovarianceMatrix & uncertainties);
131
137
  const CovarianceMatrix & uncertainties() const;
136
142
  void set_z(const double z) {z_ = z;}
137
143
 
138
144
 protected:
139
 
  Detector::ID detector_id_;  // = 0 if this was not measured in a detector
 
145
  // = 0 if this was not measured in a detector
 
146
  MAUS::DataStructure::Global::DetectorPoint detector_id_;
140
147
  CovarianceMatrix uncertainties_;
141
 
  Particle::ID particle_id_;
 
148
  MAUS::DataStructure::Global::PID particle_id_;
142
149
  double z_;
143
150
};
144
151