BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes
ModelAnalysis Class Reference

Analysis of the model tree. More...

#include <ModelAnalysis.hh>

Inheritance diagram for ModelAnalysis:
Inheritance graph
Collaboration diagram for ModelAnalysis:
Collaboration graph

Public Member Functions

 ModelAnalysis ()
 
 ModelAnalysis (Model *model, TChain *chain, bool perEntryAnalysis=true, bool debugIn=false)
 Constructor intended for use to construct a model analysis object.
 
virtual void Process ()
 Operate on each entry in the model tree.
 
- Public Member Functions inherited from Analysis
 Analysis (const std::string &treeNameIn, TChain *chainIn, const std::string &mergedHistogramNameIn, bool perEntryAnalysis=true, bool debugIn=false)
 
virtual void Execute ()
 Method which calls all other methods in order.
 
virtual void Process ()=0
 
virtual void UserProcess ()
 Virtual function for user to overload and use. Does nothing by default.
 
virtual void SimpleHistograms ()
 Process histogram definitions from configuration instance.
 
void PreparePerEntryHistograms ()
 Create structures necessary for per entry histograms.
 
void AccumulatePerEntryHistograms (long int entryNumber)
 Accumulate means and variances for per entry histograms.
 
void TerminatePerEntryHistograms ()
 Prepare result of per entry histogram accumulation.
 
virtual void Terminate ()
 
virtual void Write (TFile *outputFile)
 Write rebdsim histograms.
 

Protected Member Functions

 ClassDef (ModelAnalysis, 1)
 
- Protected Member Functions inherited from Analysis
void FillHistogram (HistogramDef *definition, std::vector< TH1 * > *outputHistograms=nullptr)
 Create an individual histogram based on a definition.
 

Protected Attributes

Modelmodel
 Model object that data loaded from the file will be loaded into.
 
- Protected Attributes inherited from Analysis
std::string treeName
 
TChain * chain
 
std::string mergedHistogramName
 Name of directory for merged histograms.
 
std::vector< TH1 * > simpleHistograms
 
std::vector< PerEntryHistogram * > perEntryHistograms
 
HistogramMeanFromFilehistoSum
 Merge of per event stored histograms.
 
bool debug
 Whether debug print out is used or not.
 
long int entries
 Number of entries in the chain.
 
bool perEntry
 Whether to analyse each entry in the tree in a for loop or not.
 

Detailed Description

Analysis of the model tree.

Author
Stuart Walker.

Definition at line 35 of file ModelAnalysis.hh.

Constructor & Destructor Documentation

◆ ModelAnalysis() [1/2]

ModelAnalysis::ModelAnalysis ( )

The default constructor is not intended for use and will not work for the purpose of analysis. It is required by the ROOT C++ reflection system in case you wish to save the object.

◆ ModelAnalysis() [2/2]

ModelAnalysis::ModelAnalysis ( Model model,
TChain *  chain,
bool  perEntryAnalysis = true,
bool  debugIn = false 
)

Constructor intended for use to construct a model analysis object.

Definition at line 30 of file ModelAnalysis.cc.

◆ ~ModelAnalysis()

ModelAnalysis::~ModelAnalysis ( )
virtualnoexcept

Definition at line 38 of file ModelAnalysis.cc.

Member Function Documentation

◆ Process()

void ModelAnalysis::Process ( )
virtual

Operate on each entry in the model tree.

Implements Analysis.

Definition at line 41 of file ModelAnalysis.cc.

References Analysis::AccumulatePerEntryHistograms(), and Analysis::entries.

Here is the call graph for this function:

Field Documentation

◆ model

Model* ModelAnalysis::model
protected

Model object that data loaded from the file will be loaded into.

Definition at line 54 of file ModelAnalysis.hh.


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