FairRoot/PandaRoot
PndRichPDHit.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndRichPDHit header file -----
3 // ----- Created 01/11/14 by Konstantin Beloborodov -----
4 // ----- -----
5 // -------------------------------------------------------------------------
6 
7 
8 #ifndef PNDRICHPDHIT_H
9 #define PNDRICHPDHIT_H
10 
11 #include "TVector3.h"
12 #include "FairHit.h"
13 
14 class PndRichPDHit : public FairHit {
15 
16 public:
17 
19  PndRichPDHit();
20 
21  PndRichPDHit(Int_t index,
22  Int_t detID,
23  Int_t sensorId,
24  TVector3& pos,
25  TVector3& dpos,
26  Double_t time,
27  Double_t timeThreshold);
28 
29 
31 /* PndRichPDHit(const PndRichPDHit& hit) : FairHit(hit),
32  fSensorId(hit.fSensorId),
33  fTime(hit.fTime),
34  fTimeThreshold(hit.fTimeThreshold)
35  { *this = hit; };
36 */
38  virtual ~PndRichPDHit();
39 
41  virtual void Print(const Option_t* opt ="") const;
42 
47  virtual Double_t GetTime() {return fTime;}
49  virtual Int_t GetRefIndex() {return fRefIndex;}
50  TVector3 GetPosition() const { return TVector3(fX, fY, fZ); }
51  Int_t GetSensorId() const {return fSensorId;}
52 // std::vector<Int_t> GetIndices() const { return fIndex;}
53 
54 /* void AddIndex(int index)
55  {
56  fIndex.push_back(index);
57  AddLink(FairLink("PndRichPDHit", index));
58  }
59 
60  void AddIndex(std::vector<Int_t> index)
61  {
62  fIndex = index;
63  AddLinks(FairMultiLinkedData("PndRichPDHit", index));
64  }
65 
66  virtual bool equal(FairTimeStamp* data){
67  PndRichPDHit* hit = dynamic_cast <PndRichPDHit*> (data);
68  if (hit != 0){
69  if (fSensorId == hit->GetSensorId()) return true;
70  }
71  return false;
72  }
73 
74  virtual bool operator<(const PndRichPDHit& hit) const{
75  if (fSensorId < hit.GetSensorId()) return true;
76  return false;
77  }
78  virtual bool operator>(const PndRichPDHit& hit) const{
79  if (fSensorId > hit.GetSensorId()) return true;
80  return false;
81  }
82  virtual bool operator==(const PndRichPDHit& hit) const{
83  if (fSensorId == hit.GetSensorId()) return true;
84  return false;
85  }
86 */
87  protected:
88 
89 // std::vector<Int_t> fIndex; // indice of mc points contributing to this digi
90  Int_t fIndex;
91  Int_t fSensorId;
92  Int_t fRefIndex;
95 
96  ClassDef(PndRichPDHit,1)
97 };
98 
99 #endif //PNDRICHPDHIT_H
TVector3 pos
Double_t fTime
Definition: PndRichPDHit.h:94
Int_t fSensorId
Definition: PndRichPDHit.h:91
virtual ~PndRichPDHit()
virtual void Print(const Option_t *opt="") const
Double_t fTimeThreshold
Definition: PndRichPDHit.h:94
Double_t
Int_t fRefIndex
Definition: PndRichPDHit.h:92
virtual Double_t GetTime()
Definition: PndRichPDHit.h:47
TVector3 GetPosition() const
Definition: PndRichPDHit.h:50
Double_t fX
Definition: PndRichPDHit.h:93
Double_t fZ
Definition: PndRichPDHit.h:93
Int_t GetSensorId() const
Definition: PndRichPDHit.h:51
virtual Double_t GetTimeThreshold()
Definition: PndRichPDHit.h:48
virtual Int_t GetRefIndex()
Definition: PndRichPDHit.h:49
Double_t fY
Definition: PndRichPDHit.h:93