FairRoot/PandaRoot
PndStt.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndStt header file -----
3 // ----- Created 25/03/06 by R. Castelijns -----
4 // ----- Based on CbmTof -----
5 // -------------------------------------------------------------------------
6 
16 #ifndef PNDSTT_H
17 #define PNDSTT_H
18 
19 
20 #include "TClonesArray.h"
21 #include "TLorentzVector.h"
22 #include "TVector3.h"
23 #include "FairDetector.h"
24 #include "PndGeoSttPar.h"
25 #include "FairRun.h"
26 
27 #include <string>
28 #include <sstream>
29 
30 class TClonesArray;
31 class PndSttPoint;
32 class FairVolume;
33 
34 class PndStt : public FairDetector
35 {
36 
37  public:
38 
40  PndStt();
41 
42 
47  PndStt(const char* name, Bool_t active);
48 
49 
51  virtual ~PndStt();
52 
53  virtual void Initialize();
54 
62  virtual Bool_t ProcessHits(FairVolume* vol = 0);
63 
64 
70  virtual void EndOfEvent();
71 
72 
77  virtual void Register();
78 
79 
81  virtual TClonesArray* GetCollection(Int_t iColl) const;
82 
83 
88  virtual void Print() const;
89 
90 
95  virtual void Reset();
96 
97 
105  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2,
106  Int_t offset);
107 
108 
113  virtual void ConstructGeometry();
114  void SetDefaultSensorNames();
115 
116  protected:
117  std::vector<std::string> fListOfSensitives;
118  bool CheckIfSensitive(std::string name);
119 
120 
121 
122  private:
123 
126  Int_t fTrackID;
127  Int_t fVolumeID;
128  TVector3 fPosInLocal;
129  TVector3 fPosOutLocal;
130  TVector3 fMomIn;
131  TVector3 fMomOut;
137 
138  Int_t fPosIndex;
139  TClonesArray* fSttCollection;
140  TVector3 fpostot; // global frame hit position (in)// da cancellare
141  TVector3 fpostotin; // global frame hit position (in)// da cancellare
142  TVector3 fpostotout; // global frame hit position (in)// da cancellare
143 
144  TObjArray *fPassNodes;
145 
146  // geometry type
147  Int_t fGeoType;
148 
149  // flag to tell if a track entered the tube
151 
156  PndSttPoint* AddHit(Int_t trackID, Int_t detID, Int_t tubeID,
157  TVector3 pos, TVector3 posInLocal, TVector3 posOutLocal,
158  TVector3 momIn, TVector3 momOut,
159  Double_t time, Double_t length, Double_t eLoss,
160  Double_t mass);
161 
162  std::string GetStringPart(std::string &aSrc, Int_t part, char aDelim);
163  bool Split(std::string &aDest, std::string &aSrc, char aDelim);
164 
169  void ResetParameters();
170 
177 
178  PndStt(const PndStt& L);
179  PndStt& operator= (const PndStt&) {return *this;};
180 
181  ClassDef(PndStt,3)
182 
183 };
184 
185 
186 inline void PndStt::ResetParameters() {
187  fTrackID = fVolumeID = 0;
188  fPosInLocal.SetXYZ(0.0, 0.0, 0.0);
189  fPosOutLocal.SetXYZ(0.0, 0.0, 0.0);
190  fMomIn.SetXYZ(0.0, 0.0, 0.0);
191  fMomOut.SetXYZ(0.0, 0.0, 0.0);
192  fTime = fLength = fELoss = 0;
193  fPosIndex = 0;
194  fpostot.SetXYZ(0.0, 0.0, 0.0); // da cancellare
195  fpostotin.SetXYZ(0.0, 0.0, 0.0); // da cancellare
196  fpostotout.SetXYZ(0.0, 0.0, 0.0); // da cancellare
197  fMass = 0;
198 }
199 
200 
201 #endif
202 
TVector3 pos
virtual void Reset()
Definition: PndStt.cxx:307
virtual ~PndStt()
Definition: PndStt.cxx:74
virtual void Register()
Definition: PndStt.cxx:270
Int_t fPosIndex
Definition: PndStt.h:138
Int_t fGeoType
Definition: PndStt.h:147
PndStt & operator=(const PndStt &)
Definition: PndStt.h:179
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition: PndStt.cxx:317
virtual void Initialize()
Definition: PndStt.cxx:86
virtual void Print() const
Definition: PndStt.cxx:291
TObjArray * fPassNodes
Definition: PndStt.h:144
void SetDefaultSensorNames()
Definition: PndStt.cxx:448
Double_t fELoss
length
Definition: PndStt.h:134
TVector3 fMomOut
momentum
Definition: PndStt.h:131
TVector3 offset(2, 0, 0)
void ResetParameters()
Definition: PndStt.h:186
Int_t fVolumeID
track index
Definition: PndStt.h:127
std::vector< std::string > fListOfSensitives
Definition: PndStt.h:117
Double_t fMass
energy loss
Definition: PndStt.h:135
Int_t fTrackID
Definition: PndStt.h:126
PndSttPoint * AddHit(Int_t trackID, Int_t detID, Int_t tubeID, TVector3 pos, TVector3 posInLocal, TVector3 posOutLocal, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t mass)
Definition: PndStt.cxx:422
Double_t
TVector3 fpostot
Hit collection.
Definition: PndStt.h:140
virtual void EndOfEvent()
Definition: PndStt.cxx:258
bool Split(std::string &aDest, std::string &aSrc, char aDelim)
Definition: PndStt.cxx:118
float GetSquaredDistanceFromWire()
Definition: PndStt.cxx:98
Double_t fTime
momentum
Definition: PndStt.h:132
TVector3 fPosInLocal
volume id
Definition: PndStt.h:128
TString name
bool CheckIfSensitive(std::string name)
Definition: PndStt.cxx:440
TVector3 fpostotout
Definition: PndStt.h:142
TClonesArray * fSttCollection
Definition: PndStt.h:139
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition: PndStt.cxx:159
virtual void ConstructGeometry()
Definition: PndStt.cxx:347
Bool_t fIsInitialized
particle mass
Definition: PndStt.h:136
TVector3 fpostotin
Definition: PndStt.h:141
PndStt()
Definition: PndStt.cxx:46
Definition: PndStt.h:34
Bool_t fInFlag
Definition: PndStt.h:150
Double_t fLength
time
Definition: PndStt.h:133
std::string GetStringPart(std::string &aSrc, Int_t part, char aDelim)
Definition: PndStt.cxx:136
TVector3 fMomIn
exit position in straw frame
Definition: PndStt.h:130
TVector3 fPosOutLocal
entry position in straw frame
Definition: PndStt.h:129
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition: PndStt.cxx:279