114 std::map<UInt_t, std::pair<CbmPsdDigi, CbmMatch*>> fired_digis_map;
116 for (
Int_t iPoint = 0; iPoint < nPoints; iPoint++) {
118 if (!point)
continue;
123 scinID = point->GetDetectorID();
124 Double_t eLoss = point->GetEnergyLoss();
125 Double_t pTime = point->GetTime();
126 sec = (
Int_t)((scinID - 1) / 6) + 1;
129 auto it = fired_digis_map.find(uAddress);
130 if (it != fired_digis_map.end()) {
132 it->second.first.SetEdep(it->second.first.GetEdep() + eLoss);
133 if (pTime < it->second.first.GetTime()) it->second.first.SetTime(pTime);
134 it->second.second->AddLink(link);
141 fired_digis_map.insert(std::make_pair(uAddress, std::make_pair(digi, match)));
146 for (
auto entry : fired_digis_map) {
147 Double_t eDep = entry.second.first.GetEdep();
148 Double_t eLossMIP = eDep / 0.005;
149 Double_t pixPerMIP = 15.;
150 Double_t eLossMIPSmeared = gRandom->Gaus(eLossMIP * pixPerMIP,
sqrt(eLossMIP * pixPerMIP)) / pixPerMIP;
151 Double_t eLossSmeared = eLossMIPSmeared * 0.005;
152 Double_t eNoise = gRandom->Gaus(0, 15) / 50. * 0.005;
153 eLossSmeared += eNoise;
163 LOG(debug1) << fName <<
": Digi " << nDigis <<
" Time " << entry.second.first.GetTime() +
fCurrentEventTime
164 <<
" Section " << entry.second.first.GetSectionID() <<
" Module " << entry.second.first.GetModuleID()
165 <<
" energy " << eLossSmeared;
170 LOG(info) <<
"+ " << setw(15) << GetName() <<
": Event " << setw(6) << right <<
fCurrentEvent <<
" at " << fixed
171 << setprecision(3) <<
fCurrentEventTime <<
" ns, points: " << nPoints <<
", digis: " << nDigis
172 <<
". Exec time " << setprecision(6) << timer.RealTime() <<
" s.";