|
GENIEGenerator
|
#include <string>#include <sstream>#include <TSystem.h>#include <TFile.h>#include <TTree.h>#include <TArrayF.h>#include "Algorithm/AlgConfigPool.h"#include "Conventions/Controls.h"#include "EVGCore/EventRecord.h"#include "Ntuple/NtpMCFormat.h"#include "Ntuple/NtpMCTreeHeader.h"#include "Ntuple/NtpMCEventRecord.h"#include "Messenger/Messenger.h"#include "ReWeight/GReWeightI.h"#include "ReWeight/GSystSet.h"#include "ReWeight/GReWeight.h"#include "ReWeight/GReWeightNuXSecCCQE.h"#include "ReWeight/GReWeightNuXSecCCQEvec.h"#include "ReWeight/GReWeightNuXSecCCRES.h"#include "ReWeight/GReWeightNuXSecNCRES.h"#include "ReWeight/GReWeightNuXSecDIS.h"#include "ReWeight/GReWeightNuXSecCOH.h"#include "ReWeight/GReWeightNonResonanceBkg.h"#include "ReWeight/GReWeightFGM.h"#include "ReWeight/GReWeightDISNuclMod.h"#include "ReWeight/GReWeightResonanceDecay.h"#include "ReWeight/GReWeightFZone.h"#include "ReWeight/GReWeightINuke.h"#include "ReWeight/GReWeightAGKY.h"#include "ReWeight/GSystUncertainty.h"#include "Utils/CmdLnArgParser.h"#include "Utils/StringUtils.h"Go to the source code of this file.
Macros | |
| #define | MAX_COEF 4 |
| A simple program to illustrate how to use the GENIE event reweighting for use with the z-expansion axial form factor. | |
Functions | |
| void | PrintSyntax () |
| void | GetEventRange (Long64_t nev_in_file, Long64_t &nfirst, Long64_t &nlast) |
| void | GetCommandLineArgs (int argc, char **argv) |
| int | GetNumberOfWeights (int *ntwk, int kmaxinc, int normtwk, bool donorm) |
| bool | IncrementCoefficients (int *ntwk, int kmaxinc, int normtwk, bool donorm, float *twkvals, GSystSet &syst) |
| GSyst_t | GetZExpSystematic (int ip) |
| int | main (int argc, char **argv) |
Variables | |
| string | gOptInpFilename |
| string | gOptOutFilename |
| Long64_t | gOptNEvt1 |
| Long64_t | gOptNEvt2 |
| int | gOptKmaxInc = 0 |
| int | gOptNormTweaks = 0 |
| bool | gOptDoNorm = false |
| bool | gOptSigmaDefined = false |
| int | gOptNTweaks [MAX_COEF] = {0 } |
| float | gOptSigMin [MAX_COEF] = {0.} |
| float | gOptSigMax [MAX_COEF] = {0.} |
| #define MAX_COEF 4 |
A simple program to illustrate how to use the GENIE event reweighting for use with the z-expansion axial form factor.
\program gRwghtZExpAxFF
\syntax grwghtzexpaxff -f filename -t NTwk1,NTwk2,... [-n nev] [-o fileOutName] [-s SigmaLo1,SigmaHi1,SigmaLo2,SigmaHi2,...] [-m NTwkN]
where [] is an optional argument -f specifies a GENIE event file (GHEP format) -o specifies a GENIE output filename -n specifies the number of events to process (default: all) -t specify number of tweaks on each z-expansion coefficient values are comma separated (# < 2 are ignored) -s specify +- one-sigma bounds on all coefficients up to max values are comma separated, given as percentages requires 2x number of fields from -t option default value is 10% on all coefficients -m number of tweaks on normalization puts reweighting into norm+shape mode
based on gtestRewght by
Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool
Definition at line 79 of file gRwghtZExpAxFF.cxx.
| void GetCommandLineArgs | ( | int | argc, |
| char ** | argv ) |
Definition at line 324 of file gRwghtZExpAxFF.cxx.
References genie::CmdLnArgParser::ArgAsLong(), genie::CmdLnArgParser::ArgAsLongTokens(), genie::CmdLnArgParser::ArgAsString(), genie::gAbortingInErr, gOptDoNorm, gOptInpFilename, gOptKmaxInc, gOptNEvt1, gOptNEvt2, gOptNormTweaks, gOptNTweaks, gOptOutFilename, gOptSigmaDefined, gOptSigMax, gOptSigMin, LOG, MAX_COEF, genie::CmdLnArgParser::OptionExists(), pDEBUG, pFATAL, pINFO, PrintSyntax(), and genie::utils::str::Split().
Referenced by main().
| void GetEventRange | ( | Long64_t | nev_in_file, |
| Long64_t & | nfirst, | ||
| Long64_t & | nlast ) |
Definition at line 453 of file gRwghtZExpAxFF.cxx.
References gOptNEvt1, and gOptNEvt2.
Referenced by main().
| int GetNumberOfWeights | ( | int * | ntwk, |
| int | kmaxinc, | ||
| int | normtwk, | ||
| bool | donorm ) |
Definition at line 547 of file gRwghtZExpAxFF.cxx.
Referenced by main().
| GSyst_t GetZExpSystematic | ( | int | ip | ) |
Definition at line 561 of file gRwghtZExpAxFF.cxx.
Referenced by IncrementCoefficients(), and main().
| bool IncrementCoefficients | ( | int * | ntwk, |
| int | kmaxinc, | ||
| int | normtwk, | ||
| bool | donorm, | ||
| float * | twkvals, | ||
| GSystSet & | syst ) |
Definition at line 483 of file gRwghtZExpAxFF.cxx.
References GetZExpSystematic(), genie::controls::kASmallNum, LOG, pERROR, and pNOTICE.
Referenced by main().
| int main | ( | int | argc, |
| char ** | argv ) |
Definition at line 108 of file gRwghtZExpAxFF.cxx.
References genie::NtpMCEventRecord::Clear(), genie::NtpMCEventRecord::event, genie::gAbortingInErr, GetCommandLineArgs(), GetEventRange(), GetNumberOfWeights(), GetZExpSystematic(), gOptDoNorm, gOptInpFilename, gOptKmaxInc, gOptNormTweaks, gOptNTweaks, gOptOutFilename, gOptSigmaDefined, gOptSigMax, gOptSigMin, IncrementCoefficients(), LOG, pFATAL, pNOTICE, PrintSyntax(), and pWARN.
| void PrintSyntax | ( | void | ) |
Definition at line 576 of file gRwghtZExpAxFF.cxx.
Referenced by GetCommandLineArgs(), and main().
| bool gOptDoNorm = false |
Definition at line 101 of file gRwghtZExpAxFF.cxx.
Referenced by GetCommandLineArgs(), and main().
| string gOptInpFilename |
Definition at line 94 of file gRwghtZExpAxFF.cxx.
| int gOptKmaxInc = 0 |
Definition at line 99 of file gRwghtZExpAxFF.cxx.
| Long64_t gOptNEvt1 |
Definition at line 97 of file gRwghtZExpAxFF.cxx.
Referenced by GetCommandLineArgs(), and GetEventRange().
| Long64_t gOptNEvt2 |
Definition at line 98 of file gRwghtZExpAxFF.cxx.
Referenced by GetCommandLineArgs(), and GetEventRange().
| int gOptNormTweaks = 0 |
Definition at line 100 of file gRwghtZExpAxFF.cxx.
Referenced by GetCommandLineArgs(), and main().
| int gOptNTweaks[MAX_COEF] = {0 } |
Definition at line 103 of file gRwghtZExpAxFF.cxx.
Referenced by GetCommandLineArgs(), and main().
| string gOptOutFilename |
Definition at line 95 of file gRwghtZExpAxFF.cxx.
| bool gOptSigmaDefined = false |
Definition at line 102 of file gRwghtZExpAxFF.cxx.
Referenced by GetCommandLineArgs(), and main().
| float gOptSigMax[MAX_COEF] = {0.} |
Definition at line 105 of file gRwghtZExpAxFF.cxx.
Referenced by GetCommandLineArgs(), and main().
| float gOptSigMin[MAX_COEF] = {0.} |
Definition at line 104 of file gRwghtZExpAxFF.cxx.
Referenced by GetCommandLineArgs(), and main().