ATLAS Offline Software
TFCSEnergyInterpolationHistogram.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ISF_FASTCALOSIMEVENT_TFCSEnergyInterpolationHistogram_h
6 #define ISF_FASTCALOSIMEVENT_TFCSEnergyInterpolationHistogram_h
7 
9 #include "TH1F.h"
10 
12 public:
13  TFCSEnergyInterpolationHistogram(const char *name = nullptr,
14  const char *title = nullptr);
15 
18  BIT(15)
19  };
21 
22  bool OnlyScaleEnergy() const { return TestBit(kOnlyScaleEnergy); };
24  void reset_OnlyScaleEnergy() { ResetBit(kOnlyScaleEnergy); };
25 
26  virtual bool is_match_Ekin_bin(int /*Ekin_bin*/) const override {
27  return true;
28  };
29  virtual bool is_match_calosample(int /*calosample*/) const override {
30  return true;
31  };
32 
35  void InitFromHist(const TH1F &hist) { m_hist = hist; };
36 
37  const TH1F &hist() const { return m_hist; };
38 
41  virtual FCSReturnCode
42  simulate(TFCSSimulationState &simulstate, const TFCSTruthState *truth,
43  const TFCSExtrapolationState *extrapol) const override;
44  void Print(Option_t *option = "") const override;
45 
46  static void unit_test(TFCSSimulationState *simulstate = nullptr,
47  TFCSTruthState *truth = nullptr,
48  const TFCSExtrapolationState *extrapol = nullptr,
49  TH1F *hist = nullptr);
50 
51 private:
53 
54  ClassDefOverride(TFCSEnergyInterpolationHistogram,
55  1) // TFCSEnergyInterpolationHistogram
56 };
57 
58 #if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
59 #pragma link C++ class TFCSEnergyInterpolationHistogram + ;
60 #endif
61 
62 #endif
FCSReturnCode
FCSReturnCode
Base class for all FastCaloSim parametrizations Functionality in derivde classes is provided through ...
Definition: TFCSParametrizationBase.h:41
TFCSEnergyInterpolationHistogram::simulate
virtual FCSReturnCode simulate(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const override
Initialize simulstate with the mean reconstructed energy in the calorimater expeted from the true kin...
Definition: TFCSEnergyInterpolationHistogram.cxx:36
TFCSExtrapolationState
Definition: TFCSExtrapolationState.h:13
RunActsMaterialValidation.extrapol
extrapol
Definition: RunActsMaterialValidation.py:90
TFCSEnergyInterpolationHistogram::hist
const TH1F & hist() const
Definition: TFCSEnergyInterpolationHistogram.h:37
TFCSEnergyInterpolationHistogram
Definition: TFCSEnergyInterpolationHistogram.h:11
TFCSParametrization.h
covarianceTool.title
title
Definition: covarianceTool.py:542
TFCSEnergyInterpolationHistogram::is_match_Ekin_bin
virtual bool is_match_Ekin_bin(int) const override
Definition: TFCSEnergyInterpolationHistogram.h:26
TFCSEnergyInterpolationHistogram::reset_OnlyScaleEnergy
void reset_OnlyScaleEnergy()
Definition: TFCSEnergyInterpolationHistogram.h:24
TFCSEnergyInterpolationHistogram::is_match_calosample
virtual bool is_match_calosample(int) const override
Definition: TFCSEnergyInterpolationHistogram.h:29
TFCSEnergyInterpolationHistogram::set_OnlyScaleEnergy
void set_OnlyScaleEnergy()
Definition: TFCSEnergyInterpolationHistogram.h:23
TFCSEnergyInterpolationHistogram::Print
void Print(Option_t *option="") const override
Definition: TFCSEnergyInterpolationHistogram.cxx:67
TFCSEnergyInterpolationHistogram::unit_test
static void unit_test(TFCSSimulationState *simulstate=nullptr, TFCSTruthState *truth=nullptr, const TFCSExtrapolationState *extrapol=nullptr, TH1F *hist=nullptr)
Definition: TFCSEnergyInterpolationHistogram.cxx:83
TFCSParametrization
Definition: TFCSParametrization.h:10
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TFCSEnergyInterpolationHistogram::OnlyScaleEnergy
bool OnlyScaleEnergy() const
Definition: TFCSEnergyInterpolationHistogram.h:22
TFCSEnergyInterpolationHistogram::InitFromHist
void InitFromHist(const TH1F &hist)
Initialize interpolation from histogram x values should be Ekin, y values should <E(reco)/Ekin(true)>
Definition: TFCSEnergyInterpolationHistogram.h:35
TFCSEnergyInterpolationHistogram::TFCSEnergyInterpolationHistogram
TFCSEnergyInterpolationHistogram(const char *name=nullptr, const char *title=nullptr)
Definition: TFCSEnergyInterpolationHistogram.cxx:32
TH1F
Definition: rootspy.cxx:320
TFCSEnergyInterpolationHistogram::kOnlyScaleEnergy
@ kOnlyScaleEnergy
Set this bit in the TObject bit field the simulated energy should only be scaled by the spline.
Definition: TFCSEnergyInterpolationHistogram.h:17
TFCSTruthState
Definition: TFCSTruthState.h:13
TFCSSimulationState
Definition: TFCSSimulationState.h:32
TFCSEnergyInterpolationHistogram::m_hist
TH1F m_hist
Definition: TFCSEnergyInterpolationHistogram.h:52
TFCSEnergyInterpolationHistogram::FCSEnergyInitializationStatusBits
FCSEnergyInitializationStatusBits
Definition: TFCSEnergyInterpolationHistogram.h:16