CbmRoot
CbmTrdModuleSim.h
Go to the documentation of this file.
1 #ifndef CBMTRDMODULESIM_H
2 #define CBMTRDMODULESIM_H
3 
4 #include "CbmTrdCheckUtil.h"
5 #include "CbmTrdModuleAbstract.h"
6 #include "CbmTrdRawToDigiR.h"
7 #include <map>
8 
9 class TClonesArray;
10 class CbmTrdPoint;
11 class CbmTrdDigi;
12 class CbmMatch;
13 class CbmTrdDigitizer;
14 class CbmTrdRadiator;
19 public:
21  kTime = 0,
24  };
32  CbmTrdModuleSim(Int_t mod, Int_t ly, Int_t rot);
33 
34  virtual ~CbmTrdModuleSim();
35 
36  virtual void GetCounters(Int_t& nEl, Int_t& nLattice, Int_t& nOverThr) const {
37  nEl = 0;
38  nLattice = 0;
39  nOverThr = 0;
40  }
41  virtual std::map<Int_t, std::pair<CbmTrdDigi*, CbmMatch*>>* GetDigiMap() {
42  return &fDigiMap;
43  }
44  virtual Int_t GetEventId() const { return fEventId; }
45  virtual Int_t GetInputId() const { return fInputId; }
46  virtual Int_t GetPointId() const { return fPointId; }
52  virtual Int_t FlushBuffer(ULong64_t time = 0) = 0;
59  virtual Bool_t
60  MakeDigi(CbmTrdPoint* p, Double_t time, Bool_t TR = kFALSE) = 0;
64  virtual Bool_t MakeRaw() = 0;
65 
66  // virtual void SetAsicPar(CbmTrdParSetAsic *p=NULL)=0;
67  void SetDigitizer(CbmTrdDigitizer* digitizer) { fDigitizer = digitizer; }
68  virtual void SetEventId(Int_t id) { fEventId = id; }
69  virtual void SetInputId(Int_t id) { fInputId = id; }
70  virtual void SetPointId(Int_t id) { fPointId = id; }
71  virtual void SetRadiator(CbmTrdRadiator* radiator = NULL) = 0;
72  virtual void SetGamma(Double_t gamma = 0.) = 0;
73  virtual void SetPositionMC(Double_t pos[3]) {
74  memcpy(fXYZ, pos, 3 * sizeof(Double_t));
75  }
76  virtual void SetLinkId(Int_t input, Int_t event = -1, Int_t point = -1) {
77  fInputId = input;
78  fEventId = event;
79  fPointId = point;
80  }
81  virtual void ResetCounters() { ; }
82  virtual void SetMessageConverter(CbmTrdRawToDigiR* conv = NULL) = 0;
83  virtual void SetQA(CbmTrdCheckUtil* qa = NULL) = 0;
84 
85 protected:
86  // definitions of MC input
87  Int_t fPointId;
88  Int_t fEventId;
89  Int_t fInputId;
90  Double_t fXYZ[3];
92 
93  // calibration objects
95 
96  std::map<Int_t, std::pair<CbmTrdDigi*, CbmMatch*>>
98  std::map<Int_t, std::vector<std::pair<CbmTrdDigi*, CbmMatch*>>>
100 
101 private:
104 
105 
106  ClassDef(CbmTrdModuleSim, 1)
107 };
108 #endif
CbmTrdModuleSim::SetMessageConverter
virtual void SetMessageConverter(CbmTrdRawToDigiR *conv=NULL)=0
CbmTrdModuleSim::fXYZ
Double_t fXYZ[3]
MC position of the point in module coordinates.
Definition: CbmTrdModuleSim.h:90
CbmTrdModuleSim::CbmTrdModuleSim
CbmTrdModuleSim()
Default constructor.
Definition: CbmTrdModuleSim.cxx:11
CbmMatch
Definition: CbmMatch.h:22
CbmTrdModuleSim::SetPointId
virtual void SetPointId(Int_t id)
Definition: CbmTrdModuleSim.h:70
CbmTrdModuleSim::operator=
const CbmTrdModuleSim & operator=(const CbmTrdModuleSim &ref)
CbmTrdModuleSim::fEventId
Int_t fEventId
MC event id being processed.
Definition: CbmTrdModuleSim.h:88
CbmTrdModuleSim::SetEventId
virtual void SetEventId(Int_t id)
Definition: CbmTrdModuleSim.h:68
CbmTrdModuleSim::GetCounters
virtual void GetCounters(Int_t &nEl, Int_t &nLattice, Int_t &nOverThr) const
Definition: CbmTrdModuleSim.h:36
CbmTrdModuleSim::fDigiMap
std::map< Int_t, std::pair< CbmTrdDigi *, CbmMatch * > > fDigiMap
Temporary storage for complete digis for each CBM address.
Definition: CbmTrdModuleSim.h:97
CbmTrdModuleSim
Abstract class for module wise digitization and raw format producing.
Definition: CbmTrdModuleSim.h:18
CbmTrdModuleSim::fInputId
Int_t fInputId
MC input file number.
Definition: CbmTrdModuleSim.h:89
CbmTrdModuleSim::fDigitizer
CbmTrdDigitizer * fDigitizer
Definition: CbmTrdModuleSim.h:91
CbmTrdModuleSim::SetDigitizer
void SetDigitizer(CbmTrdDigitizer *digitizer)
Definition: CbmTrdModuleSim.h:67
CbmTrdModuleSim::SetPositionMC
virtual void SetPositionMC(Double_t pos[3])
Definition: CbmTrdModuleSim.h:73
CbmTrdModuleSim::GetDigiMap
virtual std::map< Int_t, std::pair< CbmTrdDigi *, CbmMatch * > > * GetDigiMap()
Definition: CbmTrdModuleSim.h:41
CbmTrdModuleSim::FlushBuffer
virtual Int_t FlushBuffer(ULong64_t time=0)=0
Flush local digi buffer.
CbmTrdModuleSim::GetEventId
virtual Int_t GetEventId() const
Definition: CbmTrdModuleSim.h:44
CbmTrdModuleSim::fPointId
Int_t fPointId
MC point id being processed.
Definition: CbmTrdModuleSim.h:87
CbmTrdModuleSim::ResetCounters
virtual void ResetCounters()
Definition: CbmTrdModuleSim.h:81
CbmTrdModuleSim::SetInputId
virtual void SetInputId(Int_t id)
Definition: CbmTrdModuleSim.h:69
CbmTrdModuleSim::CbmTrdModuleSim
CbmTrdModuleSim(const CbmTrdModuleSim &ref)
CbmTrdModuleSim::fBuffer
std::map< Int_t, std::vector< std::pair< CbmTrdDigi *, CbmMatch * > > > fBuffer
Local digits buffer as function of time for each TRD channel in the module.
Definition: CbmTrdModuleSim.h:99
CbmTrdRadiator
Definition: CbmTrdRadiator.h:24
CbmTrdDigitizer
Definition: CbmTrdDigitizer.h:36
CbmTrdPoint
Definition: CbmTrdPoint.h:23
CbmTrdModuleSim::GetPointId
virtual Int_t GetPointId() const
Definition: CbmTrdModuleSim.h:46
CbmTrdModuleAbstract.h
CbmTrdModuleSim::fRadiator
CbmTrdRadiator * fRadiator
Pointer to digitizer.
Definition: CbmTrdModuleSim.h:94
CbmTrdModuleSim::kTime
@ kTime
select Time based/Event by event simulations
Definition: CbmTrdModuleSim.h:21
CbmTrdRawToDigiR
Definition: CbmTrdRawToDigiR.h:17
CbmTrdCheckUtil
Definition: CbmTrdCheckUtil.h:19
CbmTrdModuleAbstract
Abstract class for TRD module.
Definition: CbmTrdModuleAbstract.h:18
CbmTrdModuleSim::kWeightDistance
@ kWeightDistance
use weighting distance for link generation
Definition: CbmTrdModuleSim.h:23
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmTrdModuleSim::MakeDigi
virtual Bool_t MakeDigi(CbmTrdPoint *p, Double_t time, Bool_t TR=kFALSE)=0
Steering routine for converting MC point to digits.
CbmTrdDigi
Definition: CbmTrdDigi.h:14
CbmTrdModuleSim::GetInputId
virtual Int_t GetInputId() const
Definition: CbmTrdModuleSim.h:45
CbmTrdModuleSim::SetRadiator
virtual void SetRadiator(CbmTrdRadiator *radiator=NULL)=0
CbmTrdModuleSim::CbmTrdModuleSimDef
CbmTrdModuleSimDef
Definition: CbmTrdModuleSim.h:20
CbmTrdModuleSim::kNoise
@ kNoise
switch noise digits generation
Definition: CbmTrdModuleSim.h:22
CbmTrdModuleSim::SetLinkId
virtual void SetLinkId(Int_t input, Int_t event=-1, Int_t point=-1)
Definition: CbmTrdModuleSim.h:76
CbmTrdModuleSim::SetGamma
virtual void SetGamma(Double_t gamma=0.)=0
CbmTrdRawToDigiR.h
CbmTrdModuleSim::~CbmTrdModuleSim
virtual ~CbmTrdModuleSim()
Definition: CbmTrdModuleSim.cxx:37
CbmTrdModuleSim::SetQA
virtual void SetQA(CbmTrdCheckUtil *qa=NULL)=0
CbmTrdModuleSim::MakeRaw
virtual Bool_t MakeRaw()=0
Steering routine for converting MC point to raw format.
CbmTrdCheckUtil.h