|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "CLHEP/Random/RandFlat.h"
8 #include "CLHEP/Random/RandGaussZiggurat.h"
43 const double center_r = hit.
center_r();
44 const double center_z = hit.
center_z();
46 const float dist000 = TMath::Sqrt(center_r * center_r + center_z * center_z);
47 const float eta_jakobi = TMath::Abs(2.0 * TMath::Exp(-center_eta) /
48 (1.0 + TMath::Exp(-2 * center_eta)));
50 const float delta_eta = hit.
eta() - center_eta;
52 const float delta_eta_mm = delta_eta * eta_jakobi * dist000;
53 const float delta_phi_mm =
delta_phi * center_r;
54 const float delta_r_mm =
55 TMath::Sqrt(delta_eta_mm * delta_eta_mm + delta_phi_mm * delta_phi_mm);
82 m_hist = (TH1 *)
hist->Clone(TString(
"TFCSHistoLateralShapeWeight_") +
84 m_hist->SetDirectory(
nullptr);
91 bool shortprint =
opt.Index(
"short") >= 0;
93 TString optprint =
opt;
94 optprint.ReplaceAll(
"short",
"");
100 <<
" Histogram: " <<
m_hist->GetNbinsX() <<
" bins ["
101 << std::as_const(
m_hist)->GetXaxis()->GetXmin() <<
","
102 << std::as_const(
m_hist)->GetXaxis()->GetXmax() <<
"]"
FCSReturnCode
Base class for all FastCaloSim parametrizations Functionality in derivde classes is provided through ...
void Print(Option_t *option="") const override
TFCSHistoLateralShapeWeight(const char *name=nullptr, const char *title=nullptr)
CLHEP::HepRandomEngine * randomEngine()
virtual float getMinWeight() const override
Get minimum and maximum value of weight for hit energy reweighting.
virtual void Print(Option_t *option="") const override
bool Initialize(TH1 *hist)
Init from histogram.
virtual FCSReturnCode simulate_hit(Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) override
weight the energy of one hit in order to generate fluctuations
TH1 * m_hist
Histogram to be used for the shape simulation The histogram x-axis should be in dR^2=deta^2+dphi^2.
virtual float getMaxWeight() const override
def delta_phi(phi1, phi2)
virtual ~TFCSHistoLateralShapeWeight()
bool msgLvl(const MSG::Level lvl) const
Check whether the logging system is active at the provided verbosity level.