Marlin  1.17.1
 All Classes Namespaces Functions Variables Enumerations Friends Pages
Public Member Functions | Protected Attributes | List of all members
marlin::SimpleFastMCProcessor Class Reference

A simple smearing "Monte Carlo" processor. More...

#include <SimpleFastMCProcessor.h>

Inheritance diagram for marlin::SimpleFastMCProcessor:
marlin::Processor

Public Member Functions

virtual ProcessornewProcessor ()
 Returns a new instance of the processor. More...
 
 SimpleFastMCProcessor (const marlin::SimpleFastMCProcessor &)=delete
 
SimpleFastMCProcessoroperator= (const marlin::SimpleFastMCProcessor &)=delete
 
virtual void init ()
 Initializes ...
 
virtual void processRunHeader (LCRunHeader *run)
 Called for every run.
 
virtual void processEvent (LCEvent *evt)
 Updates all registered conditions handlers and adds the data to the event.
 
virtual void check (LCEvent *evt)
 Creates some checkplots.
 
virtual void end ()
 Called after data processing for clean up.
 
- Public Member Functions inherited from marlin::Processor
 Processor (const std::string &typeName)
 Possible verbosity levels. More...
 
virtual ~Processor ()
 Destructor.
 
virtual const std::string & type () const
 Return type name for the processor (as set in constructor).
 
virtual const std::string & name () const
 Return name of this processor.
 
virtual const std::string & logLevelName () const
 Return name of the local verbosity level of this processor - "" if not set.
 
virtual std::shared_ptr
< StringParameters
parameters ()
 Return parameters defined for this Processor.
 
virtual void printDescription ()
 Print information about this processor in ASCII steering file format.
 
virtual void printDescriptionXML (std::ostream &stream=std::cout)
 Print information about this processor in XML steering file format.
 
template<class T >
void printParameters ()
 Print the parameters and their values depending on the given verbosity level.
 
void printParameters ()
 Print the parameters and their values with verbosity level MESSAGE.
 
const std::string & description ()
 Description of processor.
 
bool isFirstEvent ()
 True if first event in processEvent(evt) - use this e.g. More...
 
std::string getLCIOInType (const std::string &colName)
 Return the LCIO input type for the collection colName - empty string if colName is not a registered collection name.
 
std::string getLCIOOutType (const std::string &colName)
 Return the LCIO output type for the collection colName - empty string if colName is not a registered collection name.
 
bool isInputCollectionName (const std::string &parameterName)
 True if the given parameter defines an LCIO input collection, i.e. More...
 
bool isOutputCollectionName (const std::string &parameterName)
 True if the given parameter defines an LCIO output collection.
 
virtual void setParameters (std::shared_ptr< StringParameters > parameters)
 Helper function returns the ProcessorParameter for the given name. More...
 
virtual void setName (const std::string &processorName)
 Set processor name.
 

Protected Attributes

std::string _inputCollectionName {}
 Input collection name.
 
std::string _recoParticleCollectionName {}
 Ouput collection names.
 
std::string _mcTruthCollectionName {}
 
float _momentumCut =0.0
 Momentum cut in GeV.
 
FloatVec _initChargedRes {}
 Resolutions of charged particles.
 
FloatVec _initPhotonRes {}
 Resolutions of photons.
 
FloatVec _initNeutralHadronRes {}
 Resolutions of photons.
 
IRecoParticleFactory_factory =NULL
 The particle factory.
 
int _nRun =-1
 
int _nEvt =-1
 
- Protected Attributes inherited from marlin::Processor
std::string _description =""
 Describes what the processor does. More...
 
std::string _typeName =""
 
std::string _processorName =""
 
std::shared_ptr< StringParameters_parameters {}
 
ProcParamMap _map {}
 
bool _isFirstEvent = false
 
LCIOTypeMap _inTypeMap {}
 
LCIOTypeMap _outTypeMap {}
 
std::string _logLevelName {}
 

Additional Inherited Members

- Protected Member Functions inherited from marlin::Processor
void setReturnValue (bool val)
 Set the return value for this processor - typically at end of processEvent(). More...
 
void setReturnValue (const std::string &name, bool val)
 Set a named return value for this processor - typically at end of processEvent() The value can be used in a condition in the steering file referred to by ProcessorName.name of the processor.
 
