LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
UTIL::ProcessFlag Class Reference

Helper class for defining the generated Monte Carlo physics process. More...

#include <ProcessFlag.h>

Public Member Functions

 ProcessFlag ()=default
 
 ~ProcessFlag ()=default
 
 ProcessFlag (const ProcessFlag &f)=default
 
ProcessFlagoperator= (const ProcessFlag &f)=default
 
 ProcessFlag (int flag)
 construct from int More...
 
 ProcessFlag (const std::initializer_list< PF > &bits)
 c'tor that takes a list of bit enums in an initialiser list, e.g. More...
 
void add (PF bit)
 add an individual bit More...
 
bool addFSParticles (int pdg)
 add the bit for the final state particles with given PDG code - false if not known More...
 
bool addHiggsDecay (int pdg)
 add the bit for the Higgs decaying to a particles with given PDG code - false if not known More...
 
ProcessFlagoperator= (int flag)
 assign complete int flag More...
 
bool operator== (const ProcessFlag &f) const
 conparison - true if identical processes More...
 
bool contains (const ProcessFlag &f) const
 true if this ProcessFlag contains everything in f More...
 
 operator int () const
 conversion to int More...
 
bool has (PF bit) const
 check if this bit is present More...
 

Private Attributes

int _flag =0
 
std::map< int, PF_mapFS
 
std::map< int, PF_mapH
 

Detailed Description

Helper class for defining the generated Monte Carlo physics process.

The bits decode if certain particle types are present in the final state of the hard sub-process. Additionally, in events with a Higgs bosons, its decay is denoted, e.g. ProcessFlag::has( PF::higssbb ) is true for an event with a H->bbbar decay. See enum PF for individual flag bits.

Author
F.Gaede, DESY
Date
June 2020

Definition at line 58 of file ProcessFlag.h.

Constructor & Destructor Documentation

UTIL::ProcessFlag::ProcessFlag ( )
default
UTIL::ProcessFlag::~ProcessFlag ( )
default
UTIL::ProcessFlag::ProcessFlag ( const ProcessFlag f)
default
UTIL::ProcessFlag::ProcessFlag ( int  flag)
inline

construct from int

Definition at line 69 of file ProcessFlag.h.

UTIL::ProcessFlag::ProcessFlag ( const std::initializer_list< PF > &  bits)
inline

c'tor that takes a list of bit enums in an initialiser list, e.g.

ProcessFlag( {PF::muons, PF::higssbb } )

Definition at line 75 of file ProcessFlag.h.

References add().

Member Function Documentation

void UTIL::ProcessFlag::add ( PF  bit)
inline

add an individual bit

Definition at line 80 of file ProcessFlag.h.

References _flag.

Referenced by addFSParticles(), addHiggsDecay(), UTIL::decodeMCTruthProcess(), and ProcessFlag().

bool UTIL::ProcessFlag::addFSParticles ( int  pdg)
inline

add the bit for the final state particles with given PDG code - false if not known

Definition at line 85 of file ProcessFlag.h.

References _mapFS, add(), std::map< K, T >::end(), and std::map< K, T >::find().

Referenced by UTIL::decodeMCTruthProcess().

bool UTIL::ProcessFlag::addHiggsDecay ( int  pdg)
inline

add the bit for the Higgs decaying to a particles with given PDG code - false if not known

Definition at line 94 of file ProcessFlag.h.

References _mapH, add(), std::map< K, T >::end(), and std::map< K, T >::find().

Referenced by UTIL::decodeMCTruthProcess().

bool UTIL::ProcessFlag::contains ( const ProcessFlag f) const
inline

true if this ProcessFlag contains everything in f

Definition at line 110 of file ProcessFlag.h.

References _flag.

bool UTIL::ProcessFlag::has ( PF  bit) const
inline

check if this bit is present

Definition at line 117 of file ProcessFlag.h.

References _flag.

Referenced by UTIL::operator<<().

UTIL::ProcessFlag::operator int ( ) const
inline

conversion to int

Definition at line 114 of file ProcessFlag.h.

References _flag.

ProcessFlag& UTIL::ProcessFlag::operator= ( const ProcessFlag f)
default
ProcessFlag& UTIL::ProcessFlag::operator= ( int  flag)
inline

assign complete int flag

Definition at line 104 of file ProcessFlag.h.

References _flag.

bool UTIL::ProcessFlag::operator== ( const ProcessFlag f) const
inline

conparison - true if identical processes

Definition at line 107 of file ProcessFlag.h.

References _flag.

Member Data Documentation

int UTIL::ProcessFlag::_flag =0
private

Definition at line 120 of file ProcessFlag.h.

Referenced by add(), contains(), has(), operator int(), operator=(), and operator==().

std::map< int, PF > UTIL::ProcessFlag::_mapFS
private
Initial value:
=
{
{ 11, PF::electrons },
{ 13, PF::muons },
{ 15, PF::taus },
{ 12, PF::neutrinos },
{ 14, PF::neutrinos },
{ 16, PF::neutrinos },
{ 22, PF::photons },
{ 1, PF::dquarks },
{ 2, PF::uquarks },
{ 3, PF::squarks },
{ 4, PF::cquarks },
{ 5, PF::bquarks }
}

Definition at line 122 of file ProcessFlag.h.

Referenced by addFSParticles().

std::map< int, PF > UTIL::ProcessFlag::_mapH
private
Initial value:
=
{
{ 5, PF::higgsbb },
{ 1, PF::higgsdu },
{ 2, PF::higgsdu },
{ 3, PF::higgsss },
{ 4, PF::higgscc },
{ 15, PF::higgstautau },
{ 13, PF::higgsmumu },
{ 24, PF::higgsWW },
{ 23, PF::higgsZZ },
{ 22, PF::higgsgaga },
{ 12, PF::higgsinv },
{ 14, PF::higgsinv },
{ 16, PF::higgsinv },
{ 1000022, PF::higgsinv }
}

Definition at line 137 of file ProcessFlag.h.

Referenced by addHiggsDecay().


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