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