PandaRoot
PndFtof.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndFtof header file -----
3 // ----- created by A. Sanchez -----
4 // -------------------------------------------------------------------------
5 
6 #ifndef PNDFTOF_H
7 #define PNDFTOF_H
8 
9 //#include "TClonesArray.h"
10 #include "TVector3.h"
11 #include "TLorentzVector.h"
12 #include "FairDetector.h"
13 #include "PndGeoFtofPar.h"
14 #include <string>
15 #include <vector>
16 
17 class TClonesArray;
18 class PndFtofPoint;
19 class FairVolume;
20 
21 class PndFtof : public FairDetector {
22 
23  public:
25  PndFtof();
26 
31  PndFtof(const char *name, Bool_t active);
32 
34  virtual ~PndFtof();
35 
39  virtual void Initialize();
40 
48  virtual Bool_t ProcessHits(FairVolume *vol = 0);
49 
55  virtual void EndOfEvent();
56 
57  virtual void BeginEvent();
62  virtual void Register();
63 
65  virtual TClonesArray *GetCollection(Int_t iColl) const;
66 
71  virtual void Print() const;
72 
77  virtual void Reset();
78 
86  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
87 
91  virtual void ConstructGeometry();
92 
94 
95  PndFtofPoint *AddHit(Int_t trackID, Int_t evtID, Int_t detID, TString detName, TVector3 posin, TVector3 momin, TVector3 posout, TVector3 momout, Double_t tof, Double_t length,
96  Double_t eLoss, Double_t charge, Double_t mass, Int_t pdgCode, Double_t dist, Double_t PLin, Double_t PLout);
97 
98  private:
99  std::vector<std::string> fListOfSensitives;
100  bool CheckIfSensitive(std::string name);
101 
102  PndGeoFtofPar *par;
103  Int_t fTrackID; // track index
104  Int_t fVolumeID; // volume id
105  Int_t fEventID; // event id
106  TLorentzVector fPosIn; // position
107  TLorentzVector fMomIn; // momentum
108  TLorentzVector fPosOut; // position
109  TLorentzVector fMomOut; // momentum
110 
111  Double_t fPLout, fPLin; // total momentum
112 
113  Double32_t fTime; // time
114  Double32_t fLength; // length
115  Double32_t fELoss; // energy loss
116  Int_t fPosIndex; //
117  Int_t fpdgCode; // MC volume ID of MUO
118  Int_t SiId, CId, alId, beId, CpipeId;
119 
120  Double_t fcharge;
121  Double_t fmass, fdist;
122 
123  TClonesArray *fFtofCollection;
124 
125  // reset all parameters
126  void ResetParameters();
127 
128  ClassDef(PndFtof, 2)
129 };
130 
131 inline void PndFtof::ResetParameters()
132 {
133  fTrackID = fVolumeID = 0;
134  fEventID = -1;
135  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
136  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
137  fMomIn.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
138  fMomOut.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
139 
140  fTime = fLength = fELoss = 0;
141 };
142 
143 #endif
void ConstructASCIIGeometry()
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
virtual void BeginEvent()
virtual void Register()
virtual void ConstructGeometry()
virtual void Initialize()
virtual Bool_t ProcessHits(FairVolume *vol=0)
virtual void Print() const
virtual ~PndFtof()
virtual void Reset()
virtual void EndOfEvent()
PndFtofPoint * AddHit(Int_t trackID, Int_t evtID, Int_t detID, TString detName, TVector3 posin, TVector3 momin, TVector3 posout, TVector3 momout, Double_t tof, Double_t length, Double_t eLoss, Double_t charge, Double_t mass, Int_t pdgCode, Double_t dist, Double_t PLin, Double_t PLout)
virtual TClonesArray * GetCollection(Int_t iColl) const