diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h index e43420da0ad2c14a0ee7c470118631db7ba7696a..c1ba04673337dc0fbc2827d2c00871f8fc3d7980 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h @@ -24,7 +24,7 @@ public: /// FCAL: 28.5%/sqrt(E) /// stochastic=0.285; /// constant=0.035; - TFCSLateralShapeParametrizationHitNumberFromE(const char* name=nullptr, const char* title=nullptr,double stochastic=0.1,double constant=0); + TFCSLateralShapeParametrizationHitNumberFromE(const char* name=nullptr, const char* title=nullptr,double stochastic=0.1,double constant=0,double stochastic_hadron=0); ///Give the effective size sigma^2 of the fluctuations from the stochastic and constant term double get_sigma2_fluctuation(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const override; @@ -33,11 +33,14 @@ public: void Print(Option_t *option = "") const override; private: - // simple shape information should be stored as private member variables here + // Information for the fluctuation terms + // The variation is calculated as: + // sigma^2=[m_stochastic/sqrt(E/GeV)]^2 + [m_constant + m_stochastic_hadron/sqrt(E/GeV)]^2 double m_stochastic; double m_constant; + double m_stochastic_hadron; - ClassDefOverride(TFCSLateralShapeParametrizationHitNumberFromE,1) //TFCSLateralShapeParametrizationHitNumberFromE + ClassDefOverride(TFCSLateralShapeParametrizationHitNumberFromE,2) //TFCSLateralShapeParametrizationHitNumberFromE }; #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitNumberFromE.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitNumberFromE.cxx index 6d48a5a7601f0165669727c7318b965470dd0375..2e796d56db908a9c66208840c4bf86007c45eb92 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitNumberFromE.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitNumberFromE.cxx @@ -13,8 +13,8 @@ //======= TFCSHistoLateralShapeParametrization ========= //============================================= -TFCSLateralShapeParametrizationHitNumberFromE::TFCSLateralShapeParametrizationHitNumberFromE(const char* name, const char* title,double stochastic,double constant) : - TFCSLateralShapeParametrizationHitBase(name,title),m_stochastic(stochastic),m_constant(constant) +TFCSLateralShapeParametrizationHitNumberFromE::TFCSLateralShapeParametrizationHitNumberFromE(const char* name, const char* title,double stochastic,double constant,double stochastic_hadron) : + TFCSLateralShapeParametrizationHitBase(name,title),m_stochastic(stochastic),m_constant(constant),m_stochastic_hadron(stochastic_hadron) { set_match_all_pdgid(); } @@ -33,8 +33,15 @@ double TFCSLateralShapeParametrizationHitNumberFromE::get_sigma2_fluctuation(TFC return 1; } - double sigma_stochastic=m_stochastic/sqrt(energy/1000.0); - double sigma2 = sigma_stochastic*sigma_stochastic + m_constant*m_constant; + double sqrtE=sqrt(energy/1000.0); + double sigma_stochastic=m_stochastic/sqrtE; + double sigma_stochastic_hadron=m_stochastic_hadron/sqrtE; + + //Attention: linear sum of "hadron" stochastic term and constant term as emulation of fluctuations in EM component + double sigma_hadron=m_constant+sigma_stochastic_hadron; + + //Usual quadratic sum of "hardon" component and normal stochastic term + double sigma2 = sigma_stochastic*sigma_stochastic + sigma_hadron*sigma_hadron; ATH_MSG_DEBUG("sigma^2 fluctuation="<<sigma2); @@ -63,5 +70,5 @@ void TFCSLateralShapeParametrizationHitNumberFromE::Print(Option_t *option) cons TString optprint=opt;optprint.ReplaceAll("short",""); TFCSLateralShapeParametrizationHitBase::Print(option); - if(longprint) ATH_MSG_INFO(optprint <<" stochastic="<<m_stochastic<<" constant="<<m_constant); + if(longprint) ATH_MSG_INFO(optprint <<" sigma^2=["<<m_stochastic<<"/sqrt(E/GeV)]^2 + ["<<m_constant<<" + "<<m_stochastic_hadron<<"/sqrt(E/GeV)]^2"); }