CAF.h
Go to the documentation of this file.
1 #ifndef CAF_h
2 #define CAF_h
3 
4 #include "TFile.h"
5 #include "TTree.h"
7 
8 class CAF {
9 
10 public:
11  CAF( std::string filename, bool isGas = false );
12  ~CAF();
13  void fill();
14  void fillPOT();
15  void write();
16  void addRWbranch( int parId, std::string name, std::string wgt_var, std::vector<double> &vars );
17  void Print();
18  void setToBS();
19 
20  // Make ntuple variables public so they can be set from other file
21 
22  // configuration variables
23  int isFD, isFHC;
24  // event accounting
25  int run, subrun, event;
26  // Truth information
29  // True particle counts
31  double eP, eN, ePip, ePim, ePi0, eOther;
33 
34  // vertex -- smear it?
35  double vtx_x, vtx_y, vtx_z;
36  double det_x;
37 
38  // Reco information CV
42  float muon_endpoint[3];
44  double Ehad_veto;
45  double pileup_energy;
46 
47  // Gas TPC variables
49  int nFSP;
50  int pdg[100];
51  double trkLen[100], trkLenPerp[100], ptrue[100], partEvReco[100];
52 
53  // reweights -- make sure big enough to hold all the variations for each knob, and all the knobs
54  // the names, and what they actually mean, are determined automatically from the fhicl input file
55  int nwgt[100];
56  double cvwgt[100];
57  double wgt[100][100];
58  bool iswgt[100];
59 
60  // store the GENIE record as a branch
62 
63  // Event-by-event geometric efficiency throw results
64  std::vector< std::vector < std::vector < uint64_t > > > * geoEffThrowResults;
65 
66  // meta
67  double pot;
68  int meta_run, meta_subrun;
69  int version;
70 
71  TFile * cafFile;
72  TTree * cafMVA;
73  TTree * cafPOT;
74  TTree * genie;
75 };
76 
77 #endif
78 
static QCString name
Definition: declinfo.cpp:673
void addRWbranch(int parId, std::string name, std::string wgt_var, std::vector< double > &vars)
double ePip
Definition: CAF.h:31
double vtx_y
Definition: CAF.h:35
double eOther
Definition: CAF.h:31
int meta_subrun
Definition: NUSYS.h:42
int muon_contained
Definition: CAF.h:41
int neutrinoPDG
Definition: CAF.h:27
int nNucleus
Definition: CAF.h:30
double LepNuAngle
Definition: CAF.h:28
double NuMomY
Definition: CAF.h:28
double eRecoP
Definition: CAF.h:32
int nP
Definition: CAF.h:30
int LepPDG
Definition: CAF.h:27
int pdg[100]
Definition: CAF.h:50
double eP
Definition: CAF.h:31
std::string string
Definition: nybbler.cc:12
MINOS-style ntuple record. Each such ntuple record holds a generated EventRecord object. Ntuples of this type are intended for feeding GENIE events into other applications (for example the GEANT4 based MC generation framework of an experiment) if no direct interface exists.
bool iswgt[100]
Definition: NUSYS.h:35
int niem
Definition: CAF.h:30
CAF()
Definition: CAF.cpp:22
double partEvReco[100]
Definition: CAF.h:51
void fill()
double Ev_reco
Definition: CAF.h:39
double eRecoPip
Definition: CAF.h:32
genie::NtpMCEventRecord * mcrec
Definition: NUSYS.h:38
double cvwgt[100]
Definition: NUSYS.h:33
std::vector< double > trkLen
Definition: CAF.h:78
std::vector< double > trkLenPerp
Definition: CAF.h:78
int nN
Definition: CAF.h:30
int nFSP
Definition: CAF.h:49
int reco_q
Definition: CAF.h:40
double LepMomY
Definition: CAF.h:28
void fillPOT()
int nikp
Definition: CAF.h:30
int subrun
Definition: NUSYS.h:25
int isFD
Definition: NUSYS.h:23
int run
Definition: NUSYS.h:25
string filename
Definition: train.py:213
double NuMomZ
Definition: CAF.h:28
int gastpc_pi_pl_mult
Definition: CAF.h:48
double W
Definition: CAF.h:28
double LepE
Definition: CAF.h:28
double det_x
Definition: CAF.h:36
int isCC
Definition: CAF.h:27
double ePim
Definition: CAF.h:31
int isFHC
Definition: NUSYS.h:23
int reco_lepton_pdg
Definition: CAF.h:41
void write()
int meta_run
Definition: NUSYS.h:42
TFile * cafFile
The output TFile pointer */.
Definition: CAF.h:53
double Q2
Definition: CAF.h:28
int neutrinoPDGunosc
Definition: CAF.h:27
std::string * muon_endVolName
Definition: CAF.h:43
void Print()
double vtx_x
Definition: CAF.h:35
int nipim
Definition: CAF.h:30
double NuMomX
Definition: CAF.h:28
double LepMomZ
Definition: CAF.h:28
int event
Definition: NUSYS.h:25
int nikm
Definition: CAF.h:30
int muon_exit
Definition: CAF.h:41
double eN
Definition: CAF.h:31
double Y
Definition: CAF.h:28
int version
Definition: NUSYS.h:43
double theta_reco
Definition: CAF.h:39
Definition: CAF.h:12
double eRecoOther
Definition: CAF.h:32
double Ehad_veto
Definition: CAF.h:44
double X
Definition: CAF.h:28
int nwgt[100]
Definition: NUSYS.h:32
int reco_nue
Definition: CAF.h:40
int gastpc_pi_min_mult
Definition: CAF.h:48
TTree * genie
Definition: NUSYS.h:48
double ptrue[100]
Definition: CAF.h:51
double Ev
Definition: CAF.h:28
double eRecoPim
Definition: CAF.h:32
double Elep_reco
Definition: CAF.h:39
int reco_numu
Definition: CAF.h:40
int reco_nc
Definition: CAF.h:40
int muon_ecal
Definition: CAF.h:41
~CAF()
Definition: CAF.cpp:34
double pileup_energy
Definition: CAF.h:45
TTree * cafMVA
The output TTree pointer */.
Definition: CAF.h:54
int nipi0
Definition: CAF.h:30
int niother
Definition: CAF.h:30
double eRecoN
Definition: CAF.h:32
TTree * cafPOT
Definition: NUSYS.h:47
std::vector< std::vector< std::vector< uint64_t > > > * geoEffThrowResults
Definition: CAF.h:64
std::vector< int > mode
Definition: CAF.h:69
void setToBS()
int nik0
Definition: CAF.h:30
double vtx_z
Definition: CAF.h:35
double ePi0
Definition: CAF.h:31
double wgt[100][100]
Definition: NUSYS.h:34
int muon_tracker
Definition: CAF.h:41
float muon_endpoint[3]
Definition: CAF.h:42
double eRecoPi0
Definition: CAF.h:32
int nipip
Definition: CAF.h:30
int nUNKNOWN
Definition: CAF.h:30
double LepMomX
Definition: CAF.h:28
double pot
Definition: NUSYS.h:41