get resolution systematics from material effect (mc12c setup, MVA calibration)
More...
#include <get_MaterialResolutionEffect.h>
get resolution systematics from material effect (mc12c setup, MVA calibration)
Different parameterizations (gaussian core, sigma eff 90% and 80% from crystal ball fits) are available
Definition at line 28 of file get_MaterialResolutionEffect.h.
◆ get_MaterialResolutionEffect()
get_MaterialResolutionEffect::get_MaterialResolutionEffect |
( |
| ) |
|
constructor (initialization done there reading root files with resolution fit parameters
Definition at line 36 of file get_MaterialResolutionEffect.cxx.
39 const std::string pType[3] = {
"Elec",
"Unconv",
"Conv"};
40 const std::string sType[
s_nSys] = {
"A",
"CD",
"EL",
"FMX"};
43 "ElectronPhotonFourMomentumCorrection/v8/"
44 "histos-systematics-material.root");
46 std::unique_ptr<TFile> file0(TFile::Open(
filename.c_str(),
"READ"));
48 for (Int_t isys = 0; isys <
s_nSys; isys++) {
49 for (Int_t ieta = 0; ieta <
s_nEtaBins; ieta++) {
50 for (Int_t iconv = 0; iconv < 3;
53 sprintf(
name,
"syst%s_%s_etaBin_%d", pType[iconv].c_str(),
54 sType[isys].c_str(), ieta);
56 checked_cast<TH1*>(file0->Get(
name)));
57 m_hSystPeak.at(isys).at(ieta).at(iconv)->SetDirectory(
nullptr);
59 sprintf(
name,
"syst%s_sigmaG_%s_etaBin_%d", pType[iconv].c_str(),
60 sType[isys].c_str(), ieta);
62 checked_cast<TH1*>(file0->Get(
name)));
63 m_hSystResol.at(isys).at(ieta).at(iconv)->SetDirectory(
nullptr);
70 checked_cast<TH2*>(file0->Get(
"systElec_IBLPP0")));
74 checked_cast<TH2*>(file0->Get(
"systUnconv_IBLPP0")));
78 checked_cast<TH2*>(file0->Get(
"systConv_IBLPP0")));
◆ ~get_MaterialResolutionEffect()
get_MaterialResolutionEffect::~get_MaterialResolutionEffect |
( |
| ) |
|
|
inline |
◆ getDelta()
double get_MaterialResolutionEffect::getDelta |
( |
int |
particle_type, |
|
|
double |
energy, |
|
|
double |
eta, |
|
|
int |
response_type, |
|
|
int |
isyst |
|
) |
| const |
get material effect on resolution from distorted geometry as difference to 40 GeV Et electrons smearing
particle_type: 0=electron, 1=reco unconverted photon, 2=reco converted photon
energy : energy in MeV
eta : eta
response_type: 0=gaussian core, 1=sigma eff 80%, 2=sigma eff 90%
isyst : 0 configA, 1 configCD, 2 configE, 3 configFMX
returned value is sigmaE/E change in quadrature to resolution
Definition at line 94 of file get_MaterialResolutionEffect.cxx.
99 if (particle_type < 0 || particle_type > 2)
101 if (response_type < 0 || response_type > 1)
104 float aeta = std::fabs(
eta);
105 double energyGeV =
energy * 0.001;
106 double et = energyGeV / cosh(
eta);
117 if (aeta>=2.5) aeta=2.49;
132 }
else if (aeta < 0.8) {
134 }
else if (aeta < 1.1) {
136 }
else if (aeta < 1.37) {
138 }
else if (aeta < 1.52) {
140 }
else if (aeta < 1.80) {
142 }
else if (aeta < 2.10) {
148 int ibinEt =
m_etBins->GetSize() - 2;
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ interpolateTH1()
double get_MaterialResolutionEffect::interpolateTH1 |
( |
TH1 * |
hist, |
|
|
double |
x, |
|
|
bool |
abs_bins |
|
) |
| const |
Definition at line 183 of file get_MaterialResolutionEffect.cxx.
185 if (!
hist)
return 0.;
188 if(x<=hist->GetBinCenter(1)) {
189 return abs_bins? std::abs(
hist->GetBinContent(1)) :
hist->GetBinContent(1);
195 int xbin =
hist->FindBin(
x);
197 if(x<=hist->GetBinCenter(xbin)) {
205 double y0 = abs_bins? std::abs(
hist->GetBinContent(xbin0)) :
hist->GetBinContent(xbin0);
206 double x0 =
hist->GetBinCenter(xbin0);
207 double y1 = abs_bins? std::abs(
hist->GetBinContent(xbin1)) :
hist->GetBinContent(xbin1);
208 double x1 =
hist->GetBinCenter(xbin1);
◆ msg() [1/2]
MsgStream & asg::AsgMessaging::msg |
( |
| ) |
const |
|
inherited |
The standard message stream.
- Returns
- A reference to the default message stream of this object.
Definition at line 49 of file AsgMessaging.cxx.
50 #ifndef XAOD_STANDALONE
52 #else // not XAOD_STANDALONE
54 #endif // not XAOD_STANDALONE
◆ msg() [2/2]
MsgStream & asg::AsgMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
The standard message stream.
- Parameters
-
lvl | The message level to set the stream to |
- Returns
- A reference to the default message stream, set to level "lvl"
Definition at line 57 of file AsgMessaging.cxx.
58 #ifndef XAOD_STANDALONE
60 #else // not XAOD_STANDALONE
63 #endif // not XAOD_STANDALONE
◆ msgLvl()
bool asg::AsgMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
Test the output level of the object.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicting if messages at given level will be printed
-
true
If messages at level "lvl" will be printed
Definition at line 41 of file AsgMessaging.cxx.
42 #ifndef XAOD_STANDALONE
43 return ::AthMessaging::msgLvl( lvl );
44 #else // not XAOD_STANDALONE
45 return m_msg.msgLevel( lvl );
46 #endif // not XAOD_STANDALONE
◆ setInterpolate()
void get_MaterialResolutionEffect::setInterpolate |
( |
bool |
interpolate | ) |
|
|
inline |
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ store_IBL_PP0_YProjections()
void get_MaterialResolutionEffect::store_IBL_PP0_YProjections |
( |
| ) |
|
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_etBins
const TArrayD* get_MaterialResolutionEffect::m_etBins |
|
private |
◆ m_hsyst_IBL_PP0
std::array<std::unique_ptr<TH2>, 3> get_MaterialResolutionEffect::m_hsyst_IBL_PP0 |
|
private |
◆ m_hsyst_IBL_PP0_ProjectionY
std::array<std::vector<std::unique_ptr<TH1> >, 3> get_MaterialResolutionEffect::m_hsyst_IBL_PP0_ProjectionY |
|
private |
◆ m_hSystPeak
std::array<std::array<std::array<std::unique_ptr<TH1>, 3>, s_nEtaBins>, s_nSys> get_MaterialResolutionEffect::m_hSystPeak |
|
private |
◆ m_hSystResol
std::array<std::array<std::array<std::unique_ptr<TH1>, 3>, s_nEtaBins>, s_nSys> get_MaterialResolutionEffect::m_hSystResol |
|
private |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_interpolate
bool get_MaterialResolutionEffect::m_interpolate = false |
|
private |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ s_nEtaBins
const int get_MaterialResolutionEffect::s_nEtaBins = 8 |
|
staticprivate |
◆ s_nSys
const int get_MaterialResolutionEffect::s_nSys = 4 |
|
staticprivate |
The documentation for this class was generated from the following files:
float interpolate(const CaloRec::Array< 2 > &a, float x, unsigned int degree, unsigned int ycol=1, const CaloRec::Array< 1 > ®ions=CaloRec::Array< 1 >(), int n_points=-1, bool fixZero=false)
Polynomial interpolation in a table.