FairRoot/PandaRoot
PndFts.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndFts header file -----
3 // -------------------------------------------------------------------------
4 
5 
6 #ifndef PNDFTS_H
7 #define PNDFTS_H
8 
9 
10 #include "TClonesArray.h"
11 #include "TLorentzVector.h"
12 #include "TVector3.h"
13 #include "FairDetector.h"
14 #include "PndGeoFtsPar.h"
15 #include "FairRun.h"
16 #include "PndFtsPoint.h"
17 #include "PndFtsMapCreator.h"
18 
19 #include <string>
20 #include <sstream>
21 
22 class TClonesArray;
23 class FairVolume;
24 
25 class PndFts : public FairDetector
26 {
27 
28  public:
29 
31  PndFts();
32 
33 
38  PndFts(const char* name, Bool_t active);
39 
40 
42  virtual ~PndFts();
43 
44 
52  virtual Bool_t ProcessHits(FairVolume* vol = 0);
53 
54 
60  virtual void EndOfEvent();
61 
62 
67  virtual void Register();
68 
69 
71  virtual TClonesArray* GetCollection(Int_t iColl) const;
72 
73 
78  virtual void Print() const;
79 
80 
85  virtual void Reset();
86 
87  void Initialize();
88 
96  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2,
97  Int_t offset);
98 
99 
104  virtual void ConstructGeometry();
105 
106 
107 
108  private:
109 
112  Int_t fTrackID;
113  Int_t fVolumeID;
114  TLorentzVector fPos;
115  TLorentzVector fPosIn;
116  TLorentzVector fPosOut;
117  TLorentzVector fPosInLocal;
118  TLorentzVector fPosOutLocal;
119  TLorentzVector fMomIn;
120  TLorentzVector fMomOut;
126 
127  Int_t fPosIndex;
128  TClonesArray* fFtsCollection;
129  TLorentzVector fpostot; // global frame hit position (in)// da cancellare
130  TLorentzVector fpostotin; // global frame hit position (in)// da cancellare
131  TLorentzVector fpostotout; // global frame hit position (in)// da cancellare
132 
133  TObjArray *fPassNodes;
134  //geometry type
136  Int_t fGeoType;
137 
139 
144  PndFtsPoint* AddHit(Int_t trackID, Int_t detID, Int_t tubeID,Int_t chamberID, Int_t layerID,
145  TVector3 pos, TVector3 posInLocal, TVector3 posOutLocal,
146  TVector3 momIn, TVector3 momOut,
147  Double_t time, Double_t length, Double_t eLoss,
148  Double_t mass);
149 
150  std::string GetStringPart(std::string &aSrc, Int_t part, char aDelim);
151  bool Split(std::string &aDest, std::string &aSrc, char aDelim);
152 
157  void ResetParameters();
158 
165 
166  PndFts(const PndFts& L);
167  PndFts& operator= (const PndFts&) {return *this;}
168 
169  ClassDef(PndFts,1)
170 
171 };
172 
173 
174 inline void PndFts::ResetParameters() {
175  fTrackID = fVolumeID = 0;
176  fPos.SetXYZM(0.0, 0.0, 0.0, 0.0);
177  fPosInLocal.SetXYZM(0.0, 0.0, 0.0, 0.0);
178  fPosOutLocal.SetXYZM(0.0, 0.0, 0.0, 0.0);
179  fMomIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
180  fMomOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
181  fTime = fLength = fELoss = 0;
182  fPosIndex = 0;
183  fpostot.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
184  fpostotin.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
185  fpostotout.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
186  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
187  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
188  fMass = 0;
189  fIsInitialized = kFALSE;
190  valid = kFALSE;
191 }
192 
193 
194 #endif
195 
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition: PndFts.cxx:143
TVector3 pos
Bool_t valid
Definition: PndFts.h:135
TLorentzVector fpostot
Hit collection.
Definition: PndFts.h:129
virtual void ConstructGeometry()
Definition: PndFts.cxx:413
Int_t fVolumeID
track index
Definition: PndFts.h:113
void ResetParameters()
Definition: PndFts.h:174
TLorentzVector fPosOut
entry position in global frame
Definition: PndFts.h:116
bool Split(std::string &aDest, std::string &aSrc, char aDelim)
Definition: PndFts.cxx:102
Int_t fPosIndex
Definition: PndFts.h:127
TClonesArray * fFtsCollection
Definition: PndFts.h:128
PndFts & operator=(const PndFts &)
Definition: PndFts.h:167
TLorentzVector fPosInLocal
exit position in global frame
Definition: PndFts.h:117
virtual void EndOfEvent()
Definition: PndFts.cxx:318
TVector3 offset(2, 0, 0)
void Initialize()
Definition: PndFts.cxx:404
virtual ~PndFts()
Definition: PndFts.cxx:70
virtual void Print() const
Definition: PndFts.cxx:351
Bool_t fIsInitialized
particle mass
Definition: PndFts.h:125
TLorentzVector fPosIn
wire position in global frame
Definition: PndFts.h:115
Int_t fTrackID
Definition: PndFts.h:112
TLorentzVector fMomIn
exit position in straw frame
Definition: PndFts.h:119
float GetSquaredDistanceFromWire()
Definition: PndFts.cxx:82
Double_t fELoss
length
Definition: PndFts.h:123
PndFts()
Definition: PndFts.cxx:43
Double_t
TLorentzVector fpostotin
Definition: PndFts.h:130
TLorentzVector fpostotout
Definition: PndFts.h:131
Int_t fGeoType
Definition: PndFts.h:136
TObjArray * fPassNodes
Definition: PndFts.h:133
PndFtsMapCreator * fMapper
Definition: PndFts.h:138
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition: PndFts.cxx:377
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition: PndFts.cxx:339
TString name
std::string GetStringPart(std::string &aSrc, Int_t part, char aDelim)
Definition: PndFts.cxx:120
TLorentzVector fPosOutLocal
entry position in straw frame
Definition: PndFts.h:118
virtual void Reset()
Definition: PndFts.cxx:367
Double_t fLength
time
Definition: PndFts.h:122
Double_t fMass
energy loss
Definition: PndFts.h:124
Double_t fTime
momentum
Definition: PndFts.h:121
PndFtsPoint * AddHit(Int_t trackID, Int_t detID, Int_t tubeID, Int_t chamberID, Int_t layerID, TVector3 pos, TVector3 posInLocal, TVector3 posOutLocal, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t mass)
Definition: PndFts.cxx:469
virtual void Register()
Definition: PndFts.cxx:330
TLorentzVector fPos
volume id
Definition: PndFts.h:114
TLorentzVector fMomOut
momentum
Definition: PndFts.h:120
Definition: PndFts.h:25