ATLAS Offline Software
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 
16  const char *name, const char *title)
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 
43  return -1.;
44 }
45 
47  return -1.;
48 }
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) +
56  hit.phi() = 0.5 * (extrapol->phi(cs, CaloSubPos::SUBPOS_ENT) +
58 
59  return FCSSuccess;
60 }
FCSReturnCode
FCSReturnCode
Base class for all FastCaloSim parametrizations Functionality in derivde classes is provided through ...
Definition: TFCSParametrizationBase.h:41
TFCSLateralShapeParametrizationHitBase::simulate_hit
virtual FCSReturnCode simulate_hit(Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol)
simulated one hit position with some energy.
Definition: TFCSLateralShapeParametrizationHitBase.cxx:50
TFCSLateralShapeParametrizationHitBase::Hit::phi
float & phi()
Definition: TFCSLateralShapeParametrizationHitBase.h:87
TFCSLateralShapeParametrizationHitBase::get_E_hit
virtual float get_E_hit(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const
Get hit energy from layer energy and number of hits.
Definition: TFCSLateralShapeParametrizationHitBase.cxx:31
TFCSExtrapolationState
Definition: TFCSExtrapolationState.h:13
TFCSLateralShapeParametrizationHitBase::Hit
Definition: TFCSLateralShapeParametrizationHitBase.h:42
RunActsMaterialValidation.extrapol
extrapol
Definition: RunActsMaterialValidation.py:90
TFCSLateralShapeParametrizationHitBase::get_sigma2_fluctuation
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...
Definition: TFCSLateralShapeParametrizationHitBase.cxx:19
TFCSLateralShapeParametrizationHitBase.h
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:116
covarianceTool.title
title
Definition: covarianceTool.py:542
SUBPOS_ENT
@ SUBPOS_ENT
Definition: FastCaloSim_CaloCell_ID.h:12
FCSSuccess
@ FCSSuccess
Definition: TFCSParametrizationBase.h:41
TFCSLateralShapeParametrizationHitBase::getMinWeight
virtual float getMinWeight() const
Get minimum and maximum value of weight for hit energy reweighting.
Definition: TFCSLateralShapeParametrizationHitBase.cxx:42
TFCSLateralShapeParametrizationHitBase::TFCSLateralShapeParametrizationHitBase
TFCSLateralShapeParametrizationHitBase(const char *name=nullptr, const char *title=nullptr)
Definition: TFCSLateralShapeParametrizationHitBase.cxx:15
TFCSLateralShapeParametrizationHitBase::get_number_of_hits
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...
Definition: TFCSLateralShapeParametrizationHitBase.cxx:25
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SUBPOS_EXT
@ SUBPOS_EXT
Definition: FastCaloSim_CaloCell_ID.h:13
TFCSLateralShapeParametrization::calosample
int calosample() const
Definition: TFCSLateralShapeParametrization.h:34
TFCSExtrapolationState.h
TFCSLateralShapeParametrizationHitBase::Hit::eta
float & eta()
Definition: TFCSLateralShapeParametrizationHitBase.h:86
TFCSSimulationState::E
double E() const
Definition: TFCSSimulationState.h:42
TFCSSimulationState.h
FastCaloSim_CaloCell_ID.h
TFCSLateralShapeParametrizationHitBase::getMaxWeight
virtual float getMaxWeight() const
Definition: TFCSLateralShapeParametrizationHitBase.cxx:46
TFCSLateralShapeParametrization
Definition: TFCSLateralShapeParametrization.h:10
TFCSTruthState
Definition: TFCSTruthState.h:13
TFCSSimulationState
Definition: TFCSSimulationState.h:32