ATLAS Offline Software
Loading...
Searching...
No Matches
ChainGroup_impl Namespace Reference

Functions

bool allActive (const std::vector< TriggerElement * > &tes)
void collectCombinations (const TrigConf::HLTChain *conf, const CacheGlobalMemory &cgm, FeatureContainer &fc, unsigned int condition)

Function Documentation

◆ allActive()

bool ChainGroup_impl::allActive ( const std::vector< TriggerElement * > & tes)

Definition at line 680 of file ChainGroup.cxx.

680 {
681 for(TriggerElement* te : tes){
682 if (te->getActiveState() == false)
683 return false;
684 }
685 return true;
686 }
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...

◆ collectCombinations()

void ChainGroup_impl::collectCombinations ( const TrigConf::HLTChain * conf,
const CacheGlobalMemory & cgm,
FeatureContainer & fc,
unsigned int condition )

Definition at line 690 of file ChainGroup.cxx.

690 {
691 // go over the steps of the chain and collecte TEs combinations for each of the chain step (signature)
692 bool last_step=true;
693 const TrigConf::HLTSignature* previous_sig(0);
694 for(const TrigConf::HLTSignature* sig : std::views::reverse(conf->signatureList())) {
695 // chain without signatures
696 if (!sig) break;
697
698 // the signatures size changes from step to step, this needs custom treatement and the iteration eeds to be stoped here
699 if ( previous_sig && previous_sig->outputTEs().size() != sig->outputTEs().size() )
700 break;
701 previous_sig = sig;
702
703 std::vector<std::vector<HLT::TriggerElement*> > tes(sig->outputTEs().size()); // preallocate
704 size_t idx = 0;
705 for(const TrigConf::HLTTriggerElement* confte : sig->outputTEs() ) {
706
707 // here the condition enters; if we take only accepted objects we need to pick only the active TEs
708 cgm.navigation()->getAllOfType(confte->id(), tes[idx], condition & TrigDefs::Physics );
709 idx++;
710 }
711 HLT::ComboIterator combination(tes, cgm.navigation());
712
713 // build the combinations, sometimes a huge list
714 while (combination.isValid()) {
715 // very very tricky, if all TEs in the combination are active then it means they were already picked up by previous combinations
716 // but we can not do this for the last chain step, (we woudl be unable to pick objects whcih made trigger passing)
717 //std::cerr << "emitting new combination last_step: "<< last_step << std::endl;
718 if (!allActive(*combination) || last_step) {
719 fc.addWithChecking(Combination(*combination, &cgm));
720 }
721 ++combination;
722 }
723
724 if ( condition & TrigDefs::Physics ) // here again athe condition calls for the loop breaking
725 break;
726 else
727 last_step = false; // and go deeper
728 }
729 }
This class provides a combination very quickly.
Iterator used to loop over multi-particle combinations.
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.
HLT signature configuration information.
HLT trigger element configuration information.
const HLT::TrigNavStructure * navigation() const
void addWithChecking(const Combination &newComb)
add new combination to the container checking for overlap
bool allActive(const std::vector< TriggerElement * > &tes)