6 #include <boost/algorithm/string.hpp>
93 if ( nameVec.empty() )
return false;
95 if ( name.find_first_not_of(
wildcard_ ) == std::string::npos )
return true;
97 std::vector< std::string > namePartsVec;
100 for ( std::vector< std::string >::const_iterator iVec = nameVec.begin(); iVec != nameVec.end(); ++iVec ) {
102 bool failed(
false );
106 for ( std::vector< std::string >::const_iterator iName = namePartsVec.begin(); iName != namePartsVec.end(); ++iName ) {
110 if ( iName->length() == 0 )
continue;
113 index = iVec->find( *iName, index );
117 if ( index == std::string::npos || ( iName == namePartsVec.begin() && index > 0 ) ) {
122 index += iName->length();
125 if (
index < iVec->length() && namePartsVec.back().length() != 0 ) failed =
true;
127 if ( ! failed )
return true;
145 }
else if ( pathLastFilterAccepted || pathL3FilterAccepted ) {
166 if ( !
hasL3Filter() ) pathL3FilterAccepted =
false;
168 if ( ! pathLastFilterAccepted && ! pathL3FilterAccepted )
return pathNames_;
170 std::vector< std::string >
paths;
172 for (
unsigned iPath = 0; iPath <
pathNames_.size(); ++iPath ) {
197 if ( !
hasL3Filter() ) pathL3FilterAccepted =
false;
201 if ( match ==
pathNames_.end() )
return false;
202 if ( ! pathLastFilterAccepted && ! pathL3FilterAccepted )
return true;
206 return ( foundLastFilter && foundL3Filter );
230 if ( collName.find(
wildcard_ ) != std::string::npos ) {
237 if ( collTag.
process().empty() ) {
std::vector< std::string > pathsOrAlgorithms(bool pathLastFilterAccepted, bool pathL3FilterAccepted) const
Gets all HLT path or L1 algorithm names.
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
virtual bool hasCollection(const std::string &collName) const
Checks, if a certain label of original collection is assigned (method overrides)
static const char wildcard_
Constants.
virtual int pdgId() const GCC11_FINAL
PDG identifier.
std::vector< std::string > pathNames_
Vector of names of all HLT paths or L1 algorithms the trigger objects has been used in...
std::vector< std::string > filterLabels_
Vector of labels of all HLT filters or names od L1 conditions the trigger objects has been used in...
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Analysis-level trigger object class.
bool hasAnyName(const std::string &name, const std::vector< std::string > &nameVec) const
Private methods.
void addPathOrAlgorithm(const std::string &name, bool pathLastFilterAccepted, bool pathL3FilterAccepted)
Adds a new HLT path or L1 algorithm name.
Single trigger physics object (e.g., an isolated muon)
TriggerObject triggerObject()
Gets the pat::TriggerObject (parent class)
void setCollection(const std::string &collName)
Methods.
const std::string & collection() const
Get the label of the collection the trigger object originates from.
TriggerObjectStandAlone()
Constructors and Destructor.
virtual bool hasCollection(const std::string &collName) const
Checks, if a certain label of original collection is assigned.
bool hasLastFilter() const
Check, if the usage indicator vectors have been filled.
unsigned int index
index type
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< bool > pathL3FilterAccepted_
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
std::vector< int > triggerObjectTypes() const
Get all trigger object type identifiers.
bool hasFilterOrCondition(const std::string &name) const
Checks, if a certain HLT filter label or L1 condition name is assigned.
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
void addTriggerObjectType(trigger::TriggerObjectType triggerObjectType)
Add a new trigger object type identifier.
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::vector< bool > pathLastFilterAccepted_