CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
pat::TriggerAlgorithm Class Reference

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. More...
 
const std::string & alias () const
 Get L1 algorithm alias. More...
 
unsigned bit () const
 Get L1 algorithm bit number. More...
 
const std::vector< unsigned > & conditionKeys () const
 Get all trigger condition collection indeces. More...
 
bool decision () const
 
bool decisionAfterMask () const
 Get L1 algorithm decision, considering the mask. More...
 
bool decisionBeforeMask () const
 Get L1 algorithm decision, not considering the mask. More...
 
bool gtlResult () const
 Get L1 algorithm GTL result. More...
 
bool hasConditionKey (unsigned conditionKey) const
 Checks, if a certain trigger condition collection index is assigned. More...
 
const std::string & logicalExpression () const
 Get L1 algorithm logical expression. More...
 
bool mask () const
 Get L1 algorithm mask. More...
 
const std::string & name () const
 Get L1 algorithm name. More...
 
unsigned prescale () const
 Get L1 algorithm pre-scale. More...
 
void setAlias (const std::string &alias)
 Set L1 algorithm alias. More...
 
void setBit (unsigned bit)
 Set L1 algorithm bit number. More...
 
void setDecisionAfterMas (bool decisionAfterMask)
 Set L1 algorithm decision, considering the mask. More...
 
void setDecisionBeforeMask (bool decisionBeforeMask)
 Set L1 algorithm decision, not considering the mask. More...
 
void setGtlResult (bool gtlResult)
 Set L1 algorithm GTL result. More...
 
void setLogicalExpression (const std::string &expression)
 Set L1 algorithm logical expression. More...
 
void setMask (bool mask)
 Set L1 algorithm mask. More...
 
void setName (const std::string &name)
 Methods. More...
 
void setPrescale (unsigned prescale)
 Set L1 algorithm pre-scale. More...
 
void setTechTrigger (bool tech)
 Set flag for technical L1 algorithms. More...
 
bool techTrigger () const
 Get flag for technical L1 algorithms. More...
 
 TriggerAlgorithm ()
 Constructors and Destructor. More...
 
 TriggerAlgorithm (const std::string &name)
 Constructor from algorithm name only. More...
 
 TriggerAlgorithm (const std::string &name, const std::string &alias, bool tech, unsigned bit, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask)
 Constructors from values. More...
 
 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. More...
 

Private Attributes

std::string alias_
 L1 algorithm alias. More...
 
unsigned bit_
 L1 algorithm bit number. More...
 
std::vector< unsigned > conditionKeys_
 
bool decisionAfterMask_
 L1 algorithm decision, considering the mask. More...
 
bool decisionBeforeMask_
 L1 algorithm decision, not considering the mask. More...
 
bool gtlResult_
 L1 algorithm result as determined on the GTL board. More...
 
std::string logic_
 L1 algorithm logival expression. More...
 
bool mask_
 L1 algorithm mask. More...
 
std::string name_
 Data Members. More...
 
unsigned prescale_
 L1 algorithm pre-scale. More...
 
bool tech_
 Flag for technical L1 algorithms. More...
 

Detailed Description

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

Author
Volker Adler

Definition at line 31 of file TriggerAlgorithm.h.

Constructor & Destructor Documentation

◆ TriggerAlgorithm() [1/4]

TriggerAlgorithm::TriggerAlgorithm ( )

Constructors and Destructor.

Default constructor

Definition at line 11 of file TriggerAlgorithm.cc.

References conditionKeys_.

12  : name_(),
13  alias_(),
14  logic_(),
15  tech_(),
16  bit_(),
17  gtlResult_(),
18  prescale_(),
19  mask_(),
22  conditionKeys_.clear();
23 }
bool gtlResult_
L1 algorithm result as determined on the GTL board.
std::string logic_
L1 algorithm logival expression.
std::string name_
Data Members.
unsigned bit_
L1 algorithm bit number.
bool tech_
Flag for technical L1 algorithms.
std::string alias_
L1 algorithm alias.
bool mask_
L1 algorithm mask.
std::vector< unsigned > conditionKeys_
bool decisionBeforeMask_
L1 algorithm decision, not considering the mask.
unsigned prescale_
L1 algorithm pre-scale.
bool decisionAfterMask_
L1 algorithm decision, considering the mask.

