eventAnalysis  7.0-49-g0ac7482
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ND::TNRooTrackerVtxModule Class Reference

#include <TNRooTrackerVtxModule.hxx>

+ Inheritance diagram for ND::TNRooTrackerVtxModule:
+ Collaboration diagram for ND::TNRooTrackerVtxModule:

Public Member Functions

 TNRooTrackerVtxModule (const char *name="NRooTrackerVtx", const char *title="Truth info for NEUT primary vertices from the ""nRooTracker pass-through tree")
 
virtual ~TNRooTrackerVtxModule ()
 
Bool_t CheckMismatch (ND::TG4PrimaryVertex vtx)
 
virtual Bool_t Configure (std::string &option)
 A function that allows the module to be configured from an external class without any dependencies. More...
 
void FillConfigTree (TTree *configTree)
 
bool FillTree (ND::TND280Event &)
 Fill all the stuff that goes in the output tree. More...
 
void FillVtx (int entry)
 
Int_t GetBufferSize ()
 ROOT output parameters, usually no need to touch. More...
 
std::string const GetCVSID () const
 
std::string const GetCVSTagName () const
 
std::string const GetDescription () const
 
std::string const GetDirectoryName () const
 Returns the name of the directory which the output of a particular module will be saved in. More...
 
char const * GetName ()
 
TTree const * GetOutputTree () const
 The output tree. More...
 
Int_t GetSplitLevel ()
 ROOT output parameters, usually no need to touch. More...
 
char const * GetTitle ()
 
virtual EType GetTreeType () const
 Returns the type of tree, header, truth, or recon. More...
 
void Initialize (TTree *tree)
 
void InitializeBranches ()
 Initialize Branches. Don't do anything else in this function. More...
 
virtual Bool_t IsEnabled () const
 Whether the module is enable or not. More...
 
virtual Bool_t IsEnabledByDefault () const
 Is the module is enabled by default. More...
 
virtual bool IsFullEventWorthSaving (ND::TND280Event &event)
 Whether the module thinks it is worth saving the entire oaEvent event tree entry for this event. More...
 
Bool_t IsGeantinoVtx (ND::TG4PrimaryVertex vtx)
 
Bool_t IsKnownGenerator (const char *)
 
virtual Bool_t IsUsedForPreselection () const
 Whether the module should call IsFullEventWorthSaving() function for each event, to decide if the full oaEvent info for that event should be saved in the output. More...
 
void KillOutputTree ()
 
virtual void Print ()
 Prints a simple message describing the module. More...
 
virtual bool Process (ND::TND280Event &event)
 Gets the run and event IDs and calls FillTree with the event, and then actually calls fOutputTree->Fill. More...
 
Bool_t ProcessFirstEvent (ND::TND280Event &event)
 Is called after the first event is loaded in. More...
 
virtual void SayAvailableOpts (std::string indent="")
 Subclasses should override this to let a user know what options are available. More...
 
void SetBeginFile (TFile *input)
 
void SetBufferSize (Int_t buffersize)
 ROOT output parameters, usually no need to touch. More...
 
virtual void SetDisabled ()
 Disables the module. More...
 
virtual void SetEnabled (Bool_t isenabled=true)
 Sets whether the module is enabled. More...
 
void SetFluxTreeAddresses (ND::JNuBeamFlux *flux)
 
void SetGeneratorTreeAddresses ()
 
void SetInputDirectory (std::string dir)
 
void SetNameTitle (char const *name, char const *title)
 
void SetSplitLevel (Int_t splitlevel)
 ROOT output parameters, usually no need to touch. More...
 
virtual void SetUsedForPreselection (Bool_t isused=true)
 Sets whether the module should call IsFullEventWorthSaving() function for each event, to decide if the full oaEvent info for that event should be saved in the output. More...
 

Public Attributes

Int_t fNVtx
 The number of vertices. More...
 
TClonesArray * fVtx
 TClonesArray of vertex objects. More...
 

Protected Types

