51 const char* fullInpFilePath;
52 if (!
m_fname.empty()) fullInpFilePath = gSystem->ExpandPathName (
m_fname.c_str());
53 else fullInpFilePath = gSystem->ExpandPathName (
"$ROOTCOREBIN/data/HIEventUtils/HIRun2PileUp_PbPb5p02_v2.root");
54 if (gSystem->AccessPathName(fullInpFilePath))
throw std::invalid_argument((
"File not found at \"" + (std::string)fullInpFilePath +
"\"").c_str());
56 ATH_MSG_INFO((
"Read pileup cuts from " + (std::string)fullInpFilePath).c_str());
57 TFile*
fIn =
new TFile(fullInpFilePath);
60 hname =
"hEvents";
if (!(
fIn->GetListOfKeys()->Contains(
hname.c_str()))) {
61 fIn->Close();
throw std::invalid_argument((
"Expected histogram \"" +
hname +
"\" not found in \"" +
m_fname +
"\"").c_str());}
62 hname =
"hPileUp";
if (!(
fIn->GetListOfKeys()->Contains(
hname.c_str()))) {
63 fIn->Close();
throw std::invalid_argument((
"Expected histogram \"" +
hname +
"\" not found in \"" +
m_fname +
"\"").c_str());}
64 hname =
"hCut";
if (!(
fIn->GetListOfKeys()->Contains(
hname.c_str()))) {
65 fIn->Close();
throw std::invalid_argument((
"Expected histogram \"" +
hname +
"\" not found in \"" +
m_fname +
"\"").c_str());}
66 hname =
"hEff";
if (!(
fIn->GetListOfKeys()->Contains(
hname.c_str()))) {
67 fIn->Close();
throw std::invalid_argument((
"Expected histogram \"" +
hname +
"\" not found in \"" +
m_fname +
"\"").c_str());}
68 hname =
"hPurity";
if (!(
fIn->GetListOfKeys()->Contains(
hname.c_str()))) {
69 fIn->Close();
throw std::invalid_argument((
"Expected histogram \"" +
hname +
"\" not found in \"" +
m_fname +
"\"").c_str());}
103 for (
int ibx=0;ibx<
m_hPileUp->GetNbinsX();ibx++) {
109 for (
int iby=0;iby<NY;iby++) {
115 for (
int ibx=0;ibx<
m_hEvents->GetNbinsX();ibx++) {
122 double pty = pu_cut/pu_all;
127 return StatusCode::SUCCESS;
132 bool kPileup =
false;
133 double FCal_Et =
get_et(evShCont);
143 FCal_Et =
get_et(evShCont);
149 FCal_Et =
get_et(evShCont);
156 Fcal_Et = evShCont.
at(5)->et()*1
e-6;
164 for (
const auto *zdcModule : ZdcCont) {
165 if (zdcModule->zdcType()!=0)
continue;
169 float modE = CalibEnergyAcc(*zdcModule);
172 if (!
isCalib)
throw std::invalid_argument(
"ZDC Module not Calibrated");
202 bool pileup_dec = !
is_pileup(evShCont, ZdcCont);