diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt index 70e83c44b3e8b3a74c7905a65234c132ed823ca3..171dfb8a7a35d853f74892dd59b3e4f91060c98b 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt @@ -61,6 +61,7 @@ atlas_add_root_dictionary( ISF_FastCaloSimEvent _dictSource ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitChain.h ISF_FastCaloSimEvent/TFCSCenterPositionCalculation.h + ISF_FastCaloSimEvent/TFCSFlatLateralShapeParametrization.h ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrization.h ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrizationFCal.h ISF_FastCaloSimEvent/TFCSHistoLateralShapeWeight.h diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h index 1127e0f5d41207b404fe678284b756082bff66c2..b35988acd8a9428626b4ccb97d287f755f8ec827 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h @@ -40,6 +40,7 @@ #include "ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h" #include "ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitChain.h" #include "ISF_FastCaloSimEvent/TFCSCenterPositionCalculation.h" +#include "ISF_FastCaloSimEvent/TFCSFlatLateralShapeParametrization.h" #include "ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrization.h" #include "ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrizationFCal.h" #include "ISF_FastCaloSimEvent/TFCSHistoLateralShapeWeight.h" @@ -150,6 +151,7 @@ #pragma link C++ class TFCSLateralShapeParametrizationHitBase+; #pragma link C++ class TFCSLateralShapeParametrizationHitChain+; #pragma link C++ class TFCSCenterPositionCalculation+; +#pragma link C++ class TFCSFlatLateralShapeParametrization+; #pragma link C++ class TFCSHistoLateralShapeParametrization+; #pragma link C++ class TFCSHistoLateralShapeParametrizationFCal+; #pragma link C++ class TFCSHistoLateralShapeWeight+; diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSFlatLateralShapeParametrization.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSFlatLateralShapeParametrization.h new file mode 100644 index 0000000000000000000000000000000000000000..351c309d7a75cdad06fba23b05f8b9f360df7e9c --- /dev/null +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSFlatLateralShapeParametrization.h @@ -0,0 +1,58 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TFCSFlatLateralShapeParametrization_h +#define TFCSFlatLateralShapeParametrization_h + +#include "ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h" +#include "ISF_FastCaloSimEvent/TFCS2DFunctionHistogram.h" +#include "ISF_FastCaloSimEvent/TFCSTruthState.h" + +class TH2; + +class TFCSFlatLateralShapeParametrization:public TFCSLateralShapeParametrizationHitBase { +public: + TFCSFlatLateralShapeParametrization(const char* name=nullptr, const char* title=nullptr); + ~TFCSFlatLateralShapeParametrization(); + + /// set the integral of the histogram to the desired number of hits + void set_number_of_hits(float nhits); + + float get_number_of_expected_hits() const {return m_nhits;}; + + /// default for this class is to simulate poisson(integral histogram) hits + int get_number_of_hits(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const override; + + /// set the radius in which hits should be generated + void set_dR(float _dR) {m_dR=_dR;}; + + float dR() const {return m_dR;}; + + /// set the radius in which hits should be generated + void set_scale(float _scale) {m_scale=_scale;}; + + float scale() const {return m_scale;}; + + /// simulated one hit position with weight that should be put into simulstate + /// sometime later all hit weights should be resacled such that their final sum is simulstate->E(sample) + /// someone also needs to map all hits into cells + virtual FCSReturnCode simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) override; + + void Print(Option_t *option = "") const override; +protected: + /// Simulate hits flat in radius dR + float m_dR; + float m_nhits; + float m_scale; + +private: + + ClassDefOverride(TFCSFlatLateralShapeParametrization,1) //TFCSFlatLateralShapeParametrization +}; + +#if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__) +#pragma link C++ class TFCSFlatLateralShapeParametrization+; +#endif + +#endif diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrization.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrization.h index f6ecbe2e4f6c615bb1aca035083733e7e6e00a85..50bd8fa5041efa9330e35e8195c1625f80b6fb84 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrization.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrization.h @@ -29,8 +29,20 @@ public: void set_number_of_hits(float nhits); float get_number_of_expected_hits() const {return m_nhits;}; + + ///set an offset in r on the simulated histogram + void set_r_offset(float r_offset) {m_r_offset=r_offset;}; + float r_offset() const {return m_r_offset;}; + + ///set an scale factor for r on the simulated histogram + void set_r_scale(float r_scale) {m_r_scale=r_scale;}; + float r_scale() const {return m_r_scale;}; + + ///default for this class is to simulate get_number_of_expected_hits() hits, + ///which gives fluctuations sigma^2=1/get_number_of_expected_hits() + virtual double get_sigma2_fluctuation(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const override; - /// default for this class is to simulate poisson(integral histogram) hits + /// default for this class is to simulate get_number_of_expected_hits() hits int get_number_of_hits(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const override; /// simulated one hit position with weight that should be put into simulstate @@ -50,10 +62,12 @@ protected: /// Histogram to be used for the shape simulation TFCS2DFunctionHistogram m_hist; float m_nhits; + float m_r_offset; + float m_r_scale; private: - ClassDefOverride(TFCSHistoLateralShapeParametrization,1) //TFCSHistoLateralShapeParametrization + ClassDefOverride(TFCSHistoLateralShapeParametrization,2) //TFCSHistoLateralShapeParametrization }; #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h index 3acc8982d78eb370f1bb453e822d2e8cf5482360..e74239fa174cb94e69fb5b10c3da55ced746a232 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h @@ -13,7 +13,10 @@ class TFCSLateralShapeParametrizationHitBase:public TFCSLateralShapeParametrizat public: TFCSLateralShapeParametrizationHitBase(const char* name=nullptr, const char* title=nullptr); - ///Call get_number_of_hits() only once per shower simulation, as it could be calculated with random numbers and give different results each time + ///Give the effective size sigma^2 of the fluctuations that should be generated by the amount of generated hits. Return a value <0 if this instance can't determine + virtual double get_sigma2_fluctuation(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const; + + ///Call get_number_of_hits() only once per shower simulation, as it could be calculated with random numbers and give different results each time. Return a value of -1 if this instance can't determine virtual int get_number_of_hits(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const; class Hit 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 cbe0e39996096567ab2a9130c8647e5eb5a545bb..e43420da0ad2c14a0ee7c470118631db7ba7696a 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h @@ -26,6 +26,9 @@ public: /// constant=0.035; TFCSLateralShapeParametrizationHitNumberFromE(const char* name=nullptr, const char* title=nullptr,double stochastic=0.1,double constant=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; + int get_number_of_hits(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const override; void Print(Option_t *option = "") const override; diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSFlatLateralShapeParametrization.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSFlatLateralShapeParametrization.cxx new file mode 100644 index 0000000000000000000000000000000000000000..501aa862ed14b8d3ff57be7f716906041a880737 --- /dev/null +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSFlatLateralShapeParametrization.cxx @@ -0,0 +1,87 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CLHEP/Random/RandFlat.h" +#include "CLHEP/Random/RandPoisson.h" + +#include "ISF_FastCaloSimEvent/TFCSFlatLateralShapeParametrization.h" +#include "ISF_FastCaloSimEvent/FastCaloSim_CaloCell_ID.h" +#include "ISF_FastCaloSimEvent/TFCSSimulationState.h" +#include "ISF_FastCaloSimEvent/TFCSExtrapolationState.h" + +#include "TFile.h" +#include "TMath.h" +#include "TH2.h" + +//============================================= +//======= TFCSFlatLateralShapeParametrization ========= +//============================================= + +TFCSFlatLateralShapeParametrization::TFCSFlatLateralShapeParametrization(const char* name, const char* title) : + TFCSLateralShapeParametrizationHitBase(name,title),m_nhits(0),m_scale(1) +{ +} + +TFCSFlatLateralShapeParametrization::~TFCSFlatLateralShapeParametrization() +{ +} + +int TFCSFlatLateralShapeParametrization::get_number_of_hits(TFCSSimulationState &simulstate, const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/) const +{ + if (!simulstate.randomEngine()) { + return -1; + } + + return CLHEP::RandPoisson::shoot(simulstate.randomEngine(), m_nhits); +} + +void TFCSFlatLateralShapeParametrization::set_number_of_hits(float nhits) +{ + m_nhits=nhits; +} + +FCSReturnCode TFCSFlatLateralShapeParametrization::simulate_hit(Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/) +{ + if (!simulstate.randomEngine()) { + return FCSFatal; + } + + const int cs=calosample(); + const double center_eta = hit.center_eta(); + const double center_phi = hit.center_phi(); + const double center_r = hit.center_r(); + const double center_z = hit.center_z(); + + if (TMath::IsNaN(center_r) or TMath::IsNaN(center_z) or TMath::IsNaN(center_eta) or TMath::IsNaN(center_phi)) { //Check if extrapolation fails + return FCSFatal; + } + + float alpha, r; + + alpha=2*TMath::Pi()*CLHEP::RandFlat::shoot(simulstate.randomEngine()); + r=m_dR*CLHEP::RandFlat::shoot(simulstate.randomEngine()); + + float delta_eta = r*cos(alpha); + float delta_phi = r*sin(alpha); + + hit.setEtaPhiZE(center_eta + delta_eta,center_phi + delta_phi,center_z, hit.E()*m_scale); + + ATH_MSG_DEBUG("HIT: E="<<hit.E()<<" cs="<<cs<<" eta="<<hit.eta()<<" phi="<<hit.phi()<< " z="<<hit.z()<<" r="<<r<<" alpha="<<alpha); + + return FCSSuccess; +} + + +void TFCSFlatLateralShapeParametrization::Print(Option_t *option) const +{ + TString opt(option); + bool shortprint=opt.Index("short")>=0; + bool longprint=msgLvl(MSG::DEBUG) || (msgLvl(MSG::INFO) && !shortprint); + TString optprint=opt;optprint.ReplaceAll("short",""); + TFCSLateralShapeParametrizationHitBase::Print(option); + + if(longprint) { + ATH_MSG_INFO(optprint <<" dR="<<m_dR<<" scale factor="<<m_scale<<", #hits="<<m_nhits); + } +} diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHistoLateralShapeParametrization.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHistoLateralShapeParametrization.cxx index e7b62b40d5d01c535faa81a1fc7ba48fe7570121..39e8dbe3d94be4debd1f50999520326ab8ffc3dc 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHistoLateralShapeParametrization.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHistoLateralShapeParametrization.cxx @@ -22,7 +22,7 @@ //============================================= TFCSHistoLateralShapeParametrization::TFCSHistoLateralShapeParametrization(const char* name, const char* title) : - TFCSLateralShapeParametrizationHitBase(name,title),m_nhits(0) + TFCSLateralShapeParametrizationHitBase(name,title),m_nhits(0),m_r_offset(0),m_r_scale(1.0) { reset_phi_symmetric(); } @@ -31,6 +31,11 @@ TFCSHistoLateralShapeParametrization::~TFCSHistoLateralShapeParametrization() { } +double TFCSHistoLateralShapeParametrization::get_sigma2_fluctuation(TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/) const +{ + return 1.0/m_nhits; +} + int TFCSHistoLateralShapeParametrization::get_number_of_hits(TFCSSimulationState &simulstate, const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/) const { if (!simulstate.randomEngine()) { @@ -91,6 +96,9 @@ FCSReturnCode TFCSHistoLateralShapeParametrization::simulate_hit(Hit &hit, TFCSS return FCSFatal; } + r*=m_r_scale; + r+=m_r_offset; + if(r<0) r=0; float delta_eta_mm = r * cos(alpha); float delta_phi_mm = r * sin(alpha); @@ -152,9 +160,9 @@ void TFCSHistoLateralShapeParametrization::Print(Option_t *option) const if(longprint) { if(is_phi_symmetric()) { - ATH_MSG_INFO(optprint <<" Histo: "<<m_hist.get_HistoBordersx().size()-1<<"*"<<m_hist.get_HistoBordersy().size()-1<<" bins, #hits="<<m_nhits<<" (phi symmetric)"); + ATH_MSG_INFO(optprint <<" Histo: "<<m_hist.get_HistoBordersx().size()-1<<"*"<<m_hist.get_HistoBordersy().size()-1<<" bins, #hits="<<m_nhits<<", r scale="<<m_r_scale<<", r offset="<<m_r_offset<<"mm (phi symmetric)"); } else { - ATH_MSG_INFO(optprint <<" Histo: "<<m_hist.get_HistoBordersx().size()-1<<"*"<<m_hist.get_HistoBordersy().size()-1<<" bins, #hits="<<m_nhits<<" (not phi symmetric)"); + ATH_MSG_INFO(optprint <<" Histo: "<<m_hist.get_HistoBordersx().size()-1<<"*"<<m_hist.get_HistoBordersy().size()-1<<" bins, #hits="<<m_nhits<<", r scale="<<m_r_scale<<", r offset="<<m_r_offset<<"mm (not phi symmetric)"); } } } diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitBase.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitBase.cxx index ace709d6cc37beff91c039906f7a6ea15db0fe88..8e2badda702e5ace27a7c1bd36ed34f75adadfc5 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitBase.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitBase.cxx @@ -16,6 +16,11 @@ TFCSLateralShapeParametrizationHitBase::TFCSLateralShapeParametrizationHitBase(c { } +double TFCSLateralShapeParametrizationHitBase::get_sigma2_fluctuation(TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/) const +{ + return -1; +} + int TFCSLateralShapeParametrizationHitBase::get_number_of_hits(TFCSSimulationState& /*simulstate*/,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/) const { return -1; diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx index b0bd72590e316c500eb520073985ab6ca732b917..16cd558dff7c80e985b71e98d7832bf4d8a0272b 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx @@ -92,6 +92,10 @@ FCSReturnCode TFCSLateralShapeParametrizationHitChain::simulate(TFCSSimulationSt } sumEhit+=hit.E(); ++ihit; + if(ihit>10*nhit) { + ATH_MSG_WARNING("TFCSLateralShapeParametrizationHitChain::simulate(): aborting hit chain, iterated " << 10*nhit << " times, expected " << nhit<<" times. Deposited E("<<calosample()<<")="<<sumEhit); + break; + } } while (sumEhit<Elayer); return FCSSuccess; diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitNumberFromE.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitNumberFromE.cxx index 55a3ddf360baab2d91608d45c7623fa368373dd2..6d48a5a7601f0165669727c7318b965470dd0375 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitNumberFromE.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitNumberFromE.cxx @@ -19,12 +19,8 @@ TFCSLateralShapeParametrizationHitNumberFromE::TFCSLateralShapeParametrizationHi set_match_all_pdgid(); } -int TFCSLateralShapeParametrizationHitNumberFromE::get_number_of_hits(TFCSSimulationState& simulstate,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/) const +double TFCSLateralShapeParametrizationHitNumberFromE::get_sigma2_fluctuation(TFCSSimulationState& simulstate,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/) const { - if (!simulstate.randomEngine()) { - return -1; - } - int cs=calosample(); double energy=simulstate.E(cs); @@ -38,7 +34,21 @@ int TFCSLateralShapeParametrizationHitNumberFromE::get_number_of_hits(TFCSSimula } double sigma_stochastic=m_stochastic/sqrt(energy/1000.0); - int hits = CLHEP::RandPoisson::shoot(simulstate.randomEngine(), 1.0 / (sigma_stochastic*sigma_stochastic + m_constant*m_constant)); + double sigma2 = sigma_stochastic*sigma_stochastic + m_constant*m_constant; + + ATH_MSG_DEBUG("sigma^2 fluctuation="<<sigma2); + + return sigma2; +} + +int TFCSLateralShapeParametrizationHitNumberFromE::get_number_of_hits(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const +{ + if (!simulstate.randomEngine()) { + return -1; + } + + double sigma2=get_sigma2_fluctuation(simulstate,truth,extrapol); + int hits = CLHEP::RandPoisson::shoot(simulstate.randomEngine(), 1.0 / sigma2); ATH_MSG_DEBUG("#hits="<<hits);