MaCh3 DUNE 1.0.0
Reference Guide
Loading...
Searching...
No Matches
samplePDFDUNEBeamNDGar.h
Go to the documentation of this file.
1#ifndef _samplePDFDUNEBeamNDGar_h_
2#define _samplePDFDUNEBeamNDGar_h_
3
4#include <iostream>
5#include <TTree.h>
6#include <TH1D.h>
7#include <TH2D.h>
8#include <TMath.h>
9#include <TFile.h>
10#include <TGraph2DErrors.h>
11#include <vector>
12#include <omp.h>
13#include <list>
14
15#include "splines/splinesDUNE.h"
16#include "covariance/covarianceXsec.h"
17#include "covariance/covarianceOsc.h"
18#include "samplePDF/samplePDFFDBase.h"
19#include "StandardRecord.h"
20
21#include "StructsDUNE.h"
22
24class samplePDFDUNEBeamNDGar : virtual public samplePDFFDBase
25{
26public:
30 samplePDFDUNEBeamNDGar(std::string mc_version, covarianceXsec* xsec_cov);
31
34
37
38 protected:
40 void Init();
41
45 int setupExperimentMC(int iSample);
46
49 void setupFDMC(int iSample);
50
53
55 void SetupSplines();
56
60 double CalcXsecWeightFunc(int iSample, int iEvent) {return 1.;}
61
65 void applyShifts(int iSample, int iEvent) {}
66
72 const double* GetPointerToKinematicParameter(KinematicTypes KinPar, int iSample, int iEvent);
73
79 const double* GetPointerToKinematicParameter(double KinematicVariable, int iSample, int iEvent);
80
86 const double* GetPointerToKinematicParameter(std::string KinematicParameter, int iSample, int iEvent);
87
93 double ReturnKinematicParameter(double KinematicVariable, int iSample, int iEvent);
94
100 double ReturnKinematicParameter(std::string KinematicParameter, int iSample, int iEvent);
101
105 std::vector<double> ReturnKinematicParameterBinning(std::string KinematicParameter);
106
110 std::vector<double> ReturnKinematicParameterBinning(KinematicTypes KinematicParameter);
111
115 int ReturnKinematicParameterFromString(std::string KinematicParameterStr);
116
120 std::string ReturnStringFromKinematicParameter(int KinematicParameter);
121
122 // dunendmc
124 std::vector<struct dunemc_base> dunendgarmcSamples;
125
129 TTree *_data;
131 double pot;
132
133
134 TString _nutype;
135 int _mode;
136
137
138 // dunendgarmc Variables
139 double _ev;
140 double _erec;
141 double _erec_nue;
146 double _BeRPA_cvwgt = 1;
147 int _isCC;
150 int _run;
151 int _isND;
153 double _vtx_x;
154 double _vtx_y;
155 double _vtx_z;
156 double _LepTheta;
157 double _Q2;
158
159 bool iscalo_reco; //NK Added so we can easily change what energy reconstruction we are using
160 float muonscore_threshold; //NK Added so we can optimise muon threshold
161
162 caf::StandardRecord* sr = new caf::StandardRecord();
163};
164
165#endif
Base class for handling beam ND GAR samples.
double ReturnKinematicParameter(double KinematicVariable, int iSample, int iEvent)
Returns pointer to kinemtatic parameter for event in Structs DUNE.
void SetupWeightPointers()
Sets up pointers weights for each event (oscillation/xsec/etc.)
void Init()
Initialises object.
TFile * _sampleFile
File containing sample objects.
samplePDFDUNEBeamNDGar(std::string mc_version, covarianceXsec *xsec_cov)
Constructor.
int ReturnKinematicParameterFromString(std::string KinematicParameterStr)
Get kinematic parameter ID from string name.
TTree * _data
TTree containing sample Data.
void SetupSplines()
Sets up splines.
std::string ReturnStringFromKinematicParameter(int KinematicParameter)
Gets name of kinematic parmaeter.
double pot
Value of POT used for sample.
KinematicTypes
Enum to identify kinematics.
double CalcXsecWeightFunc(int iSample, int iEvent)
NOT IMPLEMENTED: Dunder method to calculate xsec weights.
void setupFDMC(int iSample)
Tells FD base which variables to point to/be set to.
int setupExperimentMC(int iSample)
Function to setup MC from file.
const double * GetPointerToKinematicParameter(KinematicTypes KinPar, int iSample, int iEvent)
Returns pointer to kinemtatic parameter for event in Structs DUNE.
std::vector< double > ReturnKinematicParameterBinning(std::string KinematicParameter)
Gets binning for a given parameter.
std::vector< struct dunemc_base > dunendgarmcSamples
Array filled with MC samples for each oscillation channel.
void applyShifts(int iSample, int iEvent)
NOT IMPLEMENTED: Apply kinematic shifts.