FairRoot/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 
10 //#include "TClonesArray.h"
11 #include "TVector3.h"
12 #include "TLorentzVector.h"
13 #include "FairDetector.h"
14 #include "PndGeoFtofPar.h"
15 #include <string>
16 #include <vector>
17 
18 class TClonesArray;
19 class PndFtofPoint;
20 class FairVolume;
21 
22 class PndFtof : public FairDetector
23 {
24 
25  public:
26 
28  PndFtof();
29 
30 
35  PndFtof(const char* name, Bool_t active);
36 
37 
39  virtual ~PndFtof();
40 
41 
45  virtual void Initialize();
46 
47 
55  virtual Bool_t ProcessHits(FairVolume* vol = 0);
56 
57 
63  virtual void EndOfEvent();
64 
65 
66  virtual void BeginEvent();
71  virtual void Register();
72 
73 
75  virtual TClonesArray* GetCollection(Int_t iColl) const;
76 
77 
82  virtual void Print() const;
83 
84 
89  virtual void Reset();
90 
91 
99  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2,
100  Int_t offset);
101 
102 
106  virtual void ConstructGeometry();
107 
108  void ConstructASCIIGeometry();
109 
110 
111  PndFtofPoint* AddHit(Int_t trackID, Int_t evtID,
112  Int_t detID, TString detName,
113  TVector3 posin,
114  TVector3 momin,
115  TVector3 posout,
116  TVector3 momout,
117  Double_t tof,
118  Double_t length,
119  Double_t eLoss,
120  Double_t charge,
121  Double_t mass,
122  Int_t pdgCode,
123  Double_t dist,
124  Double_t PLin,
125  Double_t PLout);
126 
127 
128 
129 
130  private:
131 
132  std::vector<std::string> fListOfSensitives;
133  bool CheckIfSensitive(std::string name);
134 
136  Int_t fTrackID; // track index
137  Int_t fVolumeID; // volume id
138  Int_t fEventID; // event id
139  TLorentzVector fPosIn; // position
140  TLorentzVector fMomIn; // momentum
141  TLorentzVector fPosOut; // position
142  TLorentzVector fMomOut; // momentum
143 
144  Double_t fPLout,fPLin; // total momentum
145 
146 
147  Double32_t fTime; // time
148  Double32_t fLength; // length
149  Double32_t fELoss; // energy loss
150  Int_t fPosIndex; //
151  Int_t fpdgCode; // MC volume ID of MUO
153 
156 
157  TClonesArray* fFtofCollection;
158 
159 
160 
161  // reset all parameters
162  void ResetParameters();
163 
164  ClassDef(PndFtof,2)
165 
166 };
167 
168 
170  fTrackID = fVolumeID = 0;fEventID = -1;
171  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
172  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
173  fMomIn.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
174  fMomOut.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
175 
176  fTime = fLength = fELoss = 0;
177 
178 };
179 
180 
181 
182 #endif
Int_t fEventID
Definition: PndFtof.h:138
Int_t SiId
Definition: PndFtof.h:152
virtual void Print() const
Definition: PndFtof.cxx:235
Double_t fPLout
Definition: PndFtof.h:144
TLorentzVector fMomIn
Definition: PndFtof.h:140
Int_t alId
Definition: PndFtof.h:152
void ConstructASCIIGeometry()
Definition: PndFtof.cxx:288
virtual void ConstructGeometry()
Definition: PndFtof.cxx:275
virtual void Register()
Definition: PndFtof.cxx:217
Double_t fdist
Definition: PndFtof.h:155
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition: PndFtof.cxx:136
Int_t beId
Definition: PndFtof.h:152
Double32_t fELoss
Definition: PndFtof.h:149
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition: PndFtof.cxx:225
Double32_t fLength
Definition: PndFtof.h:148
TVector3 offset(2, 0, 0)
Int_t fPosIndex
Definition: PndFtof.h:150
TLorentzVector fMomOut
Definition: PndFtof.h:142
Int_t fTrackID
Definition: PndFtof.h:136
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition: PndFtof.cxx:258
void ResetParameters()
Hit collection.
Definition: PndFtof.h:169
Double_t
virtual void Reset()
Definition: PndFtof.cxx:248
TLorentzVector fPosIn
Definition: PndFtof.h:139
Int_t fVolumeID
Definition: PndFtof.h:137
TString name
virtual void BeginEvent()
Definition: PndFtof.cxx:127
Int_t fpdgCode
Definition: PndFtof.h:151
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)
Definition: PndFtof.cxx:471
virtual ~PndFtof()
Definition: PndFtof.cxx:95
PndGeoFtofPar * par
Definition: PndFtof.h:135
TLorentzVector fPosOut
Definition: PndFtof.h:141
PndFtof()
Definition: PndFtof.cxx:55
virtual void Initialize()
Definition: PndFtof.cxx:107
std::vector< std::string > fListOfSensitives
Definition: PndFtof.h:132
Double_t fcharge
Definition: PndFtof.h:154
virtual void EndOfEvent()
Definition: PndFtof.cxx:209
Int_t CId
Definition: PndFtof.h:152
Double_t fmass
Definition: PndFtof.h:155
bool CheckIfSensitive(std::string name)
Definition: PndFtof.cxx:458
Double32_t fTime
Definition: PndFtof.h:147
Double_t fPLin
Definition: PndFtof.h:144
TClonesArray * fFtofCollection
Definition: PndFtof.h:157
Int_t CpipeId
Definition: PndFtof.h:152