|
ATLAS Offline Software
|
#include <TFCSEnergyInterpolationHistogram.h>
◆ FindDuplicateClasses_t
◆ FindDuplicates_t
◆ FCSEnergyInitializationStatusBits
Enumerator |
---|
kOnlyScaleEnergy | Set this bit in the TObject bit field the simulated energy should only be scaled by the spline.
|
Definition at line 16 of file TFCSEnergyInterpolationHistogram.h.
◆ FCSStatusBits
Status bit for FCS needs.
Enumerator |
---|
kMatchAllPDGID | Set this bit in the TObject bit field if valid for all PDGID.
|
Definition at line 52 of file TFCSParametrizationBase.h.
◆ TFCSEnergyInterpolationHistogram()
TFCSEnergyInterpolationHistogram::TFCSEnergyInterpolationHistogram |
( |
const char * |
name = nullptr , |
|
|
const char * |
title = nullptr |
|
) |
| |
◆ add_pdgid()
void TFCSParametrization::add_pdgid |
( |
int |
id | ) |
|
|
virtualinherited |
◆ CleanAuxInfo()
◆ clear()
void TFCSParametrization::clear |
( |
| ) |
|
|
inherited |
◆ clear_pdgid()
void TFCSParametrization::clear_pdgid |
( |
| ) |
|
|
virtualinherited |
◆ compare()
Definition at line 78 of file TFCSParametrization.cxx.
81 <<
IsA()->GetName() <<
" != " <<
ref.IsA()->GetName());
84 std::string
name(GetName());
87 <<
" != " <<
ref.GetName());
90 std::string
title(GetTitle());
93 <<
" != " <<
ref.GetTitle());
◆ Ekin_max()
double TFCSParametrization::Ekin_max |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ Ekin_min()
double TFCSParametrization::Ekin_min |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ Ekin_nominal()
double TFCSParametrization::Ekin_nominal |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ eta_max()
double TFCSParametrization::eta_max |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ eta_min()
double TFCSParametrization::eta_min |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ eta_nominal()
double TFCSParametrization::eta_nominal |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ FindDuplicates()
Definition at line 90 of file TFCSParametrizationBase.cxx.
92 for (
unsigned int i = 0;
i <
size(); ++
i)
97 auto checkexist = dup.find(param);
98 if (checkexist != dup.end()) {
100 << param->GetName());
101 if (checkexist->second.replace) {
104 << refparam <<
"=" << refparam->GetName()
105 <<
", duplicate is " << param <<
"=" << param->GetName()
106 <<
" index " <<
i <<
" of " <<
this);
107 dup[refparam].mother.push_back(
this);
108 dup[refparam].index.push_back(
i);
113 dup[param] = Duplicate_t();
114 for (
auto &
ref : dup) {
117 if (param == refparam)
120 if (refparam ==
nullptr)
123 if (
ref.second.replace)
126 if (*param == *refparam) {
128 << refparam <<
"=" << refparam->GetName()
129 <<
", duplicate is " << param <<
"=" << param->GetName()
130 <<
" index " <<
i <<
" of " <<
this);
131 dup[param].replace = refparam;
132 dup[refparam].mother.push_back(
this);
133 dup[refparam].index.push_back(
i);
◆ hist()
const TH1F& TFCSEnergyInterpolationHistogram::hist |
( |
| ) |
const |
|
inline |
◆ InitFromHist()
void TFCSEnergyInterpolationHistogram::InitFromHist |
( |
const TH1F & |
hist | ) |
|
|
inline |
◆ is_match_all_calosample()
virtual bool TFCSParametrization::is_match_all_calosample |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_all_Ekin()
virtual bool TFCSParametrization::is_match_all_Ekin |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_all_Ekin_bin()
virtual bool TFCSParametrization::is_match_all_Ekin_bin |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_all_eta()
virtual bool TFCSParametrization::is_match_all_eta |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_all_pdgid()
virtual bool TFCSParametrizationBase::is_match_all_pdgid |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ is_match_calosample()
virtual bool TFCSEnergyInterpolationHistogram::is_match_calosample |
( |
int |
| ) |
const |
|
inlineoverridevirtual |
◆ is_match_Ekin()
virtual bool TFCSParametrization::is_match_Ekin |
( |
float |
Ekin | ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_Ekin_bin()
virtual bool TFCSEnergyInterpolationHistogram::is_match_Ekin_bin |
( |
int |
| ) |
const |
|
inlineoverridevirtual |
◆ is_match_eta()
virtual bool TFCSParametrization::is_match_eta |
( |
float |
eta | ) |
const |
|
inlineoverridevirtualinherited |
◆ is_match_pdgid()
virtual bool TFCSParametrization::is_match_pdgid |
( |
int |
id | ) |
const |
|
inlineoverridevirtualinherited |
◆ level()
MSG::Level ISF_FCS::MLogging::level |
( |
| ) |
const |
|
inlineinherited |
Retrieve output level.
Definition at line 201 of file MLogging.h.
201 {
return msg().level(); }
◆ msg() [1/2]
MsgStream & ISF_FCS::MLogging::msg |
( |
| ) |
const |
|
inlineinherited |
Return a stream for sending messages directly (no decoration)
Definition at line 231 of file MLogging.h.
232 MsgStream *
ms = m_msg_tls.get();
◆ msg() [2/2]
MsgStream & ISF_FCS::MLogging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Return a decorated starting stream for sending messages.
Definition at line 240 of file MLogging.h.
◆ msgLvl()
bool ISF_FCS::MLogging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Check whether the logging system is active at the provided verbosity level.
Definition at line 222 of file MLogging.h.
◆ OnlyScaleEnergy()
bool TFCSEnergyInterpolationHistogram::OnlyScaleEnergy |
( |
| ) |
const |
|
inline |
◆ operator==()
◆ operator[]() [1/2]
◆ operator[]() [2/2]
◆ pdgid()
const std::set<int>& TFCSParametrization::pdgid |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ Print()
void TFCSEnergyInterpolationHistogram::Print |
( |
Option_t * |
option = "" | ) |
const |
|
override |
Definition at line 67 of file TFCSEnergyInterpolationHistogram.cxx.
69 bool shortprint =
opt.Index(
"short") >= 0;
71 TString optprint =
opt;
72 optprint.ReplaceAll(
"short",
"");
78 <<
"histNbins=" <<
m_hist.GetNbinsX() <<
" "
79 <<
m_hist.GetXaxis()->GetBinLowEdge(1) <<
"<=Ekin<="
◆ RemoveDuplicates()
void TFCSParametrizationBase::RemoveDuplicates |
( |
| ) |
|
|
inherited |
Definition at line 142 of file TFCSParametrizationBase.cxx.
146 std::set<TFCSParametrizationBase *> dellist;
147 for (
auto &dupiter : dupclasses) {
149 for (
auto onedup : dup) {
150 if (onedup.second.mother.empty())
154 for (
unsigned int i = 0;
i < onedup.second.mother.size(); ++
i) {
155 int index = onedup.second.index[
i];
158 unsigned int delcount = dup[delparam].mother.
size();
161 << delparam <<
"=" << delparam->GetName() <<
" index "
162 <<
index <<
" of " << mother <<
", has " << delcount
163 <<
" other replacements attached. Deleting");
165 dellist.insert(delparam);
168 << delparam <<
"=" << delparam->GetName() <<
" index "
169 <<
index <<
" of " << mother <<
", has " << delcount
170 <<
" other replacements attached. Skipping");
180 std::map<std::string, int> ndel;
181 for (
auto *delparam : dellist) {
183 bool present = dup2.find(delparam) != dup2.end();
186 << delparam->GetName()
187 <<
" still referenced somewhere!");
190 << delparam->GetName());
191 ++ndel[delparam->ClassName()];
195 for (
auto &del : ndel)
196 ATH_MSG_INFO(
"Deleted " << del.second <<
" duplicate objects of class "
◆ RemoveNameTitle()
void TFCSParametrizationBase::RemoveNameTitle |
( |
| ) |
|
|
inherited |
◆ reset_match_all_pdgid()
virtual void TFCSParametrizationBase::reset_match_all_pdgid |
( |
| ) |
|
|
inlinevirtualinherited |
◆ reset_OnlyScaleEnergy()
void TFCSEnergyInterpolationHistogram::reset_OnlyScaleEnergy |
( |
| ) |
|
|
inline |
◆ set_daughter()
◆ set_Ekin()
◆ set_Ekin_eta()
◆ set_Ekin_max()
void TFCSParametrization::set_Ekin_max |
( |
double |
max | ) |
|
|
virtualinherited |
◆ set_Ekin_min()
void TFCSParametrization::set_Ekin_min |
( |
double |
min | ) |
|
|
virtualinherited |
◆ set_Ekin_nominal()
void TFCSParametrization::set_Ekin_nominal |
( |
double |
min | ) |
|
|
virtualinherited |
◆ set_eta()
◆ set_eta_max()
void TFCSParametrization::set_eta_max |
( |
double |
max | ) |
|
|
virtualinherited |
◆ set_eta_min()
void TFCSParametrization::set_eta_min |
( |
double |
min | ) |
|
|
virtualinherited |
◆ set_eta_nominal()
void TFCSParametrization::set_eta_nominal |
( |
double |
min | ) |
|
|
virtualinherited |
◆ set_geometry()
void TFCSParametrizationBase::set_geometry |
( |
ICaloGeometry * |
geo | ) |
|
|
virtualinherited |
◆ set_match_all_pdgid()
virtual void TFCSParametrizationBase::set_match_all_pdgid |
( |
| ) |
|
|
inlinevirtualinherited |
◆ set_OnlyScaleEnergy()
void TFCSEnergyInterpolationHistogram::set_OnlyScaleEnergy |
( |
| ) |
|
|
inline |
◆ set_pdgid() [1/2]
void TFCSParametrization::set_pdgid |
( |
const std::set< int > & |
ids | ) |
|
|
virtualinherited |
◆ set_pdgid() [2/2]
void TFCSParametrization::set_pdgid |
( |
int |
id | ) |
|
|
virtualinherited |
◆ set_pdgid_Ekin_eta()
◆ setLevel()
void ISF_FCS::MLogging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
virtualinherited |
◆ simulate()
Initialize simulstate with the mean reconstructed energy in the calorimater expeted from the true kinetic energy.
Reimplemented from TFCSParametrizationBase.
Definition at line 36 of file TFCSEnergyInterpolationHistogram.cxx.
41 const float Ekin = truth->
Ekin();
43 Einit = simulstate.
E();
46 if (Einit <
m_hist.GetXaxis()->GetBinLowEdge(1)) {
47 Emean =
m_hist.GetBinContent(1) * Einit;
49 if (Einit >
m_hist.GetXaxis()->GetBinUpEdge(
m_hist.GetNbinsX())) {
50 Emean =
m_hist.GetBinContent(
m_hist.GetNbinsX()) * Einit;
52 Emean =
m_hist.GetBinContent(
m_hist.GetXaxis()->FindBin(Einit)) * Einit;
58 <<
" and E=" << Einit);
62 simulstate.
set_E(Emean);
◆ size()
virtual unsigned int TFCSParametrizationBase::size |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ startMsg()
std::string ISF_FCS::MLogging::startMsg |
( |
MSG::Level |
lvl, |
|
|
const std::string & |
file, |
|
|
int |
line |
|
) |
| |
|
staticinherited |
Make a message to decorate the start of logging.
Print a message for the start of logging.
Definition at line 116 of file MLogging.cxx.
120 auto last_slash =
file.find_last_of(
'/');
121 int path_len = last_slash == std::string::npos ? 0 : last_slash;
122 int trim_point = path_len;
123 int total_len =
file.length();
124 if (total_len - path_len > col1_len)
125 trim_point = total_len - col1_len;
126 std::string trimmed_name =
file.substr(trim_point);
128 "NIL",
"VERBOSE",
"DEBUG",
"INFO",
"WARNING",
"ERROR",
"FATAL",
"ALWAYS"};
129 std::string
level = LevelNames[lvl];
130 std::string level_string = std::string(
"(") +
level +
") ";
132 output << std::setw(col1_len) << std::right << trimmed_name <<
":"
133 << std::setw(col2_len) << std::left <<
line << std::setw(col3_len)
134 << std::right << level_string;
◆ unit_test()
Definition at line 83 of file TFCSEnergyInterpolationHistogram.cxx.
94 hist =
new TH1F(
"h1",
"h1 title", 16, 0., 512.);
95 hist->SetBinContent(1, 0.687165);
96 hist->SetBinContent(2, 0.756837);
97 hist->SetBinContent(3, 0.836673);
98 hist->SetBinContent(4, 0.896336);
99 hist->SetBinContent(5, 0.889785);
100 hist->SetBinContent(6, 0.901266);
101 hist->SetBinContent(7, 0.888937);
102 hist->SetBinContent(8, 0.919943);
103 hist->SetBinContent(9, 0.941806);
104 hist->SetBinContent(10, 0.934668);
105 hist->SetBinContent(11, 0.939502);
106 hist->SetBinContent(12, 0.940796);
107 hist->SetBinContent(13, 0.945894);
108 hist->SetBinContent(14, 0.955445);
109 hist->SetBinContent(15, 0.955593);
110 hist->SetBinContent(16, 0.943673);
114 hdraw->SetMarkerColor(46);
115 hdraw->SetMarkerStyle(8);
118 "testTFCSEnergyInterpolationHistogram",
119 "test TFCSEnergyInterpolationHistogram");
121 test.set_Ekin_nominal(0.5 *
122 (hdraw->GetXaxis()->GetBinLowEdge(1) +
123 hdraw->GetXaxis()->GetBinUpEdge(hdraw->GetNbinsX())));
124 test.set_Ekin_min(hdraw->GetXaxis()->GetBinLowEdge(1));
125 test.set_Ekin_max(hdraw->GetXaxis()->GetBinUpEdge(hdraw->GetNbinsX()));
126 test.set_eta_nominal(0.225);
127 test.set_eta_min(0.2);
128 test.set_eta_max(0.25);
136 TGraph *
gr =
new TGraph();
137 gr->SetNameTitle(
"testTFCSEnergyInterpolationHistogramLogX",
138 "test TFCSEnergyInterpolationHistogram");
139 gr->GetXaxis()->SetTitle(
"Ekin [MeV]");
140 gr->GetYaxis()->SetTitle(
"<E(reco)>/Ekin(true)");
143 for (
float Ekin =
std::max(
test.Ekin_min() * 0.25, 0.1);
144 Ekin <=
test.Ekin_max() * 4; Ekin *= 1.05) {
146 truth->SetPxPyPzE(Ekin, 0, 0, Ekin);
147 simulstate->
set_E(Ekin);
151 gr->SetPoint(
ip, Ekin, simulstate->
E() / Ekin);
157 #if defined(__FastCaloSimStandAlone__)
158 TCanvas *
c =
new TCanvas(hdraw->GetName(), hdraw->GetTitle());
160 gr->Draw(
"same,APL");
◆ ATLAS_THREAD_SAFE
boost::thread_specific_ptr<MsgStream> m_msg_tls ISF_FCS::MLogging::ATLAS_THREAD_SAFE |
|
inlinestaticprivateinherited |
Do not persistify!
MsgStream instance (a std::cout like with print-out levels)
Definition at line 215 of file MLogging.h.
◆ init_Ekin_max
constexpr double TFCSParametrizationBase::init_Ekin_max = 14000000 |
|
staticconstexprprotectedinherited |
◆ init_Ekin_min
constexpr double TFCSParametrizationBase::init_Ekin_min = 0 |
|
staticconstexprprotectedinherited |
◆ init_Ekin_nominal
constexpr double TFCSParametrizationBase::init_Ekin_nominal = 0 |
|
staticconstexprprotectedinherited |
◆ init_eta_max
constexpr double TFCSParametrizationBase::init_eta_max = 100 |
|
staticconstexprprotectedinherited |
◆ init_eta_min
constexpr double TFCSParametrizationBase::init_eta_min = -100 |
|
staticconstexprprotectedinherited |
◆ init_eta_nominal
constexpr double TFCSParametrizationBase::init_eta_nominal = 0 |
|
staticconstexprprotectedinherited |
◆ m_Ekin_max
double TFCSParametrization::m_Ekin_max |
|
privateinherited |
◆ m_Ekin_min
double TFCSParametrization::m_Ekin_min |
|
privateinherited |
◆ m_Ekin_nominal
double TFCSParametrization::m_Ekin_nominal |
|
privateinherited |
◆ m_eta_max
double TFCSParametrization::m_eta_max |
|
privateinherited |
◆ m_eta_min
double TFCSParametrization::m_eta_min |
|
privateinherited |
◆ m_eta_nominal
double TFCSParametrization::m_eta_nominal |
|
privateinherited |
◆ m_hist
TH1F TFCSEnergyInterpolationHistogram::m_hist |
|
private |
◆ m_nm
std::string ISF_FCS::MLogging::m_nm |
|
privateinherited |
◆ m_pdgid
std::set<int> TFCSParametrization::m_pdgid |
|
privateinherited |
The documentation for this class was generated from the following files:
virtual void set_daughter(unsigned int, TFCSParametrizationBase *)
Some derived classes have daughter instances of TFCSParametrizationBase objects The set_daughter meth...
virtual void set_Ekin_nominal(double min)
const std::set< int > & pdgid() const override
static constexpr double init_Ekin_max
Do not persistify!
bool compare(const TFCSParametrizationBase &ref) const
Do not persistify!
static constexpr double init_eta_nominal
Do not persistify!
static constexpr double init_Ekin_min
Do not persistify!
#define IsA
Declare the TObject style functions.
double Ekin_max() const override
virtual bool is_match_all_pdgid() const
static constexpr double init_eta_min
Do not persistify!
Scalar eta() const
pseudorapidity method
MSG::Level level() const
Retrieve output level.
void FindDuplicates(FindDuplicateClasses_t &dup)
virtual void set_Ekin_max(double max)
static constexpr double init_eta_max
Do not persistify!
double eta_nominal() const override
virtual void set_Ekin(const TFCSParametrizationBase &ref)
virtual void set_eta(const TFCSParametrizationBase &ref)
IMessageSvc * getMessageSvc(bool quiet=false)
virtual void set_eta_max(double max)
const TH1F & hist() const
virtual void set_pdgid(int id)
virtual void set_Ekin_eta(const TFCSParametrizationBase &ref)
MsgStream & msg() const
Return a stream for sending messages directly (no decoration)
virtual void set_Ekin_min(double min)
TFCSParametrization(const char *name=nullptr, const char *title=nullptr)
std::map< std::string, FindDuplicates_t > FindDuplicateClasses_t
std::string m_nm
Message source name.
double Ekin_min() const override
void Print(Option_t *option="") const
Print object information.
std::map< TFCSParametrizationBase *, Duplicate_t > FindDuplicates_t
double eta_max() const override
double eta_min() const override
virtual void set_eta_nominal(double min)
void set_E(int sample, double Esample)
bool OnlyScaleEnergy() const
static constexpr double init_Ekin_nominal
#define ATH_MSG_WARNING(x)
const boost::regex ref(r_ef)
double Ekin_nominal() const override
virtual void set_eta_min(double min)
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
@ kMatchAllPDGID
Set this bit in the TObject bit field if valid for all PDGID.
@ kOnlyScaleEnergy
Set this bit in the TObject bit field the simulated energy should only be scaled by the spline.
virtual unsigned int size() const
Some derived classes have daughter instances of TFCSParametrizationBase objects The size() and operat...
bool msgLvl(const MSG::Level lvl) const
Check whether the logging system is active at the provided verbosity level.