CbmRoot
CbmStsSimModule.h
Go to the documentation of this file.
1 
6 #ifndef CBMSTSSIMMODULE_H
7 #define CBMSTSSIMMODULE_H 1
8 
9 
10 #include "CbmStsCluster.h"
11 #include "CbmStsDigi.h"
12 #include "CbmStsParModule.h"
13 #include "CbmStsSignal.h"
14 #include "TF1.h"
15 #include "TRandom.h"
16 #include <map>
17 #include <set>
18 #include <vector>
19 
20 class TClonesArray;
21 class CbmStsPhysics;
22 class CbmStsDigitize;
23 class CbmStsElement;
24 class CbmStsParAsic;
25 
26 
42 class CbmStsSimModule : public TObject {
43 
44 public:
48  CbmStsSimModule(CbmStsElement* setupModule = nullptr,
49  const CbmStsParModule* modulePar = nullptr,
50  CbmStsDigitize* digitizer = nullptr);
51 
52 
54  CbmStsSimModule(const CbmStsSimModule&) = delete;
55 
56 
59 
60 
62  virtual ~CbmStsSimModule();
63 
64 
78  void AddSignal(UShort_t channel,
79  Double_t time,
80  Double_t charge,
81  Int_t index = 0,
82  Int_t entry = 0,
83  Int_t file = 0);
84 
85 
92  void BufferStatus(Int_t& nofSignals, Double_t& timeFirst, Double_t& timeLast);
93 
94 
101  //Int_t ChargeToAdc(Double_t charge, UShort_t channel);
102 
103 
108  static Int_t GetAddressFromName(TString name);
109 
110 
115 
116 
120  UShort_t GetNofChannels() const { return fParams->GetNofChannels(); };
121 
122 
135  void InitAnalogBuffer();
136 
137 
141  Bool_t IsSet() const { return fIsSet; }
142 
143 
152  Int_t ProcessAnalogBuffer(Double_t readoutTime);
153 
154 
155  void SetParams(const CbmStsParModule& params) { fParams = &params; }
156 
159  /* Not used
160  std::vector<CbmStsDigitizeParameters>& GetParameters() {
161  return fAsicParameterVector;
162  }
163  */
164 
165 
169  /*
170  const CbmStsParAsic& GetAsicParameters(UShort_t moduleChannel) const {
171  return fParams->GetAsicPar(moduleChannel);
172  }
173  */
174 
175 
189  Int_t GenerateNoise(Double_t t1, Double_t t2);
190 
191 
193  std::string ToString() const;
194 
195 
196 private:
197  Bool_t fIsSet = kFALSE;
198  CbmStsElement* fElement = nullptr;
200  const CbmStsParModule* fParams = nullptr;
201 
209  typedef std::multiset<CbmStsSignal*, CbmStsSignal::Before> sigset;
210  std::map<UShort_t, sigset> fAnalogBuffer;
211 
212 
217  void Digitize(UShort_t channel, CbmStsSignal* signal);
218 
219 
221 };
222 
223 #endif /* CBMSTSSIMMODULE_H */
CbmStsPhysics
Auxiliary class for physics processes in Silicon.
Definition: CbmStsPhysics.h:24
CbmStsSimModule::BufferStatus
void BufferStatus(Int_t &nofSignals, Double_t &timeFirst, Double_t &timeLast)
Definition: CbmStsSimModule.cxx:98
CbmStsSimModule::sigset
std::multiset< CbmStsSignal *, CbmStsSignal::Before > sigset
Module parameters.
Definition: CbmStsSimModule.h:209
CbmStsParModule::GetNofChannels
UInt_t GetNofChannels() const
Number of channels.
Definition: CbmStsParModule.h:74
CbmStsSimModule::AddSignal
void AddSignal(UShort_t channel, Double_t time, Double_t charge, Int_t index=0, Int_t entry=0, Int_t file=0)
Definition: CbmStsSimModule.cxx:41
CbmStsSimModule::GetDigitizer
CbmStsDigitize * GetDigitizer() const
Digitizer task.
Definition: CbmStsSimModule.h:114
CbmStsDigitize
Task class for simulating the detector response of the STS.
Definition: CbmStsDigitize.h:50
CbmStsSimModule::operator=
CbmStsSimModule & operator=(const CbmStsSimModule &)=delete
Assignment operator (disabled)
CbmStsSimModule::GetNofChannels
UShort_t GetNofChannels() const
Number of electronic channels @value Number of ADC channels.
Definition: CbmStsSimModule.h:120
CbmStsSimModule::ProcessAnalogBuffer
Int_t ProcessAnalogBuffer(Double_t readoutTime)
Definition: CbmStsSimModule.cxx:237
CbmStsSimModule::fElement
CbmStsElement * fElement
Definition: CbmStsSimModule.h:198
CbmStsSimModule::CbmStsSimModule
CbmStsSimModule(CbmStsElement *setupModule=nullptr, const CbmStsParModule *modulePar=nullptr, CbmStsDigitize *digitizer=nullptr)
Standard constructor.
CbmStsSignal
Data class for an analog signal in the STS.
Definition: CbmStsSignal.h:27
CbmStsDigi.h
CbmStsSimModule::fDigitizer
CbmStsDigitize * fDigitizer
Element in geometry setup.
Definition: CbmStsSimModule.h:199
CbmStsParAsic
Parameters of the STS readout ASIC.
Definition: CbmStsParAsic.h:25
CbmStsParModule
Parameters for one STS module.
Definition: CbmStsParModule.h:28
CbmStsParModule.h
CbmStsSimModule::fParams
const CbmStsParModule * fParams
Digitizer.
Definition: CbmStsSimModule.h:200
CbmStsSimModule::ClassDef
ClassDef(CbmStsSimModule, 1)
CbmStsSimModule::fIsSet
Bool_t fIsSet
? Parameters are set
Definition: CbmStsSimModule.h:197
CbmStsSimModule::SetParams
void SetParams(const CbmStsParModule &params)
Definition: CbmStsSimModule.h:155
CbmStsSimModule::IsSet
Bool_t IsSet() const
Definition: CbmStsSimModule.h:141
CbmStsSimModule::CbmStsSimModule
CbmStsSimModule(const CbmStsSimModule &)=delete
Copy constructor (disabled)
CbmStsSimModule::Digitize
void Digitize(UShort_t channel, CbmStsSignal *signal)
Definition: CbmStsSimModule.cxx:133
CbmStsSimModule::~CbmStsSimModule
virtual ~CbmStsSimModule()
Destructor.
Definition: CbmStsSimModule.cxx:26
CbmStsSignal.h
CbmStsSimModule::InitAnalogBuffer
void InitAnalogBuffer()
Definition: CbmStsSimModule.cxx:226
CbmStsSimModule::GetAddressFromName
static Int_t GetAddressFromName(TString name)
Get the address from the module name (static)
Definition: CbmStsSimModule.cxx:203
CbmStsCluster.h
Data class for STS clusters.
CbmStsSimModule
Class for the simulation of a readout unit in the CBM-STS.
Definition: CbmStsSimModule.h:42
CbmStsSimModule::ToString
std::string ToString() const
Definition: CbmStsSimModule.cxx:297
CbmStsElement
Class representing an element of the STS setup.
Definition: CbmStsElement.h:32
CbmStsSimModule::GenerateNoise
Int_t GenerateNoise(Double_t t1, Double_t t2)
Generate noise.
Definition: CbmStsSimModule.cxx:165
CbmStsSimModule::fAnalogBuffer
std::map< UShort_t, sigset > fAnalogBuffer
Definition: CbmStsSimModule.h:210