#include <HITowerWeightTool.h>
|
| HITowerWeightTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~HITowerWeightTool ()=default |
|
virtual StatusCode | initialize () override |
|
virtual float | getEtaPhiResponse (float eta, float phi, int runIndex) const override |
|
virtual float | getEtaPhiOffset (float eta, float phi, int runIndex) const override |
|
virtual float | getWeight (float eta, float phi, int sampling) const override |
|
virtual float | getWeightEta (float eta, float phi, int sampling) const override |
|
virtual float | getWeightPhi (float eta, float phi, int sampling) const override |
|
virtual float | getWeightMag (float eta, float phi, int sampling) const override |
|
virtual int | getRunIndex (const EventContext &ctx) const override |
|
|
Gaudi::Property< bool > | m_applycorrection {this, "ApplyCorrection", true , "If false, unit weigts are applied"} |
|
Gaudi::Property< std::vector< int > > | m_defaultRunNumbers {this, "DefaultRunNumbers", {226000,287931,338037,367384,440101} , "List of run numbers that will be used if the event run number is not found in the InputFile"} |
|
Gaudi::Property< std::string > | m_inputFile {this, "InputFile", "cluster.geo.HIJING_2018.root","File containing cluster geometric moments."} |
|
Gaudi::Property< std::string > | m_configDir {this, "ConfigDir", "HIJetCorrection/","Directory containing configuration file."} |
|
TH3F * | m_h3W |
|
TH3F * | m_h3Eta |
|
TH3F * | m_h3Phi |
|
TH3F * | m_h3Mag |
|
TH3F * | m_h3EtaPhiResponse |
|
TH3F * | m_h3EtaPhiOffset |
|
std::map< unsigned int, int > | m_runMap |
|
Definition at line 22 of file HITowerWeightTool.h.
◆ HITowerWeightTool()
HITowerWeightTool::HITowerWeightTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~HITowerWeightTool()
virtual HITowerWeightTool::~HITowerWeightTool |
( |
| ) |
|
|
virtualdefault |
◆ getEtaPhiOffset()
float HITowerWeightTool::getEtaPhiOffset |
( |
float |
eta, |
|
|
float |
phi, |
|
|
int |
runIndex |
|
) |
| const |
|
overridevirtual |
◆ getEtaPhiResponse()
float HITowerWeightTool::getEtaPhiResponse |
( |
float |
eta, |
|
|
float |
phi, |
|
|
int |
runIndex |
|
) |
| const |
|
overridevirtual |
◆ getRunIndex()
int HITowerWeightTool::getRunIndex |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
Definition at line 58 of file HITowerWeightTool.cxx.
61 ATH_MSG_DEBUG(
"Using unit weights and doing no eta-phi correction.");
65 unsigned int run_number=ctx.eventID().run_number();
83 ATH_MSG_WARNING(
"No calibration for " <<
run_number <<
" is avaliable and no generic run numbers were set. Doing no eta-phi correction.");
87 std::string str_defaultRunNumbers=
"";
92 str_defaultRunNumbers.resize(str_defaultRunNumbers.length()-2);
94 ATH_MSG_WARNING(
"No calibration for " <<
run_number <<
" is avaliable; no generic calibration for runs "<<str_defaultRunNumbers<<
". Doing no eta-phi correction.");
◆ getWeight()
float HITowerWeightTool::getWeight |
( |
float |
eta, |
|
|
float |
phi, |
|
|
int |
sampling |
|
) |
| const |
|
overridevirtual |
◆ getWeightEta()
float HITowerWeightTool::getWeightEta |
( |
float |
eta, |
|
|
float |
phi, |
|
|
int |
sampling |
|
) |
| const |
|
overridevirtual |
◆ getWeightMag()
float HITowerWeightTool::getWeightMag |
( |
float |
eta, |
|
|
float |
phi, |
|
|
int |
sampling |
|
) |
| const |
|
overridevirtual |
◆ getWeightPhi()
float HITowerWeightTool::getWeightPhi |
( |
float |
eta, |
|
|
float |
phi, |
|
|
int |
sampling |
|
) |
| const |
|
overridevirtual |
◆ initialize()
StatusCode HITowerWeightTool::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 106 of file HITowerWeightTool.cxx.
111 TFile*
f=TFile::Open(full_path.c_str());
115 return StatusCode::FAILURE;
118 m_h3W=(TH3F*)
f->GetObjectChecked(
"h3_w",
"TH3F");
121 ATH_MSG_FATAL(
"Cannot find TH3F m_h3W in config file " << full_path );
122 return StatusCode::FAILURE;
125 m_h3Eta=(TH3F*)
f->GetObjectChecked(
"h3_eta",
"TH3F");
128 ATH_MSG_FATAL(
"Cannot find TH3F m_h3Eta in config file " << full_path );
129 return StatusCode::FAILURE;
132 m_h3Phi=(TH3F*)
f->GetObjectChecked(
"h3_phi",
"TH3F");
135 ATH_MSG_FATAL(
"Cannot find TH3F m_h3Phi in config file " << full_path );
136 return StatusCode::FAILURE;
139 m_h3Mag=(TH3F*)
f->GetObjectChecked(
"h3_R",
"TH3F");
142 ATH_MSG_FATAL(
"Cannot find TH3F m_h3Mag in config file " << full_path );
143 return StatusCode::FAILURE;
146 m_h3W->SetDirectory(0);
153 ATH_MSG_DEBUG(
"ApplyCorrection is set to true, now loading h3_eta_phi_response, h3_eta_phi_offset, and h1_run_index.");
158 ATH_MSG_FATAL(
"Cannot find TH3F h3_eta_phi_response in config file " << full_path );
159 return StatusCode::FAILURE;
165 ATH_MSG_FATAL(
"Cannot find TH3F h3_eta_phi_offset in config file " << full_path );
166 return StatusCode::FAILURE;
170 TH1I* h1_run_index=(TH1I*)
f->GetObjectChecked(
"h1_run_index",
"TH1I");
171 if(h1_run_index==
nullptr)
173 ATH_MSG_FATAL(
"Cannot find TH3F h1_run_index in config file " << full_path );
174 return StatusCode::FAILURE;
176 for(
int xbin=1; xbin<=h1_run_index->GetNbinsX(); xbin++) {
177 m_runMap.emplace_hint(
m_runMap.end(),std::make_pair(h1_run_index->GetBinContent(xbin),xbin));
182 ATH_MSG_DEBUG(
"ApplyCorrection is set to false, not loading h3_eta_phi_response, h3_eta_phi_offset, and h1_run_index.");
186 return StatusCode::SUCCESS;
◆ m_applycorrection
Gaudi::Property<bool> HITowerWeightTool::m_applycorrection {this, "ApplyCorrection", true , "If false, unit weigts are applied"} |
|
private |
◆ m_configDir
Gaudi::Property<std::string> HITowerWeightTool::m_configDir {this, "ConfigDir", "HIJetCorrection/","Directory containing configuration file."} |
|
private |
◆ m_defaultRunNumbers
Gaudi::Property<std::vector<int> > HITowerWeightTool::m_defaultRunNumbers {this, "DefaultRunNumbers", {226000,287931,338037,367384,440101} , "List of run numbers that will be used if the event run number is not found in the InputFile"} |
|
private |
◆ m_h3Eta
TH3F* HITowerWeightTool::m_h3Eta |
|
private |
◆ m_h3EtaPhiOffset
TH3F* HITowerWeightTool::m_h3EtaPhiOffset |
|
private |
◆ m_h3EtaPhiResponse
TH3F* HITowerWeightTool::m_h3EtaPhiResponse |
|
private |
◆ m_h3Mag
TH3F* HITowerWeightTool::m_h3Mag |
|
private |
◆ m_h3Phi
TH3F* HITowerWeightTool::m_h3Phi |
|
private |
◆ m_h3W
TH3F* HITowerWeightTool::m_h3W |
|
private |
◆ m_inputFile
Gaudi::Property<std::string> HITowerWeightTool::m_inputFile {this, "InputFile", "cluster.geo.HIJING_2018.root","File containing cluster geometric moments."} |
|
private |
◆ m_runMap
std::map<unsigned int, int> HITowerWeightTool::m_runMap |
|
private |
The documentation for this class was generated from the following files: