ATLAS Offline Software
Loading...
Searching...
No Matches
TFCSLateralShapeParametrizationHitBase.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
7
10
11//=============================================
12//======= TFCSLateralShapeParametrization =========
13//=============================================
14
18
20 TFCSSimulationState & /*simulstate*/, const TFCSTruthState * /*truth*/,
21 const TFCSExtrapolationState * /*extrapol*/) const {
22 return -1;
23}
24
26 TFCSSimulationState & /*simulstate*/, const TFCSTruthState * /*truth*/,
27 const TFCSExtrapolationState * /*extrapol*/) const {
28 return -1;
29}
30
32 TFCSSimulationState &simulstate, const TFCSTruthState *truth,
33 const TFCSExtrapolationState *extrapol) const {
34 const int nhits = get_number_of_hits(simulstate, truth, extrapol);
35 const int sample = calosample();
36 if (nhits <= 0 || sample < 0)
37 return -1.;
38 else
39 return simulstate.E(sample) / nhits;
40}
41
45
49
51 Hit &hit, TFCSSimulationState & /*simulstate*/,
52 const TFCSTruthState * /*truth*/, const TFCSExtrapolationState *extrapol) {
53 int cs = calosample();
54 hit.eta() = 0.5 * (extrapol->eta(cs, CaloSubPos::SUBPOS_ENT) +
55 extrapol->eta(cs, CaloSubPos::SUBPOS_EXT));
56 hit.phi() = 0.5 * (extrapol->phi(cs, CaloSubPos::SUBPOS_ENT) +
57 extrapol->phi(cs, CaloSubPos::SUBPOS_EXT));
58
59 return FCSSuccess;
60}
FCSReturnCode
Base class for all FastCaloSim parametrizations Functionality in derivde classes is provided through ...
virtual int get_number_of_hits(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 numb...
virtual float get_E_hit(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const
Get hit energy from layer energy and number of hits.
virtual double get_sigma2_fluctuation(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const
Give the effective size sigma^2 of the fluctuations that should be generated by the amount of generat...
TFCSLateralShapeParametrizationHitBase(const char *name=nullptr, const char *title=nullptr)
virtual float getMinWeight() const
Get minimum and maximum value of weight for hit energy reweighting.
virtual FCSReturnCode simulate_hit(Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol)
simulated one hit position with some energy.
TFCSLateralShapeParametrization(const char *name=nullptr, const char *title=nullptr)