LCFIVertex  0.7.2
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
DSTPlotProcessor Class Reference

Creates some sample plots from the data calculated by the LCFI vertex package. More...

#include <DSTPlotProcessor.h>

Inheritance diagram for DSTPlotProcessor:
Inheritance graph
[legend]
Collaboration diagram for DSTPlotProcessor:
Collaboration graph
[legend]

Public Member Functions

virtual Processor * newProcessor ()
 
virtual void init ()
 
virtual void processRunHeader (LCRunHeader *pRun)
 
virtual void processEvent (LCEvent *pEvent)
 
virtual void end ()
 

Protected Member Functions

void _displayCollectionNames (lcio::LCEvent *pEvent)
 
bool _passesEventCuts (lcio::LCEvent *pEvent)
 
bool _passesJetCuts (lcio::ReconstructedParticle *pJet)
 
void _fillPlots (LCEvent *pEvent, unsigned int jet)
 
void _outputDataToFile (std::string filename)
 
void _checkDSTParameters (LCEvent *pEvent)
 

Protected Attributes

std::string _JetCollectionName
 
std::string _TrueJetFlavourColName
 
std::string _OutputFilename
 
int _nRun
 
std::string _FlavourTagCollectionName
 
std::string _FlavourTagInputsCollectionName
 
std::map< std::string,
unsigned int > 
_IndexOfForEachTag
 
std::map< std::string,
unsigned int > 
_FlavourIndex
 
std::map< std::string,
unsigned int > 
_InputsIndex
 
histogram_data< double > _jetEnergy
 
efficiency_purity< double > _BTagEfficiencyPurity
 
efficiency_purity< double > _CTagEfficiencyPurity
 
efficiency_purity< double > _BCTagEfficiencyPurity
 
int _checkDST
 
double _jetEMax
 

Static Protected Attributes

static const int C_JET =4
 
static const int B_JET =5
 

Detailed Description

Creates some sample plots from the data calculated by the LCFI vertex package.

An example of getting the flavour tag results from the LCIO file and plotting an efficiency purity graph with them. Also plots a graph of jet energies for good measure.
The processor checks the specifed LCFloatVec collections for the flavour tag values "BTag", "CTag" and "BCTag" which are the names that FlavourTagProcessor stores its b tag, c tag and c tag (only b background) values in respectively.
These values are checked against the true jet flavour (from the TrueJetFlavour LCIntVec) and efficiency-purity values calculated for a range of cuts.
The jet energy is taken from the energy of the reconstructed particle used to represent the jet.

Getting Root output

To output to a Root file instead of CSV files the processor has to be compiled with the USEROOT preprocessor flag defined. You could add "#define USEROOT" to the code, or more easily add the line

USERINCLUDES += -D USEROOT

to the userlib.gmk file that is in the Marlin directory. If Marlin is not already set up to use Root then you will also need to add the following lines (this assumes a fully working root installation):

USERINCLUDES += root-config --cflags
USERLIBS += root-config --libs

Input

From the LCIO file, flavour tag variable values of:

"BTag" "CTag" "BCTag"

And

"JetType"

Output

If the USEROOT preprocessor flag was defined when this processor was compiled, then the output will be a root file with the filename specified in the steering file. Otherwise, the efficiency-purity values will be output as comma separated values to the file <filename>+".csv", and the jet energies to <filename>+"-JetEnergies.csv".

Parameters
JetCollectionNameName of the ReconstructedParticle collection that represents jets.
FlavourTagCollectionsNames of the LCFloatVec collections holding the Flavour tags, all tags in this list will be produced in one file for comparison
TrueJetFlavourCollectionLCIntVec that contains the MC Jet flavour (from TrueJetFlavourProcessor)
OutputFilenameThe name of the file that will hold the output.

Definition at line 61 of file DSTPlotProcessor.h.

Member Function Documentation

void DSTPlotProcessor::_displayCollectionNames ( lcio::LCEvent *  pEvent)
protected

Just prints out the available collections in the LCIO file to standard output.

Definition at line 373 of file DSTPlotProcessor.cc.

void DSTPlotProcessor::_fillPlots ( LCEvent *  pEvent,
unsigned int  jet 
)
protected

Internal function that is just code split off from processEvent() to simplify it - fills the container classes with the data from the file.

Definition at line 234 of file DSTPlotProcessor.cc.

References _JetCollectionName, B_JET, and C_JET.

void DSTPlotProcessor::_outputDataToFile ( std::string  filename)
protected

Internal function that is just code split off from end() to simplify it - writes the required data from the container classes to the output file.

Definition at line 296 of file DSTPlotProcessor.cc.

References _jetEnergy.

bool DSTPlotProcessor::_passesEventCuts ( lcio::LCEvent *  pEvent)
protected

A function that contains all the event cuts - returns true if the event passes all of the cuts, false otherwise.

Currently applies no cuts at all

Definition at line 193 of file DSTPlotProcessor.cc.

bool DSTPlotProcessor::_passesJetCuts ( lcio::ReconstructedParticle *  pJet)
protected

A function that contains all the jet cuts - returns true if the event passes all of the cuts, false otherwise.

Currently selects jets for which the jet polar angle theta is -0.95< cos(theta) <0.95.

Definition at line 205 of file DSTPlotProcessor.cc.

Member Data Documentation

std::string DSTPlotProcessor::_JetCollectionName
protected

The name of the collection of ReconstructedParticles that is the jet (comes from the steering file).

Definition at line 75 of file DSTPlotProcessor.h.

Referenced by _fillPlots().

double DSTPlotProcessor::_jetEMax
protected

Keeps a record of the highest jet energy - gets printed to standard output at the end as a sanity check.

Definition at line 109 of file DSTPlotProcessor.h.

histogram_data<double> DSTPlotProcessor::_jetEnergy
protected

Custom storage class that holds all of the jet energies.

Definition at line 90 of file DSTPlotProcessor.h.

Referenced by _outputDataToFile().

int DSTPlotProcessor::_nRun
protected

The current run number.

Definition at line 80 of file DSTPlotProcessor.h.

std::string DSTPlotProcessor::_OutputFilename
protected

The filename of the output root file if using root, otherwise the directory and the first part of the filename of the comma seperated value files.

Definition at line 78 of file DSTPlotProcessor.h.

std::string DSTPlotProcessor::_TrueJetFlavourColName
protected

The name of the collection of LCIntVec that is the true jet flavour (comes from the steering file).

Definition at line 77 of file DSTPlotProcessor.h.

const int DSTPlotProcessor::B_JET =5
staticprotected

Useful constant for the jet flavour

Definition at line 100 of file DSTPlotProcessor.h.

Referenced by _fillPlots().

const int DSTPlotProcessor::C_JET =4
staticprotected

Useful constant for the jet flavour

Definition at line 99 of file DSTPlotProcessor.h.

Referenced by _fillPlots().


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