18 #ifndef _SIMPLE_NTP_FLUX_H_
19 #define _SIMPLE_NTP_FLUX_H_
27 #include <TLorentzVector.h>
28 #include <TLorentzRotation.h>
46 class GSimpleNtpEntry;
47 ostream &
operator << (ostream & stream,
const GSimpleNtpEntry & info);
66 void Print(
const Option_t* opt =
"")
const;
101 void Print(
const Option_t* opt =
"")
const;
140 void Print(
const Option_t* opt =
"")
const;
168 void Print(
const Option_t* opt =
"")
const;
221 void Clear (Option_t * opt);
272 const std::string& det_loc);
274 virtual void GetBranchInfo(std::vector<std::string>& branchNames,
275 std::vector<std::string>& branchClassNames,
276 std::vector<void**>& branchObjPointers);
293 void GetFluxWindow(TVector3& p1, TVector3& p2, TVector3& p3)
const;
304 void AddFile (TTree* fluxtree, TTree* metatree,
string fname);
360 #endif // _SIMPLE_NTP_FLUX_H_
double UsedPOTs(void) const
of protons-on-target used
void SetGenWeighted(bool genwgt=false)
toggle whether GenerateNext() returns weight=1 flux (initial default false)
void GetFluxWindow(TVector3 &p1, TVector3 &p2, TVector3 &p3) const
3 points define a plane in beam coordinate
const PDGCodeList & FluxParticles(void)
declare list of flux neutrinos that can be generated (for init. purposes)
const TLorentzVector & Position(void)
returns the flux neutrino 4-position (note: expect SI rather than physical units) ...
Double_t E
energy in lab frame
GSimpleNtpAux * fCurAux
current "aux" branch extra info
Int_t fIFileNumber
which file for the current entry
void Clear(Option_t *opt)
reset state variables based on opt
virtual long int NFluxNeutrinos() const
of rays generated
std::vector< string > fNuFluxFilePatterns
(potentially wildcarded) path(s)
long int fNNeutrinos
number of flux neutrinos thrown so far
virtual void LoadBeamSimData(const std::vector< std::string > &filenames, const std::string &det_loc)=0
void AddFile(TTree *fluxtree, TTree *metatree, string fname)
void PrintCurrent(void)
print current entry from leaves
int PdgCode(void)
returns the flux neutrino pdg code
GSimpleNtpMeta * fCurMeta
current meta data
const TLorentzVector & Momentum(void)
returns the flux neutrino 4-momentum
Double_t pdpx
nu parent momentum at time of decay
void SetEntryReuse(long int nuse=1)
of times to use entry before moving to next
long int fIUse
current # of times an entry has been used
Double_t px
x momentum in lab frame (GeV)
A GENIE flux driver using a simple ntuple format.
double fSumWeight
sum of weights for nus thrown so far
Double_t vtxy
y position in lab frame
virtual ~GSimpleNtpEntry()
friend ostream & operator<<(ostream &stream, const GSimpleNtpEntry &info)
Double_t vx
vertex position of hadron/muon decay
friend ostream & operator<<(ostream &stream, const GSimpleNtpNuMI &info)
double MaxEnergy(void)
declare the max flux neutrino energy that can be generated (for init. purposes)
void CalcEffPOTsPerNu(void)
Int_t tptype
parent particle type at target exit
bool End(void)
true if no more flux nu's can be thrown (eg reaching end of beam sim ntuples)
std::vector< Double_t > auxdbl
additional doubles associated w/ entry
std::vector< Int_t > auxint
additional ints associated w/ entry
virtual TTree * GetMetaDataTree()
void GenerateWeighted(bool gen_weighted)
set whether to generate weighted or unweighted neutrinos
void MoveToZ0(double z0)
move ray origin to user coord Z0
Double_t vtxt
time of ray start (seconds)
ostream & operator<<(ostream &stream, const genie::flux::GJPARCNuFluxPassThroughInfo &info)
void SetIncludeVtxt(bool it=true)
const genie::flux::GSimpleNtpEntry * GetCurrentEntry(void)
GSimpleNtpEntry.
Double_t pppx
nu parent momentum at production point
const genie::flux::GSimpleNtpMeta * GetCurrentMeta(void)
GSimpleNtpMeta.
void SetRequestedBranchList(string blist="entry,numi,aux")
void ProcessMeta(void)
scan for max flux energy, weight
bool OptionalAttachBranch(std::string bname)
PDGCodeList * fPdgCList
list of neutrino pdg-codes to generate
bool fIncludeVtxt
does fX4 include CurEntry.vtxt or 0
std::vector< std::string > GetFileList()
list of files currently part of chain
TLorentzVector fX4
reconstituted position vector
bool fAllFilesMeta
do all files in chain have meta data
Double_t fFilePOTs
of protons-on-target represented by all files
bool fGenWeighted
does GenerateNext() give weights?
Double_t vtxz
z position in lab frame
GENIE interface for uniform flux exposure iterface.
Int_t ppmedium
tracking medium where parent was produced
virtual double GetTotalExposure() const
GFluxExposureI interface.
bool GetIncludeVtxt()
should X4 include CurEntry.vtxt
GSimpleNtpNuMI * fCurNuMICopy
current "numi" branch extra info
long int fNEntriesUsed
number of entries read from files
bool GenerateNext(void)
generate the next flux neutrino (return false in err)
void PrintConfig()
print the current configuration
TChain * GetFluxTChain(void)
Double_t tpx
parent particle px at target exit
void SetMaxEnergy(double Ev)
specify maximum flx neutrino energy
GSimpleNtpNuMI * fCurNuMI
current "numi" branch extra info
double SumWeight(void) const
integrated weight for flux neutrinos looped so far
int fNFiles
number of files in chain
virtual void GetBranchInfo(std::vector< std::string > &branchNames, std::vector< std::string > &branchClassNames, std::vector< void ** > &branchObjPointers)
double fMaxWeight
max flux neutrino weight in input file
double fWeight
current neutrino weight
TChain * fNuMetaTree
TTree // REF ONLY.
GSimpleNtpEntry * fCurEntry
current entry
const genie::flux::GSimpleNtpAux * GetCurrentAux(void)
GSimpleNtpAux.
TLorentzVector fP4
reconstituted p4 vector
bool fAlreadyUnwgt
are input files already unweighted
Long64_t fIEntry
current flux ntuple entry
Long64_t fNEntries
number of flux ntuple entries
Double_t vtxx
x position in lab frame (meters)
Double_t pz
z momentum in lab frame
friend ostream & operator<<(ostream &stream, const GSimpleNtpAux &info)
long int Index(void)
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current ent...
GSimpleNtpAux * fCurAuxCopy
current "aux" branch extra info
long int fNUse
how often to use same entry in a row
long int NEntriesUsed(void) const
number of entries read from files
Double_t dist
distance from hadron decay
GSimpleNtpEntry * fCurEntryCopy
current entry
double fEffPOTsPerNu
what a entry is worth ...
double GetDecayDist() const
dist (user units) from dk to current pos
const genie::flux::GSimpleNtpNuMI * GetCurrentNuMI(void)
GSimpleNtpNuMI.
string fNuFluxBranchRequest
list of requested branches "entry,numi,au"
bool fEnd
end condition reached
virtual void LoadBeamSimData(const std::vector< string > &filenames, const std::string &det_loc)
double fMaxEv
maximum energy
UInt_t metakey
key to meta data
void Print(const Option_t *opt="") const
Double_t py
y momentum in lab frame
double Weight(void)
returns the flux neutrino weight (if any)
double fAccumPOTs
POTs used so far.
virtual ~GSimpleNtpNuMI()
void Print(const Option_t *opt="") const
bool GenerateNext_weighted(void)
TChain * fNuFluxTree
TTree // REF ONLY.
GENIE Interface for user-defined flux classes.
void Print(const Option_t *opt="") const
Int_t ptype
parent type (PDG)