enum  EType {
  kHeader = 0, kTruth, kRecon, kLowLevel,
  kNTypes
}
 

Protected Member Functions

virtual void InitializeModule ()
 Initialize Module, override if necessary. More...
 

Protected Attributes

Int_t fBufferSize
 Buffer Size for TBranch. More...
 
TFile * fCurrInputFile
 Current loaded pass-through file. More...
 
std::string fCVSID
 Defined if an official tagged version. More...
 
std::string fCVSTagName
 Defined if an official tagged version. More...
 
std::string fDescription
 A longish descrition of the analysis. More...
 
Int_t fEventID
 
Bool_t fFilledConfigTree
 
std::string fGeneratorName
 The generator name. Currently genie or neut. More...
 
std::string fInputDirectory
 An input directory where analysis modules can search for extra files. More...
 
TTree * fInputFileTree
 Pass-through book keeping trees. More...
 
TTree * fInputKinemTree
 
int fInputTreeEntryNumber
 The entry number in the current rootracker file. More...
 
std::string fInputTreeName
 The input rootracker tree name. Currently gRooTracker or nRooTracker. More...
 
Bool_t fIsEnabled
 
Bool_t fIsMC
 
Bool_t fIsUsedForPreselection
 
TFile * fLastBeginFile
 
std::string fName
 
std::string fOrigInputFileName
 The original rootracker tree POT. More...
 
int fOrigInputTreeEntries
 The number of entries in the original input tree. Important for working out POTs. More...
 
double fOrigInputTreePOT
 
int fOrigTreeEntryNumber
 Entry in original rootracker tree. More...
 
TTree * fOutputTree
 
Int_t fPreselected
 
TTree * fRooTrackerTree
 Current loaded rootracker file. More...
 
Int_t fRunID
 
Int_t fSplitLevel
 Split Level for TBranch. More...
 
Int_t fSubrunID
 
double fTimeInSpill
 The time within the spill for vertex. More...
 
std::string fTitle
 
int fTruthVertexID
 The ID of the truth vertex created from this generator vertex. More...
 

Private Attributes

NRooTrackerVtxfCurrNeutVtx
 
bool fHaveNFBranches
 

Detailed Description

Definition at line 23 of file TNRooTrackerVtxModule.hxx.

Member Enumeration Documentation

enum ND::TAnalysisModuleBase::EType
protectedinherited
Enumerator
kHeader 
kTruth 
kRecon 
kLowLevel 
kNTypes 

Definition at line 54 of file TAnalysisModuleBase.hxx.

Constructor & Destructor Documentation

ND::TNRooTrackerVtxModule::TNRooTrackerVtxModule ( const char *  name = "NRooTrackerVtx",
const char *  title = "Truth info for NEUT primary vertices from the " "nRooTracker pass-through tree" 
)
ND::TNRooTrackerVtxModule::~TNRooTrackerVtxModule ( )
virtual

Definition at line 19 of file TNRooTrackerVtxModule.cxx.

Member Function Documentation

Bool_t ND::TNRooTrackerVtxModule::CheckMismatch ( ND::TG4PrimaryVertex  vtx)
virtual

Implements ND::TRooTrackerVtxModuleBase.

Definition at line 31 of file TNRooTrackerVtxModule.cxx.

References IsGeantinoVtx().

Bool_t ND::TAnalysisModuleBase::Configure ( std::string &  option)
virtualinherited

A function that allows the module to be configured from an external class without any dependencies.

Should be overridden with a function that responds to the string option, and returns true if configuration succedded. Used in TAnalysisLoop.cxx (and RunEventAnalysis.exe) for options of the form: -O TTruthTrajectoriesModule=SaveAll

Reimplemented in ND::TTrackerECALReconModule::OutputManager, ND::TGlobalReconModule, ND::TBeamSummaryDataModule, ND::TTruthTrajectoriesModule, ND::TBasicHeaderModule, and ND::TTagsModule.

Definition at line 17 of file TAnalysisModuleBase.cxx.

