CbmRoot
CbmPsdMCbmHitProducer.h
Go to the documentation of this file.
1 
2 #ifndef CBM_PSD_MCBM_HIT_PRODUCER
3 #define CBM_PSD_MCBM_HIT_PRODUCER
4 
5 #include "FairTask.h"
6 //#include "CbmRichRecGeoPar.h"
7 
8 class TClonesArray;
9 class TVector3;
10 class CbmEvent;
11 class CbmDigiManager;
12 class CbmPsdDigi;
13 
14 class CbmPsdMCbmHitProducer : public FairTask {
15 public:
20 
24  virtual ~CbmPsdMCbmHitProducer();
25 
29  virtual void SetParContainers();
30 
34  virtual InitStatus Init();
35 
36 
40  virtual void Exec(Option_t* option);
41 
45  virtual void Finish();
46 
47 
51  void ProcessData(CbmEvent* event);
52 
53 
57  void ProcessDigi(CbmEvent* event, Int_t digiIndex);
58 
59 
63  //void SetMappingFile(const string& mappingFile){fMappingFile = mappingFile;}
64 
65 
69  void setEnRange(double low, double high) {
70  fEnLimitLow = low;
71  fEnLimitHigh = high;
72  }
73 
77  void applyEnCut() { fDoEnCut = true; }
78 
79 private:
81  TClonesArray* fPsdHits; // PSD hits
82  TClonesArray* fCbmEvents = nullptr; // CbmEvent for time-based simulations
83  bool fDoEnCut = false;
84  double fEnLimitLow = 0.;
85  double fEnLimitHigh = 100000.;
86 
87  //map<Int_t,CbmRichMCbmMappingData> fPsdMapping; //TODO
88 
89  Int_t fEventNum; // event number
90 
91  Double_t fHitError;
92 
93  TString fMappingFile;
94 
95  void InitMapping();
96 
97  bool isInEnRange(const double energy);
98 
103  void AddHit(CbmEvent* event,
104  Double_t time,
105  Double_t energy,
106  UInt_t moduleId,
107  UInt_t sectionId,
108  Int_t index);
109 
114 
119 
120  ClassDef(CbmPsdMCbmHitProducer, 1)
121 };
122 
123 #endif
CbmPsdMCbmHitProducer::fMappingFile
TString fMappingFile
Definition: CbmPsdMCbmHitProducer.h:93
CbmPsdMCbmHitProducer::Finish
virtual void Finish()
Inherited from FairTask.
Definition: CbmPsdMCbmHitProducer.cxx:165
CbmPsdMCbmHitProducer::fDoEnCut
bool fDoEnCut
Definition: CbmPsdMCbmHitProducer.h:83
CbmPsdMCbmHitProducer::isInEnRange
bool isInEnRange(const double energy)
Definition: CbmPsdMCbmHitProducer.cxx:168
CbmPsdMCbmHitProducer::ProcessDigi
void ProcessDigi(CbmEvent *event, Int_t digiIndex)
Definition: CbmPsdMCbmHitProducer.cxx:132
CbmPsdMCbmHitProducer::ProcessData
void ProcessData(CbmEvent *event)
Definition: CbmPsdMCbmHitProducer.cxx:112
CbmPsdMCbmHitProducer::fEnLimitHigh
double fEnLimitHigh
Definition: CbmPsdMCbmHitProducer.h:85
CbmPsdMCbmHitProducer::operator=
CbmPsdMCbmHitProducer & operator=(const CbmPsdMCbmHitProducer &)
Assignment operator.
CbmPsdMCbmHitProducer
Definition: CbmPsdMCbmHitProducer.h:14
CbmPsdMCbmHitProducer::fHitError
Double_t fHitError
Definition: CbmPsdMCbmHitProducer.h:91
CbmPsdMCbmHitProducer::Init
virtual InitStatus Init()
Inherited from FairTask.
Definition: CbmPsdMCbmHitProducer.cxx:30
CbmPsdMCbmHitProducer::Exec
virtual void Exec(Option_t *option)
Inherited from FairTask.
Definition: CbmPsdMCbmHitProducer.cxx:94
CbmPsdMCbmHitProducer::fEnLimitLow
double fEnLimitLow
Definition: CbmPsdMCbmHitProducer.h:84
CbmPsdMCbmHitProducer::fDigiMan
CbmDigiManager * fDigiMan
Definition: CbmPsdMCbmHitProducer.h:80
CbmPsdMCbmHitProducer::fEventNum
Int_t fEventNum
Definition: CbmPsdMCbmHitProducer.h:89
CbmPsdMCbmHitProducer::applyEnCut
void applyEnCut()
Definition: CbmPsdMCbmHitProducer.h:77
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmPsdMCbmHitProducer::fPsdHits
TClonesArray * fPsdHits
Definition: CbmPsdMCbmHitProducer.h:81
CbmPsdMCbmHitProducer::CbmPsdMCbmHitProducer
CbmPsdMCbmHitProducer()
Default constructor.
Definition: CbmPsdMCbmHitProducer.cxx:16
CbmEvent
Class characterising one event by a collection of links (indices) to data objects,...
Definition: CbmEvent.h:30
CbmPsdMCbmHitProducer::InitMapping
void InitMapping()
CbmPsdMCbmHitProducer::SetParContainers
virtual void SetParContainers()
Inherited from FairTask.
Definition: CbmPsdMCbmHitProducer.cxx:28
CbmPsdMCbmHitProducer::CbmPsdMCbmHitProducer
CbmPsdMCbmHitProducer(const CbmPsdMCbmHitProducer &)
Copy constructor.
CbmPsdDigi
Data class for PSD digital information.
Definition: CbmPsdDigi.h:31
CbmPsdMCbmHitProducer::setEnRange
void setEnRange(double low, double high)
Definition: CbmPsdMCbmHitProducer.h:69
CbmPsdMCbmHitProducer::~CbmPsdMCbmHitProducer
virtual ~CbmPsdMCbmHitProducer()
Destructor.
Definition: CbmPsdMCbmHitProducer.cxx:23
CbmPsdMCbmHitProducer::AddHit
void AddHit(CbmEvent *event, Double_t time, Double_t energy, UInt_t moduleId, UInt_t sectionId, Int_t index)
Add hit to the output array (and) CbmEvent if it is not NULL.
Definition: CbmPsdMCbmHitProducer.cxx:146
CbmPsdMCbmHitProducer::fCbmEvents
TClonesArray * fCbmEvents
Definition: CbmPsdMCbmHitProducer.h:82