Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrkrTruthTrack.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrkrTruthTrack.h
1 #ifndef TRACKBASE_TRKRTRUTHTRACK_H
2 #define TRACKBASE_TRKRTRUTHTRACK_H
3 
4 
5 #include <phool/PHObject.h>
6 #include <trackbase/TrkrDefs.h>
7 
8 #include <climits>
9 #include <cmath>
10 #include <vector>
11 
12 class TrkrTruthTrack : public PHObject
13 {
14  public:
16  ~TrkrTruthTrack() override = default;
18 
19  virtual unsigned int getTrackid() const { return UINT_MAX; };
20 
21  virtual float getX0() const { return NAN; };
22  virtual float getY0() const { return NAN; };
23  virtual float getZ0() const { return NAN; };
24 
25  virtual float getPseudoRapidity() const { return NAN; };
26  virtual float getPt() const { return NAN; };
27  virtual float getPhi() const { return NAN; };
28 
29  virtual std::vector<TrkrDefs::cluskey>& getClusters();
30  virtual void addCluster(TrkrDefs::cluskey){};
31 
32  virtual bool has_hitsetkey(TrkrDefs::hitsetkey) const { return false; };
33  virtual bool has_hitsetkey(TrkrDefs::cluskey) const { return false; };
34  virtual std::pair<bool, TrkrDefs::cluskey> get_cluskey(TrkrDefs::hitsetkey) const { return {false, 0}; }; // bool is if there is the key, and if so, then hitsetket is the correspeonding key
35 
36  virtual void setTrackid(unsigned int){};
37  virtual void setX0(float){};
38  virtual void setY0(float){};
39  virtual void setZ0(float){};
40 
41  virtual void setPseudoRapity(float){};
42  virtual void setPt(float){};
43  virtual void setPhi(float){};
44 
45  struct Comp
46  {
47  bool operator()(const unsigned int lhs, const TrkrTruthTrack* rhs) const
48  {
49  return lhs < rhs->getTrackid();
50  }
51  bool operator()(const TrkrTruthTrack* lhs, const unsigned int& rhs) const
52  {
53  return lhs->getTrackid() < rhs;
54  }
55  bool operator()(const TrkrTruthTrack* lhs, const TrkrTruthTrack* rhs) const
56  {
57  return lhs->getTrackid() < rhs->getTrackid();
58  }
59  };
60 
61  // PHObject virtual overloads
62  void identify(std::ostream& os = std::cout) const override
63  {
64  os << "TrkrTruthTrack base class" << std::endl;
65  };
66 
67  protected:
68  ClassDefOverride(TrkrTruthTrack, 1)
69 };
70 
71 #endif // TRACKBASE_TRKRTRUTHTRACK_H