PandaRoot
PndFts.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndFts header file -----
3 // -------------------------------------------------------------------------
4 
5 #ifndef PNDFTS_H
6 #define PNDFTS_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 #include "PndFtsMapCreator.h"
16 
17 #include <string>
18 #include <sstream>
19 
20 class TClonesArray;
21 class FairVolume;
22 
23 class PndFts : public FairDetector {
24 
25  public:
27  PndFts();
28 
33  PndFts(const char *name, Bool_t active);
34 
36  virtual ~PndFts();
37 
45  virtual Bool_t ProcessHits(FairVolume *vol = 0);
46 
52  virtual void EndOfEvent();
53 
58  virtual void Register();
59 
61  virtual TClonesArray *GetCollection(Int_t iColl) const;
62 
67  virtual void Print() const;
68 
73  virtual void Reset();
74 
75  void Initialize();
76 
84  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
85 
90  virtual void ConstructGeometry();
91 
92  private:
95  Int_t fTrackID;
96  Int_t fVolumeID;
97  TLorentzVector fPos;
98  TLorentzVector fPosIn;
99  TLorentzVector fPosOut;
100  TLorentzVector fPosInLocal;
101  TLorentzVector fPosOutLocal;
102  TLorentzVector fMomIn;
103  TLorentzVector fMomOut;
104  Double_t fTime;
105  Double_t fLength;
106  Double_t fELoss;
107  Double_t fMass;
108  Bool_t fIsInitialized;
109 
110  Int_t fPosIndex;
111  TClonesArray *fFtsCollection;
112  TLorentzVector fpostot; // global frame hit position (in)// da cancellare
113  TLorentzVector fpostotin; // global frame hit position (in)// da cancellare
114  TLorentzVector fpostotout; // global frame hit position (in)// da cancellare
115 
116  TObjArray *fPassNodes;
117  // geometry type
118  Bool_t valid;
119  Int_t fGeoType;
120 
121  PndFtsMapCreator *fMapper;
122 
127  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,
128  TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t mass);
129 
130  std::string GetStringPart(std::string &aSrc, Int_t part, char aDelim);
131  bool Split(std::string &aDest, std::string &aSrc, char aDelim);
132 
137  void ResetParameters();
138 
144  float GetSquaredDistanceFromWire();
145 
146  PndFts(const PndFts &L);
147  PndFts &operator=(const PndFts &) { return *this; }
148 
149  ClassDef(PndFts, 1)
150 };
151 
152 inline void PndFts::ResetParameters()
153 {
154  fTrackID = fVolumeID = 0;
155  fPos.SetXYZM(0.0, 0.0, 0.0, 0.0);
156  fPosInLocal.SetXYZM(0.0, 0.0, 0.0, 0.0);
157  fPosOutLocal.SetXYZM(0.0, 0.0, 0.0, 0.0);
158  fMomIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
159  fMomOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
160  fTime = fLength = fELoss = 0;
161  fPosIndex = 0;
162  fpostot.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
163  fpostotin.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
164  fpostotout.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
165  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
166  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
167  fMass = 0;
168  fIsInitialized = kFALSE;
169  valid = kFALSE;
170 }
171 
172 #endif
virtual void EndOfEvent()
virtual void Print() const
virtual void Register()
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
void Initialize()
virtual void Reset()
virtual Bool_t ProcessHits(FairVolume *vol=0)
virtual void ConstructGeometry()
virtual ~PndFts()
Definition: PndFts.h:23
virtual TClonesArray * GetCollection(Int_t iColl) const