Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackSeed.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackSeed.h
1 #ifndef TRACKBASEHISTORIC_TRACKSEED_H
2 #define TRACKBASEHISTORIC_TRACKSEED_H
3 
4 #include <phool/PHObject.h>
5 
6 #include <trackbase/TrkrDefs.h>
9 
10 #include <g4main/PHG4HitDefs.h>
11 
12 #include <cmath>
13 #include <iostream>
14 #include <set>
15 #include <iterator>
16 
17 class TrackSeed : public PHObject
18 {
19  public:
20  typedef std::set<TrkrDefs::cluskey> ClusterKeySet;
21  typedef ClusterKeySet::const_iterator ConstClusterKeyIter;
22  typedef ClusterKeySet::iterator ClusterKeyIter;
23 
24  ~TrackSeed() override = default;
25 
26  void identify(std::ostream& os = std::cout) const override
27  {
28  os << "TrackSeed base class\n";
29  }
30 
31  int isValid() const override { return 0; }
32  PHObject* CloneMe() const override { return nullptr; }
33  using PHObject::CopyFrom;
34 
35  virtual void CopyFrom( const TrackSeed& ) {}
36 
37  virtual void CopyFrom( TrackSeed* ) {}
38 
39  virtual int get_charge() const { return std::numeric_limits<int>::max(); }
41  virtual float get_px(TrkrClusterContainer*,
42  ActsGeometry*) const { return NAN; }
43  virtual float get_py(TrkrClusterContainer*,
44  ActsGeometry*) const { return NAN; }
45  virtual float get_phi(TrkrClusterContainer*,
46  ActsGeometry*) const { return NAN; }
47  virtual float get_phi(std::map<TrkrDefs::cluskey, Acts::Vector3>&) const { return NAN; }
48  virtual float get_pz() const { return NAN; }
49  virtual float get_x() const { return NAN; }
50  virtual float get_y() const { return NAN; }
51  virtual float get_z() const { return NAN; }
52  virtual float get_qOverR() const { return NAN; }
53  virtual float get_X0() const { return NAN; }
54  virtual float get_Y0() const { return NAN; }
55  virtual float get_slope() const { return NAN; }
56  virtual float get_Z0() const { return NAN; }
57  virtual float get_eta() const { return NAN; }
58  virtual float get_theta() const { return NAN; }
59  virtual float get_pt() const { return NAN; }
60  virtual float get_p() const { return NAN; }
61  virtual short int get_crossing() const { return 0; }
62 
63  virtual void set_crossing(const short int) {}
64  virtual void set_qOverR(const float) {}
65  virtual void set_X0(const float) {}
66  virtual void set_Y0(const float) {}
67  virtual void set_slope(const float) {}
68  virtual void set_Z0(const float) {}
69 
71  ActsGeometry*,
72  uint8_t, uint8_t) {}
74  ActsGeometry*,
75  uint8_t, uint8_t) {}
76 
79  virtual void circleFitByTaubin(std::map<TrkrDefs::cluskey, Acts::Vector3>&,
80  uint8_t, uint8_t) {}
81  virtual void lineFit(std::map<TrkrDefs::cluskey, Acts::Vector3>&,
82  uint8_t, uint8_t) {}
83 
84  virtual void clear_cluster_keys() {}
85  virtual bool empty_cluster_keys() const { return false; }
86  virtual size_t size_cluster_keys() const { return 0; }
88  virtual size_t erase_cluster_key(TrkrDefs::cluskey) { return 0; }
91  virtual ConstClusterKeyIter end_cluster_keys() const;
93  virtual ClusterKeyIter find_cluster_keys(unsigned int);
95 
96  virtual void set_silicon_seed_index(const unsigned int) {}
97  virtual void set_tpc_seed_index(const unsigned int) {}
98  virtual unsigned int get_silicon_seed_index() const { return 0; }
99  virtual unsigned int get_tpc_seed_index() const { return 0; }
100 
101  virtual void set_crossing_estimate(const short int) { }
102  virtual short int get_crossing_estimate() const { return 0; }
103 
104  /* ---------------------------------------------------------
105  * Truth tracking interfaces
106  * ---------------------------------------------------------
107  */
108  typedef std::map<int, std::set<PHG4HitDefs::keytype> > HitIdMap;
109  typedef HitIdMap::iterator HitIdIter;
110  typedef HitIdMap::const_iterator HitIdConstIter;
111 
112  virtual unsigned int get_truth_track_id() const { return std::numeric_limits<unsigned int>::max(); }
113  virtual void set_truth_track_id(unsigned int) {}
114  virtual void set_num_measurements(int) {}
115  virtual unsigned int get_num_measurements() const { return 0; }
116  virtual bool empty_g4hit_id() const { return true; }
117  virtual size_t size_g4hit_id() const { return 0; }
118  virtual void add_g4hit_id(int, PHG4HitDefs::keytype) {}
119  virtual HitIdIter begin_g4hit_id();
120  virtual HitIdConstIter begin_g4hit_id() const;
121  virtual HitIdIter find_g4hit_id(int);
122  virtual HitIdConstIter find_g4hit_id(int) const;
123  virtual HitIdIter end_g4hit_id();
124  virtual HitIdConstIter end_g4hit_id() const;
125  virtual size_t remove_g4hit_id(int, PHG4HitDefs::keytype) { return 0; }
126  virtual size_t remove_g4hit_volume(int) { return 0; }
127  virtual void clear_g4hit_id() {}
128  virtual const HitIdMap& g4hit_ids() const;
129 
130 
131  protected:
133 
135 
136 };
137 
138 #endif