◆ TriggerAlgorithm() [2/4]

TriggerAlgorithm::TriggerAlgorithm ( const std::string &  name)

Constructor from algorithm name only.

Definition at line 26 of file TriggerAlgorithm.cc.

References conditionKeys_.

27  : name_(name),
28  alias_(),
29  logic_(),
30  tech_(),
31  bit_(),
32  gtlResult_(),
33  prescale_(),
34  mask_(),
37  conditionKeys_.clear();
38 }
bool gtlResult_
L1 algorithm result as determined on the GTL board.
std::string logic_
L1 algorithm logival expression.
std::string name_
Data Members.
unsigned bit_
L1 algorithm bit number.
bool tech_
Flag for technical L1 algorithms.
std::string alias_
L1 algorithm alias.
bool mask_
L1 algorithm mask.
std::vector< unsigned > conditionKeys_
bool decisionBeforeMask_
L1 algorithm decision, not considering the mask.
unsigned prescale_
L1 algorithm pre-scale.
const std::string & name() const
Get L1 algorithm name.
bool decisionAfterMask_
L1 algorithm decision, considering the mask.

◆ TriggerAlgorithm() [3/4]

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 41 of file TriggerAlgorithm.cc.

References conditionKeys_.

49  : name_(name),
50  alias_(alias),
51  logic_(),
52  tech_(tech),
53  bit_(bit),
54  gtlResult_(),
56  mask_(mask),
59  conditionKeys_.clear();
60 }
bool decisionAfterMask() const
Get L1 algorithm decision, considering the mask.
bool gtlResult_
L1 algorithm result as determined on the GTL board.
std::string logic_
L1 algorithm logival expression.
std::string name_
Data Members.
unsigned bit_
L1 algorithm bit number.
bool tech_
Flag for technical L1 algorithms.
std::string alias_
L1 algorithm alias.
unsigned bit() const
Get L1 algorithm bit number.
bool mask_
L1 algorithm mask.
bool mask() const
Get L1 algorithm mask.
const std::string & alias() const
Get L1 algorithm alias.
std::vector< unsigned > conditionKeys_
bool decisionBeforeMask_
L1 algorithm decision, not considering the mask.
unsigned prescale_
L1 algorithm pre-scale.
const std::string & name() const
Get L1 algorithm name.
bool decisionAfterMask_
L1 algorithm decision, considering the mask.
bool decisionBeforeMask() const
Get L1 algorithm decision, not considering the mask.

◆ TriggerAlgorithm() [4/4]

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 61 of file TriggerAlgorithm.cc.

References conditionKeys_.

70  : name_(name),
71  alias_(alias),
72  logic_(),
73  tech_(tech),
74  bit_(bit),
77  mask_(mask),
80  conditionKeys_.clear();
81 }
bool decisionAfterMask() const
Get L1 algorithm decision, considering the mask.
bool gtlResult_
L1 algorithm result as determined on the GTL board.
std::string logic_
L1 algorithm logival expression.
std::string name_
Data Members.
unsigned bit_
L1 algorithm bit number.
bool tech_
Flag for technical L1 algorithms.
bool gtlResult() const
Get L1 algorithm GTL result.
std::string alias_
L1 algorithm alias.
unsigned bit() const
Get L1 algorithm bit number.
bool mask_
L1 algorithm mask.
bool mask() const
Get L1 algorithm mask.
const std::string & alias() const
Get L1 algorithm alias.
std::vector< unsigned > conditionKeys_
bool decisionBeforeMask_
L1 algorithm decision, not considering the mask.
unsigned prescale_
L1 algorithm pre-scale.
const std::string & name() const
Get L1 algorithm name.
bool decisionAfterMask_
L1 algorithm decision, considering the mask.
bool decisionBeforeMask() const
Get L1 algorithm decision, not considering the mask.

◆ ~TriggerAlgorithm()

