CbmRoot
CbmStsMC.h
Go to the documentation of this file.
1 
8 #ifndef CBMSTSMC_H
9 #define CBMSTSMC_H
10 
11 
12 #include "CbmStsTrackStatus.h"
13 #include "FairDetector.h"
14 #include "FairRootManager.h"
15 #include "TClonesArray.h"
16 #include <map>
17 
18 class FairVolume;
19 class CbmStsPoint;
20 class CbmStsSetup;
21 class TGeoNode;
22 class TGeoCombiTrans;
23 
33 class CbmStsMC : public FairDetector {
34 public:
40  CbmStsMC(Bool_t active = kTRUE, const char* name = "STSMC");
41 
42 
44  virtual ~CbmStsMC();
45 
46 
55  virtual Bool_t CheckIfSensitive(std::string name) {
56  return (TString(name).Contains("Sensor") ? kTRUE : kFALSE);
57  }
58 
59 
66  virtual void ConstructGeometry();
67 
68 
74  virtual void EndOfEvent();
75 
76 
84  virtual void Initialize();
85 
86 
93  virtual TClonesArray* GetCollection(Int_t iColl) const {
94  return (iColl ? NULL : fStsPoints);
95  }
96 
97 
102  virtual void Print(Option_t* opt = "") const;
103 
104 
117  virtual Bool_t ProcessHits(FairVolume* vol = 0);
118 
119 
124  virtual void Register() {
125  FairRootManager::Instance()->Register(
126  "StsPoint", GetName(), fStsPoints, kTRUE);
127  }
128 
129 
141  void ProcessNeutrals(Bool_t choice = kTRUE) { fProcessNeutrals = choice; }
142 
143 
148  virtual void Reset();
149 
150  virtual void ConstructRootGeometry(TGeoMatrix* shift = NULL);
151 
152 private:
155  Double_t fEloss;
156  std::map<TString, Int_t>
158  TClonesArray* fStsPoints;
160  TGeoCombiTrans*
163 
169 
170 
175  void SetStatus(CbmStsTrackStatus& status);
176 
177 
180 
181 
184 
185 
187 };
188 
189 #endif /* CBMSTSMC_H */
CbmStsMC
Class for the MC transport of the CBM-STS.
Definition: CbmStsMC.h:33
CbmStsMC::ProcessHits
virtual Bool_t ProcessHits(FairVolume *vol=0)
Action for a track step in a sensitive node of the STS.
Definition: CbmStsMC.cxx:130
CbmStsMC::EndOfEvent
virtual void EndOfEvent()
Action at end of event.
Definition: CbmStsMC.cxx:71
CbmStsMC::fProcessNeutrals
Bool_t fProcessNeutrals
Transformation matrix for geometry positioning.
Definition: CbmStsMC.h:162
CbmStsMC::CreatePoint
CbmStsPoint * CreatePoint()
Create a new StsPoint Creates a new CbmStsPoint using the current track status information and adds i...
Definition: CbmStsMC.cxx:194
CbmStsMC::GetCollection
virtual TClonesArray * GetCollection(Int_t iColl) const
Get array of CbmStsPoints.
Definition: CbmStsMC.h:93
CbmStsMC::SetStatus
void SetStatus(CbmStsTrackStatus &status)
Set the current track status Set the current track status (in or out) with parameters obtained from T...
Definition: CbmStsMC.cxx:261
CbmStsMC::fSetup
CbmStsSetup * fSetup
Output array (CbmStsPoint)
Definition: CbmStsMC.h:159
CbmStsPoint
Definition: CbmStsPoint.h:27
CbmStsMC::ConstructGeometry
virtual void ConstructGeometry()
Construct the STS geometry in the TGeoManager.
Definition: CbmStsMC.cxx:56
CbmStsMC::fStsPoints
TClonesArray * fStsPoints
Definition: CbmStsMC.h:158
CbmStsMC::ProcessNeutrals
void ProcessNeutrals(Bool_t choice=kTRUE)
Create StsPoints also for neutral particles.
Definition: CbmStsMC.h:141
CbmStsMC::Reset
virtual void Reset()
Clear output array and reset current track status.
Definition: CbmStsMC.cxx:170
CbmStsTrackStatus
Stores status of track during transport. Auxiliary for CbmSts.
Definition: CbmStsTrackStatus.h:20
CbmStsTrackStatus.h
CbmStsMC::CbmStsMC
CbmStsMC(const CbmStsMC &)
CbmStsMC::Register
virtual void Register()
Register output array (StsPoint) to the I/O manager.
Definition: CbmStsMC.h:124
CbmStsMC::fAddressMap
std::map< TString, Int_t > fAddressMap
Accumulated energy loss for current track.
Definition: CbmStsMC.h:157
CbmStsMC::fEloss
Double_t fEloss
Track status at exit of sensor.
Definition: CbmStsMC.h:155
CbmStsMC::fCombiTrans
TGeoCombiTrans * fCombiTrans
Pointer to static instance of CbmStsSetup.
Definition: CbmStsMC.h:161
CbmStsSetup
Class representing the top level of the STS setup.
Definition: CbmStsSetup.h:39
CbmStsMC::CheckIfSensitive
virtual Bool_t CheckIfSensitive(std::string name)
Check whether a volume is sensitive.
Definition: CbmStsMC.h:55
CbmStsMC::CbmStsMC
CbmStsMC(Bool_t active=kTRUE, const char *name="STSMC")
Definition: CbmStsMC.cxx:31
CbmStsMC::operator=
CbmStsMC operator=(const CbmStsMC &)
CbmStsMC::ConstructRootGeometry
virtual void ConstructRootGeometry(TGeoMatrix *shift=NULL)
Definition: CbmStsMC.cxx:313
CbmStsMC::Initialize
virtual void Initialize()
Initialisation.
Definition: CbmStsMC.cxx:79
CbmStsMC::~CbmStsMC
virtual ~CbmStsMC()
Definition: CbmStsMC.cxx:45
CbmStsMC::Print
virtual void Print(Option_t *opt="") const
Screen log Prints current number of StsPoints in array. Virtual from TObject.
Definition: CbmStsMC.cxx:180
CbmStsMC::fStatusOut
CbmStsTrackStatus fStatusOut
Track status at entry of sensor.
Definition: CbmStsMC.h:154
CbmStsMC::ClassDef
ClassDef(CbmStsMC, 1)
CbmStsMC::fStatusIn
CbmStsTrackStatus fStatusIn
Definition: CbmStsMC.h:153