PandaRoot
PndSciT.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // ----- PndSciT header file -----
3 // ----- created by A. Sanchez -----
4 // ----- modified by D. Steinschaden -----
5 // ----- last update 06.2015 -----
6 // --------------------------------------------------------------------------
7 
8 #ifndef PNDSCIT_H
9 #define PNDSCIT_H
10 
11 #include "PndGeoSciTPar.h"
12 #include "PndGeoHandling.h"
13 
14 #include "FairDetector.h"
15 
16 //#include "TClonesArray.h"
17 #include "TVector3.h"
18 #include "TLorentzVector.h"
19 
20 #include <string>
21 #include <vector>
22 
23 class TClonesArray;
24 class PndSciTPoint;
25 class FairVolume;
26 
27 class PndSciT : public FairDetector {
28 
29  public:
31  PndSciT();
32 
37  PndSciT(const char *name, Bool_t active);
38 
40  virtual ~PndSciT();
41 
45  virtual void Initialize();
46 
54  virtual Bool_t ProcessHits(FairVolume *vol = 0);
55 
61  virtual void EndOfEvent();
62 
63  virtual void BeginEvent();
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 
97  virtual void ConstructGeometry();
98 
99  // void ConstructASCIIGeometry();
100 
101  void SetThreshold(Double_t val) { fThreshold = val; }; // default value is 0.0001 GeV
102 
103  PndSciTPoint *AddHit(Int_t eventID, Int_t trackID, Int_t sensorID, TString detName, TVector3 posin, TVector3 momin, TVector3 posout, TVector3 momout, Double_t tof,
104  Double_t length, Double_t eLoss);
105 
106  private:
107  std::vector<std::string> fListOfSensitives;
108  bool CheckIfSensitive(std::string name);
109 
110  Int_t fEventID; // event id
111  Int_t fTrackID; // track index
112  Int_t fSensorID; // used as volume ID/ detector ID coming from PndGeoHandling
113  TString fdetPath;
114 
115  TLorentzVector fPosIn; // position
116  TLorentzVector fMomIn; // momentum
117  TLorentzVector fPosOut; // position
118  TLorentzVector fMomOut; // momentum
119 
120  Double32_t fTime; // time
121  Double32_t fLength; // length
122  Double_t fELoss; // energy loss
123  Double_t fThreshold; // energy loss threshold
124 
125  PndGeoHandling *fGeoH;
126  PndGeoSciTPar *par;
127  Int_t fPosIndex; // Used when Copying the TCloneArrays
128  TClonesArray *fSciTCollection; // Hit collection
129 
130  // reset all parameters
131  void ResetParameters();
132 
133  ClassDef(PndSciT, 4)
134 };
135 
136 inline void PndSciT::ResetParameters()
137 {
138  fTrackID = fSensorID = fEventID = -1;
139  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
140  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
141  fMomIn.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
142  fMomOut.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
143 
144  fTime = fLength = fELoss = 0;
145 };
146 
147 #endif
void SetThreshold(Double_t val)
Definition: PndSciT.h:101
virtual void Initialize()
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
virtual void Reset()
virtual TClonesArray * GetCollection(Int_t iColl) const
virtual void Register()
Class to access the naming information of the MVD.
virtual void Print() const
virtual void BeginEvent()
virtual void ConstructGeometry()
virtual void EndOfEvent()
virtual ~PndSciT()
virtual Bool_t ProcessHits(FairVolume *vol=0)
PndSciTPoint * AddHit(Int_t eventID, Int_t trackID, Int_t sensorID, TString detName, TVector3 posin, TVector3 momin, TVector3 posout, TVector3 momout, Double_t tof, Double_t length, Double_t eLoss)