CbmRoot
Loading...
Searching...
No Matches
CbmStsSimModule.h
Go to the documentation of this file.
1/* Copyright (C) 2013-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
10#ifndef CBMSTSSIMMODULE_H
11#define CBMSTSSIMMODULE_H 1
12
13
14#include "CbmStsCluster.h"
15#include "CbmStsDigi.h"
16#include "CbmStsParModule.h"
17#include "CbmStsSignal.h"
18
19#include "TF1.h"
20#include "TRandom.h"
21
22#include <map>
23#include <set>
24#include <vector>
25
26class TClonesArray;
27class CbmStsPhysics;
28class CbmStsDigitize;
29class CbmStsElement;
30class CbmStsParAsic;
31
32
48class CbmStsSimModule : public TObject {
49
50public:
54 CbmStsSimModule(CbmStsElement* setupModule = nullptr, const CbmStsParModule* modulePar = nullptr,
55 CbmStsDigitize* digitizer = nullptr);
56
57
60
61
64
65
67 virtual ~CbmStsSimModule();
68
69
83 void AddSignal(UShort_t channel, Double_t time, Double_t charge, Int_t index = 0, Int_t entry = 0, 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
196private:
197 Bool_t fIsSet = kFALSE;
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 */
Data class for STS clusters.
Task class for simulating the detector response of the STS.
Class representing an element of the STS setup.
Parameters of the STS readout ASIC.
Parameters for one STS module.
uint32_t GetNofChannels() const
Number of channels.
Auxiliary class for physics processes in Silicon.
Data class for an analog signal in the STS.
Class for the simulation of a readout unit in the CBM-STS.
Bool_t fIsSet
? Parameters are set
Int_t ProcessAnalogBuffer(Double_t readoutTime)
CbmStsSimModule & operator=(const CbmStsSimModule &)=delete
Assignment operator (disabled)
CbmStsSimModule(CbmStsElement *setupModule=nullptr, const CbmStsParModule *modulePar=nullptr, CbmStsDigitize *digitizer=nullptr)
Standard constructor.
const CbmStsParModule * fParams
Digitizer.
void AddSignal(UShort_t channel, Double_t time, Double_t charge, Int_t index=0, Int_t entry=0, Int_t file=0)
CbmStsDigitize * GetDigitizer() const
Digitizer task.
static Int_t GetAddressFromName(TString name)
Get the address from the module name (static)
void Digitize(UShort_t channel, CbmStsSignal *signal)
Bool_t IsSet() const
UShort_t GetNofChannels() const
Number of electronic channels @value Number of ADC channels.
std::map< UShort_t, sigset > fAnalogBuffer
ClassDef(CbmStsSimModule, 1)
std::string ToString() const
CbmStsElement * fElement
std::multiset< CbmStsSignal *, CbmStsSignal::Before > sigset
Module parameters.
CbmStsSimModule(const CbmStsSimModule &)=delete
Copy constructor (disabled)
virtual ~CbmStsSimModule()
Destructor.
Int_t GenerateNoise(Double_t t1, Double_t t2)
Generate noise.
void BufferStatus(Int_t &nofSignals, Double_t &timeFirst, Double_t &timeLast)
CbmStsDigitize * fDigitizer
Element in geometry setup.
void SetParams(const CbmStsParModule &params)