herwig is hosted by Hepforge, IPPP Durham
Herwig++  2.7.0
Analysis2::Analysis2Base Class Reference

Analysis2 is the base class for all Analysis2 AnalysisHandlers. More...

#include <Analysis2Base.h>

Inheritance diagram for Analysis2::Analysis2Base:

List of all members.

Public Types

enum  NormalisationMode {
  FromMap = -1, NoNormalisation = 0, NormaliseToUnity = 1, NormaliseToXSec = 2,
  NormaliseToData = 3
}
 Normalization modes.

Public Member Functions

void insert (const string &name, const string &instring, Histogram2Options &)
 Insert an observable by building it from a data file or a given bin range and bin number.
void insertObservable (const string &name, Histogram2Ptr, const Histogram2Options &=Histogram2Options())
 Insert an observable.
void insertObservable (const string &name, const string &dataName, const string &dataFile, const Histogram2Options &=Histogram2Options())
 Insert an observable by building it from a data file.
tcHistogram2Ptr histogram (const string &) const
 Return the histogram for the given observable.
void book (double evt, const string &name, double weight)
 Book an event for the given observable.
void finish (const string &name, int normMode=FromMap, bool combined=false)
 Finish an observable.
void combineObservable (const string &prefix, const string &name, unsigned int numRuns, int normMode=FromMap)
 Insert an observable by combining multiple runs.
string startCombine (string)
 A command indicating that we start combining observables from parallel runs.
string combine (string)
 A command to combine an observable from multiple runs.
string finishCombine (string)
 A command indicating that we finished combining observables from parallel runs.
tcHistogram2OutputPtr output () const
 Return the Histogram2Output object.
tcJetFinderPtr jetFinder () const
 Return the JetFinder.
tcEventExtractorPtr eventExtractor () const
 Return the event extractor.
void finalize ()
 Finalize the analysis.
Standard constructors and destructors.
 Analysis2Base ()
 The default constructor.
virtual ~Analysis2Base ()
 The destructor.
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 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 ()
 The standard Init function used to initialize the interfaces.

Protected Member Functions

tHistogram2Ptr histogram (const string &)
 Access the histogram for the given observable.
tHistogram2OutputPtr output ()
 Access the Histogram2Output object.
tcEventPtr lastEvent () const
 Return the last presented event.
unsigned int minMult () const
 Return the minimum over the presented subprocess multiplicities.
unsigned int maxMult () const
 Return the maximum over the presented subprocess multiplicities.
tJetFinderPtr jetFinder ()
 Access the JetFinder.
tEventExtractorPtr eventExtractor ()
 Access the event extractor.
Standard Interfaced functions.
virtual void dofinish ()
 Finalize this object.
virtual void rebind (const TranslationMap &trans) throw (RebindException)
 Rebind pointer to other Interfaced objects.
virtual IVector getReferences ()
 Return a vector of all pointers to Interfaced objects used in this object.

Private Member Functions

Analysis2Baseoperator= (const Analysis2Base &)
 The assignment operator is private and must never be called.

Private Attributes

Histogram2OutputPtr _output
 The output used for histograms.
map< string, Histogram2Ptr > _histograms
 The observables mapped by their name.
map< string, Histogram2Options_outputOptions
 The observables mapped to their output options.
map< string, string > _datachannels
 Observables mapped to data channels.
map< string, int > _normalisation
 Observables mapped to normalisation mode.
bool _bookPerSubprocess
 Wether we should book a channel per hard subprocess multiplitiplicity.
tcEventPtr _lastEvent
 The last presented events.
unsigned int _minMult
 The minimum multiplicity of the hard processes presented.
unsigned int _maxMult
 The maximum multiplicity of the hard processes presented.
bool _parallel
 Wether or not we're part of a parallel run.
JetFinderPtr _jetFinder
 The jet finder to be used.
EventExtractorPtr _eventExtractor
 The event extractor to be used.
bool _backParallel
 Backup parallel flag.

Static Private Attributes

static
AbstractClassDescription
< Analysis2Base
initAnalysis2Base
 The static object used to initialize the description of this class.

Detailed Description

Analysis2 is the base class for all Analysis2 AnalysisHandlers.

It uses the Histogram2 class for histogramming and statistics and provides helpers for setting up parallel runs.

See also:
The interfaces defined for Analysis2Base.

Definition at line 38 of file Analysis2Base.h.


Member Function Documentation

virtual void Analysis2::Analysis2Base::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 call transform to make a lorentz transformation of the whole event, then extract all final state particles 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.

Parameters:
eventpointer to the Event to be analyzed.
ievethe event number.
loopthe number of times this event has been presented. If negative the event is now fully generated.
statea number different from zero if the event has been manipulated in some way since it was last presented.

Reimplemented from ThePEG::AnalysisHandler.

virtual void Analysis2::Analysis2Base::analyze ( const tPVector particles) [virtual]

Analyze the given vector of particles.

The default version calls analyze(tPPtr) for each of the particles.

Parameters:
particlesthe vector of pointers to particles to be analyzed

Reimplemented from ThePEG::AnalysisHandler.

Reimplemented in Analysis2::EventShapes2, Analysis2::YMerge, Analysis2::YJetRates, and Analysis2::FourJetCorrelations.

virtual void Analysis2::Analysis2Base::analyze ( tPPtr  particle) [virtual]

