21 : fElement(element), fDigitizer(digitizer), fParams(params) {}
31 for (
auto sigIt = (chanIt->second).begin(); sigIt != (chanIt->second).end();
65 Bool_t isMerged = kFALSE;
72 if (TMath::Abs((*it)->GetTime() - time) < deadTime) {
77 (*it)->SetTime(TMath::Min((*it)->GetTime(), time));
78 (*it)->AddLink(charge, index, entry, file);
100 Double_t& timeLast) {
104 Double_t tFirst = -1.;
105 Double_t tLast = -1.;
106 Double_t tSignal = -1.;
113 for (
auto sigIt = (chanIt->second).begin(); sigIt != (chanIt->second).end();
116 tSignal = (*sigIt)->GetTime();
118 tFirst = tFirst < 0. ? tSignal : TMath::Min(tFirst, tSignal);
119 tLast = TMath::Max(tLast, tSignal);
125 nofSignals = nSignals;
144 Short_t adc = asic.ChargeToAdc(charge);
148 Double_t deltaT = gRandom->Gaus(0., asic.GetTimeResol());
149 Long64_t dTime = Long64_t(round(signal->
GetTime() + deltaT));
175 Double_t nNoiseMean = asic.GetNoiseRate() * nAsicChannels * (t2 - t1);
178 Int_t nNoise = gRandom->Poisson(nNoiseMean);
181 for (Int_t iNoise = 0; iNoise < nNoise; iNoise++) {
184 UInt_t channel = UInt_t(gRandom->Uniform(Double_t(nAsicChannels)));
185 Double_t time = gRandom->Uniform(t1, t2);
186 Double_t charge = asic.GetRandomNoiseCharge();
187 UInt_t moduleChannel = iAsic * nAsicChannels + channel;
191 AddSignal(moduleChannel, time, charge, -1, -1, -1);
205 Bool_t isValid = kTRUE;
206 if (name.Length() != 16) isValid = kFALSE;
208 if (!name.BeginsWith(
"STS")) isValid = kFALSE;
209 if (name[4] !=
'U') isValid = kFALSE;
210 if (name[8] !=
'L') isValid = kFALSE;
211 if (name[13] !=
'M') isValid = kFALSE;
215 Int_t unit = 10 * (name[5] -
'0') + name[6] -
'0' - 1;
216 Int_t ladder = 10 * (name[9] -
'0') + name[10] -
'0' - 1;
217 Int_t hLadder = (name[11] ==
'U' ? 0 : 1);
218 Int_t module = 10 * (name[14] -
'0') + name[15] -
'0' - 1;
229 multiset<CbmStsSignal*, CbmStsSignal::Before> mset;
243 sigset::iterator sigIt;
245 sigset::iterator oldIt;
246 sigset::iterator endIt;
252 if (!(chanIt.second).empty()) {
264 readoutTime - 5. * asic.
GetTimeResol() - asic.GetDeadTime();
267 sigIt = (chanIt.second).begin();
269 endIt = (chanIt.second).end();
270 while (sigIt != endIt) {
274 if (readoutTime >= 0. && (*sigIt)->GetTime() > timeLimit)
break;
286 (chanIt.second).erase(oldIt);
300 ss <<
"Module " <<
fElement->GetName() <<
": dynRange " << asic.GetDynRange()
301 <<
"e, thresh. " << asic.GetThreshold() <<
"e, nAdc " << asic.GetNofAdc()
302 <<
", time res. " << asic.GetTimeResol() <<
"ns, dead time "
303 << asic.GetDeadTime() <<
"ns, noise " << asic.GetNoise()
304 <<
"e, zero noise rate " << asic.GetZeroNoiseRate() <<
"/ns";