CbmRoot
Loading...
Searching...
No Matches
CbmTrd.h
Go to the documentation of this file.
1/* Copyright (C) 2004-2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese, Andrey Lebedev, Denis Bertini [committer], Florian Uhlig */
4
12#ifndef CBMTRD_H_
13#define CBMTRD_H_
14
15#include "FairDetector.h"
16
17#include "TLorentzVector.h"
18#include "TVector3.h"
19
20#include <string>
21
22class CbmTrdPoint;
24class FairVolume;
25class TClonesArray;
26class TGeoCombiTrans;
27
34class CbmTrd : public FairDetector {
35public:
39 CbmTrd();
40
46 CbmTrd(const char* name, Bool_t active);
47
48 CbmTrd(const CbmTrd&) = delete;
49 CbmTrd operator=(const CbmTrd&) = delete;
50
54 virtual ~CbmTrd();
55
61 virtual Bool_t ProcessHits(FairVolume* vol = NULL);
62
66 virtual void EndOfEvent();
67
71 virtual void Register();
72
76 virtual TClonesArray* GetCollection(Int_t iColl) const;
77
81 virtual void Print(Option_t* = "") const;
82
86 virtual void Reset();
87
94 virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset);
95
99 virtual void ConstructGeometry();
100
101 Bool_t CheckIfSensitive(std::string name);
102 virtual Bool_t IsSensitive(const std::string& name);
103
105
106 void SetTransformationMatrix(TGeoMatrix* mat) { fCombiTrans = mat; }
107
108private:
111 TLorentzVector fPosIn;
112 TLorentzVector fMomIn;
113 TLorentzVector fPosOut;
114 TLorentzVector fMomOut;
115 Double32_t fTime;
116 Double32_t fLength;
117 Double32_t fELoss;
118 Int_t fPosIndex;
119
120 TClonesArray* fTrdPoints;
122
124
125 TGeoMatrix* fCombiTrans;
126
130 void ResetParameters();
131 virtual void Initialize();
132 virtual void SetSpecialPhysicsCuts();
133
134 virtual void ConstructRootGeometry(TGeoMatrix* shift = NULL);
135
136
138};
139
140
142{
143 fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
144 fMomIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
145 fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
146 fMomOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
147 fTime = fLength = fELoss = 0;
148 fPosIndex = 0;
149}
150
151#endif
Defines the active detector TRD. Constructs the geometry and registers MCPoints.
Definition CbmTrd.h:34
Bool_t CheckIfSensitive(std::string name)
Definition CbmTrd.cxx:335
TGeoMatrix * fCombiTrans
weather to follow the global switch for physics cuts for the TRDgas
Definition CbmTrd.h:125
CbmTrd operator=(const CbmTrd &)=delete
virtual void EndOfEvent()
If verbosity level is set, print hit collection at the end of the event and resets it afterwards.
Definition CbmTrd.cxx:233
Double32_t fLength
time
Definition CbmTrd.h:116
virtual void Print(Option_t *="") const
Screen output of hit collection.
Definition CbmTrd.cxx:258
TLorentzVector fMomIn
position at entrance
Definition CbmTrd.h:112
CbmTrdGeoHandler * fGeoHandler
MC point collection.
Definition CbmTrd.h:121
virtual Bool_t IsSensitive(const std::string &name)
Definition CbmTrd.cxx:324
Bool_t fUseGlobalPhysicsProcesses
Interface to gMC and gGeoManager.
Definition CbmTrd.h:123
virtual void ConstructGeometry()
Constructs the TRD geometry.
Definition CbmTrd.cxx:300
void SetTransformationMatrix(TGeoMatrix *mat)
Definition CbmTrd.h:106
virtual void Reset()
Clears the hit collection.
Definition CbmTrd.cxx:273
virtual ~CbmTrd()
Destructor.
Definition CbmTrd.cxx:80
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Copies the hit collection with a given track index offset.
Definition CbmTrd.cxx:282
CbmTrd()
Default constructor.
Definition CbmTrd.cxx:38
ClassDef(CbmTrd, 10)
Double32_t fELoss
length
Definition CbmTrd.h:117
void ResetParameters()
Transformation matrix for geometry positioning.
Definition CbmTrd.h:141
virtual void ConstructRootGeometry(TGeoMatrix *shift=NULL)
Definition CbmTrd.cxx:311
TLorentzVector fMomOut
position at exit
Definition CbmTrd.h:114
virtual TClonesArray * GetCollection(Int_t iColl) const
Accessor to the hit collection.
Definition CbmTrd.cxx:248
CbmTrd(const CbmTrd &)=delete
virtual void SetSpecialPhysicsCuts()
Definition CbmTrd.cxx:105
virtual void Register()
Registers the hit collection in the ROOT manager.
Definition CbmTrd.cxx:243
TClonesArray * fTrdPoints
position index
Definition CbmTrd.h:120
Double32_t fTime
momentum at exit
Definition CbmTrd.h:115
virtual void Initialize()
Definition CbmTrd.cxx:92
Int_t fPosIndex
energy loss
Definition CbmTrd.h:118
TLorentzVector fPosOut
momentum at entrance
Definition CbmTrd.h:113
void UseGlobalPhysicsProcesses(Bool_t use)
Definition CbmTrd.h:104
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:189
TLorentzVector fPosIn
Definition CbmTrd.h:111