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

Simple analysis to pull out first hit in each sampler. More...

#include <EventAnalysisOrbit.hh>

Inheritance diagram for EventAnalysisOrbit:
Inheritance graph
Collaboration diagram for EventAnalysisOrbit:
Collaboration graph

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)
 
- Public Member Functions inherited from EventAnalysis
 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.
 
- 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.
 

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

- Protected Member Functions inherited from EventAnalysis
void PreparePerEntryHistogramSets ()
 
void AccumulatePerEntryHistogramSets (long int entryNumber)
 
void TerminatePerEntryHistogramSets ()
 
void CheckSpectraBranches ()
 
void FillHistogram (HistogramDefSet *definition)
 Fill a set of simple histograms across all events.
 
- 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 inherited from EventAnalysis
Eventevent
 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.
 
- 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

Simple analysis to pull out first hit in each sampler.

Author
L. Nevay

Definition at line 39 of file EventAnalysisOrbit.hh.

Constructor & Destructor Documentation

◆ EventAnalysisOrbit() [1/2]

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() [2/2]

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.

◆ ~EventAnalysisOrbit()

virtual EventAnalysisOrbit::~EventAnalysisOrbit ( )
inlinevirtual

Definition at line 59 of file EventAnalysisOrbit.hh.

Member Function Documentation

◆ Clear()

void EventAnalysisOrbit::Clear ( )

Empty the member vectors of their data.

Definition at line 54 of file EventAnalysisOrbit.cc.

References elementName, ss, x, xp, y, and yp.

◆ ExtractOrbit()

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.

◆ WriteOrbit()

void EventAnalysisOrbit::WriteOrbit ( TFile *  f)

Write orbit to a ROOT file.

Definition at line 98 of file EventAnalysisOrbit.cc.

References elementName, ss, x, xp, y, and yp.

Field Documentation

◆ elementName

std::vector<std::string> EventAnalysisOrbit::elementName

Temporary storage for orbit.

Definition at line 71 of file EventAnalysisOrbit.hh.

Referenced by Clear(), ExtractOrbit(), and WriteOrbit().

◆ ss

std::vector<double> EventAnalysisOrbit::ss

Temporary storage for orbit.

Definition at line 66 of file EventAnalysisOrbit.hh.

Referenced by Clear(), ExtractOrbit(), and WriteOrbit().

◆ x

std::vector<double> EventAnalysisOrbit::x

Temporary storage for orbit.

Definition at line 67 of file EventAnalysisOrbit.hh.

Referenced by Clear(), ExtractOrbit(), and WriteOrbit().

◆ xp

std::vector<double> EventAnalysisOrbit::xp

Temporary storage for orbit.

Definition at line 68 of file EventAnalysisOrbit.hh.

Referenced by Clear(), ExtractOrbit(), and WriteOrbit().

◆ y

std::vector<double> EventAnalysisOrbit::y

Temporary storage for orbit.

Definition at line 69 of file EventAnalysisOrbit.hh.

Referenced by Clear(), ExtractOrbit(), and WriteOrbit().

◆ yp

std::vector<double> EventAnalysisOrbit::yp

Temporary storage for orbit.

Definition at line 70 of file EventAnalysisOrbit.hh.

Referenced by Clear(), ExtractOrbit(), and WriteOrbit().


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