19#ifndef EVENTANALYSIS_H
20#define EVENTANALYSIS_H
52 bool perEntryAnalysis =
true,
53 bool processSamplersIn =
true,
55 double printModuloFraction = 0.01,
56 bool emittanceOnTheFlyIn =
false,
57 long int eventStartIn = 0,
58 long int eventEndIn = -1,
59 const std::string& primaryParticleName =
"");
76 virtual
void Write(TFile* outputFileName);
83 void PreparePerEntryHistogramSets();
84 void AccumulatePerEntryHistogramSets(
long int entryNumber);
85 void TerminatePerEntryHistogramSets();
87 void CheckSpectraBranches();
Base class for any TTree analysis.
std::vector< PerEntryHistogramSet * > perEntryHistogramSets
Cache of all per entry histogram sets.
void FillHistogram(HistogramDefSet *definition)
Fill a set of simple histograms across all events.
void Initialise()
Initialise each sampler analysis object in samplerAnalysis.
Event * event
Event object that data loaded from the file will be loaded into.
bool processSamplers
Whether to process samplers.
long int eventEnd
Event index to end analysis at.
virtual void Process()
Operate on each entry in the event tree.
virtual void SimpleHistograms()
Process histogram definitions from configuration instance.
int printModulo
Cache of print modulo fraction.
std::vector< std::vector< std::vector< double > > > opticalFunctions
Optical functions from all samplers.
void ProcessSamplers(bool firstTime=false)
Process each sampler analysis object.
std::vector< SamplerAnalysis * > samplerAnalyses
Holder for sampler analysis objects.
std::map< HistogramDefSet *, std::vector< TH1 * > > simpleSetHistogramOutputs
Map of simple histograms created per histogram set for writing out.
virtual void Write(TFile *outputFileName)
Write analysis including optical functions to an output file.
virtual void Terminate()
Terminate each individual sampler analysis and append optical functions.
bool emittanceOnTheFly
Whether to calculate emittance fresh at each sampler.
long int eventStart
Event index to start analysis from.
void SetPrintModuloFraction(double fraction)
Set how often to print out information about the event.
Specification for a set of histograms.
Histogram over a set of integers not number line.
Analysis routines for an individual sampler.