Analyze the given particle.

Parameters:
particlepointer to the particle to be analyzed.

Reimplemented from ThePEG::AnalysisHandler.

void Analysis2::Analysis2Base::book ( double  evt,
const string &  name,
double  weight 
)

Book an event for the given observable.

The weight is looked up from the event generator. The channel it is booked to is named Analysis2++

string Analysis2::Analysis2Base::combine ( string  )

A command to combine an observable from multiple runs.

Arguments need to be given as follows:

[run prefix] [number of runs] [observable name] \ {normalization mode : none, unity, xsec, data}

If observable = *, all present observables are combined.

void Analysis2::Analysis2Base::combineObservable ( const string &  prefix,
const string &  name,
unsigned int  numRuns,
int  normMode = FromMap 
)

Insert an observable by combining multiple runs.

See also:
Histogram2::combine
virtual void Analysis2::Analysis2Base::dofinish ( ) [inline, protected, virtual]

Finalize this object.

Called in the run phase just after a run has ended. Used eg. to write out statistics.

Reimplemented from ThePEG::InterfacedBase.

Reimplemented in Analysis2::EventShapes2, Analysis2::YMerge, Analysis2::FourJetCorrelations, and Analysis2::YJetRates.

Finalize the analysis.

Called by dofinish. Dumps the histograms to h2 files for later recovery.

void Analysis2::Analysis2Base::finish ( const string &  name,
int  normMode = FromMap,
bool  combined = false 
)

Finish an observable.

If a channel Analysis2++ is found, this is normalized depending on the normalization flag (see above). If normalization to data is requested, but no data channel is indicated, it is normalized to cross section.

If we are counting per subprocess, channels named Analysis2++-[Multiplicity] are summed up to a channel named "Analysis2++", which is in turn normalized as a single Analysis2++ channel.

If a data channel name is indicated, the ratio and chi2 are computed taking Analysis2++ as prediction. The chi2/DOF, indexed by the observable's name, is written to generator()->log().

virtual IVector Analysis2::Analysis2Base::getReferences ( ) [inline, protected, virtual]

Return a vector of all pointers to Interfaced objects used in this object.

Returns:
a vector of pointers.

Reimplemented from ThePEG::InterfacedBase.

static void Analysis2::Analysis2Base::Init ( ) [static]

The standard Init function used to initialize the interfaces.

Called exactly once for each class by the class description system before the main function starts or when this class is dynamically loaded.

Reimplemented from ThePEG::AnalysisHandler.

Reimplemented in Analysis2::YMerge, Analysis2::YJetRates, Analysis2::EventShapes2, and Analysis2::FourJetCorrelations.

void Analysis2::Analysis2Base::insert ( const string &  name,
const string &  instring,
Histogram2Options  
)

Insert an observable by building it from a data file or a given bin range and bin number.

instring is taken to be a XML tag: <options title="the title" xlabel="x label" ylabel="y label" \ norm="..." datafile="file name" datatitle="name"/> or <options title="the title" xlabel="x label" ylabel="y label" \ norm="..." lowerbound="..." upperbound="..." numbins="..."/> Output options are set accordingly.

void Analysis2::Analysis2Base::insertObservable ( const string &  name,
Histogram2Ptr  ,
const Histogram2Options = Histogram2Options() 
) [inline]

Insert an observable.

If not present, this will insert a channel named Analysis2++ into the histogram. Events are booked to this channel by default.

void Analysis2::Analysis2Base::insertObservable ( const string &  name,
const string &  dataName,
const string &  dataFile,
const Histogram2Options = Histogram2Options() 
) [inline]

Insert an observable by building it from a data file.

A channel Analysis2++ is inserted.

Analysis2Base& Analysis2::Analysis2Base::operator= ( const Analysis2Base ) [private]

The assignment operator is private and must never be called.

In fact, it should not even be implemented.

Function used to read in object persistently.

Parameters:
isthe persistent input stream read from.
versionthe version number of the object when written.

Reimplemented from ThePEG::AnalysisHandler.

Reimplemented in Analysis2::YMerge, Analysis2::YJetRates, Analysis2::EventShapes2, and Analysis2::FourJetCorrelations.

Function used to write out object persistently.

Parameters:
osthe persistent output stream written to.

Reimplemented from ThePEG::AnalysisHandler.

Reimplemented in Analysis2::YMerge, Analysis2::YJetRates, Analysis2::EventShapes2, and Analysis2::FourJetCorrelations.

virtual void Analysis2::Analysis2Base::rebind ( const TranslationMap trans) throw (RebindException) [inline, protected, virtual]

Rebind pointer to other Interfaced objects.

Called in the setup phase after all objects used in an EventGenerator has been cloned so that the pointers will refer to the cloned objects afterwards.

Parameters:
transa TranslationMap relating the original objects to their respective clones.
Exceptions:
RebindExceptionif no cloned object was found for a given pointer.

Reimplemented from ThePEG::InterfacedBase.

Transform the event to the desired Lorentz frame and return the corresponding LorentzRotation.

Parameters:
eventa pointer to the Event to be transformed.
Returns:
the LorentzRotation used in the transformation.

Reimplemented from ThePEG::AnalysisHandler.


Member Data Documentation

The static object used to initialize the description of this class.

Indicates that this is an abstract class with persistent data.

Definition at line 420 of file Analysis2Base.h.


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