FairRoot/PandaRoot
PndFtsHit.h
Go to the documentation of this file.
1 
10 #ifndef PNDFTSHIT_H
11 #define PNDFTSHIT_H 1
12 
13 
14 #include "TVector3.h"
15 #include "FairHit.h"
16 
17 class PndFtsHit : public FairHit
18 {
19 
20  public:
21 
23  PndFtsHit();
24 
25 
40  // THIS ONE!
41  PndFtsHit(Int_t detID, Int_t tubeID, Int_t chamberID, Int_t layerID, Int_t skew, Int_t mcindex, TVector3& pos, TVector3& dpos, Double_t p, Double_t isochrone, Double_t isochroneError, Double_t chDep);
42 
43 
45  virtual ~PndFtsHit();
46 
47 
49  virtual void Print(const Option_t* opt = 0) const {std::cout<<" opt = "<<opt<<std::endl; return;}
50 
54  void Clear();
55 
57  Double_t GetIsochrone() const { return fIsochrone; };
59  Double_t GetPulse() const {return fPulse; };
60  Double_t GetDepCharge() const { return fDepCharge; };
61  Double_t GetEnergyLoss() const { return fDepCharge/1e6; };
62 
64  void SetIsochrone(Double_t isochrone) { fIsochrone = isochrone; };
65  void SetIsochroneError(Double_t isochroneError) { fIsochroneError = isochroneError; };
66  void SetDepCharge(Double_t depcharge) { fDepCharge = depcharge; }
67 
68  // tube ID // CHECK added
69  void SetTubeID(Int_t tubeid) { fTubeID = tubeid; }
70  Int_t GetTubeID() const { return fTubeID; }
71  void SetChamberID(Int_t chamberid) { fChamberID = chamberid; }
72  Int_t GetChamberID() const { return fChamberID; }
73  void SetLayerID(Int_t layerid) { fLayerID = layerid; }
74  Int_t GetLayerID() const { return fLayerID; }
75  Int_t GetSkewed() const { return fSkewed; }
76 
77  virtual bool equal(FairTimeStamp* data) const{
78  PndFtsHit* myDigi = dynamic_cast <PndFtsHit*> (data);
79  if (myDigi != 0){
80  if (fTubeID == myDigi->GetTubeID())
81  return true;
82  }
83  return false;
84  }
85 
86  virtual bool operator<(const PndFtsHit& myDigi) const{
87  if (fTubeID < myDigi.GetTubeID()) return true;
88  else return false;
89  }
90 
92  out << "PndSttHit in Tube: " << digi.GetTubeID() << " Isochrone: " << digi.GetIsochrone() << " +/- " << digi.GetIsochroneError()
93  << " Charge: " << digi.GetDepCharge() << " Pulse: " << digi.GetPulse() << std::endl;
94  return out;
95  }
96 
97  protected:
98 
103 
106 
109 
111  Int_t fTubeID; // CHECK added
112  Int_t fChamberID;
113  Int_t fLayerID;
114  Int_t fSkewed;
115 
116  ClassDef(PndFtsHit,2);
117 };
118 
119 
120 #endif
TVector3 pos
Double_t p
Definition: anasim.C:58
void SetIsochrone(Double_t isochrone)
Definition: PndFtsHit.h:64
TClonesArray * digi
Double_t GetPulse() const
Definition: PndFtsHit.h:59
void SetChamberID(Int_t chamberid)
Definition: PndFtsHit.h:71
Int_t fLayerID
Definition: PndFtsHit.h:113
void SetTubeID(Int_t tubeid)
Definition: PndFtsHit.h:69
Double_t fDepCharge
Definition: PndFtsHit.h:108
virtual ~PndFtsHit()
Definition: PndFtsHit.cxx:57
Int_t fSkewed
Definition: PndFtsHit.h:114
Int_t GetTubeID() const
Definition: PndFtsHit.h:70
Int_t GetLayerID() const
Definition: PndFtsHit.h:74
double skew
Double_t fIsochroneError
Definition: PndFtsHit.h:102
Double_t
Double_t fPulse
Definition: PndFtsHit.h:105
void SetDepCharge(Double_t depcharge)
Definition: PndFtsHit.h:66
Int_t fChamberID
Definition: PndFtsHit.h:112
TFile * out
Definition: reco_muo.C:20
Double_t fIsochrone
Definition: PndFtsHit.h:100
Int_t fTubeID
Definition: PndFtsHit.h:111
virtual void Print(const Option_t *opt=0) const
Definition: PndFtsHit.h:49
Double_t GetIsochrone() const
Definition: PndFtsHit.h:57
Double_t GetIsochroneError() const
Definition: PndFtsHit.h:58
void SetLayerID(Int_t layerid)
Definition: PndFtsHit.h:73
Int_t GetSkewed() const
Definition: PndFtsHit.h:75
virtual bool operator<(const PndFtsHit &myDigi) const
Definition: PndFtsHit.h:86
void Clear()
Definition: PndFtsHit.cxx:43
Double_t GetEnergyLoss() const
Definition: PndFtsHit.h:61
friend std::ostream & operator<<(std::ostream &out, PndFtsHit &digi)
Definition: PndFtsHit.h:91
Double_t GetDepCharge() const
Definition: PndFtsHit.h:60
virtual bool equal(FairTimeStamp *data) const
Definition: PndFtsHit.h:77
void SetIsochroneError(Double_t isochroneError)
Definition: PndFtsHit.h:65
Int_t GetChamberID() const
Definition: PndFtsHit.h:72
ClassDef(PndFtsHit, 2)