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 
14 #ifndef PNDSTT_H
15 #define PNDSTT_H
16 
17 #include "TClonesArray.h"
18 #include "TLorentzVector.h"
19 #include "TVector3.h"
20 #include "FairDetector.h"
21 #include "PndGeoSttPar.h"
22 #include "FairRun.h"
23 
24 #include <string>
25 #include <sstream>
26 
27 class TClonesArray;
28 class PndSttPoint;
29 class FairVolume;
30 
31 class PndStt : public FairDetector {
32 
33  public:
35  PndStt();
36 
41  PndStt(const char *name, Bool_t active);
42 
44  virtual ~PndStt();
45 
46  virtual void Initialize();
47 
55  virtual Bool_t ProcessHits(FairVolume *vol = 0);
56 
62  virtual void EndOfEvent();
63 
68  virtual void Register();
69 
71  virtual TClonesArray *GetCollection(Int_t iColl) const;
72 
77  virtual void Print() const;
78 
83  virtual void Reset();
84 
92  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
93 
98  virtual void ConstructGeometry();
99  void SetDefaultSensorNames();
100 
101  protected:
102  std::vector<std::string> fListOfSensitives;
103  bool CheckIfSensitive(std::string name);
104 
105  private:
108  Int_t fTrackID;
109  Int_t fVolumeID;
110  TVector3 fPosInLocal;
111  TVector3 fPosOutLocal;
112  TVector3 fMomIn;
113  TVector3 fMomOut;
114  Double_t fTime;
115  Double_t fLength;
116  Double_t fELoss;
117  Double_t fMass;
118  Bool_t fIsInitialized;
119 
120  Int_t fPosIndex;
121  TClonesArray *fSttCollection;
122  TVector3 fpostot; // global frame hit position (in)// da cancellare
123  TVector3 fpostotin; // global frame hit position (in)// da cancellare
124  TVector3 fpostotout; // global frame hit position (in)// da cancellare
125 
126  TObjArray *fPassNodes;
127 
128  // geometry type
129  Int_t fGeoType;
130 
131  // flag to tell if a track entered the tube
132  Bool_t fInFlag;
133 
138  PndSttPoint *AddHit(Int_t trackID, Int_t detID, Int_t tubeID, TVector3 pos, TVector3 posInLocal, TVector3 posOutLocal, TVector3 momIn, TVector3 momOut, Double_t time,
139  Double_t length, Double_t eLoss, Double_t mass);
140 
141  std::string GetStringPart(std::string &aSrc, Int_t part, char aDelim);
142  bool Split(std::string &aDest, std::string &aSrc, char aDelim);
143 
148  void ResetParameters();
149 
155  float GetSquaredDistanceFromWire();
156 
157  PndStt(const PndStt &L);
158  PndStt &operator=(const PndStt &) { return *this; };
159 
160  ClassDef(PndStt, 3)
161 };
162 
163 inline void PndStt::ResetParameters()
164 {
165  fTrackID = fVolumeID = 0;
166  fPosInLocal.SetXYZ(0.0, 0.0, 0.0);
167  fPosOutLocal.SetXYZ(0.0, 0.0, 0.0);
168  fMomIn.SetXYZ(0.0, 0.0, 0.0);
169  fMomOut.SetXYZ(0.0, 0.0, 0.0);
170  fTime = fLength = fELoss = 0;
171  fPosIndex = 0;
172  fpostot.SetXYZ(0.0, 0.0, 0.0); // da cancellare
173  fpostotin.SetXYZ(0.0, 0.0, 0.0); // da cancellare
174  fpostotout.SetXYZ(0.0, 0.0, 0.0); // da cancellare
175  fMass = 0;
176 }
177 
178 #endif
virtual TClonesArray * GetCollection(Int_t iColl) const
virtual void Reset()
virtual void EndOfEvent()
void SetDefaultSensorNames()
virtual void Register()
std::vector< std::string > fListOfSensitives
Definition: PndStt.h:102
virtual void Print() const
virtual ~PndStt()
bool CheckIfSensitive(std::string name)
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition: PndStt.h:31
virtual Bool_t ProcessHits(FairVolume *vol=0)
virtual void ConstructGeometry()
virtual void Initialize()