1 #include "PileUpCorrection.hxx" 2 #include "ND280AnalysisUtils.hxx" 3 #include "VersioningUtils.hxx" 4 #include "DataClasses.hxx" 11 if (versionUtils::prod6_corrections)
12 sprintf(filename,
"%s/data/PileUpFGD1Correction_p6B.dat", getenv(
"HIGHLANDCORRECTIONSROOT"));
14 sprintf(filename,
"%s/data/PileUpFGD1Correction_p5F.dat", getenv(
"HIGHLANDCORRECTIONSROOT"));
16 std::cout <<
" PileUp correction data " << filename << std::endl;
17 FILE *pFile = fopen(filename,
"r");
20 printf(
"Cannot open file.\n");
29 while (fscanf(pFile,
"%d%f", &runPeriod, &corr) == 2) {
30 _correction[runPeriod] = corr;
50 if (runPeriod<0 && runPeriod>=(Int_t)_nRunPeriods)
return;
53 for (UInt_t i = 0; i < spill.
Bunches.size(); i++)
54 spill.
Bunches[i]->Weight *= 1-_correction[runPeriod];
std::vector< AnaBunchC * > Bunches
The reconstructed objects, split into timing bunches.
AnaEventInfoB * EventInfo
Run, sunrun, event, time stamp, etc.
All corrections should be registered with the CorrectionManager.
void Apply(AnaSpillC &spill)
int GetRunPeriod(int run, int subrun=-1)
Returns the run period (sequentially: 0,1,2,3,4,5 ...)
bool GetIsMC() const
Return whether this spill is from Monte Carlo or not.
Int_t Run
The ND280 run number.