ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SvtxTrack_FastSim_v2.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SvtxTrack_FastSim_v2.h
1 /*
2  * SvtxTrack_FastSim_v2.h
3  */
4 
5 #ifndef TRACKBASEHISTORIC_SVTXTRACKFASTSIMV2_H
6 #define TRACKBASEHISTORIC_SVTXTRACKFASTSIMV2_H
7 
8 #include "SvtxTrack_v2.h"
9 
10 // SvtxTrack_FastSim with recording of associated G4hits
12 {
13  public:
14 
15  //* constructor
16  SvtxTrack_FastSim_v2() = default;
17 
18  //* base class copy constructor
20 
21  //* destructor
22  ~SvtxTrack_FastSim_v2() override = default;
23 
24  // copy content from base class
25  void CopyFrom( const SvtxTrack& ) override;
26  void CopyFrom( SvtxTrack* source ) override
27  { CopyFrom( *source ); }
28 
29  // The "standard PHObject response" functions...
30  void identify(std::ostream& os = std::cout) const override;
31  void Reset() override{ *this = SvtxTrack_FastSim_v2(); }
32  int isValid() const override;
33 
34  PHObject* CloneMe() const override
35  { return new SvtxTrack_FastSim_v2(*this); }
36 
38 
39 
40  unsigned int get_truth_track_id() const override
41  { return _truth_track_id; }
42 
43  unsigned int get_num_measurements() const override
44  { return _nmeas; }
45 
46  const HitIdMap& g4hit_ids() const override
47  { return _g4hit_ids; }
48 
49  bool empty_g4hit_id() const override
50  { return _g4hit_ids.empty(); }
51 
52  size_t size_g4hit_id() const override
53  { return _g4hit_ids.size(); }
54 
56  { return _g4hit_ids.begin(); }
57 
59  { return _g4hit_ids.end(); }
60 
62  { return _g4hit_ids.find(volume); }
63 
65 
66 
68 
69 
70  void set_truth_track_id(unsigned int truthTrackId) override
71  { _truth_track_id = truthTrackId; }
72 
73  void set_num_measurements(int nmeas) override
74  { _nmeas = nmeas; }
75 
76  void add_g4hit_id(int volume, PHG4HitDefs::keytype id) override
77  { _g4hit_ids[volume].insert(id); }
78 
79  size_t remove_g4hit_id(int volume, PHG4HitDefs::keytype id) override
80  { return _g4hit_ids[volume].erase(id); }
81 
82  size_t remove_g4hit_volume(int volume) override
83  { return _g4hit_ids.erase(volume); }
84 
86  { return _g4hit_ids.begin(); }
87 
89  { return _g4hit_ids.end(); }
90 
92  { return _g4hit_ids.find(volume); }
93 
94  void clear_g4hit_id() override
95  { return _g4hit_ids.clear(); }
96 
98 
99  private:
100 
101  unsigned int _truth_track_id = UINT_MAX;
102  unsigned int _nmeas = 0;
103 
105 
107 };
108 
109 #endif /* __SVTXTRACK_FAST_SIMV1_H__ */