bool ND::TRooTrackerVtxModuleBase::FillTree ( ND::TND280Event &  )
virtualinherited

Fill all the stuff that goes in the output tree.

Return true if everything went well. Otherwise, the module may be disabled! (return definition changed Apr 2009!)

Make sure not Dereferencing a NULL THandle to stop the module being disabled.

Loop over the vertices and fill genie or neut roo tracker event objects.

Load the trees if necessary.

Set the bookkeeping info from the current vertex and pass-through info. This done here as is common to all generators.

Fill the vertex.

Check basic pass-through quantities match those of G4PrimaryVertex.

Implements ND::TAnalysisModuleBase.

Definition at line 43 of file TRooTrackerVtxModuleBase.cxx.

void ND::TNRooTrackerVtxModule::FillVtx ( int  entry)
virtual

< Fill in the geometry path for the current vertex.

< Get the name of the generator that generated this event.

< Get the geometry path for this event.

< Now create another fRooTracker vtx to add to the vertex container.

Copy the current neut event. Make sure this is done last so we copy a complete event.

Implements ND::TRooTrackerVtxModuleBase.

Definition at line 67 of file TNRooTrackerVtxModule.cxx.

References ND::NRooTrackerVtx::Copy().

Int_t ND::TAnalysisModuleBase::GetBufferSize ( )
inherited

ROOT output parameters, usually no need to touch.

Definition at line 123 of file TAnalysisModuleBase.hxx.

References ND::TAnalysisModuleBase::fBufferSize.

std::string const ND::TAnalysisModuleBase::GetCVSID ( ) const
inherited

Definition at line 136 of file TAnalysisModuleBase.hxx.

References ND::TAnalysisModuleBase::fCVSID.

std::string const ND::TAnalysisModuleBase::GetCVSTagName ( ) const
inherited

Definition at line 135 of file TAnalysisModuleBase.hxx.

References ND::TAnalysisModuleBase::fCVSTagName.

std::string const ND::TAnalysisModuleBase::GetDescription ( ) const
inherited

Definition at line 134 of file TAnalysisModuleBase.hxx.

References ND::TAnalysisModuleBase::fDescription.

std::string const ND::TAnalysisModuleBase::GetDirectoryName ( ) const
inherited

Returns the name of the directory which the output of a particular module will be saved in.

Definition at line 22 of file TAnalysisModuleBase.cxx.

Referenced by ND::TAnalysisLoop::Initialize().

TTree const* ND::TAnalysisModuleBase::GetOutputTree ( ) const
inherited

The output tree.

Definition at line 139 of file TAnalysisModuleBase.hxx.

References ND::TAnalysisModuleBase::fOutputTree.

Int_t ND::TAnalysisModuleBase::GetSplitLevel ( )
inherited

ROOT output parameters, usually no need to touch.

Definition at line 129 of file TAnalysisModuleBase.hxx.

References ND::TAnalysisModuleBase::fSplitLevel.

char const * ND::TAnalysisModuleBase::GetTitle ( )
inherited

Definition at line 118 of file TAnalysisModuleBase.cxx.

Referenced by ND::TAnalysisLoop::Initialize().

virtual EType ND::TAnalysisTruthModuleBase::GetTreeType ( ) const
virtualinherited

Returns the type of tree, header, truth, or recon.

This is overridden in the derived base classes such as TAnalysisReconModuleBase, so users do not need to override it explicitly

Implements ND::TAnalysisModuleBase.

Definition at line 17 of file TAnalysisTruthModuleBase.hxx.

References ND::TAnalysisModuleBase::kTruth.

void ND::TAnalysisModuleBase::Initialize ( TTree *  tree)
inherited

Definition at line 37 of file TAnalysisModuleBase.cxx.

Referenced by ND::TAnalysisLoop::Initialize().

void ND::TRooTrackerVtxModuleBase::InitializeBranches ( )
virtualinherited

Initialize Branches. Don't do anything else in this function.

