MaCh3 DUNE 1.0.0
Reference Guide
Loading...
Searching...
No Matches
samplePDFDUNEBeamND.h
Go to the documentation of this file.
1#ifndef _samplePDFDUNEBeamND_h_
2#define _samplePDFDUNEBeamND_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
20#include "StructsDUNE.h"
21
23class samplePDFDUNEBeamND : virtual public samplePDFFDBase
24{
25public:
30 samplePDFDUNEBeamND(std::string mc_version, covarianceXsec* xsec_cov, covarianceOsc* osc_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
62 const double* GetPointerToKinematicParameter(KinematicTypes KinPar, int iSample, int iEvent);
63
69 const double* GetPointerToKinematicParameter(double KinematicVariable, int iSample, int iEvent);
70
76 const double* GetPointerToKinematicParameter(std::string KinematicParameter, int iSample, int iEvent);
77
83 double ReturnKinematicParameter(double KinematicVariable, int iSample, int iEvent);
84
90 double ReturnKinematicParameter(std::string KinematicParameter, int iSample, int iEvent);
91
95 std::vector<double> ReturnKinematicParameterBinning(std::string KinematicParameter);
96
100 std::string ReturnStringFromKinematicParameter(int KinematicParameter);
101
105 int ReturnKinematicParameterFromString(std::string KinematicParameterStr);
106
107 //DB functions which could be initialised to do something which is non-trivial
108
112 double CalcXsecWeightFunc(int iSample, int iEvent) {return 1.;}
113
117 void applyShifts(int iSample, int iEvent);
118
120 std::vector<struct dunemc_base> dunendmcSamples;
121
124
126 TTree *_data;
127
129 double pot;
130
131 TString _nutype;
132
133 int _mode;
134
135 // dunendmc Variables
136 double _ev;
137 double _erec;
138 double _erec_lep;
139 double _erec_had;
142
143 double _eRecoP;
144 double _eRecoPip;
145 double _eRecoPim;
146 double _eRecoPi0;
147 double _eRecoN;
148
150 double _LepE;
151 double _eP;
152 double _ePip;
153 double _ePim;
154 double _ePi0;
155 double _eN;
157 int _isCC;
160 int _run;
161 int _isND;
163 double _vtx_x;
164 double _vtx_y;
165 double _vtx_z;
166 double _LepTheta;
167 double _Q2;
169
170 // configuration
172 bool isND;
173 bool IsRHC;
174
175 //Positions of ND Detector systematics
195
197 std::vector<const double*> NDDetectorSystPointers;
198
201};
202
203#endif
Base class for handling beam ND LAR samples.
samplePDFDUNEBeamND(std::string mc_version, covarianceXsec *xsec_cov, covarianceOsc *osc_cov)
samplePDFDUNE ND beam Constructor
int ReturnKinematicParameterFromString(std::string KinematicParameterStr)
Get kinematic parameter ID from string name.
std::vector< double > ReturnKinematicParameterBinning(std::string KinematicParameter)
Gets binning for a given parameter.
int nNDDetectorSystPointers
Number of FD Detector Systematics.
int setupExperimentMC(int iSample)
Function to setup MC from file.
void applyShifts(int iSample, int iEvent)
NOT IMPLEMENTED: Apply kinematic shifts.
std::vector< const double * > NDDetectorSystPointers
ND Detector Systematics.
double CalcXsecWeightFunc(int iSample, int iEvent)
NOT IMPLEMENTED: Dunder method to calculate xsec weights.
void SetupWeightPointers()
Sets up pointers weights for each event (oscillation/xsec/etc.)
void SetupSplines()
Sets up splines.
void Init()
Initialises object.
void setupFDMC(int iSample)
Tells FD base which variables to point to/be set to.
TTree * _data
TTree containing sample Data.
std::vector< struct dunemc_base > dunendmcSamples
Array filled with MC samples for each oscillation channel.
TFile * _sampleFile
File containing sample objects.
KinematicTypes
Enum to identify kinematics.
double ReturnKinematicParameter(double KinematicVariable, int iSample, int iEvent)
Returns pointer to kinemtatic parameter for event in Structs DUNE.
const double * GetPointerToKinematicParameter(KinematicTypes KinPar, int iSample, int iEvent)
Returns pointer to kinemtatic parameter for event in Structs DUNE.
std::string ReturnStringFromKinematicParameter(int KinematicParameter)
Gets name of kinematic parmaeter.
double pot
Value of POT used for sample.