|
ATLAS Offline Software
|
#include <ChainGroup.h>
|
bool | isPassed (const TrigConf::HLTChain &chain, unsigned int condition) const |
|
bool | isCorrelatedL1items (const std::string &item) const |
|
float | correlatedL1Prescale (const std::string &item) const |
|
float | calculatePrescale (unsigned int condition=TrigDefs::Physics) |
|
void | appendFeatures (std::vector< std::vector< HLT::TriggerElement * > > &tes, FeatureContainer &fc) const |
|
const std::vector< std::string > & | names () const |
| names of triggers within chain group More...
|
|
bool | HLTResult (const std::string &chain, unsigned int condition) const |
|
bool | L1Result (const std::string &item, unsigned int condition) const |
|
unsigned int | HLTBits (const std::string &chain, const std::string &level, const TrigCompositeUtils::DecisionIDContainer &passExpress) const |
|
unsigned int | L1Bits (const std::string &item) const |
|
float | HLTPrescale (const std::string &chain, unsigned int condition) const |
|
float | L1Prescale (const std::string &item, unsigned int condition) const |
|
std::string | getLowerName (const std::string &EFname) const |
|
const Trig::CacheGlobalMemory & | cgm_assert () const |
|
const Trig::CacheGlobalMemory & | cgm () const |
|
Trig::CacheGlobalMemory & | cgm () |
|
void | update (const TrigConf::HLTChainList *confChains, const TrigConf::ItemContainer *confItems, TrigDefs::Group prop=TrigDefs::Group::Default) |
|
ChainGroup & | operator= (const ChainGroup &) |
|
Definition at line 51 of file ChainGroup.h.
◆ const_iterator
◆ ChainGroup()
◆ ~ChainGroup()
Trig::ChainGroup::~ChainGroup |
( |
| ) |
|
|
default |
◆ addAlias()
void Trig::ChainGroup::addAlias |
( |
const std::string & |
alias | ) |
|
adds alias (sort understandabel name) to the group
Definition at line 66 of file ChainGroup.cxx.
◆ appendFeatures()
◆ calculatePrescale()
float Trig::ChainGroup::calculatePrescale |
( |
unsigned int |
condition = TrigDefs::Physics | ) |
|
|
private |
Definition at line 413 of file ChainGroup.cxx.
419 const std::string& hltChainName =
ch->chain_name();
422 if (
condition & TrigDefs::enforceLogicalFlow) {
424 if (
ch->level()==
"EF") {
425 const std::string& hltChainNameL2 =
getLowerName(hltChainName);
426 const std::string& l1ItemName =
getLowerName(hltChainNameL2);
429 if(l1ItemName.find(
',')!=std::string::npos) singleTrigger=
false;
431 }
else if (
ch->level()==
"L2") {
432 const std::string& l1ItemName =
getLowerName(hltChainName);
434 if(l1ItemName.find(
',')!=std::string::npos) singleTrigger=
false;
436 }
else if (
ch->level()==
"HLT") {
437 const std::string& l1ItemName =
getLowerName(hltChainName);
439 if(l1ItemName.find(
',')!=std::string::npos and !
isCorrelatedL1items(l1ItemName) ) singleTrigger=
false;
443 if (singleTrigger)
return chainRESULT;
445 const bool UNPRESCALED = (fabs(chainRESULT-1.0)<1
e-5);
447 if (UNPRESCALED)
return 1.0;
452 const std::string& l1ItemName =
item->name();
454 if(l1ItemName.find(
',')!=std::string::npos) singleTrigger=
false;
456 if (singleTrigger)
return itemRESULT;
458 const bool UNPRESCALED = (itemRESULT==1);
460 if (UNPRESCALED)
return 1.0;
◆ cgm() [1/2]
◆ cgm() [2/2]
◆ cgm_assert()
◆ correlatedL1Prescale()
float Trig::ChainGroup::correlatedL1Prescale |
( |
const std::string & |
item | ) |
const |
|
private |
Definition at line 348 of file ChainGroup.cxx.
349 if( (
item ==
"L1_MU20,L1_MU21") || (
item ==
"L1_MU21,L1_MU20") ) {
352 if (l1mu20==
nullptr) {
354 return std::numeric_limits<float>::quiet_NaN();
359 if (l1mu21==
nullptr) {
361 return std::numeric_limits<float>::quiet_NaN();
365 if( (l1mu20ps < 1.0) && (l1mu21ps < 1.0) )
return 0.0;
366 if( (l1mu20ps < 1.0) )
return l1mu21ps;
367 if( (l1mu21ps < 1.0) )
return l1mu20ps;
368 if(l1mu20ps == 1.0)
return 1.0;
◆ error()
returns most severe error in the chains composing that chain group for L1 it is just OK If there is suspicion that there are other problems in the CG one needs to loop over chains and check each of them.
Definition at line 315 of file ChainGroup.cxx.
319 if (fchain==
nullptr)
continue;
321 errorCode = errorCode > ec ? errorCode : ec;
◆ features() [1/2]
template<class CONTAINER >
returns typed features related to given chain group of HLT chains or L1 items Note: This is a RUN 3 (and on) function.
- Parameters
-
[in] | eventStore | Event store pointer. To migrate to readHandles with the rest of the TDT soon |
[in] | HLTSummaryKeyIn | SG Key to the navigation summary container |
[in] | condition | Condition requirement. Only TrigDefs::Physics and TrigDefs::includeFailedDecisions are supported. |
[in] | containerSGKey | Optional requirement to return only features within the specified container name. Not checked if not specified. |
[in] | featureCollectionMode | For lastFeatureOfType, stop exploring each route through the navigation once one matching feature has been found. |
[in] | navElementLinkKey | Optional name of element link as saved online. The "feature" link is enforced, others may have been added. |
[in] | restrictToLegIndex | Optional index of a leg for mult-leg chains. Features will only be returned on the specified leg. Default is all legs. |
- Returns
- Vector of LinkInfo, where each entry wraps an ElementLink to the feature, and the Decision object it came from.
◆ features() [2/2]
returns all features related to given chain group of HLT chains or L1 items Note: This does not yet work for L1_FJ..., i.e.
no features are returned for these items.
Definition at line 726 of file ChainGroup.cxx.
739 std::vector< std::vector< HLT::TriggerElement*> > tes;
740 std::vector< std::vector< HLT::TriggerElement*> >
::iterator tesit;
744 std::set< std::string > threshold_names;
745 std::stack<const TrigConf::TriggerItemNode*> nodes;
747 nodes.push(
item->topNode() );
750 while (!nodes.empty()) {
755 if (
node->isThreshold()) {
756 if (
node->triggerThreshold()) {
758 if (!
node->triggerThreshold()->
name().empty())
759 threshold_names.insert(
node->triggerThreshold()->
name());
760 }
else if (!
node->thresholdName().empty()) {
762 threshold_names.insert(
node->thresholdName());
766 nodes.push(childnode);
772 tes.resize(threshold_names.size());
776 for (setstrit = threshold_names.begin(); setstrit != threshold_names.end(); ++setstrit, ++tesit) {
783 ATH_MSG_DEBUG(
"features: features container size: "<<
f.getCombinations().size());
◆ getHLTTriggerElements()
Definition at line 577 of file ChainGroup.cxx.
579 std::set< std::vector< TrigConf::HLTTriggerElement* > > tes;
583 tes.insert(
s->outputTEs());
586 return {tes.begin(), tes.end()};
◆ getListOfGroups()
vector< string > Trig::ChainGroup::getListOfGroups |
( |
| ) |
const |
◆ getListOfSignatures()
std::vector< std::string > Trig::ChainGroup::getListOfSignatures |
( |
| ) |
const |
◆ getListOfStreams()
std::vector< std::string > Trig::ChainGroup::getListOfStreams |
( |
| ) |
const |
◆ getListOfThresholds()
vector< string > Trig::ChainGroup::getListOfThresholds |
( |
| ) |
const |
Definition at line 517 of file ChainGroup.cxx.
520 std::stack<const TrigConf::TriggerItemNode*> nodes;
524 nodes.push(
item->topNode() );
525 while (!nodes.empty()) {
526 node = nodes.top(); nodes.pop();
529 if (
node->isThreshold()) {
530 if (
node->triggerThreshold()) {
532 if (!
node->triggerThreshold()->
name().empty())
533 s.insert(
node->triggerThreshold()->
name());
534 }
else if (!
node->thresholdName().empty()) {
536 s.insert(
node->thresholdName());
540 nodes.push(childnode);
547 return {
s.begin(),
s.end()};
◆ getListOfTriggerElements()
std::vector< std::vector< std::string > > Trig::ChainGroup::getListOfTriggerElements |
( |
| ) |
const |
Definition at line 555 of file ChainGroup.cxx.
557 std::set< std::vector< std::string > > tes;
558 std::vector< std::string >
t;
564 t.push_back( te->name());
569 return {tes.begin(), tes.end()};
◆ getListOfTriggers()
std::vector< std::string > Trig::ChainGroup::getListOfTriggers |
( |
| ) |
const |
◆ getLowerName()
std::string Trig::ChainGroup::getLowerName |
( |
const std::string & |
EFname | ) |
const |
|
private |
◆ getPrescale()
float Trig::ChainGroup::getPrescale |
( |
unsigned int |
condition = TrigDefs::Physics | ) |
const |
returns prescale factor for chain group with single chain in returns real prescale factor for real chain group composed of many prescaled chains returns 1 if at least one chain is unprescaled
Definition at line 407 of file ChainGroup.cxx.
◆ HLTBits()
Definition at line 221 of file ChainGroup.cxx.
222 unsigned int chainRESULT = 0;
223 if (
chain.empty())
return chainRESULT;
225 if (fchain==
nullptr)
return chainRESULT;
227 if (fchain->
chainPassedRaw()) chainRESULT = chainRESULT | TrigDefs::L2_passedRaw;
228 if (fchain->
isPassedThrough()) chainRESULT = chainRESULT | TrigDefs::L2_passThrough;
229 if (fchain->
isPrescaled()) chainRESULT = chainRESULT | TrigDefs::L2_prescaled;
230 if (fchain->
isResurrected()) chainRESULT = chainRESULT | TrigDefs::L2_resurrected;
232 if (fchain->
chainPassedRaw()) chainRESULT = chainRESULT | TrigDefs::EF_passedRaw;
233 if (fchain->
isPassedThrough()) chainRESULT = chainRESULT | TrigDefs::EF_passThrough;
234 if (fchain->
isPrescaled()) chainRESULT = chainRESULT | TrigDefs::EF_prescaled;
235 if (fchain->
isResurrected()) chainRESULT = chainRESULT | TrigDefs::EF_resurrected;
238 chainRESULT = chainRESULT | TrigDefs::Express_passed;
◆ HLTPrescale()
float Trig::ChainGroup::HLTPrescale |
( |
const std::string & |
chain, |
|
|
unsigned int |
condition |
|
) |
| const |
|
private |
Definition at line 326 of file ChainGroup.cxx.
327 if (
chain==
"")
return 0.;
332 return std::numeric_limits<float>::quiet_NaN();
334 float chainRESULT = fchain->
prescale();
◆ HLTResult()
bool Trig::ChainGroup::HLTResult |
( |
const std::string & |
chain, |
|
|
unsigned int |
condition |
|
) |
| const |
|
private |
Definition at line 78 of file ChainGroup.cxx.
79 bool chainRESULT =
false;
80 if (
chain.empty())
return chainRESULT;
82 if (fchain==
nullptr)
return chainRESULT;
92 if (~
condition & TrigDefs::allowResurrectedDecision) {
100 if (
condition & TrigDefs::passedThrough) {
101 if (PASSTHROUGH) {chainRESULT=
true;}
103 if (
condition & TrigDefs::requireDecision) {
104 if (RAW && !PRESCALED) {chainRESULT=
true;}
105 if (
condition & TrigDefs::allowResurrectedDecision ) {
106 if (RAW) {chainRESULT=
true;}
111 if (
condition & TrigDefs::eventAccepted) {
112 if ( (RAW && !PRESCALED) || PASSTHROUGH) {chainRESULT=
true;}
122 <<
" name = " << std::setw(35) << fchain->
getChainName()
123 <<
" result = " << chainRESULT);
◆ isCorrelatedL1items()
bool Trig::ChainGroup::isCorrelatedL1items |
( |
const std::string & |
item | ) |
const |
|
private |
Definition at line 343 of file ChainGroup.cxx.
344 if( (
item ==
"L1_MU20,L1_MU21") || (
item ==
"L1_MU21,L1_MU20") )
return true;
◆ isPassed() [1/2]
◆ isPassed() [2/2]
bool Trig::ChainGroup::isPassed |
( |
unsigned int |
condition = TrigDefs::Physics | ) |
const |
tells if chain group passed
- Parameters
-
conditions | is modifying the question |
Definition at line 208 of file ChainGroup.cxx.
210 if (
condition & TrigDefs::Express_passed) {
211 ATH_MSG_ERROR(
"Incorrect use of Express_passed bit. Please use isPassedBits() and test for TrigDefs::Express_passed in the returned bit-map.");
◆ isPassedBits()
unsigned int Trig::ChainGroup::isPassedBits |
( |
| ) |
const |
returns bits (OR ed) of the chain group Meaning of the returned bits can be understood by using masks defined in TrigDefs
Definition at line 305 of file ChainGroup.cxx.
309 for (
unsigned int r :
all) {
◆ isPassedBitsForEach()
std::vector< unsigned int > Trig::ChainGroup::isPassedBitsForEach |
( |
| ) |
const |
return result of isPassedBits for each chain in the group
Definition at line 261 of file ChainGroup.cxx.
266 if (navRHK && !navRHK->
empty()) {
268 if (navRH.isValid()) {
270 if (expressTerminusNode) {
276 std::vector<unsigned int>
all;
281 unsigned int RESULT =
HLTBits(
ch->chain_name(),
ch->level(), passExpress);
283 if (
ch->level()==
"EF") {
285 RESULT = RESULT |
HLTBits(nexttwo,
"L2", passExpress);
288 }
else if (
ch->level()==
"L2") {
291 }
else if (
ch->level()==
"HLT") {
295 all.push_back(RESULT);
◆ isPassedForEach()
std::vector< bool > Trig::ChainGroup::isPassedForEach |
( |
unsigned int |
condition = TrigDefs::Physics | ) |
const |
return vector with isPassed decision for each chain
- Parameters
-
conditions | is modifying the question |
The order of decisions is the same as in getListOfTriggers().
Definition at line 193 of file ChainGroup.cxx.
◆ L1Bits()
unsigned int Trig::ChainGroup::L1Bits |
( |
const std::string & |
item | ) |
const |
|
private |
Definition at line 244 of file ChainGroup.cxx.
246 if (
item.empty())
return r;
247 if (
item.find(
',')!=std::string::npos) {
254 if (fitem==
nullptr)
return r;
◆ L1Prescale()
float Trig::ChainGroup::L1Prescale |
( |
const std::string & |
item, |
|
|
unsigned int |
condition |
|
) |
| const |
|
private |
Definition at line 374 of file ChainGroup.cxx.
375 if (
item.empty())
return 0;
377 if(
item.find(
',')==std::string::npos) {
379 if (fitem==
nullptr) {
381 return std::numeric_limits<float>::quiet_NaN();
386 if ( itemprescale < 1) itemprescale = 0;
395 if (fitem==
nullptr) {
397 return std::numeric_limits<float>::quiet_NaN();
400 if ( itemprescale < 1) itemprescale = 0;
401 minprescale = (minprescale&&(minprescale<itemprescale)?minprescale:itemprescale);
◆ L1Result()
bool Trig::ChainGroup::L1Result |
( |
const std::string & |
item, |
|
|
unsigned int |
condition |
|
) |
| const |
|
private |
Definition at line 129 of file ChainGroup.cxx.
131 if (
item.empty())
return r;
132 if (
item.find(
',')!=std::string::npos) {
139 if (fitem==
nullptr) {
144 <<
" vetoed = " << fitem->
isVeto()
145 <<
" name = " << std::setw(35) << fitem->
name());
149 if (
condition & TrigDefs::allowResurrectedDecision)
◆ msg() [1/2]
MsgStream& Trig::Logger::msg |
( |
| ) |
const |
|
inlineinherited |
◆ msg() [2/2]
MsgStream& Trig::Logger::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
◆ msgLvl()
bool Trig::Logger::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
◆ names()
const std::vector< std::string >& Trig::ChainGroup::names |
( |
| ) |
const |
|
inlineprivate |
names of triggers within chain group
Definition at line 165 of file ChainGroup.h.
◆ operator!=()
◆ operator+()
◆ operator=()
◆ operator==()
◆ patterns()
const std::vector< std::string >& Trig::ChainGroup::patterns |
( |
| ) |
const |
|
inline |
◆ update()
Definition at line 591 of file ChainGroup.cxx.
600 if (!(confChains && confItems) )
return;
610 if ( boost::regex_match(
ch->chain_name().c_str(),
what, compiled) ) {
616 if ( boost::regex_match(
item->name().c_str(),
what, compiled) ) {
626 bool found_it =
false;
629 if (
ch->chain_name() ==
what) {
653 <<
" but this item or chain could not be found in the menu");
◆ CacheGlobalMemory
◆ ATLAS_THREAD_SAFE
asg::AsgTool* s_logger Trig::Logger::ATLAS_THREAD_SAFE {nullptr} |
|
inlinestaticprivateinherited |
◆ m_cgm
◆ m_confChains
◆ m_confItems
◆ m_names
std::vector< std::string > Trig::ChainGroup::m_names |
|
private |
names of trigger derived from patterns & current configuration
Definition at line 187 of file ChainGroup.h.
◆ m_patterns
std::vector<std::string> Trig::ChainGroup::m_patterns |
|
private |
patterns with which the CG was constructed
Definition at line 178 of file ChainGroup.h.
◆ m_prescale
float Trig::ChainGroup::m_prescale {0} |
|
private |
The documentation for this class was generated from the following files:
unsigned int getChainCounter() const
return the unique identifier of this Chain (uint)
JetConstituentVector::iterator iterator
std::vector< unsigned int > isPassedBitsForEach() const
return result of isPassedBits for each chain in the group
float correlatedL1Prescale(const std::string &item) const
std::vector< std::string > m_names
names of trigger derived from patterns & current configuration
const Trig::ChainGroup * createChainGroup(const std::vector< std::string > &patterns, const std::string &alias="", TrigDefs::Group props=TrigDefs::Group::Default) const
creates new chain group
std::string getLowerName(const std::string &EFname) const
const std::string & level() const
void getAllOfType(const te_id_type id, std::vector< TriggerElement * > &output, const bool activeOnly=true) const
The query returning a collection of all TriggerElements if name is given.
TrigCompositeUtils::DecisionID numeric() const
numeric ID
const TrigConf::TriggerItem * config_item(const std::string &name) const
CTP config item from given name.
The definition of error codes in HLT. This is a class (note; before was simple enum) to enable safer ...
const std::string & lower_chain_name() const
bool HLTResult(const std::string &chain, unsigned int condition) const
const TrigConf::HLTChain * getConfigChain() const
get underlying ConfigChain
const LVL1CTP::Lvl1Item * item(const std::string &name) const
CTP item from given name.
Trig::CacheGlobalMemory & m_cgm
unsigned int HLTBits(const std::string &chain, const std::string &level, const TrigCompositeUtils::DecisionIDContainer &passExpress) const
float calculatePrescale(unsigned int condition=TrigDefs::Physics)
bool isPrescaled() const
is chain prescaled ?
#define ATH_MSG_VERBOSE(x)
Property holding a SG store/key/clid from which a ReadHandle is made.
HLT chain configuration information.
bool empty() const
Test if the key is blank.
std::vector< std::string > convertStringToVector(const std::string &triggerNames)
makes a split of list of chains into the vector of chains
float item_prescale(int ctpid) const
Prescale for CPT item.
bool isPassedAfterPrescale() const
std::vector< const TrigConf::HLTChain * > m_confChains
const HLT::TrigNavStructure * navigation() const
HLT signature configuration information.
const SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > * getRun3NavigationKeyPtr() const
static asg::AsgTool *s_logger ATLAS_THREAD_SAFE
static HLTHash string2hash(const std::string &, const std::string &category="TE")
hash function translating TE names into identifiers
float HLTPrescale(const std::string &chain, unsigned int condition) const
bool assert_decision() const
checks if new event arrived with the decision Need to use before any call to CacheGlobalMemory.
const TrigConf::HLTChain * config_chain(const std::string &name) const
HLT config chain from given name.
const Decision * getExpressTerminusNode(const DecisionContainer &container)
Returns the express-accept navigation node from a collection or nullptr if missing.
float L1Prescale(const std::string &item, unsigned int condition) const
Iterator used to loop over multi-particle combinations.
int getChainStep() const
return the current step of execution
@ NoRegex
Do not use regular expressions.
const HLT::Chain * chain(const std::string &name) const
HLT chain object from given name (0 pointer returned if no match)
bool L1Result(const std::string &item, unsigned int condition) const
std::vector< std::string > keyWrap(const std::vector< std::string > &triggerNames)
normalizes the list of triggers (patterns) by sorting and uniquing them
Class used to describe composite objects in the HLT.
HLT::ErrorCode getErrorCode() const
return this Chain's most severe error code (from execution)
const std::vector< std::string > & patterns() const
void appendFeatures(std::vector< std::vector< HLT::TriggerElement * > > &tes, FeatureContainer &fc) const
void name(const std::string &n)
constexpr std::enable_if_t< is_bitmask_v< E >, bool > test(E lhs, E rhs)
Convenience function to test bits in a class enum bitmask.
bool isPassed(unsigned int condition=TrigDefs::Physics) const
tells if chain group passed
bool isResurrected() const
is chain resurrected ?
const Trig::CacheGlobalMemory & cgm() const
std::vector< std::string > m_patterns
patterns with which the CG was constructed
HLT trigger element configuration information.
const Trig::CacheGlobalMemory & cgm_assert() const
HLT stream configuration information.
const std::vector< std::string > & names() const
names of triggers within chain group
std::set< DecisionID > DecisionIDContainer
void collectCombinations(const TrigConf::HLTChain *conf, const CacheGlobalMemory &cgm, FeatureContainer &fc, unsigned int condition)
bool isCorrelatedL1items(const std::string &item) const
bool isPassedAfterVeto() const
bool isPassedBeforePrescale() const
#define ATH_MSG_WARNING(x)
void addWithChecking(const Combination &newComb)
add new combination to the container checking for overlap
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
def merge(input_file_pattern, output_file)
Merge many input LHE files into a single output file.
const std::string & getChainName() const
return the Chain name (string)
unsigned int L1Bits(const std::string &item) const
const std::string & name() const
bool chainPassedRaw() const
bool isPassedThrough() const
is chain passed through ?
std::vector< const TrigConf::TriggerItem * > m_confItems