Implements ND::TAnalysisModuleBase.

Definition at line 355 of file TRooTrackerVtxModuleBase.cxx.

virtual void ND::TAnalysisModuleBase::InitializeModule ( )
protectedvirtualinherited
virtual Bool_t ND::TAnalysisModuleBase::IsEnabled ( ) const
virtualinherited

Whether the module is enable or not.

Definition at line 84 of file TAnalysisModuleBase.hxx.

References ND::TAnalysisModuleBase::fIsEnabled.

Referenced by ND::TAnalysisLoop::Initialize(), and ND::TAnalysisLoop::operator()().

virtual Bool_t ND::TRooTrackerVtxModuleBase::IsEnabledByDefault ( ) const
virtualinherited

Is the module is enabled by default.

Default is to enable module. To set to disable override this method in the derived module.

Reimplemented from ND::TAnalysisModuleBase.

Definition at line 40 of file TRooTrackerVtxModuleBase.hxx.

bool ND::TAnalysisModuleBase::IsFullEventWorthSaving ( ND::TND280Event &  event)
virtualinherited

Whether the module thinks it is worth saving the entire oaEvent event tree entry for this event.

eventAnalysis can be used for event pre-selection in this way. Activated with the –oaEvent-preselection=<moduleclass>> command- line argument

Reimplemented in ND::TTrackerECALReconModule::OutputManager, ND::TReconPerformanceEvalModule, and ND::TTRExReconModule.

Definition at line 90 of file TAnalysisModuleBase.cxx.

Bool_t ND::TNRooTrackerVtxModule::IsGeantinoVtx ( ND::TG4PrimaryVertex  vtx)
virtual

Implements ND::TRooTrackerVtxModuleBase.

Definition at line 57 of file TNRooTrackerVtxModule.cxx.

Referenced by CheckMismatch().

Bool_t ND::TNRooTrackerVtxModule::IsKnownGenerator ( const char *  name)
virtual

Implements ND::TRooTrackerVtxModuleBase.

Definition at line 21 of file TNRooTrackerVtxModule.cxx.

virtual Bool_t ND::TAnalysisModuleBase::IsUsedForPreselection ( ) const
virtualinherited

Whether the module should call IsFullEventWorthSaving() function for each event, to decide if the full oaEvent info for that event should be saved in the output.

Definition at line 93 of file TAnalysisModuleBase.hxx.

References ND::TAnalysisModuleBase::fIsUsedForPreselection.

Referenced by ND::TAnalysisLoop::Initialize(), and ND::TAnalysisLoop::operator()().

void ND::TAnalysisModuleBase::KillOutputTree ( )
inherited

Definition at line 140 of file TAnalysisModuleBase.hxx.

References ND::TAnalysisModuleBase::fOutputTree.

void ND::TAnalysisModuleBase::Print ( )
virtualinherited

Prints a simple message describing the module.

Should be overridden for more detail

Definition at line 99 of file TAnalysisModuleBase.cxx.

Referenced by ND::TAnalysisLoop::Initialize().

bool ND::TAnalysisModuleBase::Process ( ND::TND280Event &  event)
virtualinherited

Gets the run and event IDs and calls FillTree with the event, and then actually calls fOutputTree->Fill.

Definition at line 77 of file TAnalysisModuleBase.cxx.

Referenced by ND::TAnalysisLoop::operator()().

Bool_t ND::TRooTrackerVtxModuleBase::ProcessFirstEvent ( ND::TND280Event &  )
virtualinherited

Is called after the first event is loaded in.

This is a good time to save persistent quantities in the module's data members, which will be retrievable from the eventAnalysis output file. Not intended for filling in the tree with the first event, as Process() will also be called.

Implements ND::TAnalysisModuleBase.

Definition at line 445 of file TRooTrackerVtxModuleBase.cxx.

virtual void ND::TAnalysisModuleBase::SayAvailableOpts ( std::string  indent = "")
virtualinherited

Subclasses should override this to let a user know what options are available.

