FairRoot/PandaRoot
PndSttHit.h
Go to the documentation of this file.
1 
15 #ifndef PNDSTTHIT_H
16 #define PNDSTTHIT_H 1
17 
18 
19 #include "TVector3.h"
20 #include "FairHit.h"
21 #include "PndTrack.h"
22 
23 class PndSttHit : public FairHit
24 {
25 
26  public:
27 
29  PndSttHit();
30 
31 
43  // THIS ONE!
44  PndSttHit(Int_t detID, Int_t tubeID, Int_t mcindex, TVector3& pos, TVector3& dpos, Double_t p, Double_t isochrone, Double_t isochroneError, Double_t chDep);
45 
46 
48  virtual ~PndSttHit();
49 
50 
52  virtual void Print(const Option_t* opt = 0) const {std::cout<<" opt = "<<opt<<std::endl; return;}
53 
54 
58  void Clear();
59 
60 
62  Double_t GetIsochrone() const { return fIsochrone; };
64  Double_t GetPulse() const {return fPulse; };
65  Double_t GetDepCharge() const { return fDepCharge; };
66  Double_t GetEnergyLoss() const { return fDepCharge/1e6; };
67 
69  void SetIsochrone(Double_t isochrone) { fIsochrone = isochrone; };
70  void SetIsochroneError(Double_t isochroneError) { fIsochroneError = isochroneError; };
71  void SetDepCharge(Double_t depcharge) { fDepCharge = depcharge; }
72 
73  // tube ID // CHECK added
74  void SetTubeID(Int_t tubeid) { fTubeID = tubeid; }
75  Int_t GetTubeID() const { return fTubeID; }
76 
77  // computation of dE/dx
79 
80  virtual bool equal(FairTimeStamp* data) {
81  PndSttHit* myDigi = dynamic_cast <PndSttHit*> (data);
82  if (myDigi != 0){
83  if (fTubeID == myDigi->GetTubeID())
84  return true;
85  }
86  return false;
87  }
88 
89  virtual bool operator<(const PndSttHit& myDigi) const{
90  if (fTubeID < myDigi.GetTubeID()) return true;
91  else return false;
92  }
93 
95  out << "PndSttHit in Tube: " << digi.GetTubeID() << " Isochrone: " << digi.GetIsochrone() << " +/- " << digi.GetIsochroneError()
96  << " Charge: " << digi.GetDepCharge() << " Pulse: " << digi.GetPulse() << std::endl;
97  return out;
98  }
99 
100  protected:
101 
103  Int_t fTubeID; // CHECK added
112 
113 
114 
115  ClassDef(PndSttHit,1);
116 };
117 
118 
119 #endif
TVector3 pos
Double_t p
Definition: anasim.C:58
TClonesArray * digi
Double_t GetPulse() const
Definition: PndSttHit.h:64
void Clear()
Definition: PndSttHit.cxx:35
Double_t GetEnergyLoss() const
Definition: PndSttHit.h:66
void SetIsochrone(Double_t isochrone)
Definition: PndSttHit.h:69
virtual bool equal(FairTimeStamp *data)
Definition: PndSttHit.h:80
Double_t fIsochrone
Definition: PndSttHit.h:107
void SetTubeID(Int_t tubeid)
Definition: PndSttHit.h:74
Double_t fIsochroneError
Definition: PndSttHit.h:109
void SetDepCharge(Double_t depcharge)
Definition: PndSttHit.h:71
void SetIsochroneError(Double_t isochroneError)
Definition: PndSttHit.h:70
Int_t fTubeID
Definition: PndSttHit.h:103
Double_t GetIsochrone() const
Definition: PndSttHit.h:62
Double_t
PndMCTrack * track
Definition: anaLmdCluster.C:89
Double_t fDepCharge
Definition: PndSttHit.h:111
Int_t GetTubeID() const
Definition: PndSttHit.h:75
Double_t GetIsochroneError() const
Definition: PndSttHit.h:63
TFile * out
Definition: reco_muo.C:20
Double_t GetDepCharge() const
Definition: PndSttHit.h:65
Double_t ComputedEdx(PndTrack *track, Double_t tuberadius)
Definition: PndSttHit.cxx:52
ClassDef(PndSttHit, 1)
Double_t fPulse
Definition: PndSttHit.h:105
virtual ~PndSttHit()
Definition: PndSttHit.cxx:47
virtual void Print(const Option_t *opt=0) const
Definition: PndSttHit.h:52
virtual bool operator<(const PndSttHit &myDigi) const
Definition: PndSttHit.h:89
friend std::ostream & operator<<(std::ostream &out, PndSttHit &digi)
Definition: PndSttHit.h:94