1 #ifndef TRooTrackerVtxModuleBase_hxx_seen
2 #define TRooTrackerVtxModuleBase_hxx_seen
8 #include "TClonesArray.h"
10 #include "TLorentzVector.h"
14 #include "TND280Event.hxx"
18 #include "TG4PrimaryParticle.hxx"
19 #include "TG4PrimaryVertex.hxx"
23 class TRooTrackerVtxModuleBase;
25 OA_EXCEPTION(EPassThroughMismatch, ERooTrackerVerticesModule);
26 OA_EXCEPTION(EIncorrectInputGenerator, ERooTrackerVerticesModule);
27 OA_EXCEPTION(ENoKinematicsPassThroughTrees, ERooTrackerVerticesModule);
53 virtual void FillVtx(
int entry) = 0;
97 std::string
GetFileName(
const ND::TG4PrimaryVertex& vtx);
98 std::string
GetTreeName(
const ND::TG4PrimaryVertex& vtx);
101 bool ComparePaths(
const char* path1,
const char* path2);
void SetFluxTreeAddresses(ND::JNuBeamFlux *flux)
int fOrigInputTreeEntries
The number of entries in the original input tree. Important for working out POTs. ...
bool FillTree(ND::TND280Event &)
Fill all the stuff that goes in the output tree.
TTree * fInputFileTree
Pass-through book keeping trees.
int fInputTreeEntryNumber
The entry number in the current rootracker file.
TRooTrackerVtxModuleBase()
TTree * fRooTrackerTree
Current loaded rootracker file.
OA_EXCEPTION(EeventAnalysis, EoaCore)
Generate a base exception for the Analysis library.
Abstract base class for converting the neutrino MC pass-through information into eventAnalysis define...
Bool_t ProcessFirstEvent(ND::TND280Event &event)
Is called after the first event is loaded in.
int fTruthVertexID
The ID of the truth vertex created from this generator vertex.
std::string fGeneratorName
The generator name. Currently genie or neut.
int GetEntryNum(const ND::TG4PrimaryVertex &vtx)
void SetBeginFile(TFile *input)
TClonesArray * fVtx
TClonesArray of vertex objects.
Int_t fNVtx
The number of vertices.
bool UpdateBookKeepingInfo(const ND::TG4PrimaryVertex &vtx)
bool GetTreesFromFile(const ND::TG4PrimaryVertex &vtx)
void FillConfigTree(TTree *configTree)
virtual void FillVtx(int entry)=0
std::string GetFileFromPath(const char *path)
bool GetTreesFromDirectory(const ND::TG4PrimaryVertex &vtx)
double fTimeInSpill
The time within the spill for vertex.
bool ComparePaths(const char *path1, const char *path2)
bool AreTreesLoaded(const ND::TG4PrimaryVertex &vtx)
std::string fInputTreeName
The input rootracker tree name. Currently gRooTracker or nRooTracker.
TFile * fCurrInputFile
Current loaded pass-through file.
int fOrigTreeEntryNumber
Entry in original rootracker tree.
void InitializeBranches()
Initialize Branches. Don't do anything else in this function.
std::string GetFileName(const ND::TG4PrimaryVertex &vtx)
A base class for analysis output modules which contain event truth information.
virtual Bool_t IsEnabledByDefault() const
Is the module is enabled by default.
virtual void SetGeneratorTreeAddresses()=0
virtual Bool_t CheckMismatch(ND::TG4PrimaryVertex vtx)=0
virtual Bool_t IsGeantinoVtx(ND::TG4PrimaryVertex vtx)=0
virtual Bool_t IsKnownGenerator(const char *)=0
std::string GetTreeName(const ND::TG4PrimaryVertex &vtx)
bool LoadPassThroughInput(const ND::TG4PrimaryVertex &vtx)
std::string fOrigInputFileName
The original rootracker tree POT.
virtual ~TRooTrackerVtxModuleBase()