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 672 of file ChainGroup.cxx.

672 {
673 for(TriggerElement* te : tes){
674 if (te->getActiveState() == false)
675 return false;
676 }
677 return true;
678 }
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 682 of file ChainGroup.cxx.

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