CbmRoot
Loading...
Searching...
No Matches
CbmStsMC.h
Go to the documentation of this file.
1/* Copyright (C) 2006-2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese, Denis Bertini [committer] */
4
12#ifndef CBMSTSMC_H
13#define CBMSTSMC_H
14
15
16#include "CbmStsTrackStatus.h"
17
18#include "FairDetector.h"
19#include "FairRootManager.h"
20
21#include "TClonesArray.h"
22
23#include <map>
24
25class FairVolume;
26class CbmStsPoint;
27class CbmStsSetup;
28class TGeoNode;
29class TGeoCombiTrans;
30
40class CbmStsMC : public FairDetector {
41public:
47 CbmStsMC(Bool_t active = kTRUE, const char* name = "STSMC");
48
49
51 virtual ~CbmStsMC();
52
53
62 virtual Bool_t IsSensitive(const std::string& name) { return (TString(name).Contains("Sensor") ? kTRUE : kFALSE); }
63 virtual Bool_t CheckIfSensitive(std::string name) { return IsSensitive(name); }
64
65
72 virtual void ConstructGeometry();
73
74
80 virtual void EndOfEvent();
81
82
90 virtual void Initialize();
91
92
99 virtual TClonesArray* GetCollection(Int_t iColl) const { return (iColl ? NULL : fStsPoints); }
100
101
106 virtual void Print(Option_t* opt = "") const;
107
108
121 virtual Bool_t ProcessHits(FairVolume* vol = 0);
122
123
128 virtual void Register() { FairRootManager::Instance()->Register("StsPoint", GetName(), fStsPoints, kTRUE); }
129
130
142 void ProcessNeutrals(Bool_t choice = kTRUE) { fProcessNeutrals = choice; }
143
144
149 virtual void Reset();
150
151 virtual void ConstructRootGeometry(TGeoMatrix* shift = NULL);
152
153private:
156 Double_t fEloss;
157 std::map<TString, Int_t> fAddressMap;
158 TClonesArray* fStsPoints;
160 TGeoCombiTrans* fCombiTrans;
162
168
169
174 void SetStatus(CbmStsTrackStatus& status);
175
176
179
180
183
184
186};
187
188#endif /* CBMSTSMC_H */
Class for the MC transport of the CBM-STS.
Definition CbmStsMC.h:40
virtual ~CbmStsMC()
Definition CbmStsMC.cxx:51
void ProcessNeutrals(Bool_t choice=kTRUE)
Create StsPoints also for neutral particles.
Definition CbmStsMC.h:142
TClonesArray * fStsPoints
Definition CbmStsMC.h:158
Double_t fEloss
Track status at exit of sensor.
Definition CbmStsMC.h:156
virtual void Initialize()
Initialisation.
Definition CbmStsMC.cxx:87
virtual void Reset()
Clear output array and reset current track status.
Definition CbmStsMC.cxx:178
CbmStsMC(Bool_t active=kTRUE, const char *name="STSMC")
Definition CbmStsMC.cxx:35
CbmStsSetup * fSetup
Output array (CbmStsPoint)
Definition CbmStsMC.h:159
virtual Bool_t CheckIfSensitive(std::string name)
Definition CbmStsMC.h:63
virtual void Register()
Register output array (StsPoint) to the I/O manager.
Definition CbmStsMC.h:128
CbmStsTrackStatus fStatusIn
Definition CbmStsMC.h:154
CbmStsPoint * CreatePoint()
Create a new StsPoint Creates a new CbmStsPoint using the current track status information and adds i...
Definition CbmStsMC.cxx:203
virtual Bool_t IsSensitive(const std::string &name)
Check whether a volume is sensitive.
Definition CbmStsMC.h:62
virtual void ConstructRootGeometry(TGeoMatrix *shift=NULL)
Definition CbmStsMC.cxx:309
std::map< TString, Int_t > fAddressMap
Accumulated energy loss for current track.
Definition CbmStsMC.h:157
virtual void EndOfEvent()
Action at end of event.
Definition CbmStsMC.cxx:78
virtual void Print(Option_t *opt="") const
Screen log Prints current number of StsPoints in array. Virtual from TObject.
Definition CbmStsMC.cxx:189
virtual Bool_t ProcessHits(FairVolume *vol=0)
Action for a track step in a sensitive node of the STS.
Definition CbmStsMC.cxx:138
Bool_t fProcessNeutrals
Transformation matrix for geometry positioning.
Definition CbmStsMC.h:161
virtual TClonesArray * GetCollection(Int_t iColl) const
Get array of CbmStsPoints.
Definition CbmStsMC.h:99
CbmStsTrackStatus fStatusOut
Track status at entry of sensor.
Definition CbmStsMC.h:155
TGeoCombiTrans * fCombiTrans
Pointer to static instance of CbmStsSetup.
Definition CbmStsMC.h:160
CbmStsMC(const CbmStsMC &)
CbmStsMC operator=(const CbmStsMC &)
ClassDef(CbmStsMC, 1)
virtual void ConstructGeometry()
Construct the STS geometry in the TGeoManager.
Definition CbmStsMC.cxx:63
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:256
Class representing the top level of the STS setup.
Definition CbmStsSetup.h:43
Stores status of track during transport. Auxiliary for CbmSts.