ATLAS Offline Software
Loading...
Searching...
No Matches
TFCSEnergyInterpolationSpline.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_TFCSEnergyInterpolationSpline_h
6#define ISF_FASTCALOSIMEVENT_TFCSEnergyInterpolationSpline_h
7
9#include "TSpline.h"
10
11class TGraph;
12
14public:
15 TFCSEnergyInterpolationSpline(const char *name = nullptr,
16 const char *title = nullptr);
17
24
25 bool OnlyScaleEnergy() const { return TestBit(kOnlyScaleEnergy); };
28
29 virtual bool is_match_Ekin_bin(int /*Ekin_bin*/) const override {
30 return true;
31 };
32 virtual bool is_match_calosample(int /*calosample*/) const override {
33 return true;
34 };
35
38 void InitFromSpline(const TSpline3 &spline) { m_spline = spline; };
39
43 void InitFromArrayInLogEkin(Int_t np, Double_t logEkin[], Double_t response[],
44 const char *opt = nullptr, Double_t valbeg = 0,
45 Double_t valend = 0);
46
50 void InitFromArrayInEkin(Int_t np, Double_t Ekin[], Double_t response[],
51 const char *opt = nullptr, Double_t valbeg = 0,
52 Double_t valend = 0);
53
54 const TSpline3 &spline() const { return m_spline; };
55
58 virtual FCSReturnCode
59 simulate(TFCSSimulationState &simulstate, const TFCSTruthState *truth,
60 const TFCSExtrapolationState *extrapol) const override;
61
62 void Print(Option_t *option = "") const override;
63
64 static void unit_test(TFCSSimulationState *simulstate = nullptr,
65 TFCSTruthState *truth = nullptr,
66 const TFCSExtrapolationState *extrapol = nullptr,
67 TGraph *grspline = nullptr);
68
69private:
70 TSpline3 m_spline;
71
72 ClassDefOverride(TFCSEnergyInterpolationSpline,
73 1) // TFCSEnergyInterpolationSpline
74};
75
76#endif
MDT_Response response
FCSReturnCode
Base class for all FastCaloSim parametrizations Functionality in derivde classes is provided through ...
void InitFromSpline(const TSpline3 &spline)
Initialize interpolation from spline x values should be log(Ekin), y values should <E(reco)/Ekin(true...
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...
static void unit_test(TFCSSimulationState *simulstate=nullptr, TFCSTruthState *truth=nullptr, const TFCSExtrapolationState *extrapol=nullptr, TGraph *grspline=nullptr)
void InitFromArrayInEkin(Int_t np, Double_t Ekin[], Double_t response[], const char *opt=nullptr, Double_t valbeg=0, Double_t valend=0)
Initialize spline interpolation from arrays in Ekin and response=<E(reco)/Ekin(true)> opt,...
FCSEnergyInitializationStatusBits
Status bit for energy initialization.
@ kOnlyScaleEnergy
Set this bit in the TObject bit field the simulated energy.
virtual bool is_match_Ekin_bin(int) const override
void Print(Option_t *option="") const override
void InitFromArrayInLogEkin(Int_t np, Double_t logEkin[], Double_t response[], const char *opt=nullptr, Double_t valbeg=0, Double_t valend=0)
Initialize spline interpolation from arrays in log(Ekin) and response=<E(reco)/Ekin(true)> opt,...
TFCSEnergyInterpolationSpline(const char *name=nullptr, const char *title=nullptr)
virtual bool is_match_calosample(int) const override
TFCSParametrization(const char *name=nullptr, const char *title=nullptr)