template<class T >
void registerProcessorParameter (const std::string &parameterName, const std::string &parameterDescription, T &parameter, const T &defaultVal, int setSize=0)
 Register a steering variable for this processor - call in constructor of processor. More...
 
void registerInputCollection (const std::string &collectionType, const std::string &parameterName, const std::string &parameterDescription, std::string &parameter, const std::string &defaultVal, int setSize=0)
 Specialization of registerProcessorParameter() for a parameter that defines an input collection - can be used fo checking the consistency of the steering file.
 
void registerOutputCollection (const std::string &collectionType, const std::string &parameterName, const std::string &parameterDescription, std::string &parameter, const std::string &defaultVal, int setSize=0)
 Specialization of registerProcessorParameter() for a parameter that defines an output collection - can be used fo checking the consistency of the steering file.
 
void registerInputCollections (const std::string &collectionType, const std::string &parameterName, const std::string &parameterDescription, StringVec &parameter, const StringVec &defaultVal, int setSize=0)
 Specialization of registerProcessorParameter() for a parameter that defines one or several input collections - can be used fo checking the consistency of the steering file.
 
template<class T >
void registerOptionalParameter (const std::string &parameterName, const std::string &parameterDescription, T &parameter, const T &defaultVal, int setSize=0)
 Same as registerProcessorParameter except that the parameter is optional. More...
 
bool parameterSet (const std::string &name)
 Tests whether the parameter has been set in the steering file.
 
void checkForExistingParameter (const std::string &parameterName)
 Tests whether the parameter has been registered before. More...
 
template<class T >
void message (const std::string &m) const
 Print message according to verbosity level of the templated parameter (one of DEBUG, MESSAGE, WARNING, ERROR ) and the global parameter "Verbosity". More...
 
template<class T >
void message (const std::basic_ostream< char, std::char_traits< char > > &m) const
 Same as message(const std::string& message) except that it allows the output of more complex messages in the argument using the log() method, e.g. More...
 
std::stringstream & log () const
 Returns an empty stringstream that is used by the message method. More...
 

Detailed Description

A simple smearing "Monte Carlo" processor.

It creates ReconstructedParticles from MCParticles according to the resolution that is specified for the particle type, one of:

The resolutions for charged particles are given as delta(1/P) for a certain polar angle range (mapped to [0.,pi/2.]), e.g.
ChargedResolution   .7e-5   0.   3.141593/2.
sets the resolution for all charged particles to 0.7*10^-5.
Specifying different resolutions for different polar angle ranges allows to mimic degrading detector performance in the very forward region.
The energy of the charged ReconstructedParticles is set from the "measured" momentum using the energy momentum relation for electrons and muons and assuming the pion mass for all other charged tracks.
The resolutions for neutral particles are given as A and B for a certain polar angle range, where dE/E = A "+" B / sqrt(E/GeV), e.g.
NeutralHadronResolution   0.03   .30   0.   3.141593/2.
sets the resolution for all neutral hadrons to 3% "+" 30% / sqrt( E /GeV ). The resolution for gammas is specified in PhotonResolution
No ReconstructedParticles are created if there is no resolution defined at that polar angle, e.g.
PhotonResolution   .7e-5   0.083   3.141593/2.
effectively limits the acceptance region for photons to theta > 83mrad.

A collection of LCRelations, called "MCTruthMapping" holds the relation between the ReconstructedParticles and their proper MCParticles.

Input - Prerequisites

A collection of MCParticles (the MCPArticle collection).

Output

Parameters
ChargedResolutionResolution of charged particles in polar angle range: d(1/P) th_min th_max
InputCollectionNameName of the MCParticle input collection
MomentumCutNo reconstructed particles are produced for smaller momenta (in [GeV])
NeutralHadronResolutionResolution dE/E=A+B/sqrt(E/GeV) of neutral hadrons in polar angle range: A B th_min th_max
PhotonResolutionResolution dE/E=A+B/sqrt(E/GeV) of photons in polar angle range: A B th_min th_max
RecoParticleCollectionNamedefault is "ReconstructedParticles"
MCTruthMappingCollectionNamedefault is "MCTruthMapping"
Author
F. Gaede, DESY
Version
Id:
SimpleFastMCProcessor.h,v 1.4 2007-07-04 12:13:06 gaede Exp

Member Function Documentation

virtual Processor* marlin::SimpleFastMCProcessor::newProcessor ( )
inlinevirtual

Returns a new instance of the processor.

Implements marlin::Processor.


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