38 #include "Tools/ReWeight/GReWeightI.h" 39 #include "Tools/ReWeight/GSystSet.h" 40 #include "Tools/ReWeight/GReWeight.h" 41 #include "Tools/ReWeight/GReWeightNuXSecCCQE.h" 42 #include "Tools/ReWeight/GReWeightNuXSecCCQEvec.h" 43 #include "Tools/ReWeight/GReWeightNuXSecCCRES.h" 44 #include "Tools/ReWeight/GReWeightNuXSecNCRES.h" 45 #include "Tools/ReWeight/GReWeightNuXSecDIS.h" 46 #include "Tools/ReWeight/GReWeightNuXSecCOH.h" 47 #include "Tools/ReWeight/GReWeightNonResonanceBkg.h" 48 #include "Tools/ReWeight/GReWeightFGM.h" 49 #include "Tools/ReWeight/GReWeightDISNuclMod.h" 50 #include "Tools/ReWeight/GReWeightResonanceDecay.h" 51 #include "Tools/ReWeight/GReWeightFZone.h" 52 #include "Tools/ReWeight/GReWeightINuke.h" 53 #include "Tools/ReWeight/GReWeightAGKY.h" 58 using namespace genie;
77 tree = dynamic_cast <TTree *> (
file.Get(
"gtree") );
82 LOG(
"test",
pNOTICE) <<
"Input tree header: " << *thdr;
85 TMath::Min(
gOptNEvt, (
int)tree->GetEntries()) :
86 (
int) tree->GetEntries();
88 LOG(
"test",
pNOTICE) <<
"Will process " << nev <<
" events";
97 rw.AdoptWghtCalc(
"xsec_ccqe",
new GReWeightNuXSecCCQE );
98 rw.AdoptWghtCalc(
"xsec_ccqe_vec",
new GReWeightNuXSecCCQEvec );
99 rw.AdoptWghtCalc(
"xsec_ccres",
new GReWeightNuXSecCCRES );
100 rw.AdoptWghtCalc(
"xsec_ncres",
new GReWeightNuXSecNCRES );
101 rw.AdoptWghtCalc(
"xsec_nonresbkg",
new GReWeightNonResonanceBkg );
102 rw.AdoptWghtCalc(
"xsec_dis",
new GReWeightNuXSecDIS );
103 rw.AdoptWghtCalc(
"xsec_coh",
new GReWeightNuXSecCOH );
104 rw.AdoptWghtCalc(
"nuclear_qe",
new GReWeightFGM );
105 rw.AdoptWghtCalc(
"nuclear_dis",
new GReWeightDISNuclMod );
106 rw.AdoptWghtCalc(
"hadro_res_decay",
new GReWeightResonanceDecay );
107 rw.AdoptWghtCalc(
"hadro_fzone",
new GReWeightFZone );
108 rw.AdoptWghtCalc(
"hadro_intranuke",
new GReWeightINuke );
109 rw.AdoptWghtCalc(
"hadro_agky",
new GReWeightAGKY );
123 GSystSet & syst = rw.Systematics();
125 syst.Set(kXSecTwkDial_NormCCQE, +1.0);
126 syst.Set(kXSecTwkDial_MaCCQEshape, +1.0);
127 syst.Set(kXSecTwkDial_NormCCRES, -1.0);
128 syst.Set(kXSecTwkDial_VecFFCCQEshape, -1.0);
129 syst.Set(kXSecTwkDial_MaCCRESshape, -1.0);
130 syst.Set(kXSecTwkDial_MvCCRESshape, +0.5);
131 syst.Set(kXSecTwkDial_NormNCRES, +1.0);
132 syst.Set(kXSecTwkDial_MaNCRESshape, -0.7);
133 syst.Set(kXSecTwkDial_MvNCRESshape, +0.3);
134 syst.Set(kXSecTwkDial_RvpCC1pi, +0.5);
135 syst.Set(kXSecTwkDial_RvnCC1pi, +0.5);
136 syst.Set(kXSecTwkDial_MaCOHpi, -0.5);
137 syst.Set(kINukeTwkDial_MFP_pi, +1.0);
138 syst.Set(kINukeTwkDial_MFP_N, -1.0);
139 syst.Set(kINukeTwkDial_FrPiProd_pi, -0.7);
140 syst.Set(kHadrAGKYTwkDial_xF1pi, -1.0);
141 syst.Set(kHadrAGKYTwkDial_pT1pi, +1.0);
142 syst.Set(kHadrNuclTwkDial_FormZone, +1.0);
143 syst.Set(kRDcyTwkDial_Theta_Delta2Npi, +1.0);
151 GReWeightNuXSecCCQE * rwccqe =
152 dynamic_cast<GReWeightNuXSecCCQE *
> (rw.WghtCalc(
"xsec_ccqe"));
153 rwccqe -> RewNue (
false);
154 rwccqe -> RewNuebar (
false);
155 rwccqe -> RewNumubar(
false);
162 tree->SetBranchAddress(
"gmcrec", &mcrec);
164 for(
int i = 0; i < nev; i++) {
170 double wght = rw.CalcWeight(
event);
171 LOG(
"test",
pNOTICE) <<
"Overall weight = " << wght;
184 LOG(
"test",
pINFO) <<
"*** Parsing command line arguments";
190 LOG(
"test",
pINFO) <<
"Reading event sample filename";
194 <<
"Unspecified input filename - Exiting";
200 LOG(
"test",
pINFO) <<
"Reading number of events to analyze";
204 <<
"Unspecified number of events to analyze - Use all";
string ArgAsString(char opt)
THE MAIN GENIE PROJECT NAMESPACE
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.
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
void GetCommandLineArgs(int argc, char **argv)
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
int main(int argc, char **argv)
Command line argument parser.
void Clear(Option_t *opt="")
bool OptionExists(char opt)
was option set?
Event finding and building.