File tree Expand file tree Collapse file tree
Detectors/ZDC/simulation/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -276,16 +276,15 @@ Bool_t Detector::ProcessHits(FairVolume* v)
276276 charge = TMath::Abs (pdgCode / 10000 - 100000 );
277277 // look into the light tables
278278 if (mZDCdetectorID == 1 || mZDCdetectorID == 4 ) {
279- if (iradius > Geometry::ZNFIBREDIAMETER)
280- iradius = Geometry::ZNFIBREDIAMETER;
281- lightoutput = charge * charge * mLightTableZN [ibeta][iangle][iradius];
279+ iradius = std::min ((int )Geometry::ZNFIBREDIAMETER, iradius);
280+ lightoutput = charge * charge * mLightTableZN [ibeta][iradius][iangle];
282281 } else {
283- if (iradius > Geometry::ZPFIBREDIAMETER)
284- iradius = Geometry::ZPFIBREDIAMETER;
285- lightoutput = charge * charge * mLightTableZP [ibeta][iangle][iradius];
282+ iradius = std::min ((int )Geometry::ZPFIBREDIAMETER, iradius);
283+ lightoutput = charge * charge * mLightTableZP [ibeta][iradius][iangle];
286284 }
287- if (lightoutput > 0 )
285+ if (lightoutput > 0 ) {
288286 nphe = gRandom ->Poisson (lightoutput);
287+ }
289288 }
290289 }
291290
You can’t perform that action at this time.
0 commit comments