1 #ifndef ND280AnalysisUtils_h 2 #define ND280AnalysisUtils_h 4 #include "AnalysisUtils.hxx" 6 #include "ConstituentsUtils.hxx" 7 #include "PIDUtils.hxx" 8 #include "TruthUtils.hxx" 9 #include "VersioningUtils.hxx" 41 template<
int nIntBins,
int nMomBins>
42 void LoadPionCrossSections(
char* inputFileName, Float_t (&xsec_array)[nIntBins][nMomBins], Float_t (&err_array)[nIntBins][nMomBins]){
43 ifstream inputFile(inputFileName, std::ios::in);
46 std::cerr <<
"Cannot open input file '" << inputFileName <<
"'. Exit!" << std::endl;
50 std::string ctype, cintBin, cvalue;
52 while (inputFile >> ctype >> cintBin) {
53 int intBin = strtod(cintBin.c_str(),&pEnd);
54 int type = strtod(ctype.c_str(),&pEnd);
56 if(intBin >= nIntBins) std::cout <<
"Error - interaction bin larger than input array size" << std::endl;
58 for (
int momBin = 0;momBin<nMomBins;momBin++){
60 Float_t value = strtod(cvalue.c_str(),&pEnd);
62 xsec_array[intBin][momBin] = value;
65 err_array[intBin][momBin] = value;
72 double GetNTargets(massComponentEnum massComponent = kFGD1,
int target_nucleons = 3);
73 double GetNucleonsPerNucleus(massComponentEnum massComponent = kFGD1,
int target_nucleons = 3);
74 double GetAreaFV(massComponentEnum massComponent = kFGD1);
81 Float_t ComputeInversePTFlip(
const AnaTrackB& track);
int GetFGDMichelElectrons(const AnaEventB &event, const SubDetId::SubDetEnum det, AnaFgdTimeBinB **arr, bool prod5Cut=0)
Get all delayed time bins as Michel Electron candidates.
Float_t ComputeInversePT(const AnaDetCrossingB &cross, bool entrance=true)
Compute inverse PT given an AnaDetCrossing.
int GetRunPeriod(int run, int subrun=-1)
Returns the run period (sequentially: 0,1,2,3,4,5 ...)
Float_t ComputeMomentumFromInversePTFlip(const AnaParticleB &part, Float_t PTinv)
Compute the total momentum (flip) given the part and the inverse transverse momentum.
Representation of a detector crossing info for a true particle (G4 trajectory).
SubDetEnum
Enumeration of all detector systems and subdetectors.
Representation of a global track.
int GetSandMode(int run)
Returns the sans muon modes (sequentially: 0,1,2)
This namespace contains useful functions for analyses related to kinematics.
Representation of a reconstructed particle (track or shower).
void LoadPionCrossSections(char *inputFileName, Float_t(&xsec_array)[nIntBins][nMomBins], Float_t(&err_array)[nIntBins][nMomBins])
Method to load external ipon cross section data into arrays.
Float_t MagnetIntensityCorrection(Int_t Run)