Analysis-level L1 trigger algorithm class. More...
#include <DataFormats/PatCandidates/interface/TriggerAlgorithm.h>
Public Member Functions | |
void | addConditionKey (unsigned conditionKey) |
Add a new trigger condition collection index. | |
std::string | alias () const |
Get L1 algorithm alias. | |
unsigned | bit () const |
Get L1 algorithm bit number. | |
std::vector< unsigned > | conditionKeys () const |
Get all trigger condition collection indeces. | |
bool | decision () const |
bool | decisionAfterMask () const |
Get L1 algorithm decision, considering the mask. | |
bool | decisionBeforeMask () const |
Get L1 algorithm decision, not considering the mask. | |
bool | gtlResult () const |
Get L1 algorithm GTL result. | |
bool | hasConditionKey (unsigned conditionKey) const |
Checks, if a certain trigger condition collection index is assigned. | |
std::string | logicalExpression () const |
Get L1 algorithm logical expression. | |
bool | mask () const |
Get L1 algorithm mask. | |
std::string | name () const |
Get L1 algorithm name. | |
unsigned | prescale () const |
Get L1 algorithm pre-scale. | |
void | setAlias (const std::string &alias) |
Set L1 algorithm alias. | |
void | setBit (unsigned bit) |
Set L1 algorithm bit number. | |
void | setDecisionAfterMas (bool decisionAfterMask) |
Set L1 algorithm decision, considering the mask. | |
void | setDecisionBeforeMask (bool decisionBeforeMask) |
Set L1 algorithm decision, not considering the mask. | |
void | setGtlResult (bool gtlResult) |
Set L1 algorithm GTL result. | |
void | setLogicalExpression (const std::string &expression) |
Set L1 algorithm logical expression. | |
void | setMask (bool mask) |
Set L1 algorithm mask. | |
void | setName (const std::string &name) |
Methods. | |
void | setPrescale (unsigned prescale) |
Set L1 algorithm pre-scale. | |
void | setTechTrigger (bool tech) |
Set flag for technical L1 algorithms. | |
bool | techTrigger () const |
Get flag for technical L1 algorithms. | |
TriggerAlgorithm () | |
Constructors and Destructor. | |
TriggerAlgorithm (const std::string &name, const std::string &alias, bool tech, unsigned bit, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask) | |
Constructors from values. | |
TriggerAlgorithm (const std::string &name) | |
Constructor from algorithm name only. | |
TriggerAlgorithm (const std::string &name, const std::string &alias, bool tech, unsigned bit, bool gtlResult, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask) | |
virtual | ~TriggerAlgorithm () |
Destructor. | |
Private Attributes | |
std::string | alias_ |
L1 algorithm alias. | |
unsigned | bit_ |
L1 algorithm bit number. | |
std::vector< unsigned > | conditionKeys_ |
bool | decisionAfterMask_ |
L1 algorithm decision, considering the mask. | |
bool | decisionBeforeMask_ |
L1 algorithm decision, not considering the mask. | |
bool | gtlResult_ |
L1 algorithm result as determined on the GTL board. | |
std::string | logic_ |
L1 algorithm logival expression. | |
bool | mask_ |
L1 algorithm mask. | |
std::string | name_ |
Data Members. | |
unsigned | prescale_ |
L1 algorithm pre-scale. | |
bool | tech_ |
Flag for technical L1 algorithms. |
Analysis-level L1 trigger algorithm class.
TriggerAlgorithm implements a container for L1 trigger algorithms' information within the 'pat' namespace. For detailed information, consult https://twiki.cern.ch/twiki/bin/view/CMS/SWGuidePATTrigger#TriggerAlgorithm
Definition at line 36 of file TriggerAlgorithm.h.
TriggerAlgorithm::TriggerAlgorithm | ( | ) |
Constructors and Destructor.
Default constructor
Definition at line 16 of file TriggerAlgorithm.cc.
References conditionKeys_.
: name_(), alias_(), logic_(), tech_(), bit_(), prescale_(), mask_(), decisionBeforeMask_(), decisionAfterMask_() { conditionKeys_.clear(); }
TriggerAlgorithm::TriggerAlgorithm | ( | const std::string & | name | ) |
Constructor from algorithm name only.
Definition at line 32 of file TriggerAlgorithm.cc.
References conditionKeys_.
: name_( name ), alias_(), logic_(), tech_(), bit_(), gtlResult_(), prescale_(), mask_(), decisionBeforeMask_(), decisionAfterMask_() { conditionKeys_.clear(); }
TriggerAlgorithm::TriggerAlgorithm | ( | const std::string & | name, |
const std::string & | alias, | ||
bool | tech, | ||
unsigned | bit, | ||
unsigned | prescale, | ||
bool | mask, | ||
bool | decisionBeforeMask, | ||
bool | decisionAfterMask | ||
) |
Constructors from values.
Definition at line 49 of file TriggerAlgorithm.cc.
References conditionKeys_.
: name_( name ), alias_( alias), logic_(), tech_( tech ), bit_( bit ), gtlResult_(), prescale_( prescale ), mask_( mask ), decisionBeforeMask_( decisionBeforeMask ), decisionAfterMask_( decisionAfterMask ) { conditionKeys_.clear(); }
TriggerAlgorithm::TriggerAlgorithm | ( | const std::string & | name, |
const std::string & | alias, | ||
bool | tech, | ||
unsigned | bit, | ||
bool | gtlResult, | ||
unsigned | prescale, | ||
bool | mask, | ||
bool | decisionBeforeMask, | ||
bool | decisionAfterMask | ||
) |
Definition at line 63 of file TriggerAlgorithm.cc.
References conditionKeys_.
: name_( name ), alias_( alias), logic_(), tech_( tech ), bit_( bit ), gtlResult_( gtlResult ), prescale_( prescale ), mask_( mask ), decisionBeforeMask_( decisionBeforeMask ), decisionAfterMask_( decisionAfterMask ) { conditionKeys_.clear(); }
virtual pat::TriggerAlgorithm::~TriggerAlgorithm | ( | ) | [inline, virtual] |
void pat::TriggerAlgorithm::addConditionKey | ( | unsigned | conditionKey | ) | [inline] |
Add a new trigger condition collection index.
Definition at line 102 of file TriggerAlgorithm.h.
References conditionKeys_, and hasConditionKey().
Referenced by pat::PATTriggerProducer::produce().
{ if ( ! hasConditionKey( conditionKey ) ) conditionKeys_.push_back( conditionKey ); };
std::string pat::TriggerAlgorithm::alias | ( | ) | const [inline] |
Get L1 algorithm alias.
Definition at line 106 of file TriggerAlgorithm.h.
References alias_.
Referenced by setAlias().
{ return alias_; };
unsigned pat::TriggerAlgorithm::bit | ( | ) | const [inline] |
Get L1 algorithm bit number.
Definition at line 112 of file TriggerAlgorithm.h.
References bit_.
Referenced by setBit().
{ return bit_; };
std::vector< unsigned > pat::TriggerAlgorithm::conditionKeys | ( | ) | const [inline] |
Get all trigger condition collection indeces.
Definition at line 127 of file TriggerAlgorithm.h.
References conditionKeys_.
Referenced by pat::TriggerEvent::algorithmConditions(), and hasConditionKey().
{ return conditionKeys_; };
bool pat::TriggerAlgorithm::decision | ( | ) | const [inline] |
Get L1 algorithm decision as applied, identical to L1 algorithm decision, considering the mask
Definition at line 125 of file TriggerAlgorithm.h.
References decisionAfterMask().
Referenced by pat::PATTriggerProducer::produce().
{ return decisionAfterMask(); };
bool pat::TriggerAlgorithm::decisionAfterMask | ( | ) | const [inline] |
Get L1 algorithm decision, considering the mask.
Definition at line 122 of file TriggerAlgorithm.h.
References decisionAfterMask_.
Referenced by decision(), and setDecisionAfterMas().
{ return decisionAfterMask_; };
bool pat::TriggerAlgorithm::decisionBeforeMask | ( | ) | const [inline] |
Get L1 algorithm decision, not considering the mask.
Definition at line 120 of file TriggerAlgorithm.h.
References decisionBeforeMask_.
Referenced by setDecisionBeforeMask().
{ return decisionBeforeMask_; };
bool pat::TriggerAlgorithm::gtlResult | ( | ) | const [inline] |
Get L1 algorithm GTL result.
Definition at line 114 of file TriggerAlgorithm.h.
References gtlResult_.
Referenced by setGtlResult().
{ return gtlResult_; };
bool TriggerAlgorithm::hasConditionKey | ( | unsigned | conditionKey | ) | const |
Checks, if a certain trigger condition collection index is assigned.
Definition at line 83 of file TriggerAlgorithm.cc.
References conditionKeys().
Referenced by addConditionKey().
{ for ( size_t iO = 0; iO < conditionKeys().size(); ++iO ) { if ( conditionKeys().at( iO ) == conditionKey ) { return true; } } return false; }
std::string pat::TriggerAlgorithm::logicalExpression | ( | ) | const [inline] |
Get L1 algorithm logical expression.
Definition at line 108 of file TriggerAlgorithm.h.
References logic_.
{ return logic_; };
bool pat::TriggerAlgorithm::mask | ( | ) | const [inline] |
Get L1 algorithm mask.
Definition at line 118 of file TriggerAlgorithm.h.
References mask_.
Referenced by setMask().
{ return mask_; };
std::string pat::TriggerAlgorithm::name | ( | ) | const [inline] |
Get L1 algorithm name.
Definition at line 104 of file TriggerAlgorithm.h.
References name_.
Referenced by pat::PATTriggerProducer::produce(), and setName().
{ return name_; };
unsigned pat::TriggerAlgorithm::prescale | ( | ) | const [inline] |
Get L1 algorithm pre-scale.
Definition at line 116 of file TriggerAlgorithm.h.
References prescale_.
Referenced by setPrescale().
{ return prescale_; };
void pat::TriggerAlgorithm::setAlias | ( | const std::string & | alias | ) | [inline] |
void pat::TriggerAlgorithm::setBit | ( | unsigned | bit | ) | [inline] |
void pat::TriggerAlgorithm::setDecisionAfterMas | ( | bool | decisionAfterMask | ) | [inline] |
Set L1 algorithm decision, considering the mask.
Definition at line 100 of file TriggerAlgorithm.h.
References decisionAfterMask(), and decisionAfterMask_.
{ decisionAfterMask_ = decisionAfterMask; };
void pat::TriggerAlgorithm::setDecisionBeforeMask | ( | bool | decisionBeforeMask | ) | [inline] |
Set L1 algorithm decision, not considering the mask.
Definition at line 98 of file TriggerAlgorithm.h.
References decisionBeforeMask(), and decisionBeforeMask_.
void pat::TriggerAlgorithm::setGtlResult | ( | bool | gtlResult | ) | [inline] |
Set L1 algorithm GTL result.
Definition at line 92 of file TriggerAlgorithm.h.
References gtlResult(), and gtlResult_.
Referenced by pat::PATTriggerProducer::produce().
{ gtlResult_ = gtlResult; };
void pat::TriggerAlgorithm::setLogicalExpression | ( | const std::string & | expression | ) | [inline] |
Set L1 algorithm logical expression.
Definition at line 86 of file TriggerAlgorithm.h.
References logic_.
Referenced by pat::PATTriggerProducer::produce().
{ logic_ = expression; };
void pat::TriggerAlgorithm::setMask | ( | bool | mask | ) | [inline] |
void pat::TriggerAlgorithm::setName | ( | const std::string & | name | ) | [inline] |
void pat::TriggerAlgorithm::setPrescale | ( | unsigned | prescale | ) | [inline] |
Set L1 algorithm pre-scale.
Definition at line 94 of file TriggerAlgorithm.h.
References prescale(), and prescale_.
void pat::TriggerAlgorithm::setTechTrigger | ( | bool | tech | ) | [inline] |
Set flag for technical L1 algorithms.
Definition at line 88 of file TriggerAlgorithm.h.
References tech_.
{ tech_ = tech; };
bool pat::TriggerAlgorithm::techTrigger | ( | ) | const [inline] |
Get flag for technical L1 algorithms.
Definition at line 110 of file TriggerAlgorithm.h.
References tech_.
{ return tech_; };
std::string pat::TriggerAlgorithm::alias_ [private] |
L1 algorithm alias.
Definition at line 43 of file TriggerAlgorithm.h.
Referenced by alias(), and setAlias().
unsigned pat::TriggerAlgorithm::bit_ [private] |
L1 algorithm bit number.
Definition at line 49 of file TriggerAlgorithm.h.
std::vector< unsigned > pat::TriggerAlgorithm::conditionKeys_ [private] |
Indeces of trigger conditions in pat::TriggerConditionCollection in event as produced together with the pat::TriggerAlgorithmCollection
Definition at line 62 of file TriggerAlgorithm.h.
Referenced by addConditionKey(), conditionKeys(), and TriggerAlgorithm().
bool pat::TriggerAlgorithm::decisionAfterMask_ [private] |
L1 algorithm decision, considering the mask.
Definition at line 59 of file TriggerAlgorithm.h.
Referenced by decisionAfterMask(), and setDecisionAfterMas().
bool pat::TriggerAlgorithm::decisionBeforeMask_ [private] |
L1 algorithm decision, not considering the mask.
Definition at line 57 of file TriggerAlgorithm.h.
Referenced by decisionBeforeMask(), and setDecisionBeforeMask().
bool pat::TriggerAlgorithm::gtlResult_ [private] |
L1 algorithm result as determined on the GTL board.
Definition at line 51 of file TriggerAlgorithm.h.
Referenced by gtlResult(), and setGtlResult().
std::string pat::TriggerAlgorithm::logic_ [private] |
L1 algorithm logival expression.
Definition at line 45 of file TriggerAlgorithm.h.
Referenced by logicalExpression(), and setLogicalExpression().
bool pat::TriggerAlgorithm::mask_ [private] |
L1 algorithm mask.
Definition at line 55 of file TriggerAlgorithm.h.
std::string pat::TriggerAlgorithm::name_ [private] |
unsigned pat::TriggerAlgorithm::prescale_ [private] |
L1 algorithm pre-scale.
Definition at line 53 of file TriggerAlgorithm.h.
Referenced by prescale(), and setPrescale().
bool pat::TriggerAlgorithm::tech_ [private] |
Flag for technical L1 algorithms.
Definition at line 47 of file TriggerAlgorithm.h.
Referenced by setTechTrigger(), and techTrigger().