diff --git a/sim/detectors/trd/CbmTrdDigitizer.cxx b/sim/detectors/trd/CbmTrdDigitizer.cxx index 6e71dfa8be986a2f03a6bfa70fff5a43693aabbc..023069fa2dc8a17bdd6f3edc496d081bbf9165fb 100644 --- a/sim/detectors/trd/CbmTrdDigitizer.cxx +++ b/sim/detectors/trd/CbmTrdDigitizer.cxx @@ -204,7 +204,7 @@ void CbmTrdDigitizer::Exec(Option_t*) else mod = imod->second; mod->SetLinkId(fCurrentInput, fCurrentMCEntry, iPoint); - Double_t gamma = TMath::Sqrt(1 + TMath::Power(track->GetP() / (3.e8 * track->GetMass()), 2)); + Double_t gamma = TMath::Sqrt(1 + TMath::Power(track->GetP() / (track->GetMass()), 2)); mod->SetGamma(gamma); mod->MakeDigi(point, fCurrentEventTime, TMath::Abs(track->GetPdgCode()) == 11); } diff --git a/sim/detectors/trd/CbmTrdModuleSimR.cxx b/sim/detectors/trd/CbmTrdModuleSimR.cxx index 8a54c57fe52f2180bf757886be07997cd0967c46..b8fb5a5dd3f9e5d27007d831d77b8ac82925791f 100644 --- a/sim/detectors/trd/CbmTrdModuleSimR.cxx +++ b/sim/detectors/trd/CbmTrdModuleSimR.cxx @@ -2027,7 +2027,10 @@ Double_t CbmTrdModuleSimR::GetStep(Double_t dist, Int_t roll) std::make_pair(300, 1.65), std::make_pair(400, 1.675), std::make_pair(500, 1.7), std::make_pair(1000, 1.725)}; for (Int_t n = 0; n < 12; n++) { - if (fGamma < bethe[0].first) CalcGamma = bethe[0].second; + if (fGamma < bethe[0].first) { + CalcGamma = bethe[0].second; + break; + } if (n == 11) { CalcGamma = bethe[11].second; break; @@ -2066,7 +2069,10 @@ std::pair<Int_t, std::vector<Double_t>> CbmTrdModuleSimR::GetTotalSteps(Double_t std::make_pair(300, 1.65), std::make_pair(400, 1.675), std::make_pair(500, 1.7), std::make_pair(1000, 1.725)}; for (Int_t n = 0; n < 12; n++) { - if (fGamma < bethe[0].first) CalcGamma = bethe[0].second; + if (fGamma < bethe[0].first) { + CalcGamma = bethe[0].second; + break; + } if (n == 11) { CalcGamma = bethe[11].second; break;