|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #include "CLHEP/Random/RandFlat.h"
6 #include "CLHEP/Random/RandPoisson.h"
14 #include "HepPDT/ParticleData.hh"
15 #include "HepPDT/ParticleDataTable.hh"
36 const int pdgId = truth->
pdgid();
46 const double center_r = hit.
center_r();
47 const double center_z = hit.
center_z();
49 float alpha,
r, rnd1, rnd2;
50 rnd1 = CLHEP::RandFlat::shoot(simulstate.
randomEngine());
51 rnd2 = CLHEP::RandFlat::shoot(simulstate.
randomEngine());
65 if (TMath::IsNaN(alpha) || TMath::IsNaN(
r)) {
69 <<
" bins, #hits=" <<
m_nhits <<
" alpha=" << alpha
70 <<
" r=" <<
r <<
" rnd1=" << rnd1 <<
" rnd2=" << rnd2);
78 const float hit_r =
r *
cos(alpha) + center_r;
83 if ((
charge < 0. && pdgId!=11) || pdgId==-11)
85 const float hit_phi =
delta_phi + center_phi;
87 hit.
setXYZE(hit_r *
cos(hit_phi), hit_r *
sin(hit_phi), center_z, hit.
E());
90 <<
" y=" << hit.
y() <<
" z=" << hit.
z() <<
" r=" <<
r
91 <<
" alpha=" << alpha);
FCSReturnCode
Base class for all FastCaloSim parametrizations Functionality in derivde classes is provided through ...
void setXYZE(float x, float y, float z, float E)
CLHEP::HepRandomEngine * randomEngine()
const std::vector< float > & get_HistoBordersy() const
~TFCSHistoLateralShapeParametrizationFCal()
virtual void rnd_to_fct(float &valuex, float &valuey, float rnd0, float rnd1) const
bool is_phi_symmetric() const
double charge(const T &p)
virtual FCSReturnCode simulate_hit(Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) override
simulated one hit position with weight that should be put into simulstate sometime later all hit weig...
def delta_phi(phi1, phi2)
TFCS2DFunctionHistogram m_hist
Histogram to be used for the shape simulation.
TFCSHistoLateralShapeParametrizationFCal(const char *name=nullptr, const char *title=nullptr)
const std::vector< float > & get_HistoBordersx() const