virtual pat::TriggerAlgorithm::~TriggerAlgorithm ( )
inlinevirtual

Destructor.

Definition at line 85 of file TriggerAlgorithm.h.

85 {};

Member Function Documentation

◆ addConditionKey()

void pat::TriggerAlgorithm::addConditionKey ( unsigned  conditionKey)
inline

Add a new trigger condition collection index.

Definition at line 110 of file TriggerAlgorithm.h.

References conditionKeys_, and hasConditionKey().

Referenced by pat::PATTriggerProducer::produce().

110  {
111  if (!hasConditionKey(conditionKey))
112  conditionKeys_.push_back(conditionKey);
113  };
std::vector< unsigned > conditionKeys_
bool hasConditionKey(unsigned conditionKey) const
Checks, if a certain trigger condition collection index is assigned.

◆ alias()

const std::string& pat::TriggerAlgorithm::alias ( ) const
inline

Get L1 algorithm alias.

Definition at line 117 of file TriggerAlgorithm.h.

References alias_.

Referenced by setAlias().

117 { return alias_; };
std::string alias_
L1 algorithm alias.

◆ bit()

unsigned pat::TriggerAlgorithm::bit ( ) const
inline

Get L1 algorithm bit number.

Definition at line 123 of file TriggerAlgorithm.h.

References bit_.

Referenced by setBit().

123 { return bit_; };
unsigned bit_
L1 algorithm bit number.

◆ conditionKeys()

const std::vector<unsigned>& pat::TriggerAlgorithm::conditionKeys ( ) const
inline

Get all trigger condition collection indeces.

Definition at line 138 of file TriggerAlgorithm.h.

References conditionKeys_.

Referenced by hasConditionKey().

138 { return conditionKeys_; };
std::vector< unsigned > conditionKeys_

◆ decision()

bool pat::TriggerAlgorithm::decision ( ) const
inline

Get L1 algorithm decision as applied, identical to L1 algorithm decision, considering the mask

Definition at line 136 of file TriggerAlgorithm.h.

References decisionAfterMask().

Referenced by pat::PATTriggerProducer::produce().

136 { return decisionAfterMask(); };
bool decisionAfterMask() const
Get L1 algorithm decision, considering the mask.

◆ decisionAfterMask()

bool pat::TriggerAlgorithm::decisionAfterMask ( ) const
inline

Get L1 algorithm decision, considering the mask.

Definition at line 133 of file TriggerAlgorithm.h.

References decisionAfterMask_.

Referenced by decision(), and setDecisionAfterMas().

133 { return decisionAfterMask_; };
bool decisionAfterMask_
L1 algorithm decision, considering the mask.

◆ decisionBeforeMask()

bool pat::TriggerAlgorithm::decisionBeforeMask ( ) const
inline

Get L1 algorithm decision, not considering the mask.

Definition at line 131 of file TriggerAlgorithm.h.

References decisionBeforeMask_.

Referenced by setDecisionBeforeMask().

131 { return decisionBeforeMask_; };
bool decisionBeforeMask_
L1 algorithm decision, not considering the mask.

◆ gtlResult()

bool pat::TriggerAlgorithm::gtlResult ( ) const
inline

Get L1 algorithm GTL result.

Definition at line 125 of file TriggerAlgorithm.h.

References gtlResult_.

Referenced by setGtlResult().

125 { return gtlResult_; };
bool gtlResult_
L1 algorithm result as determined on the GTL board.

◆ hasConditionKey()

bool TriggerAlgorithm::hasConditionKey ( unsigned  conditionKey) const

Checks, if a certain trigger condition collection index is assigned.

Definition at line 86 of file TriggerAlgorithm.cc.

References conditionKeys().

Referenced by addConditionKey().

86  {
87  for (size_t iO = 0; iO < conditionKeys().size(); ++iO) {
88  if (conditionKeys().at(iO) == conditionKey) {
89  return true;
90  }
91  }
92  return false;
93 }
const std::vector< unsigned > & conditionKeys() const
Get all trigger condition collection indeces.

◆ logicalExpression()

