Skip to content
Snippets Groups Projects
Commit 824cd9ad authored by Michael Duehrssen-Debling's avatar Michael Duehrssen-Debling
Browse files

Add constant for the maximum amount of fluctuation

parent 993e37d6
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,8 @@ public:
///Give the effective size sigma^2 of the fluctuations that should be generated.
virtual float get_sigma2_fluctuation(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const;
static constexpr float s_max_sigma2_fluctuation=1000;//! Do not persistify!
void Print(Option_t *option = "") const override;
#if defined(__FastCaloSimStandAlone__)
......
......@@ -25,7 +25,7 @@ FCSReturnCode TFCSLateralShapeParametrizationFluctChain::simulate(TFCSSimulation
{
// Call get_number_of_hits() only once, as it could contain a random number
float sigma2 = get_sigma2_fluctuation(simulstate, truth, extrapol);
if (sigma2 >= 1000) {
if (sigma2 >= s_max_sigma2_fluctuation) {
ATH_MSG_ERROR("TFCSLateralShapeParametrizationHitChain::simulate(): fluctuation of hits could not be calculated");
return FCSFatal;
}
......@@ -41,7 +41,7 @@ FCSReturnCode TFCSLateralShapeParametrizationFluctChain::simulate(TFCSSimulation
float Eavghit_tenth=Eavghit/10;
float sumEhit=0;
float error2_sumEhit=0;
float error2=1000;
float error2=2*s_max_sigma2_fluctuation;
bool debug = msgLvl(MSG::DEBUG);
if (debug) {
......
......@@ -53,8 +53,8 @@ float TFCSLateralShapeParametrizationHitChain::get_sigma2_fluctuation(TFCSSimula
double sigma2=hitsim->get_sigma2_fluctuation(simulstate,truth,extrapol);
if(sigma2>0) return sigma2;
}
//Limit to factor 1000 fluctuations
return 1000;
//Limit to factor s_max_sigma2_fluctuation fluctuations
return s_max_sigma2_fluctuation;
}
FCSReturnCode TFCSLateralShapeParametrizationHitChain::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment