Analysis-level trigger object class (stand-alone) More...
#include <DataFormats/PatCandidates/interface/TriggerObjectStandAlone.h>
Public Member Functions | |
void | addAlgorithmName (const std::string &algorithmName, bool algoCondAccepted=true) |
Adds a new L1 algorithm name. | |
void | addConditionName (const std::string &conditionName) |
Adds a new L1 condition name. | |
void | addFilterLabel (const std::string &filterLabel) |
Methods. | |
void | addPathName (const std::string &pathName, bool pathLastFilterAccepted=true, bool pathL3FilterAccepted=true) |
Adds a new HLT path name. | |
bool | algo (const std::string &algorithmName, unsigned algoCondAccepted=1) const |
Calls 'hasAlgorithmName(...)'. | |
std::vector< std::string > | algorithmNames (bool algoCondAccepted=true) const |
Gets all L1 algorithm names. | |
virtual bool | coll (const std::string &collName) const |
Calls 'hasCollection(...)' (method override) | |
bool | cond (const std::string &conditionName) const |
Calls 'hasConditionName(...)'. | |
std::vector< std::string > | conditionNames () const |
Gets all L1 condition names. | |
bool | filter (const std::string &filterLabel) const |
Calls 'hasFilterLabel(...)'. | |
std::vector< std::string > | filterLabels () const |
Gets all HLT filter labels. | |
bool | hasAlgoCondAccepted () const |
bool | hasAlgorithmName (const std::string &algorithmName, bool algoCondAccepted=true) const |
Checks, if a certain L1 algorithm name is assigned. | |
virtual bool | hasCollection (const std::string &collName) const |
Checks, if a certain label of original collection is assigned (method overrides) | |
virtual bool | hasCollection (const edm::InputTag &collName) const |
bool | hasConditionName (const std::string &conditionName) const |
Checks, if a certain L1 condition name is assigned. | |
bool | hasFilterLabel (const std::string &filterLabel) const |
Checks, if a certain HLT filter label is assigned. | |
bool | hasPathL3FilterAccepted () const |
bool | hasPathLastFilterAccepted () const |
Checks, if the usage indicator vector has been filled. | |
bool | hasPathName (const std::string &pathName, bool pathLastFilterAccepted=false, bool pathL3FilterAccepted=true) const |
Checks, if a certain HLT path name is assigned. | |
bool | path (const std::string &pathName, unsigned pathLastFilterAccepted=0, unsigned pathL3FilterAccepted=1) const |
Calls 'hasPathName(...)'. | |
std::vector< std::string > | pathNames (bool pathLastFilterAccepted=false, bool pathL3FilterAccepted=true) const |
Gets all HLT path names. | |
TriggerObject | triggerObject () |
Gets the pat::TriggerObject (parent class) | |
TriggerObjectStandAlone (const reco::LeafCandidate &leafCand) | |
Constructor from reco::Candidate. | |
TriggerObjectStandAlone () | |
Constructors and Destructor. | |
TriggerObjectStandAlone (const trigger::TriggerObject &trigObj) | |
Constructor from trigger::TriggerObject. | |
TriggerObjectStandAlone (const reco::Particle::LorentzVector &vec, int id=0) | |
Constructors from Lorentz-vectors and (optional) PDG ID. | |
TriggerObjectStandAlone (const TriggerObject &trigObj) | |
Constructor from pat::TriggerObject. | |
TriggerObjectStandAlone (const reco::Particle::PolarLorentzVector &vec, int id=0) | |
virtual | ~TriggerObjectStandAlone () |
Destructor. | |
Private Member Functions | |
void | addFilterOrCondition (const std::string &name) |
Adds a new HLT filter label or L1 condition name. | |
void | addPathOrAlgorithm (const std::string &name, bool pathLastFilterAccepted, bool pathL3FilterAccepted) |
Adds a new HLT path or L1 algorithm name. | |
std::vector< std::string > | filtersOrConditions () const |
Gets all HLT filter labels or L1 condition names. | |
bool | hasAnyName (const std::string &name, const std::vector< std::string > &nameVec) const |
Private methods. | |
bool | hasFilterOrCondition (const std::string &name) const |
Checks, if a certain HLT filter label or L1 condition name is assigned. | |
bool | hasL3Filter () const |
bool | hasLastFilter () const |
Check, if the usage indicator vectors have been filled. | |
bool | hasPathOrAlgorithm (const std::string &name, bool pathLastFilterAccepted, bool pathL3FilterAccepted) const |
Checks, if a certain HLT path or L1 algorithm name is assigned. | |
std::vector< std::string > | pathsOrAlgorithms (bool pathLastFilterAccepted, bool pathL3FilterAccepted) const |
Gets all HLT path or L1 algorithm names. | |
Private Attributes | |
std::vector< std::string > | filterLabels_ |
Vector of labels of all HLT filters or names od L1 conditions the trigger objects has been used in. | |
std::vector< bool > | pathL3FilterAccepted_ |
std::vector< bool > | pathLastFilterAccepted_ |
std::vector< std::string > | pathNames_ |
Vector of names of all HLT paths or L1 algorithms the trigger objects has been used in. | |
Static Private Attributes | |
static const char | wildcard_ = '*' |
Constants. |
Analysis-level trigger object class (stand-alone)
TriggerObjectStandAlone implements a container for trigger objects' information within the 'pat' namespace. These Trigger objects keep also information on filters and paths to be saved independently or embedded into PAT objects. The TriggerObjectStandAlone is also the data format used in the PAT trigger object matching. For detailed information, consult https://twiki.cern.ch/twiki/bin/view/CMS/SWGuidePATTrigger#TriggerObjectStandAlone
Definition at line 32 of file TriggerObjectStandAlone.h.
TriggerObjectStandAlone::TriggerObjectStandAlone | ( | ) |
Constructors and Destructor.
Default constructor
Definition at line 24 of file TriggerObjectStandAlone.cc.
References filterLabels_, pathL3FilterAccepted_, pathLastFilterAccepted_, and pathNames_.
: TriggerObject() { filterLabels_.clear(); pathNames_.clear(); pathLastFilterAccepted_.clear(); pathL3FilterAccepted_.clear(); }
TriggerObjectStandAlone::TriggerObjectStandAlone | ( | const TriggerObject & | trigObj | ) |
Constructor from pat::TriggerObject.
Definition at line 35 of file TriggerObjectStandAlone.cc.
References filterLabels_, pathL3FilterAccepted_, pathLastFilterAccepted_, and pathNames_.
: TriggerObject( trigObj ) { filterLabels_.clear(); pathNames_.clear(); pathLastFilterAccepted_.clear(); pathL3FilterAccepted_.clear(); }
TriggerObjectStandAlone::TriggerObjectStandAlone | ( | const trigger::TriggerObject & | trigObj | ) |
Constructor from trigger::TriggerObject.
Definition at line 46 of file TriggerObjectStandAlone.cc.
References filterLabels_, pathL3FilterAccepted_, pathLastFilterAccepted_, and pathNames_.
: TriggerObject( trigObj ) { filterLabels_.clear(); pathNames_.clear(); pathLastFilterAccepted_.clear(); pathL3FilterAccepted_.clear(); }
TriggerObjectStandAlone::TriggerObjectStandAlone | ( | const reco::LeafCandidate & | leafCand | ) |
Constructor from reco::Candidate.
Definition at line 57 of file TriggerObjectStandAlone.cc.
References filterLabels_, pathL3FilterAccepted_, pathLastFilterAccepted_, and pathNames_.
: TriggerObject( leafCand ) { filterLabels_.clear(); pathNames_.clear(); pathLastFilterAccepted_.clear(); pathL3FilterAccepted_.clear(); }
TriggerObjectStandAlone::TriggerObjectStandAlone | ( | const reco::Particle::LorentzVector & | vec, |
int | id = 0 |
||
) |
Constructors from Lorentz-vectors and (optional) PDG ID.
Definition at line 68 of file TriggerObjectStandAlone.cc.
References filterLabels_, pathL3FilterAccepted_, pathLastFilterAccepted_, and pathNames_.
: TriggerObject( vec, id ) { filterLabels_.clear(); pathNames_.clear(); pathLastFilterAccepted_.clear(); pathL3FilterAccepted_.clear(); }
TriggerObjectStandAlone::TriggerObjectStandAlone | ( | const reco::Particle::PolarLorentzVector & | vec, |
int | id = 0 |
||
) |
Definition at line 76 of file TriggerObjectStandAlone.cc.
References filterLabels_, pathL3FilterAccepted_, pathLastFilterAccepted_, and pathNames_.
: TriggerObject( vec, id ) { filterLabels_.clear(); pathNames_.clear(); pathLastFilterAccepted_.clear(); pathL3FilterAccepted_.clear(); }
virtual pat::TriggerObjectStandAlone::~TriggerObjectStandAlone | ( | ) | [inline, virtual] |
void pat::TriggerObjectStandAlone::addAlgorithmName | ( | const std::string & | algorithmName, |
bool | algoCondAccepted = true |
||
) | [inline] |
Adds a new L1 algorithm name.
Definition at line 105 of file TriggerObjectStandAlone.h.
References addPathOrAlgorithm().
{ addPathOrAlgorithm( algorithmName, algoCondAccepted, false ); };
void pat::TriggerObjectStandAlone::addConditionName | ( | const std::string & | conditionName | ) | [inline] |
Adds a new L1 condition name.
Definition at line 101 of file TriggerObjectStandAlone.h.
References addFilterOrCondition().
{ addFilterOrCondition( conditionName ); };
void pat::TriggerObjectStandAlone::addFilterLabel | ( | const std::string & | filterLabel | ) | [inline] |
Methods.
Adds a new HLT filter label
Definition at line 99 of file TriggerObjectStandAlone.h.
References addFilterOrCondition().
Referenced by pat::PATTriggerProducer::produce().
{ addFilterOrCondition( filterLabel ); };
void pat::TriggerObjectStandAlone::addFilterOrCondition | ( | const std::string & | name | ) | [inline, private] |
Adds a new HLT filter label or L1 condition name.
Definition at line 62 of file TriggerObjectStandAlone.h.
References filterLabels_, and hasFilterOrCondition().
Referenced by addConditionName(), and addFilterLabel().
{ if ( ! hasFilterOrCondition( name ) ) filterLabels_.push_back( name ); };
void pat::TriggerObjectStandAlone::addPathName | ( | const std::string & | pathName, |
bool | pathLastFilterAccepted = true , |
||
bool | pathL3FilterAccepted = true |
||
) | [inline] |
Adds a new HLT path name.
Definition at line 103 of file TriggerObjectStandAlone.h.
References addPathOrAlgorithm().
Referenced by pat::PATTriggerProducer::produce().
{ addPathOrAlgorithm( pathName, pathLastFilterAccepted, pathL3FilterAccepted ); };
void TriggerObjectStandAlone::addPathOrAlgorithm | ( | const std::string & | name, |
bool | pathLastFilterAccepted, | ||
bool | pathL3FilterAccepted | ||
) | [private] |
Adds a new HLT path or L1 algorithm name.
Definition at line 136 of file TriggerObjectStandAlone.cc.
References hasPathOrAlgorithm(), mergeVDriftHistosByStation::name, pathL3FilterAccepted_, pathLastFilterAccepted_, and pathNames_.
Referenced by addAlgorithmName(), and addPathName().
{ // Check, if path is already assigned if ( ! hasPathOrAlgorithm( name, false, false ) ) { // The path itself pathNames_.push_back( name ); // The corresponding usage of the trigger objects pathLastFilterAccepted_.push_back( pathLastFilterAccepted ); pathL3FilterAccepted_.push_back( pathL3FilterAccepted ); // Enable status updates } else if ( pathLastFilterAccepted || pathL3FilterAccepted ) { // Search for path unsigned index( 0 ); while ( index < pathNames_.size() ) { if ( pathNames_.at( index ) == name ) break; ++index; } // Status update if ( index < pathNames_.size() ) { pathLastFilterAccepted_.at( index ) = pathLastFilterAccepted_.at( index ) || pathLastFilterAccepted; pathL3FilterAccepted_.at( index ) = pathL3FilterAccepted_.at( index ) || pathL3FilterAccepted; } } }
bool pat::TriggerObjectStandAlone::algo | ( | const std::string & | algorithmName, |
unsigned | algoCondAccepted = 1 |
||
) | const [inline] |
Calls 'hasAlgorithmName(...)'.
Definition at line 143 of file TriggerObjectStandAlone.h.
References hasAlgorithmName().
{ return hasAlgorithmName( algorithmName, bool( algoCondAccepted ) ); };
std::vector< std::string > pat::TriggerObjectStandAlone::algorithmNames | ( | bool | algoCondAccepted = true | ) | const [inline] |
Gets all L1 algorithm names.
Definition at line 113 of file TriggerObjectStandAlone.h.
References pathsOrAlgorithms().
{ return pathsOrAlgorithms( algoCondAccepted, false ); };
virtual bool pat::TriggerObjectStandAlone::coll | ( | const std::string & | collName | ) | const [inline, virtual] |
Calls 'hasCollection(...)' (method override)
Reimplemented from pat::TriggerObject.
Definition at line 145 of file TriggerObjectStandAlone.h.
References hasCollection().
{ return hasCollection( collName ); };
bool pat::TriggerObjectStandAlone::cond | ( | const std::string & | conditionName | ) | const [inline] |
Calls 'hasConditionName(...)'.
Definition at line 139 of file TriggerObjectStandAlone.h.
References hasConditionName().
{ return hasConditionName( conditionName ); };
std::vector< std::string > pat::TriggerObjectStandAlone::conditionNames | ( | ) | const [inline] |
Gets all L1 condition names.
Definition at line 109 of file TriggerObjectStandAlone.h.
References filtersOrConditions().
{ return filtersOrConditions(); };
bool pat::TriggerObjectStandAlone::filter | ( | const std::string & | filterLabel | ) | const [inline] |
Calls 'hasFilterLabel(...)'.
Special methods for the cut string parser
Definition at line 137 of file TriggerObjectStandAlone.h.
References hasFilterLabel().
{ return hasFilterLabel( filterLabel ); };
std::vector< std::string > pat::TriggerObjectStandAlone::filterLabels | ( | ) | const [inline] |
Gets all HLT filter labels.
Definition at line 107 of file TriggerObjectStandAlone.h.
References filtersOrConditions().
{ return filtersOrConditions(); };
std::vector< std::string > pat::TriggerObjectStandAlone::filtersOrConditions | ( | ) | const [inline, private] |
Gets all HLT filter labels or L1 condition names.
Definition at line 66 of file TriggerObjectStandAlone.h.
References filterLabels_.
Referenced by conditionNames(), and filterLabels().
{ return filterLabels_; };
bool pat::TriggerObjectStandAlone::hasAlgoCondAccepted | ( | ) | const [inline] |
Definition at line 129 of file TriggerObjectStandAlone.h.
References hasLastFilter().
{ return hasLastFilter(); };
bool pat::TriggerObjectStandAlone::hasAlgorithmName | ( | const std::string & | algorithmName, |
bool | algoCondAccepted = true |
||
) | const [inline] |
Checks, if a certain L1 algorithm name is assigned.
Definition at line 123 of file TriggerObjectStandAlone.h.
References hasPathOrAlgorithm().
Referenced by algo().
{ return hasPathOrAlgorithm( algorithmName, algoCondAccepted, false ); };
bool TriggerObjectStandAlone::hasAnyName | ( | const std::string & | name, |
const std::vector< std::string > & | nameVec | ||
) | const [private] |
Private methods.
Checks a string vector for occurence of a certain string, incl. wild-card mechanism
Definition at line 90 of file TriggerObjectStandAlone.cc.
References split, AlCaHLTBitMon_QueryRunRegistry::string, and wildcard_.
Referenced by hasCollection(), hasFilterOrCondition(), and hasPathOrAlgorithm().
{ // Special cases first // Always false for empty vector to check if ( nameVec.empty() ) return false; // Always true for general wild-card(s) if ( name.find_first_not_of( wildcard_ ) == std::string::npos ) return true; // Split name to evaluate in parts, seperated by wild-cards std::vector< std::string > namePartsVec; boost::split( namePartsVec, name, boost::is_any_of( std::string( 1, wildcard_ ) ), boost::token_compress_on ); // Iterate over vector of names to search for ( std::vector< std::string >::const_iterator iVec = nameVec.begin(); iVec != nameVec.end(); ++iVec ) { // Not failed yet bool failed( false ); // Start searching at the first character size_type index( 0 ); // Iterate over evaluation name parts for ( std::vector< std::string >::const_iterator iName = namePartsVec.begin(); iName != namePartsVec.end(); ++iName ) { // Empty parts due to // - wild-card at beginning/end or // - multiple wild-cards (should be supressed by 'boost::token_compress_on') if ( iName->length() == 0 ) continue; // Search from current index and // set index to found occurence index = iVec->find( *iName, index ); // Failed and exit loop, if // - part not found // - part at beginning not found there if ( index == std::string::npos || ( iName == namePartsVec.begin() && index > 0 ) ) { failed = true; break; } // Increase index by length of found part index += iName->length(); } // Failed, if end of name not reached if ( index < iVec->length() && namePartsVec.back().length() != 0 ) failed = true; // Match found! if ( ! failed ) return true; } // No match found! return false; }
virtual bool pat::TriggerObjectStandAlone::hasCollection | ( | const edm::InputTag & | collName | ) | const [inline, virtual] |
Reimplemented from pat::TriggerObject.
Definition at line 126 of file TriggerObjectStandAlone.h.
References edm::InputTag::encode(), and hasCollection().
Referenced by hasCollection().
{ return hasCollection( collName.encode() ); };
bool TriggerObjectStandAlone::hasCollection | ( | const std::string & | collName | ) | const [virtual] |
Checks, if a certain label of original collection is assigned (method overrides)
Reimplemented from pat::TriggerObject.
Definition at line 228 of file TriggerObjectStandAlone.cc.
References pat::TriggerObject::collection(), hasAnyName(), edm::InputTag::instance(), edm::InputTag::label(), edm::InputTag::process(), and wildcard_.
Referenced by coll(), and pat::PATTriggerProducer::produce().
{ // Move to wild-card parser, if needed only if ( collName.find( wildcard_ ) != std::string::npos ) { // True, if collection name is simply fine if ( hasAnyName( collName, std::vector< std::string >( 1, collection() ) ) ) return true; // Check, if collection name possibly fits in an edm::InputTag approach const edm::InputTag collectionTag( collection() ); const edm::InputTag collTag( collName ); // If evaluated collection tag contains a process name, it must have been found already by identity check if ( collTag.process().empty() ) { // Check instance ... if ( ( collTag.instance().empty() && collectionTag.instance().empty() ) || hasAnyName( collTag.instance(), std::vector< std::string >( 1, collectionTag.instance() ) ) ) { // ... and label return hasAnyName( collTag.label(), std::vector< std::string >( 1, collectionTag.label() ) ); } } return false; } // Use parent class's method otherwise return TriggerObject::hasCollection( collName ); }
bool pat::TriggerObjectStandAlone::hasConditionName | ( | const std::string & | conditionName | ) | const [inline] |
Checks, if a certain L1 condition name is assigned.
Definition at line 119 of file TriggerObjectStandAlone.h.
References hasFilterOrCondition().
Referenced by cond().
{ return hasFilterOrCondition( conditionName ); };
bool pat::TriggerObjectStandAlone::hasFilterLabel | ( | const std::string & | filterLabel | ) | const [inline] |
Checks, if a certain HLT filter label is assigned.
Definition at line 117 of file TriggerObjectStandAlone.h.
References hasFilterOrCondition().
Referenced by filter().
{ return hasFilterOrCondition( filterLabel ); };
bool TriggerObjectStandAlone::hasFilterOrCondition | ( | const std::string & | name | ) | const [private] |
Checks, if a certain HLT filter label or L1 condition name is assigned.
Definition at line 182 of file TriggerObjectStandAlone.cc.
References filterLabels_, spr::find(), hasAnyName(), mergeVDriftHistosByStation::name, and wildcard_.
Referenced by addFilterOrCondition(), hasConditionName(), and hasFilterLabel().
{ // Move to wild-card parser, if needed if ( name.find( wildcard_ ) != std::string::npos ) return hasAnyName( name, filterLabels_ ); // Return, if filter label is assigned return ( std::find( filterLabels_.begin(), filterLabels_.end(), name ) != filterLabels_.end() ); }
bool pat::TriggerObjectStandAlone::hasL3Filter | ( | ) | const [inline, private] |
Definition at line 75 of file TriggerObjectStandAlone.h.
References pathL3FilterAccepted_, and pathNames_.
Referenced by hasPathL3FilterAccepted(), hasPathOrAlgorithm(), and pathsOrAlgorithms().
{ return ( pathL3FilterAccepted_.size() > 0 && pathL3FilterAccepted_.size() == pathNames_.size() ); };
bool pat::TriggerObjectStandAlone::hasLastFilter | ( | ) | const [inline, private] |
Check, if the usage indicator vectors have been filled.
Definition at line 74 of file TriggerObjectStandAlone.h.
References pathLastFilterAccepted_, and pathNames_.
Referenced by hasAlgoCondAccepted(), hasPathLastFilterAccepted(), hasPathOrAlgorithm(), and pathsOrAlgorithms().
{ return ( pathLastFilterAccepted_.size() > 0 && pathLastFilterAccepted_.size() == pathNames_.size() ); };
bool pat::TriggerObjectStandAlone::hasPathL3FilterAccepted | ( | ) | const [inline] |
Definition at line 130 of file TriggerObjectStandAlone.h.
References hasL3Filter().
{ return hasL3Filter(); };
bool pat::TriggerObjectStandAlone::hasPathLastFilterAccepted | ( | ) | const [inline] |
Checks, if the usage indicator vector has been filled.
Definition at line 128 of file TriggerObjectStandAlone.h.
References hasLastFilter().
{ return hasLastFilter(); };
bool pat::TriggerObjectStandAlone::hasPathName | ( | const std::string & | pathName, |
bool | pathLastFilterAccepted = false , |
||
bool | pathL3FilterAccepted = true |
||
) | const [inline] |
Checks, if a certain HLT path name is assigned.
Definition at line 121 of file TriggerObjectStandAlone.h.
References hasPathOrAlgorithm().
Referenced by path().
{ return hasPathOrAlgorithm( pathName, pathLastFilterAccepted, pathL3FilterAccepted ); };
bool TriggerObjectStandAlone::hasPathOrAlgorithm | ( | const std::string & | name, |
bool | pathLastFilterAccepted, | ||
bool | pathL3FilterAccepted | ||
) | const [private] |
Checks, if a certain HLT path or L1 algorithm name is assigned.
Definition at line 192 of file TriggerObjectStandAlone.cc.
References spr::find(), hasAnyName(), hasL3Filter(), hasLastFilter(), match(), mergeVDriftHistosByStation::name, pathL3FilterAccepted_, pathLastFilterAccepted_, pathNames_, pathsOrAlgorithms(), and wildcard_.
Referenced by addPathOrAlgorithm(), hasAlgorithmName(), and hasPathName().
{ // Move to wild-card parser, if needed if ( name.find( wildcard_ ) != std::string::npos ) return hasAnyName( name, pathsOrAlgorithms( pathLastFilterAccepted, pathL3FilterAccepted ) ); // Deal with older PAT-tuples, where trigger object usage is not available if ( ! hasLastFilter() ) pathLastFilterAccepted = false; if ( ! hasL3Filter() ) pathL3FilterAccepted = false; // Check, if path name is assigned at all std::vector< std::string >::const_iterator match( std::find( pathNames_.begin(), pathNames_.end(), name ) ); // False, if path name not assigned if ( match == pathNames_.end() ) return false; if ( ! pathLastFilterAccepted && ! pathL3FilterAccepted ) return true; bool foundLastFilter( pathLastFilterAccepted ? pathLastFilterAccepted_.at( match - pathNames_.begin() ) : true ); bool foundL3Filter( pathL3FilterAccepted ? pathL3FilterAccepted_.at( match - pathNames_.begin() ) : true ); // Return for assigned path name, if trigger object usage meets requirement return ( foundLastFilter && foundL3Filter ); }
bool pat::TriggerObjectStandAlone::path | ( | const std::string & | pathName, |
unsigned | pathLastFilterAccepted = 0 , |
||
unsigned | pathL3FilterAccepted = 1 |
||
) | const [inline] |
Calls 'hasPathName(...)'.
Definition at line 141 of file TriggerObjectStandAlone.h.
References hasPathName().
{ return hasPathName( pathName, bool( pathLastFilterAccepted ), bool( pathL3FilterAccepted ) ); };
std::vector< std::string > pat::TriggerObjectStandAlone::pathNames | ( | bool | pathLastFilterAccepted = false , |
bool | pathL3FilterAccepted = true |
||
) | const [inline] |
Gets all HLT path names.
Definition at line 111 of file TriggerObjectStandAlone.h.
References pathsOrAlgorithms().
{ return pathsOrAlgorithms( pathLastFilterAccepted, pathL3FilterAccepted ); };
std::vector< std::string > TriggerObjectStandAlone::pathsOrAlgorithms | ( | bool | pathLastFilterAccepted, |
bool | pathL3FilterAccepted | ||
) | const [private] |
Gets all HLT path or L1 algorithm names.
Definition at line 163 of file TriggerObjectStandAlone.cc.
References hasL3Filter(), hasLastFilter(), pathL3FilterAccepted_, pathLastFilterAccepted_, pathNames_, and EgammaValidation_cff::paths.
Referenced by algorithmNames(), hasPathOrAlgorithm(), and pathNames().
{ // Deal with older PAT-tuples, where trigger object usage is not available if ( ! hasLastFilter() ) pathLastFilterAccepted = false; if ( ! hasL3Filter() ) pathL3FilterAccepted = false; // All path names, if usage not restricted (not required or not available) if ( ! pathLastFilterAccepted && ! pathL3FilterAccepted ) return pathNames_; // Temp vector of path names std::vector< std::string > paths; // Loop over usage vector and fill corresponding paths into temp vector for ( unsigned iPath = 0; iPath < pathNames_.size(); ++iPath ) { if ( ( ! pathLastFilterAccepted || pathLastFilterAccepted_.at( iPath ) ) && ( ! pathL3FilterAccepted || pathL3FilterAccepted_.at( iPath ) ) ) paths.push_back( pathNames_.at( iPath ) ); // order matters in order to protect from empty vectors in old data } // Return temp vector return paths; }
TriggerObject TriggerObjectStandAlone::triggerObject | ( | ) |
Gets the pat::TriggerObject (parent class)
Definition at line 215 of file TriggerObjectStandAlone.cc.
References pat::TriggerObject::addTriggerObjectType(), asciidump::at, pat::TriggerObject::collection(), i, reco::LeafCandidate::p4(), reco::LeafCandidate::pdgId(), pat::TriggerObject::setCollection(), and pat::TriggerObject::triggerObjectTypes().
{ // Create a TriggerObjects TriggerObject theObj( p4(), pdgId() ); // Set its collection and trigger objects types (no c'tor for that) theObj.setCollection( collection() ); for ( size_t i = 0; i < triggerObjectTypes().size(); ++i ) theObj.addTriggerObjectType( triggerObjectTypes().at( i ) ); // Return TriggerObject return theObj; }
std::vector< std::string > pat::TriggerObjectStandAlone::filterLabels_ [private] |
Vector of labels of all HLT filters or names od L1 conditions the trigger objects has been used in.
Data Members Keeping the old names of the data members for backward compatibility, although they refer only to HLT objects.
Definition at line 39 of file TriggerObjectStandAlone.h.
Referenced by addFilterOrCondition(), filtersOrConditions(), hasFilterOrCondition(), and TriggerObjectStandAlone().
std::vector< bool > pat::TriggerObjectStandAlone::pathL3FilterAccepted_ [private] |
Vector alligned with 'pathNames_' of boolean indicating the usage of the trigger object An element is true, if the corresponding path succeeded and the trigger object was used in an L3 filter (HLT only) The vector is empty for data (size 0), if the according information is not available.
Definition at line 50 of file TriggerObjectStandAlone.h.
Referenced by addPathOrAlgorithm(), hasL3Filter(), hasPathOrAlgorithm(), pathsOrAlgorithms(), and TriggerObjectStandAlone().
std::vector< bool > pat::TriggerObjectStandAlone::pathLastFilterAccepted_ [private] |
Vector alligned with 'pathNames_' of boolean indicating the usage of the trigger object An element is true, if the corresponding path succeeded and the trigger object was used in the last filter (HLT) or the corresponding algorithm succeeded as well as the corresponding condition (L1). The vector is empty for data (size 0), if the according information is not available.
Definition at line 46 of file TriggerObjectStandAlone.h.
Referenced by addPathOrAlgorithm(), hasLastFilter(), hasPathOrAlgorithm(), pathsOrAlgorithms(), and TriggerObjectStandAlone().
std::vector< std::string > pat::TriggerObjectStandAlone::pathNames_ [private] |
Vector of names of all HLT paths or L1 algorithms the trigger objects has been used in.
Definition at line 41 of file TriggerObjectStandAlone.h.
Referenced by addPathOrAlgorithm(), hasL3Filter(), hasLastFilter(), hasPathOrAlgorithm(), pathsOrAlgorithms(), and TriggerObjectStandAlone().
const char TriggerObjectStandAlone::wildcard_ = '*' [static, private] |
Constants.
Constant defining the wild-card used in 'hasAnyName()'
Definition at line 55 of file TriggerObjectStandAlone.h.
Referenced by hasAnyName(), hasCollection(), hasFilterOrCondition(), and hasPathOrAlgorithm().