CbmRoot
CbmTrd.h
Go to the documentation of this file.
1 
8 #ifndef CBMTRD_H_
9 #define CBMTRD_H_
10 
11 #include "FairDetector.h"
12 #include "TLorentzVector.h"
13 #include "TVector3.h"
14 #include <string>
15 
16 class CbmTrdPoint;
17 class CbmTrdGeoHandler;
18 class FairVolume;
19 class TClonesArray;
20 class TGeoCombiTrans;
21 
28 class CbmTrd : public FairDetector {
29 public:
33  CbmTrd();
34 
40  CbmTrd(const char* name, Bool_t active);
41 
42  CbmTrd(const CbmTrd&) = delete;
43  CbmTrd operator=(const CbmTrd&) = delete;
44 
48  virtual ~CbmTrd();
49 
55  virtual Bool_t ProcessHits(FairVolume* vol = NULL);
56 
60  virtual void EndOfEvent();
61 
65  virtual void Register();
66 
70  virtual TClonesArray* GetCollection(Int_t iColl) const;
71 
75  virtual void Print(Option_t* = "") const;
76 
80  virtual void Reset();
81 
88  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset);
89 
93  virtual void ConstructGeometry();
94 
95  Bool_t CheckIfSensitive(std::string name);
96 
97  void UseGlobalPhysicsProcesses(Bool_t use) {
99  }
100 
101  void SetTransformationMatrix(TGeoMatrix* mat) { fCombiTrans = mat; }
102 
103 private:
106  TLorentzVector fPosIn;
107  TLorentzVector fMomIn;
108  TLorentzVector fPosOut;
109  TLorentzVector fMomOut;
110  Double32_t fTime;
111  Double32_t fLength;
112  Double32_t fELoss;
113  Int_t fPosIndex;
114 
115  TClonesArray* fTrdPoints;
117 
118  Bool_t
120 
121  TGeoMatrix* fCombiTrans;
122 
126  void ResetParameters();
127  virtual void Initialize();
128  virtual void SetSpecialPhysicsCuts();
129 
130  virtual void ConstructRootGeometry(TGeoMatrix* shift = NULL);
131 
132 
134 };
135 
136 
137 inline void CbmTrd::ResetParameters() {
138  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
139  fMomIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
140  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
141  fMomOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
142  fTime = fLength = fELoss = 0;
143  fPosIndex = 0;
144 }
145 
146 #endif
CbmTrd::SetTransformationMatrix
void SetTransformationMatrix(TGeoMatrix *mat)
Definition: CbmTrd.h:101
CbmTrd::EndOfEvent
virtual void EndOfEvent()
If verbosity level is set, print hit collection at the end of the event and resets it afterwards.
Definition: CbmTrd.cxx:227
CbmTrd::CbmTrd
CbmTrd(const CbmTrd &)=delete
CbmTrd::fCombiTrans
TGeoMatrix * fCombiTrans
weather to follow the global switch for physics cuts for the TRDgas
Definition: CbmTrd.h:121
CbmTrd::ResetParameters
void ResetParameters()
Transformation matrix for geometry positioning.
Definition: CbmTrd.h:137
CbmTrd::fMomOut
TLorentzVector fMomOut
position at exit
Definition: CbmTrd.h:109
CbmTrd::operator=
CbmTrd operator=(const CbmTrd &)=delete
CbmTrd::CopyClones
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Copies the hit collection with a given track index offset.
Definition: CbmTrd.cxx:275
CbmTrd::CbmTrd
CbmTrd()
Default constructor.
Definition: CbmTrd.cxx:34
CbmTrd::~CbmTrd
virtual ~CbmTrd()
Destructor.
Definition: CbmTrd.cxx:74
CbmTrd::ConstructGeometry
virtual void ConstructGeometry()
Constructs the TRD geometry.
Definition: CbmTrd.cxx:292
CbmTrd::fTime
Double32_t fTime
momentum at exit
Definition: CbmTrd.h:110
CbmTrdGeoHandler
Definition: CbmTrdGeoHandler.h:29
CbmTrd
Defines the active detector TRD. Constructs the geometry and registers MCPoints.
Definition: CbmTrd.h:28
CbmTrd::fUseGlobalPhysicsProcesses
Bool_t fUseGlobalPhysicsProcesses
Interface to gMC and gGeoManager.
Definition: CbmTrd.h:119
CbmTrd::fPosIndex
Int_t fPosIndex
energy loss
Definition: CbmTrd.h:113
CbmTrd::fPosIn
TLorentzVector fPosIn
Definition: CbmTrd.h:106
CbmTrd::Reset
virtual void Reset()
Clears the hit collection.
Definition: CbmTrd.cxx:267
CbmTrd::ConstructRootGeometry
virtual void ConstructRootGeometry(TGeoMatrix *shift=NULL)
Definition: CbmTrd.cxx:304
CbmTrd::fMomIn
TLorentzVector fMomIn
position at entrance
Definition: CbmTrd.h:107
CbmTrd::ProcessHits
virtual Bool_t ProcessHits(FairVolume *vol=NULL)
Defines the action to be taken when a step is inside the active volume. Creates CbmTrdPoints and adds...
Definition: CbmTrd.cxx:177
CbmTrd::fGeoHandler
CbmTrdGeoHandler * fGeoHandler
MC point collection.
Definition: CbmTrd.h:116
CbmTrd::CheckIfSensitive
Bool_t CheckIfSensitive(std::string name)
Definition: CbmTrd.cxx:315
CbmTrd::Initialize
virtual void Initialize()
Definition: CbmTrd.cxx:85
CbmTrd::UseGlobalPhysicsProcesses
void UseGlobalPhysicsProcesses(Bool_t use)
Definition: CbmTrd.h:97
CbmTrd::fLength
Double32_t fLength
time
Definition: CbmTrd.h:111
CbmTrdPoint
Definition: CbmTrdPoint.h:23
CbmTrd::ClassDef
ClassDef(CbmTrd, 10)
CbmTrd::GetCollection
virtual TClonesArray * GetCollection(Int_t iColl) const
Accessor to the hit collection.
Definition: CbmTrd.cxx:243
CbmTrd::fELoss
Double32_t fELoss
length
Definition: CbmTrd.h:112
CbmTrd::Register
virtual void Register()
Registers the hit collection in the ROOT manager.
Definition: CbmTrd.cxx:236
CbmTrd::fTrdPoints
TClonesArray * fTrdPoints
position index
Definition: CbmTrd.h:115
CbmTrd::SetSpecialPhysicsCuts
virtual void SetSpecialPhysicsCuts()
Definition: CbmTrd.cxx:97
CbmTrd::Print
virtual void Print(Option_t *="") const
Screen output of hit collection.
Definition: CbmTrd.cxx:253
CbmTrd::fPosOut
TLorentzVector fPosOut
momentum at entrance
Definition: CbmTrd.h:108