Reimplemented in ND::TTrackerECALReconModule::OutputManager, ND::TGlobalReconModule, ND::TTagsModule, and ND::TBasicHeaderModule.

Definition at line 156 of file TAnalysisModuleBase.hxx.

void ND::TRooTrackerVtxModuleBase::SetBeginFile ( TFile *  input)
inherited
void ND::TAnalysisModuleBase::SetBufferSize ( Int_t  buffersize)
inherited

ROOT output parameters, usually no need to touch.

Definition at line 126 of file TAnalysisModuleBase.hxx.

References ND::TAnalysisModuleBase::fBufferSize.

virtual void ND::TAnalysisModuleBase::SetDisabled ( )
virtualinherited

Disables the module.

Is called when an exception is thrown inside the module.

Definition at line 74 of file TAnalysisModuleBase.hxx.

References ND::TAnalysisModuleBase::SetEnabled().

Referenced by ND::TAnalysisLoop::Initialize(), and ND::TAnalysisLoop::operator()().

virtual void ND::TAnalysisModuleBase::SetEnabled ( Bool_t  isenabled = true)
virtualinherited

Sets whether the module is enabled.

This only refer to modules which have been included for consideration by being instantiated in TAnalysisLoop.cxx or similar.

Definition at line 70 of file TAnalysisModuleBase.hxx.

References ND::TAnalysisModuleBase::fIsEnabled.

Referenced by ND::TAnalysisLoop::Initialize(), ND::TAnalysisModuleBase::SetDisabled(), and ND::TAnalysisLoop::SetOption().

void ND::TNRooTrackerVtxModule::SetGeneratorTreeAddresses ( )
virtual
void ND::TAnalysisModuleBase::SetInputDirectory ( std::string  dir)
inherited

Definition at line 158 of file TAnalysisModuleBase.hxx.

References ND::TAnalysisModuleBase::fInputDirectory.

void ND::TAnalysisModuleBase::SetSplitLevel ( Int_t  splitlevel)
inherited
virtual void ND::TAnalysisModuleBase::SetUsedForPreselection ( Bool_t  isused = true)
virtualinherited

Sets whether the module should call IsFullEventWorthSaving() function for each event, to decide if the full oaEvent info for that event should be saved in the output.

Definition at line 79 of file TAnalysisModuleBase.hxx.

References ND::TAnalysisModuleBase::fIsUsedForPreselection.

Referenced by ND::TAnalysisLoop::SetOption().

Member Data Documentation

TFile* ND::TRooTrackerVtxModuleBase::fCurrInputFile
protectedinherited

Current loaded pass-through file.

Definition at line 65 of file TRooTrackerVtxModuleBase.hxx.

NRooTrackerVtx* ND::TNRooTrackerVtxModule::fCurrNeutVtx
private

Definition at line 38 of file TNRooTrackerVtxModule.hxx.

Referenced by TNRooTrackerVtxModule().

Int_t ND::TAnalysisModuleBase::fEventID
protectedinherited

Definition at line 198 of file TAnalysisModuleBase.hxx.

Bool_t ND::TAnalysisModuleBase::fFilledConfigTree
protectedinherited
std::string ND::TRooTrackerVtxModuleBase::fGeneratorName
protectedinherited

The generator name. Currently genie or neut.

Definition at line 80 of file TRooTrackerVtxModuleBase.hxx.

bool ND::TNRooTrackerVtxModule::fHaveNFBranches
private

Definition at line 39 of file TNRooTrackerVtxModule.hxx.

std::string ND::TAnalysisModuleBase::fInputDirectory
protectedinherited

An input directory where analysis modules can search for extra files.

Definition at line 201 of file TAnalysisModuleBase.hxx.

Referenced by ND::TAnalysisModuleBase::SetInputDirectory().

TTree* ND::TRooTrackerVtxModuleBase::fInputFileTree
protectedinherited

Pass-through book keeping trees.

