ATLAS Offline Software
Loading...
Searching...
No Matches
eg_resolution.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 EG_RESOLUTION_H
6#define EG_RESOLUTION_H
7
8#include <cmath>
9#include <cstdlib>
10#include <memory>
11#include <array>
12#include "TArrayD.h"
13#include "TFile.h"
14#include "TH1.h"
15#include "xAODEgamma/Egamma.h"
26
28{
29
30public:
31 static constexpr size_t samplings = 4;
32 static constexpr size_t resolTypes = 3;
35 eg_resolution(const std::string& configuration);
36 ~eg_resolution() = default;
37
45 double getResolution(int particle_type,
46 double energy,
47 double eta,
48 int resol_type = 2) const;
53 double getResolution(const xAOD::Egamma& particle, int resol_type = 2) const;
54
55private:
56 // histograms to store resolution parameters
57 std::array<std::array<std::unique_ptr<TH1>, resolTypes>, samplings> m_hSampling;
58 std::array<std::array<std::unique_ptr<TH1>, resolTypes>, samplings> m_hNoise;
59 std::array<std::array<std::unique_ptr<TH1>, resolTypes>, samplings> m_hConst;
60 const TArrayD* m_etaBins; // Not owning pointer
61};
62
63#endif
Scalar eta() const
pseudorapidity method
static constexpr size_t resolTypes
std::array< std::array< std::unique_ptr< TH1 >, resolTypes >, samplings > m_hNoise
~eg_resolution()=default
std::array< std::array< std::unique_ptr< TH1 >, resolTypes >, samplings > m_hConst
static constexpr size_t samplings
std::array< std::array< std::unique_ptr< TH1 >, resolTypes >, samplings > m_hSampling
eg_resolution(const std::string &configuration)
constructor (initialization done there reading root files with resolution fit parameters
double getResolution(int particle_type, double energy, double eta, int resol_type=2) const
get relative resolution (sigmaE/E) as a function of E (in Mev) and eta
const TArrayD * m_etaBins
Egamma_v1 Egamma
Definition of the current "egamma version".
Definition Egamma.h:17