1 #include "tutorialCorrection.hxx" 2 #include "ND280AnalysisUtils.hxx" 3 #include "VersioningUtils.hxx" 4 #include "DataClasses.hxx" 26 if (versionUtils::prod6_corrections)
27 sprintf(filename,
"%s/data/tutorialCorrection_p6B.dat", getenv(
"TUTORIALANALYSISROOT"));
29 sprintf(filename,
"%s/data/tutorialCorrection_p5F.dat", getenv(
"TUTORIALANALYSISROOT"));
32 std::cout <<
" tutorial correction data " << filename << std::endl;
33 FILE *pFile = fopen(filename,
"r");
36 printf(
"Cannot open file.\n");
45 while (fscanf(pFile,
"%d%f", &runPeriod, &corr) == 2) {
46 _correction[runPeriod] = corr;
67 if (runPeriod<0 && runPeriod>=(Int_t)_nRunPeriods)
return;
70 for (UInt_t i = 0; i < spill.
Bunches.size(); i++) {
72 for (UInt_t j = 0; j < bunch->
Particles.size(); j++) {
Float_t PositionStart[4]
The reconstructed start position of the particle.
Representation of a global track.
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.
std::vector< AnaParticleB * > Particles
Float_t PositionEnd[4]
The reconstructed end position of the particle.
Int_t Run
The ND280 run number.