const std::string& pat::TriggerAlgorithm::logicalExpression ( ) const
inline

Get L1 algorithm logical expression.

Definition at line 119 of file TriggerAlgorithm.h.

References logic_.

119 { return logic_; };
std::string logic_
L1 algorithm logival expression.

◆ mask()

bool pat::TriggerAlgorithm::mask ( ) const
inline

Get L1 algorithm mask.

Definition at line 129 of file TriggerAlgorithm.h.

References mask_.

Referenced by setMask().

129 { return mask_; };
bool mask_
L1 algorithm mask.

◆ name()

const std::string& pat::TriggerAlgorithm::name ( ) const
inline

Get L1 algorithm name.

Definition at line 115 of file TriggerAlgorithm.h.

References name_.

Referenced by config.CFG::__str__(), validation.Sample::digest(), VIDSelectorBase.VIDSelectorBase::initialize(), pat::PATTriggerProducer::produce(), and setName().

115 { return name_; };
std::string name_
Data Members.

◆ prescale()

unsigned pat::TriggerAlgorithm::prescale ( ) const
inline

Get L1 algorithm pre-scale.

Definition at line 127 of file TriggerAlgorithm.h.

References prescale_.

Referenced by setPrescale().

127 { return prescale_; };
unsigned prescale_
L1 algorithm pre-scale.

◆ setAlias()

void pat::TriggerAlgorithm::setAlias ( const std::string &  alias)
inline

Set L1 algorithm alias.

Definition at line 92 of file TriggerAlgorithm.h.

References alias(), and alias_.

92 { alias_ = alias; };
std::string alias_
L1 algorithm alias.
const std::string & alias() const
Get L1 algorithm alias.

◆ setBit()

void pat::TriggerAlgorithm::setBit ( unsigned  bit)
inline

Set L1 algorithm bit number.

Definition at line 98 of file TriggerAlgorithm.h.

References bit(), and bit_.

98 { bit_ = bit; };
unsigned bit_
L1 algorithm bit number.
unsigned bit() const
Get L1 algorithm bit number.

◆ setDecisionAfterMas()

void pat::TriggerAlgorithm::setDecisionAfterMas ( bool  decisionAfterMask)
inline

Set L1 algorithm decision, considering the mask.

Definition at line 108 of file TriggerAlgorithm.h.

References decisionAfterMask(), and decisionAfterMask_.

bool decisionAfterMask() const
Get L1 algorithm decision, considering the mask.
bool decisionAfterMask_
L1 algorithm decision, considering the mask.

◆ setDecisionBeforeMask()

void pat::TriggerAlgorithm::setDecisionBeforeMask ( bool  decisionBeforeMask)
inline

Set L1 algorithm decision, not considering the mask.

Definition at line 106 of file TriggerAlgorithm.h.

References decisionBeforeMask(), and decisionBeforeMask_.

bool decisionBeforeMask_
L1 algorithm decision, not considering the mask.
bool decisionBeforeMask() const
Get L1 algorithm decision, not considering the mask.

◆ setGtlResult()

void pat::TriggerAlgorithm::setGtlResult ( bool  gtlResult)
inline

Set L1 algorithm GTL result.

Definition at line 100 of file TriggerAlgorithm.h.

References gtlResult(), and gtlResult_.

Referenced by pat::PATTriggerProducer::produce().

100 { gtlResult_ = gtlResult; };
bool gtlResult_
L1 algorithm result as determined on the GTL board.
bool gtlResult() const
Get L1 algorithm GTL result.

◆ setLogicalExpression()

void pat::TriggerAlgorithm::setLogicalExpression ( const std::string &  expression)
inline

Set L1 algorithm logical expression.

Definition at line 94 of file TriggerAlgorithm.h.

References l1tGTMenu_hadr_metSeeds_cff::expression, and logic_.

Referenced by pat::PATTriggerProducer::produce().

94 { logic_ = expression; };
std::string logic_
L1 algorithm logival expression.

◆ setMask()

void pat::TriggerAlgorithm::setMask ( bool  mask)
inline

Set L1 algorithm mask.

