PandaRoot
PndFts2.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndFts header file -----
3 // -------------------------------------------------------------------------
4 
5 #ifndef PNDFTS2_H
6 #define PNDFTS2_H
7 
8 #include "TClonesArray.h"
9 #include "TLorentzVector.h"
10 #include "TVector3.h"
11 #include "FairDetector.h"
12 #include "PndGeoFtsPar.h"
13 #include "FairRun.h"
14 #include "PndFtsPoint.h"
15 
16 #include <string>
17 #include <sstream>
18 
19 class TClonesArray;
20 class FairVolume;
21 
22 class PndFts2 : public FairDetector {
23 
24  public:
26  PndFts2();
27 
32  PndFts2(const char *name, Bool_t active);
33 
35  virtual ~PndFts2();
36 
44  virtual Bool_t ProcessHits(FairVolume *vol = 0);
45 
51  virtual void EndOfEvent();
52 
57  virtual void Register();
58 
60  virtual TClonesArray *GetCollection(Int_t iColl) const;
61 
66  virtual void Print() const;
67 
72  virtual void Reset();
73 
74  void Initialize();
75 
83  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
84 
89  virtual void ConstructGeometry();
90 
91  private:
94  Int_t fTrackID;
95  Int_t fVolumeID;
96  TLorentzVector fPos;
97  TLorentzVector fPosIn;
98  TLorentzVector fPosOut;
99  TLorentzVector fPosInLocal;
100  TLorentzVector fPosOutLocal;
101  TLorentzVector fMomIn;
102  TLorentzVector fMomOut;
103  Double_t fTime;
104  Double_t fLength;
105  Double_t fELoss;
106  Double_t fMass;
107  Bool_t fIsInitialized;
108 
109  Int_t fPosIndex;
110  TClonesArray *fFtsCollection;
111  TLorentzVector fpostot; // global frame hit position (in)// da cancellare
112  TLorentzVector fpostotin; // global frame hit position (in)// da cancellare
113  TLorentzVector fpostotout; // global frame hit position (in)// da cancellare
114 
115  TObjArray *fPassNodes;
116  // geometry type
117  Bool_t valid;
118  Int_t fGeoType;
119 
124  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,
125  TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t mass);
126 
127  std::string GetStringPart(std::string &aSrc, Int_t part, char aDelim);
128  bool Split(std::string &aDest, std::string &aSrc, char aDelim);
129 
134  void ResetParameters();
135 
141  float GetSquaredDistanceFromWire();
142 
143  PndFts2(const PndFts2 &L);
144  PndFts2 &operator=(const PndFts2 &) { return *this; }
145 
146  ClassDef(PndFts2, 1)
147 };
148 
149 inline void PndFts2::ResetParameters()
150 {
151  fTrackID = fVolumeID = 0;
152  fPos.SetXYZM(0.0, 0.0, 0.0, 0.0);
153  fPosInLocal.SetXYZM(0.0, 0.0, 0.0, 0.0);
154  fPosOutLocal.SetXYZM(0.0, 0.0, 0.0, 0.0);
155  fMomIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
156  fMomOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
157  fTime = fLength = fELoss = 0;
158  fPosIndex = 0;
159  fpostot.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
160  fpostotin.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
161  fpostotout.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
162  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
163  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
164  fMass = 0;
165  fIsInitialized = kFALSE;
166  valid = kFALSE;
167 }
168 
169 #endif
virtual void Reset()
virtual ~PndFts2()
virtual void EndOfEvent()
virtual void Print() const
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
virtual void Register()
void Initialize()
virtual void ConstructGeometry()
virtual TClonesArray * GetCollection(Int_t iColl) const
virtual Bool_t ProcessHits(FairVolume *vol=0)