FairRoot/PandaRoot
PndFts2.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndFts header file -----
3 // -------------------------------------------------------------------------
4 
5 
6 #ifndef PNDFTS2_H
7 #define PNDFTS2_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 
18 #include <string>
19 #include <sstream>
20 
21 class TClonesArray;
22 class FairVolume;
23 
24 class PndFts2 : public FairDetector
25 {
26 
27  public:
28 
30  PndFts2();
31 
32 
37  PndFts2(const char* name, Bool_t active);
38 
39 
41  virtual ~PndFts2();
42 
43 
51  virtual Bool_t ProcessHits(FairVolume* vol = 0);
52 
53 
59  virtual void EndOfEvent();
60 
61 
66  virtual void Register();
67 
68 
70  virtual TClonesArray* GetCollection(Int_t iColl) const;
71 
72 
77  virtual void Print() const;
78 
79 
84  virtual void Reset();
85 
86  void Initialize();
87 
95  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2,
96  Int_t offset);
97 
98 
103  virtual void ConstructGeometry();
104 
105 
106 
107  private:
108 
111  Int_t fTrackID;
112  Int_t fVolumeID;
113  TLorentzVector fPos;
114  TLorentzVector fPosIn;
115  TLorentzVector fPosOut;
116  TLorentzVector fPosInLocal;
117  TLorentzVector fPosOutLocal;
118  TLorentzVector fMomIn;
119  TLorentzVector fMomOut;
125 
126  Int_t fPosIndex;
127  TClonesArray* fFtsCollection;
128  TLorentzVector fpostot; // global frame hit position (in)// da cancellare
129  TLorentzVector fpostotin; // global frame hit position (in)// da cancellare
130  TLorentzVector fpostotout; // global frame hit position (in)// da cancellare
131 
132  TObjArray *fPassNodes;
133  //geometry type
135  Int_t fGeoType;
136 
137 
138 
143  PndFtsPoint* AddHit(Int_t trackID, Int_t detID, Int_t tubeID,Int_t chamberID, Int_t layerID,
144  TVector3 pos, TVector3 posInLocal, TVector3 posOutLocal,
145  TVector3 momIn, TVector3 momOut,
146  Double_t time, Double_t length, Double_t eLoss,
147  Double_t mass);
148 
149  std::string GetStringPart(std::string &aSrc, Int_t part, char aDelim);
150  bool Split(std::string &aDest, std::string &aSrc, char aDelim);
151 
156  void ResetParameters();
157 
164 
165  PndFts2(const PndFts2& L);
166  PndFts2& operator= (const PndFts2&) {return *this;}
167 
168  ClassDef(PndFts2,1)
169 
170 };
171 
172 
174  fTrackID = fVolumeID = 0;
175  fPos.SetXYZM(0.0, 0.0, 0.0, 0.0);
176  fPosInLocal.SetXYZM(0.0, 0.0, 0.0, 0.0);
177  fPosOutLocal.SetXYZM(0.0, 0.0, 0.0, 0.0);
178  fMomIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
179  fMomOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
180  fTime = fLength = fELoss = 0;
181  fPosIndex = 0;
182  fpostot.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
183  fpostotin.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
184  fpostotout.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
185  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
186  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
187  fMass = 0;
188  fIsInitialized = kFALSE;
189  valid = kFALSE;
190 }
191 
192 
193 #endif
194 
Bool_t fIsInitialized
particle mass
Definition: PndFts2.h:124
TVector3 pos
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition: PndFts2.cxx:378
TLorentzVector fMomOut
momentum
Definition: PndFts2.h:119
Double_t fTime
momentum
Definition: PndFts2.h:120
Bool_t valid
Definition: PndFts2.h:134
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: PndFts2.cxx:468
PndFts2 & operator=(const PndFts2 &)
Definition: PndFts2.h:166
TLorentzVector fpostot
Hit collection.
Definition: PndFts2.h:128
TObjArray * fPassNodes
Definition: PndFts2.h:132
Double_t fMass
energy loss
Definition: PndFts2.h:123
TVector3 offset(2, 0, 0)
TLorentzVector fpostotout
Definition: PndFts2.h:130
float GetSquaredDistanceFromWire()
Definition: PndFts2.cxx:82
bool Split(std::string &aDest, std::string &aSrc, char aDelim)
Definition: PndFts2.cxx:102
Double_t fLength
time
Definition: PndFts2.h:121
PndFts2()
Definition: PndFts2.cxx:43
Double_t fELoss
length
Definition: PndFts2.h:122
Int_t fPosIndex
Definition: PndFts2.h:126
TClonesArray * fFtsCollection
Definition: PndFts2.h:127
virtual void Reset()
Definition: PndFts2.cxx:368
Double_t
TLorentzVector fPosIn
wire position in global frame
Definition: PndFts2.h:114
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition: PndFts2.cxx:143
void Initialize()
Definition: PndFts2.cxx:405
TLorentzVector fpostotin
Definition: PndFts2.h:129
void ResetParameters()
Definition: PndFts2.h:173
virtual void Print() const
Definition: PndFts2.cxx:352
TString name
Int_t fTrackID
Definition: PndFts2.h:111
TLorentzVector fPosOutLocal
entry position in straw frame
Definition: PndFts2.h:117
TLorentzVector fPosInLocal
exit position in global frame
Definition: PndFts2.h:116
TLorentzVector fPos
volume id
Definition: PndFts2.h:113
TLorentzVector fPosOut
entry position in global frame
Definition: PndFts2.h:115
TLorentzVector fMomIn
exit position in straw frame
Definition: PndFts2.h:118
virtual void Register()
Definition: PndFts2.cxx:331
virtual ~PndFts2()
Definition: PndFts2.cxx:70
Int_t fGeoType
Definition: PndFts2.h:135
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition: PndFts2.cxx:340
Int_t fVolumeID
track index
Definition: PndFts2.h:112
virtual void ConstructGeometry()
Definition: PndFts2.cxx:414
std::string GetStringPart(std::string &aSrc, Int_t part, char aDelim)
Definition: PndFts2.cxx:120
virtual void EndOfEvent()
Definition: PndFts2.cxx:319