LCFIVertex
0.7.2
|
Creates some sample plots from the data calculated by the LCFI vertex package. More...
#include <PlotProcessor.h>
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) |
Protected Attributes | |
std::string | _JetCollectionName |
std::vector< std::string > | _FlavourTagCollectionNames |
std::string | _TrueJetFlavourColName |
std::string | _OutputFilename |
std::vector< std::map < std::string, unsigned int > > | _IndexOfForEachTag |
int | _nRun |
histogram_data< double > | _jetEnergy |
std::vector< efficiency_purity < double > > | _BTagEfficiencyPurity |
std::vector< efficiency_purity < double > > | _CTagEfficiencyPurity |
std::vector< efficiency_purity < double > > | _BCTagEfficiencyPurity |
double | _jetEMax |
Static Protected Attributes | |
static const int | C_JET =4 |
static const int | B_JET =5 |
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.
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
From the LCIO file, flavour tag variable values of:
"BTag" "CTag" "BCTag"
And
"JetType"
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".
JetCollectionName | Name of the ReconstructedParticle collection that represents jets. |
FlavourTagCollections | Names of the LCFloatVec collections holding the Flavour tags, all tags in this list will be produced in one file for comparison |
TrueJetFlavourCollection | LCIntVec that contains the MC Jet flavour (from TrueJetFlavourProcessor) |
OutputFilename | The name of the file that will hold the output. |
Definition at line 61 of file PlotProcessor.h.
|
protected |
Just prints out the available collections in the LCIO file to standard output.
Definition at line 397 of file PlotProcessor.cc.
|
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 219 of file PlotProcessor.cc.
References _BCTagEfficiencyPurity, _BTagEfficiencyPurity, _CTagEfficiencyPurity, _FlavourTagCollectionNames, _TrueJetFlavourColName, B_JET, and C_JET.
|
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 253 of file PlotProcessor.cc.
References _BCTagEfficiencyPurity, _BTagEfficiencyPurity, _CTagEfficiencyPurity, _FlavourTagCollectionNames, and _jetEnergy.
|
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 178 of file PlotProcessor.cc.
|
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 190 of file PlotProcessor.cc.
|
protected |
Custom storage class that holds all the efficiency/purity data for the b tag (only b background) calculated by the FlavourTagProcessor.
Definition at line 86 of file PlotProcessor.h.
Referenced by _fillPlots(), and _outputDataToFile().
|
protected |
Custom storage class that holds all the efficiency/purity data for the b tag calculated by the FlavourTagProcessor.
Definition at line 84 of file PlotProcessor.h.
Referenced by _fillPlots(), and _outputDataToFile().
|
protected |
Custom storage class that holds all the efficiency/purity data for the b tag calculated by the FlavourTagProcessor.
Definition at line 85 of file PlotProcessor.h.
Referenced by _fillPlots(), and _outputDataToFile().
|
protected |
The names of the collection of LCFloatVec that are the flavour tags (a set of purity effiency plots will be made for each tag) (comes from the steering file).
Definition at line 76 of file PlotProcessor.h.
Referenced by _fillPlots(), and _outputDataToFile().
|
protected |
The name of the collection of ReconstructedParticles that is the jet (comes from the steering file).
Definition at line 75 of file PlotProcessor.h.
|
protected |
Keeps a record of the highest jet energy - gets printed to standard output at the end as a sanity check.
Definition at line 99 of file PlotProcessor.h.
|
protected |
Custom storage class that holds all of the jet energies.
Definition at line 82 of file PlotProcessor.h.
Referenced by _outputDataToFile().
|
protected |
The current run number.
Definition at line 80 of file PlotProcessor.h.
|
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 PlotProcessor.h.
|
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 PlotProcessor.h.
Referenced by _fillPlots().
|
staticprotected |
Useful constant for the jet flavour
Definition at line 90 of file PlotProcessor.h.
Referenced by _fillPlots().
|
staticprotected |
Useful constant for the jet flavour
Definition at line 89 of file PlotProcessor.h.
Referenced by _fillPlots().