Definition at line 69 of file TRooTrackerVtxModuleBase.hxx.

Referenced by ND::TRooTrackerVtxModuleBase::TRooTrackerVtxModuleBase().

TTree* ND::TRooTrackerVtxModuleBase::fInputKinemTree
protectedinherited
int ND::TRooTrackerVtxModuleBase::fInputTreeEntryNumber
protectedinherited

The entry number in the current rootracker file.

Definition at line 74 of file TRooTrackerVtxModuleBase.hxx.

std::string ND::TRooTrackerVtxModuleBase::fInputTreeName
protectedinherited

The input rootracker tree name. Currently gRooTracker or nRooTracker.

Definition at line 82 of file TRooTrackerVtxModuleBase.hxx.

Bool_t ND::TAnalysisModuleBase::fIsUsedForPreselection
protectedinherited
TFile* ND::TRooTrackerVtxModuleBase::fLastBeginFile
protectedinherited
std::string ND::TAnalysisModuleBase::fName
protectedinherited

Definition at line 203 of file TAnalysisModuleBase.hxx.

Int_t ND::TRooTrackerVtxModuleBase::fNVtx
inherited

The number of vertices.

Definition at line 58 of file TRooTrackerVtxModuleBase.hxx.

std::string ND::TRooTrackerVtxModuleBase::fOrigInputFileName
protectedinherited

The original rootracker tree POT.

Definition at line 78 of file TRooTrackerVtxModuleBase.hxx.

int ND::TRooTrackerVtxModuleBase::fOrigInputTreeEntries
protectedinherited

The number of entries in the original input tree. Important for working out POTs.

Definition at line 76 of file TRooTrackerVtxModuleBase.hxx.

double ND::TRooTrackerVtxModuleBase::fOrigInputTreePOT
protectedinherited

Definition at line 77 of file TRooTrackerVtxModuleBase.hxx.

int ND::TRooTrackerVtxModuleBase::fOrigTreeEntryNumber
protectedinherited

Entry in original rootracker tree.

Definition at line 72 of file TRooTrackerVtxModuleBase.hxx.

Int_t ND::TAnalysisModuleBase::fPreselected
protectedinherited

Definition at line 199 of file TAnalysisModuleBase.hxx.

TTree* ND::TRooTrackerVtxModuleBase::fRooTrackerTree
protectedinherited

Current loaded rootracker file.

Definition at line 67 of file TRooTrackerVtxModuleBase.hxx.

Referenced by ND::TRooTrackerVtxModuleBase::TRooTrackerVtxModuleBase().

Int_t ND::TAnalysisModuleBase::fRunID
protectedinherited

Definition at line 196 of file TAnalysisModuleBase.hxx.

Int_t ND::TAnalysisModuleBase::fSubrunID
protectedinherited

Definition at line 197 of file TAnalysisModuleBase.hxx.

double ND::TRooTrackerVtxModuleBase::fTimeInSpill
protectedinherited

The time within the spill for vertex.

Definition at line 84 of file TRooTrackerVtxModuleBase.hxx.

std::string ND::TAnalysisModuleBase::fTitle
protectedinherited

Definition at line 204 of file TAnalysisModuleBase.hxx.

int ND::TRooTrackerVtxModuleBase::fTruthVertexID
protectedinherited

The ID of the truth vertex created from this generator vertex.

Definition at line 86 of file TRooTrackerVtxModuleBase.hxx.

TClonesArray* ND::TRooTrackerVtxModuleBase::fVtx
inherited

TClonesArray of vertex objects.

Definition at line 59 of file TRooTrackerVtxModuleBase.hxx.

Referenced by ND::TGRooTrackerVtxModule::TGRooTrackerVtxModule(), and TNRooTrackerVtxModule().


The documentation for this class was generated from the following files:

Package Summary
Package Name: eventAnalysis
Package Version: 7.0-49-g0ac7482
Package Manager:

Generated on Mon Mar 25 2024 14:44:02 for eventAnalysis by doxygen 1.8.5