BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Simple analysis to pull out first hit in each sampler. More...
#include <EventAnalysisOrbit.hh>
Public Member Functions | |
EventAnalysisOrbit () | |
EventAnalysisOrbit (Event *eventIn, TChain *chain, bool perEntryAnalysis=true, bool processSamplersIn=true, bool debugIn=false, bool printOutIn=true, double printModuloFraction=0.01, bool emittanceOnTheFlyIn=false, long int eventStartIn=0, long int eventEndIn=-1) | |
Constructor intended for use to construct an event analysis object. | |
void | Clear () |
Empty the member vectors of their data. | |
void | ExtractOrbit (int index) |
Extract an orbit from the data. | |
void | WriteOrbit (TFile *f) |
Write orbit to a ROOT file. | |
ClassDef (EventAnalysisOrbit, 1) | |
![]() | |
EventAnalysis () | |
EventAnalysis (Event *eventIn, TChain *chain, bool perEntryAnalysis=true, bool processSamplersIn=true, bool debugIn=false, bool printOutIn=true, double printModuloFraction=0.01, bool emittanceOnTheFlyIn=false, long int eventStartIn=0, long int eventEndIn=-1, const std::string &primaryParticleName="") | |
Constructor intended for use to construct an event analysis object. | |
virtual void | Execute () |
virtual void | Process () |
Operate on each entry in the event tree. | |
virtual void | SimpleHistograms () |
Process histogram definitions from configuration instance. | |
virtual void | Terminate () |
Terminate each individual sampler analysis and append optical functions. | |
virtual void | Write (TFile *outputFileName) |
Write analysis including optical functions to an output file. | |
![]() | |
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. | |
Data Fields | |
std::vector< double > | ss |
Temporary storage for orbit. | |
std::vector< double > | x |
Temporary storage for orbit. | |
std::vector< double > | xp |
Temporary storage for orbit. | |
std::vector< double > | y |
Temporary storage for orbit. | |
std::vector< double > | yp |
Temporary storage for orbit. | |
std::vector< std::string > | elementName |
Temporary storage for orbit. | |
Additional Inherited Members | |
![]() | |
void | PreparePerEntryHistogramSets () |
void | AccumulatePerEntryHistogramSets (long int entryNumber) |
void | TerminatePerEntryHistogramSets () |
void | CheckSpectraBranches () |
void | FillHistogram (HistogramDefSet *definition) |
Fill a set of simple histograms across all events. | |
![]() | |
void | FillHistogram (HistogramDef *definition, std::vector< TH1 * > *outputHistograms=nullptr) |
Create an individual histogram based on a definition. | |
![]() | |
Event * | event |
Event object that data loaded from the file will be loaded into. | |
std::vector< SamplerAnalysis * > | samplerAnalyses |
Holder for sampler analysis objects. | |
std::vector< std::vector< std::vector< double > > > | opticalFunctions |
Optical functions from all samplers. | |
![]() | |
std::string | treeName |
TChain * | chain |
std::string | mergedHistogramName |
Name of directory for merged histograms. | |
std::vector< TH1 * > | simpleHistograms |
std::vector< PerEntryHistogram * > | perEntryHistograms |
HistogramMeanFromFile * | histoSum |
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. | |
Simple analysis to pull out first hit in each sampler.
Definition at line 39 of file EventAnalysisOrbit.hh.
EventAnalysisOrbit::EventAnalysisOrbit | ( | ) |
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.
EventAnalysisOrbit::EventAnalysisOrbit | ( | Event * | eventIn, |
TChain * | chain, | ||
bool | perEntryAnalysis = true , |
||
bool | processSamplersIn = true , |
||
bool | debugIn = false , |
||
bool | printOutIn = true , |
||
double | printModuloFraction = 0.01 , |
||
bool | emittanceOnTheFlyIn = false , |
||
long int | eventStartIn = 0 , |
||
long int | eventEndIn = -1 |
||
) |
Constructor intended for use to construct an event analysis object.
Definition at line 39 of file EventAnalysisOrbit.cc.
|
inlinevirtual |
Definition at line 59 of file EventAnalysisOrbit.hh.
void EventAnalysisOrbit::Clear | ( | ) |
Empty the member vectors of their data.
Definition at line 54 of file EventAnalysisOrbit.cc.
void EventAnalysisOrbit::ExtractOrbit | ( | int | index | ) |
Extract an orbit from the data.
Definition at line 64 of file EventAnalysisOrbit.cc.
References elementName, Analysis::entries, EventAnalysis::samplerAnalyses, ss, x, xp, y, and yp.
void EventAnalysisOrbit::WriteOrbit | ( | TFile * | f | ) |
Write orbit to a ROOT file.
Definition at line 98 of file EventAnalysisOrbit.cc.
std::vector<std::string> EventAnalysisOrbit::elementName |
Temporary storage for orbit.
Definition at line 71 of file EventAnalysisOrbit.hh.
Referenced by Clear(), ExtractOrbit(), and WriteOrbit().
std::vector<double> EventAnalysisOrbit::ss |
Temporary storage for orbit.
Definition at line 66 of file EventAnalysisOrbit.hh.
Referenced by Clear(), ExtractOrbit(), and WriteOrbit().
std::vector<double> EventAnalysisOrbit::x |
Temporary storage for orbit.
Definition at line 67 of file EventAnalysisOrbit.hh.
Referenced by Clear(), ExtractOrbit(), and WriteOrbit().
std::vector<double> EventAnalysisOrbit::xp |
Temporary storage for orbit.
Definition at line 68 of file EventAnalysisOrbit.hh.
Referenced by Clear(), ExtractOrbit(), and WriteOrbit().
std::vector<double> EventAnalysisOrbit::y |
Temporary storage for orbit.
Definition at line 69 of file EventAnalysisOrbit.hh.
Referenced by Clear(), ExtractOrbit(), and WriteOrbit().
std::vector<double> EventAnalysisOrbit::yp |
Temporary storage for orbit.
Definition at line 70 of file EventAnalysisOrbit.hh.
Referenced by Clear(), ExtractOrbit(), and WriteOrbit().