Definition at line 104 of file TriggerAlgorithm.h.

References mask(), and mask_.

104 { mask_ = mask; };
bool mask_
L1 algorithm mask.
bool mask() const
Get L1 algorithm mask.

◆ setName()

void pat::TriggerAlgorithm::setName ( const std::string &  name)
inline

Methods.

Set L1 algorithm name

Definition at line 90 of file TriggerAlgorithm.h.

References name(), and name_.

90 { name_ = name; };
std::string name_
Data Members.
const std::string & name() const
Get L1 algorithm name.

◆ setPrescale()

void pat::TriggerAlgorithm::setPrescale ( unsigned  prescale)
inline

Set L1 algorithm pre-scale.

Definition at line 102 of file TriggerAlgorithm.h.

References prescale(), and prescale_.

102 { prescale_ = prescale; };
unsigned prescale_
L1 algorithm pre-scale.
unsigned prescale() const
Get L1 algorithm pre-scale.

◆ setTechTrigger()

void pat::TriggerAlgorithm::setTechTrigger ( bool  tech)
inline

Set flag for technical L1 algorithms.

Definition at line 96 of file TriggerAlgorithm.h.

References tech_.

96 { tech_ = tech; };
bool tech_
Flag for technical L1 algorithms.

◆ techTrigger()

bool pat::TriggerAlgorithm::techTrigger ( ) const
inline

Get flag for technical L1 algorithms.

Definition at line 121 of file TriggerAlgorithm.h.

References tech_.

121 { return tech_; };
bool tech_
Flag for technical L1 algorithms.

Member Data Documentation

◆ alias_

std::string pat::TriggerAlgorithm::alias_
private

L1 algorithm alias.

Definition at line 37 of file TriggerAlgorithm.h.

Referenced by alias(), and setAlias().

◆ bit_

unsigned pat::TriggerAlgorithm::bit_
private

L1 algorithm bit number.

Definition at line 43 of file TriggerAlgorithm.h.

Referenced by bit(), and setBit().

◆ conditionKeys_

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 56 of file TriggerAlgorithm.h.

Referenced by addConditionKey(), conditionKeys(), and TriggerAlgorithm().

◆ decisionAfterMask_

bool pat::TriggerAlgorithm::decisionAfterMask_
private

L1 algorithm decision, considering the mask.

Definition at line 53 of file TriggerAlgorithm.h.

Referenced by decisionAfterMask(), and setDecisionAfterMas().

◆ decisionBeforeMask_

bool pat::TriggerAlgorithm::decisionBeforeMask_
private

L1 algorithm decision, not considering the mask.

Definition at line 51 of file TriggerAlgorithm.h.

Referenced by decisionBeforeMask(), and setDecisionBeforeMask().

◆ gtlResult_

bool pat::TriggerAlgorithm::gtlResult_
private

L1 algorithm result as determined on the GTL board.

Definition at line 45 of file TriggerAlgorithm.h.

Referenced by gtlResult(), and setGtlResult().

◆ logic_

std::string pat::TriggerAlgorithm::logic_
private

L1 algorithm logival expression.

Definition at line 39 of file TriggerAlgorithm.h.

Referenced by logicalExpression(), and setLogicalExpression().

◆ mask_

bool pat::TriggerAlgorithm::mask_
private

L1 algorithm mask.

Definition at line 49 of file TriggerAlgorithm.h.

Referenced by mask(), and setMask().

◆ name_

std::string pat::TriggerAlgorithm::name_
private

Data Members.

L1 algorithm name

Definition at line 35 of file TriggerAlgorithm.h.

Referenced by name(), and setName().

◆ prescale_

unsigned pat::TriggerAlgorithm::prescale_
private

L1 algorithm pre-scale.

Definition at line 47 of file TriggerAlgorithm.h.

Referenced by prescale(), and setPrescale().

◆ tech_

bool pat::TriggerAlgorithm::tech_
private

Flag for technical L1 algorithms.

Definition at line 41 of file TriggerAlgorithm.h.

Referenced by setTechTrigger(), and techTrigger().