GENIEGenerator
|
#include <string>
#include <iostream>
#include <iomanip>
#include <map>
#include <cstdlib>
#include <algorithm>
#include "TROOT.h"
#include "TH1.h"
#include "TH2.h"
#include "TF1.h"
#include "TFile.h"
#include "TRandom3.h"
#include "TMath.h"
#include "TChain.h"
#include "TSystem.h"
#include "TSystemDirectory.h"
#include "TLorentzVector.h"
#include "FluxDrivers/GNuMIFlux.h"
#include "dk2nu/genie/GDk2NuFlux.h"
#include "tree/dk2nu.h"
#include "tree/calcLocationWeights.h"
#include "tree/dkmeta.h"
Go to the source code of this file.
Functions | |
TRandom3 | generator (0) |
void | InitialiseMetaBranches (TTree *meta) |
void | InitialiseTreeBranches (TTree *tree) |
void | FillMetaBranches (bsim::DkMeta *dkmeta) |
void | FillTreeBranches (bsim::Dk2Nu *dk2nu) |
void | LoopEntries (TChain *cflux, TChain *dflux, bool grid, bool debug) |
void | RootifyChar (std::string rfch, char fdch[maxC]) |
void | LoadDetectorPosition (bool grid, genie::GFluxI *gfluxdriver) |
Variables | |
const Int_t | setID = 0 |
const int | maxArray = 30 |
const int | maxC = 100 |
const std::string | USER = std::getenv("USER") != NULL ? string(std::getenv("USER")) : "user" |
const std::string | OUTDIR = std::getenv("OUTDIR") != NULL ? string(std::getenv("OUTDIR")) : string(std::getenv("PWD")) |
const std::string | SAMPLEDK2NU = std::getenv("INDIR") != NULL ? string(std::getenv("INDIR"))+"/sample_dk2nu.root" : string(std::getenv("PWD"))+"/sample_dk2nu.root" |
const std::string | INDIR_GRID = "" |
const std::string | OUTDIR_GRID = "" |
const std::string | INDIR_DEBUG = "./DEBUG" |
const std::string | GDK2NU_PSET = "MINERVA-v10r8" |
const int | m_maxNFiles = 100 |
TTree * | dkMeta = 0 |
int | mArSize = 0 |
int | mJob = 0 |
double | mPots = 0.0 |
char | mBeamsim [maxC] |
char | mPhysics [maxC] |
char | mPhyscuts [maxC] |
char | mTgtcfg [maxC] |
char | mHorncfg [maxC] |
char | mDkvolcfg [maxC] |
double | mBeam0x = 0.0 |
double | mBeam0y = 0.0 |
double | mBeam0z = 0.0 |
double | mBeamhwidth = 0.0 |
double | mBeamvwidth = 0.0 |
double | mBeamdxdz = 0.0 |
double | mBeamdydz = 0.0 |
double | mLocationDotX [maxArray] |
double | mLocationDotY [maxArray] |
double | mLocationDotZ [maxArray] |
char | mLocationDotName [maxC *maxArray] |
TTree * | dkTree = 0 |
int | dArSize = 0 |
int | dAnArSize = 0 |
int | dTrArSize = 0 |
int | dJob = 0 |
double | dPotnum = 0.0 |
double | dPpvx = 0.0 |
double | dPpvy = 0.0 |
double | dPpvz = 0.0 |
int | dDecayDotNorig = 0 |
int | dDecayDotNdecay = 0 |
int | dDecayDotNtype = 0 |
double | dDecayDotVx = 0.0 |
double | dDecayDotVy = 0.0 |
double | dDecayDotVz = 0.0 |
double | dDecayDotPdpx = 0.0 |
double | dDecayDotPdpy = 0.0 |
double | dDecayDotPdpz = 0.0 |
double | dDecayDotPpdxdz = 0.0 |
double | dDecayDotPpdydz = 0.0 |
double | dDecayDotPppz = 0.0 |
double | dDecayDotPpenergy = 0.0 |
int | dDecayDotPpmedium = 0 |
int | dDecayDotPtype = 0 |
double | dDecayDotMuparpx = 0.0 |
double | dDecayDotMuparpy = 0.0 |
double | dDecayDotMuparpz = 0.0 |
double | dDecayDotMupare = 0.0 |
double | dDecayDotNecm = 0.0 |
double | dDecayDotNimpwt = 0.0 |
double | dNurayDotPx [maxArray] |
double | dNurayDotPy [maxArray] |
double | dNurayDotPz [maxArray] |
double | dNurayDotE [maxArray] |
double | dNurayDotWgt [maxArray] |
int | dAncestorDotPdg [maxArray] |
double | dAncestorDotStartx [maxArray] |
double | dAncestorDotStarty [maxArray] |
double | dAncestorDotStartz [maxArray] |
double | dAncestorDotStartt [maxArray] |
double | dAncestorDotStartpx [maxArray] |
double | dAncestorDotStartpy [maxArray] |
double | dAncestorDotStartpz [maxArray] |
double | dAncestorDotStoppx [maxArray] |
double | dAncestorDotStoppy [maxArray] |
double | dAncestorDotStoppz [maxArray] |
double | dAncestorDotPolx [maxArray] |
double | dAncestorDotPoly [maxArray] |
double | dAncestorDotPolz [maxArray] |
double | dAncestorDotPprodpx [maxArray] |
double | dAncestorDotPprodpy [maxArray] |
double | dAncestorDotPprodpz [maxArray] |
int | dAncestorDotNucleus [maxArray] |
char | dAncestorDotProc [maxArray *maxC] |
char | dAncestorDotIvol [maxArray *maxC] |
char | dAncestorDotImat [maxArray *maxC] |
double | dTgtexitDotTvx = 0.0 |
double | dTgtexitDotTvy = 0.0 |
double | dTgtexitDotTvz = 0.0 |
double | dTgtexitDotTpx = 0.0 |
double | dTgtexitDotTpy = 0.0 |
double | dTgtexitDotTpz = 0.0 |
int | dTgtexitDotTptype = 0 |
int | dTgtexitDotTgen = 0 |
double | dTrajDotTrkx [maxArray] |
double | dTrajDotTrky [maxArray] |
double | dTrajDotTrkz [maxArray] |
double | dTrajDotTrkpx [maxArray] |
double | dTrajDotTrkpy [maxArray] |
double | dTrajDotTrkpz [maxArray] |
void FillMetaBranches | ( | bsim::DkMeta * | dkmeta | ) |
void FillTreeBranches | ( | bsim::Dk2Nu * | dk2nu | ) |
TRandom3 generator | ( | 0 | ) |
! This is a script to generate flat root trees from dk2nu tuples. ! It copies the dk2nu structure but does away with members of bsim ! so that GENIE HNL simulation can avoid having dk2nu as a compile-time package
Referenced by genie::flux::GFluxBlender::AdoptFluxGenerator().
void InitialiseMetaBranches | ( | TTree * | meta | ) |
void InitialiseTreeBranches | ( | TTree * | tree | ) |
void LoadDetectorPosition | ( | bool | grid, |
genie::GFluxI * | gfluxdriver | ||
) |
Definition at line 199 of file write_dk2nus.h.
References genie::flux::GFluxFileConfigI::LoadBeamSimData(), and SAMPLEDK2NU.
void LoopEntries | ( | TChain * | cflux, |
TChain * | dflux, | ||
bool | grid, | ||
bool | debug | ||
) |
void RootifyChar | ( | std::string | rfch, |
char | fdch[maxC] | ||
) |
int dAnArSize = 0 |
Definition at line 120 of file write_dk2nus.h.
Definition at line 177 of file write_dk2nus.h.
Definition at line 176 of file write_dk2nus.h.
int dAncestorDotNucleus[maxArray] |
Definition at line 174 of file write_dk2nus.h.
int dAncestorDotPdg[maxArray] |
Definition at line 157 of file write_dk2nus.h.
double dAncestorDotPolx[maxArray] |
Definition at line 168 of file write_dk2nus.h.
double dAncestorDotPoly[maxArray] |
Definition at line 169 of file write_dk2nus.h.
double dAncestorDotPolz[maxArray] |
Definition at line 170 of file write_dk2nus.h.
double dAncestorDotPprodpx[maxArray] |
Definition at line 171 of file write_dk2nus.h.
double dAncestorDotPprodpy[maxArray] |
Definition at line 172 of file write_dk2nus.h.
double dAncestorDotPprodpz[maxArray] |
Definition at line 173 of file write_dk2nus.h.
Definition at line 175 of file write_dk2nus.h.
double dAncestorDotStartpx[maxArray] |
Definition at line 162 of file write_dk2nus.h.
double dAncestorDotStartpy[maxArray] |
Definition at line 163 of file write_dk2nus.h.
double dAncestorDotStartpz[maxArray] |
Definition at line 164 of file write_dk2nus.h.
double dAncestorDotStartt[maxArray] |
Definition at line 161 of file write_dk2nus.h.
double dAncestorDotStartx[maxArray] |
Definition at line 158 of file write_dk2nus.h.
double dAncestorDotStarty[maxArray] |
Definition at line 159 of file write_dk2nus.h.
double dAncestorDotStartz[maxArray] |
Definition at line 160 of file write_dk2nus.h.
double dAncestorDotStoppx[maxArray] |
Definition at line 165 of file write_dk2nus.h.
double dAncestorDotStoppy[maxArray] |
Definition at line 166 of file write_dk2nus.h.
double dAncestorDotStoppz[maxArray] |
Definition at line 167 of file write_dk2nus.h.
int dArSize = 0 |
Definition at line 119 of file write_dk2nus.h.
double dDecayDotMupare = 0.0 |
Definition at line 147 of file write_dk2nus.h.
double dDecayDotMuparpx = 0.0 |
Definition at line 144 of file write_dk2nus.h.
double dDecayDotMuparpy = 0.0 |
Definition at line 145 of file write_dk2nus.h.
double dDecayDotMuparpz = 0.0 |
Definition at line 146 of file write_dk2nus.h.
int dDecayDotNdecay = 0 |
Definition at line 130 of file write_dk2nus.h.
double dDecayDotNecm = 0.0 |
Definition at line 148 of file write_dk2nus.h.
double dDecayDotNimpwt = 0.0 |
Definition at line 149 of file write_dk2nus.h.
int dDecayDotNorig = 0 |
Definition at line 129 of file write_dk2nus.h.
int dDecayDotNtype = 0 |
Definition at line 131 of file write_dk2nus.h.
double dDecayDotPdpx = 0.0 |
Definition at line 135 of file write_dk2nus.h.
double dDecayDotPdpy = 0.0 |
Definition at line 136 of file write_dk2nus.h.
double dDecayDotPdpz = 0.0 |
Definition at line 137 of file write_dk2nus.h.
double dDecayDotPpdxdz = 0.0 |
Definition at line 138 of file write_dk2nus.h.
double dDecayDotPpdydz = 0.0 |
Definition at line 139 of file write_dk2nus.h.
double dDecayDotPpenergy = 0.0 |
Definition at line 141 of file write_dk2nus.h.
int dDecayDotPpmedium = 0 |
Definition at line 142 of file write_dk2nus.h.
double dDecayDotPppz = 0.0 |
Definition at line 140 of file write_dk2nus.h.
int dDecayDotPtype = 0 |
Definition at line 143 of file write_dk2nus.h.
double dDecayDotVx = 0.0 |
Definition at line 132 of file write_dk2nus.h.
double dDecayDotVy = 0.0 |
Definition at line 133 of file write_dk2nus.h.
double dDecayDotVz = 0.0 |
Definition at line 134 of file write_dk2nus.h.
int dJob = 0 |
Definition at line 123 of file write_dk2nus.h.
TTree* dkMeta = 0 |
Definition at line 90 of file write_dk2nus.h.
TTree* dkTree = 0 |
Definition at line 117 of file write_dk2nus.h.
double dNurayDotE[maxArray] |
Definition at line 154 of file write_dk2nus.h.
double dNurayDotPx[maxArray] |
Definition at line 151 of file write_dk2nus.h.
double dNurayDotPy[maxArray] |
Definition at line 152 of file write_dk2nus.h.
double dNurayDotPz[maxArray] |
Definition at line 153 of file write_dk2nus.h.
double dNurayDotWgt[maxArray] |
Definition at line 155 of file write_dk2nus.h.
double dPotnum = 0.0 |
Definition at line 124 of file write_dk2nus.h.
double dPpvx = 0.0 |
Definition at line 125 of file write_dk2nus.h.
double dPpvy = 0.0 |
Definition at line 126 of file write_dk2nus.h.
double dPpvz = 0.0 |
Definition at line 127 of file write_dk2nus.h.
int dTgtexitDotTgen = 0 |
Definition at line 186 of file write_dk2nus.h.
int dTgtexitDotTptype = 0 |
Definition at line 185 of file write_dk2nus.h.
double dTgtexitDotTpx = 0.0 |
Definition at line 182 of file write_dk2nus.h.
double dTgtexitDotTpy = 0.0 |
Definition at line 183 of file write_dk2nus.h.
double dTgtexitDotTpz = 0.0 |
Definition at line 184 of file write_dk2nus.h.
double dTgtexitDotTvx = 0.0 |
Definition at line 179 of file write_dk2nus.h.
double dTgtexitDotTvy = 0.0 |
Definition at line 180 of file write_dk2nus.h.
double dTgtexitDotTvz = 0.0 |
Definition at line 181 of file write_dk2nus.h.
double dTrajDotTrkpx[maxArray] |
Definition at line 191 of file write_dk2nus.h.
double dTrajDotTrkpy[maxArray] |
Definition at line 192 of file write_dk2nus.h.
double dTrajDotTrkpz[maxArray] |
Definition at line 193 of file write_dk2nus.h.
double dTrajDotTrkx[maxArray] |
Definition at line 188 of file write_dk2nus.h.
double dTrajDotTrky[maxArray] |
Definition at line 189 of file write_dk2nus.h.
double dTrajDotTrkz[maxArray] |
Definition at line 190 of file write_dk2nus.h.
int dTrArSize = 0 |
Definition at line 121 of file write_dk2nus.h.
const std::string GDK2NU_PSET = "MINERVA-v10r8" |
Definition at line 76 of file write_dk2nus.h.
const std::string INDIR_DEBUG = "./DEBUG" |
Definition at line 74 of file write_dk2nus.h.
const std::string INDIR_GRID = "" |
Definition at line 71 of file write_dk2nus.h.
const int m_maxNFiles = 100 |
Definition at line 81 of file write_dk2nus.h.
int mArSize = 0 |
Definition at line 92 of file write_dk2nus.h.
const int maxArray = 30 |
Definition at line 50 of file write_dk2nus.h.
const int maxC = 100 |
Definition at line 51 of file write_dk2nus.h.
double mBeam0x = 0.0 |
Definition at line 101 of file write_dk2nus.h.
double mBeam0y = 0.0 |
Definition at line 102 of file write_dk2nus.h.
double mBeam0z = 0.0 |
Definition at line 103 of file write_dk2nus.h.
double mBeamdxdz = 0.0 |
Definition at line 106 of file write_dk2nus.h.
double mBeamdydz = 0.0 |
Definition at line 107 of file write_dk2nus.h.
double mBeamhwidth = 0.0 |
Definition at line 104 of file write_dk2nus.h.
char mBeamsim[maxC] |
Definition at line 95 of file write_dk2nus.h.
double mBeamvwidth = 0.0 |
Definition at line 105 of file write_dk2nus.h.
char mDkvolcfg[maxC] |
Definition at line 100 of file write_dk2nus.h.
char mHorncfg[maxC] |
Definition at line 99 of file write_dk2nus.h.
int mJob = 0 |
Definition at line 93 of file write_dk2nus.h.
Definition at line 111 of file write_dk2nus.h.
double mLocationDotX[maxArray] |
Definition at line 108 of file write_dk2nus.h.
double mLocationDotY[maxArray] |
Definition at line 109 of file write_dk2nus.h.
double mLocationDotZ[maxArray] |
Definition at line 110 of file write_dk2nus.h.
char mPhyscuts[maxC] |
Definition at line 97 of file write_dk2nus.h.
char mPhysics[maxC] |
Definition at line 96 of file write_dk2nus.h.
double mPots = 0.0 |
Definition at line 94 of file write_dk2nus.h.
char mTgtcfg[maxC] |
Definition at line 98 of file write_dk2nus.h.
const std::string OUTDIR = std::getenv("OUTDIR") != NULL ? string(std::getenv("OUTDIR")) : string(std::getenv("PWD")) |
Definition at line 68 of file write_dk2nus.h.
const std::string OUTDIR_GRID = "" |
Definition at line 72 of file write_dk2nus.h.
const std::string SAMPLEDK2NU = std::getenv("INDIR") != NULL ? string(std::getenv("INDIR"))+"/sample_dk2nu.root" : string(std::getenv("PWD"))+"/sample_dk2nu.root" |
Definition at line 69 of file write_dk2nus.h.
Referenced by LoadDetectorPosition().
const Int_t setID = 0 |
Definition at line 45 of file write_dk2nus.h.
const std::string USER = std::getenv("USER") != NULL ? string(std::getenv("USER")) : "user" |
Definition at line 67 of file write_dk2nus.h.