18 #ifndef _SIMPLE_NTP_FLUX_H_ 19 #define _SIMPLE_NTP_FLUX_H_ 27 #include <TLorentzVector.h> 28 #include <TLorentzRotation.h> 46 class GSimpleNtpEntry;
66 void Print(
const Option_t*
opt =
"")
const;
101 void Print(
const Option_t*
opt =
"")
const;
140 void Print(
const Option_t*
opt =
"")
const;
167 void AddFlavor(Int_t nupdg);
168 void Print(
const Option_t*
opt =
"")
const;
178 Double_t windowBase[3];
179 Double_t windowDir1[3];
180 Double_t windowDir2[3];
214 bool GenerateNext (
void);
217 const TLorentzVector &
Momentum (
void) {
return fP4; }
218 const TLorentzVector &
Position (
void) {
return fX4; }
219 bool End (
void) {
return fEnd; }
220 long int Index (
void) {
return fIEntry; }
221 void Clear (Option_t *
opt);
222 void GenerateWeighted (
bool gen_weighted);
246 double GetDecayDist()
const;
247 void MoveToZ0(
double z0);
249 void SetIncludeVtxt(
bool it=
true);
255 virtual double GetTotalExposure()
const;
256 virtual long int NFluxNeutrinos()
const;
258 double UsedPOTs(
void)
const;
263 void PrintCurrent(
void);
266 std::vector<std::string> GetFileList();
271 virtual void LoadBeamSimData(
const std::vector<string>& filenames,
274 virtual void GetBranchInfo(std::vector<std::string>& branchNames,
275 std::vector<std::string>& branchClassNames,
276 std::vector<void**>& branchObjPointers);
277 virtual TTree* GetMetaDataTree();
285 void SetMaxEnergy(
double Ev);
289 void SetEntryReuse(
long int nuse=1);
291 void ProcessMeta(
void);
293 void GetFluxWindow(TVector3& p1, TVector3& p2, TVector3& p3)
const;
299 bool GenerateNext_weighted (
void);
301 void SetDefaults (
void);
303 void ResetCurrent (
void);
304 void AddFile (TTree* fluxtree, TTree* metatree,
string fname);
306 void CalcEffPOTsPerNu (
void);
307 void ScanMeta (
void);
360 #endif // _SIMPLE_NTP_FLUX_H_ void SetGenWeighted(bool genwgt=false)
toggle whether GenerateNext() returns weight=1 flux (initial default false)
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
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
int PdgCode(void)
returns the flux neutrino pdg code
THE MAIN GENIE PROJECT NAMESPACE
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
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
double MaxEnergy(void)
declare the max flux neutrino energy that can be generated (for init. purposes)
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
Double_t vtxt
time of ray start (seconds)
ostream & operator<<(ostream &stream, const genie::flux::GJPARCNuFluxPassThroughInfo &info)
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")
bool fIncludeVtxt
does fX4 include CurEntry.vtxt or 0
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
GSimpleNtpNuMI * fCurNuMICopy
current "numi" branch extra info
long int fNEntriesUsed
number of entries read from files
TChain * GetFluxTChain(void)
Double_t tpx
parent particle px at target exit
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
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
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 ...
const genie::flux::GSimpleNtpNuMI * GetCurrentNuMI(void)
GSimpleNtpNuMI.
string fNuFluxBranchRequest
list of requested branches "entry,numi,au"
bool fEnd
end condition reached
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()
TChain * fNuFluxTree
TTree // REF ONLY.
GENIE Interface for user-defined flux classes.
Int_t ptype
parent type (PDG)