#include <AnalysisHandler.h>
Public Types | |
typedef FactoryBase::tH1DPtr | tH1DPtr |
Convenient typedef for pointer to AIDA::IHistogram1D. | |
typedef FactoryBase::tcH1DPtr | tcH1DPtr |
Convenient typedef for pointer to AIDA::IHistogram1D. | |
Public Member Functions | |
Virtual functions required by the AnalysisHandler class. | |
virtual void | analyze (tEventPtr event, long ieve, int loop, int state) |
Analyze a given Event. | |
virtual LorentzRotation | transform (tEventPtr event) const |
Transform the event to the desired Lorentz frame and return the corresponding LorentzRotation. | |
virtual void | analyze (const tPVector &particles) |
Analyze the given vector of particles. | |
virtual void | analyze (tPPtr particle) |
Analyze the given particle. | |
Functions to access histograms. | |
bool | checkHistogramFactory (bool warn=false) const |
Check if the associated EventGenerator has been assigned a histogram factory. | |
FactoryBase & | histogramFactory () |
Access the HistogramFactory from the EventGenerator. | |
const FactoryBase & | histogramFactory () const |
Access the HistogramFactory from the EventGenerator. | |
void | normalize (tH1DPtr h, CrossSection unit=picobarn) const |
Normalize the histogran h using the collected statistics from the EventGenerator. | |
void | unitNormalize (tH1DPtr h) const |
Normalize the histogran h to unit integral. | |
Functions used by the persistent I/O system. | |
void | persistentOutput (PersistentOStream &os) const |
Function used to write out object persistently. | |
void | persistentInput (PersistentIStream &is, int version) |
Function used to read in object persistently. | |
Static Public Member Functions | |
static void | Init () |
Standard Init function used to initialize the interface. | |
Protected Member Functions | |
Clone Methods. | |
virtual IBPtr | clone () const |
Make a simple clone of this object. | |
virtual IBPtr | fullclone () const |
Make a clone of this object, possibly modifying the cloned object to make it sane. | |
Private Attributes | |
AnalysisVector | theSlaves |
A list of slave analysis objects which are called for the same extracted particles and in the same Lorentz frame as this one. | |
Static Private Attributes | |
static ClassDescription < AnalysisHandler > | initAnalysisHandler |
The static object used to initialize the description of this class. | |
Classes | |
class | NoHistFactory |
Exception class used if no histogram factory was found. More... |
The main function is the virtual analyze()
method which which is called for each analysis handler after each event. The method may be called several times for each event - this may be checked by the analysis handler by looking at the ieve
, loop
and state
arguments to the analyze
method.
Initialization of histograms etc. should be made in the doinitrun()
function, while writing out of histograms and analysis results should be performed in the dofinish()
function.
FullEventGenerator
Definition at line 41 of file AnalysisHandler.h.
virtual void ThePEG::AnalysisHandler::analyze | ( | tEventPtr | event, | |
long | ieve, | |||
int | loop, | |||
int | state | |||
) | [virtual] |
Analyze a given Event.
Note that a fully generated event may be presented several times, if it has been manipulated in between. The default version of this function will extract all final state particles, temporarily boost them according to the transform(tEventPtr) function and call analyze(tPVector) of this analysis object and those of all associated analysis objects. The default version will not, however, do anything on events which have not been fully generated, or have been manipulated in any way.
event | pointer to the Event to be analyzed. | |
ieve | the event number. | |
loop | the number of times this event has been presented. If negative the event is now fully generated. | |
state | a number different from zero if the event has been manipulated in some way since it was last presented. |
Reimplemented in ThePEG::GraphvizPlot, ThePEG::HepMCFile, ThePEG::RivetAnalysis, and ThePEG::XSecCheck.
virtual LorentzRotation ThePEG::AnalysisHandler::transform | ( | tEventPtr | event | ) | const [virtual] |
Transform the event to the desired Lorentz frame and return the corresponding LorentzRotation.
event | a pointer to the Event to be transformed. |
virtual void ThePEG::AnalysisHandler::analyze | ( | const tPVector & | particles | ) | [virtual] |
Analyze the given vector of particles.
The default version calls analyze(tPPtr) for each of the particles.
particles | the vector of pointers to particles to be analyzed |
virtual void ThePEG::AnalysisHandler::analyze | ( | tPPtr | particle | ) | [virtual] |
Analyze the given particle.
particle | pointer to the particle to be analyzed. |
bool ThePEG::AnalysisHandler::checkHistogramFactory | ( | bool | warn = false |
) | const |
Check if the associated EventGenerator has been assigned a histogram factory.
If warn is true also emit a warning saying that no histograms will be generated.
void ThePEG::AnalysisHandler::normalize | ( | tH1DPtr | h, | |
CrossSection | unit = picobarn | |||
) | const |
Normalize the histogran h using the collected statistics from the EventGenerator.
If the histogram has been filled with the Event::weight() as weight a plotted function will correspond to a proper cross section distribution in units of unit. This only works for evenly binned histograms. If not evenly binned, nothing will be done.
void ThePEG::AnalysisHandler::persistentOutput | ( | PersistentOStream & | os | ) | const |
Function used to write out object persistently.
os | the persistent output stream written to. |
Reimplemented from ThePEG::Interfaced.
Reimplemented in ThePEG::GraphvizPlot, ThePEG::HepMCFile, ThePEG::RivetAnalysis, and ThePEG::XSecCheck.
void ThePEG::AnalysisHandler::persistentInput | ( | PersistentIStream & | is, | |
int | version | |||
) |
Function used to read in object persistently.
is | the persistent input stream read from. | |
version | the version number of the object when written. |
Reimplemented from ThePEG::Interfaced.
Reimplemented in ThePEG::GraphvizPlot, ThePEG::HepMCFile, ThePEG::RivetAnalysis, and ThePEG::XSecCheck.
virtual IBPtr ThePEG::AnalysisHandler::clone | ( | ) | const [protected, virtual] |
Make a simple clone of this object.
Implements ThePEG::InterfacedBase.
Reimplemented in ThePEG::GraphvizPlot, ThePEG::HepMCFile, ThePEG::RivetAnalysis, and ThePEG::XSecCheck.
virtual IBPtr ThePEG::AnalysisHandler::fullclone | ( | ) | const [protected, virtual] |
Make a clone of this object, possibly modifying the cloned object to make it sane.
Reimplemented from ThePEG::InterfacedBase.
Reimplemented in ThePEG::GraphvizPlot, ThePEG::HepMCFile, ThePEG::RivetAnalysis, and ThePEG::XSecCheck.
ClassDescription<AnalysisHandler> ThePEG::AnalysisHandler::initAnalysisHandler [static, private] |
The static object used to initialize the description of this class.
Indicates that this is a concrete class with persistent data.
Definition at line 199 of file AnalysisHandler.h.