7 #include <boost/algorithm/string.hpp>
94 if ( nameVec.empty() )
return false;
96 if ( name.find_first_not_of(
wildcard_ ) == std::string::npos )
return true;
98 std::vector< std::string > namePartsVec;
99 boost::split( namePartsVec, name, boost::is_any_of( std::string( 1,
wildcard_ ) ), boost::token_compress_on );
101 for ( std::vector< std::string >::const_iterator iVec = nameVec.begin(); iVec != nameVec.end(); ++iVec ) {
103 bool failed(
false );
107 for ( std::vector< std::string >::const_iterator iName = namePartsVec.begin(); iName != namePartsVec.end(); ++iName ) {
111 if ( iName->length() == 0 )
continue;
114 index = iVec->find( *iName, index );
118 if ( index == std::string::npos || ( iName == namePartsVec.begin() && index > 0 ) ) {
123 index += iName->length();
126 if (
index < iVec->length() && namePartsVec.back().length() != 0 ) failed =
true;
128 if ( ! failed )
return true;
146 }
else if ( pathLastFilterAccepted || pathL3FilterAccepted ) {
167 if ( !
hasL3Filter() ) pathL3FilterAccepted =
false;
169 if ( ! pathLastFilterAccepted && ! pathL3FilterAccepted )
return pathNames_;
171 std::vector< std::string >
paths;
173 for (
unsigned iPath = 0; iPath <
pathNames_.size(); ++iPath ) {
198 if ( !
hasL3Filter() ) pathL3FilterAccepted =
false;
202 if ( match ==
pathNames_.end() )
return false;
203 if ( ! pathLastFilterAccepted && ! pathL3FilterAccepted )
return true;
207 return ( foundLastFilter && foundL3Filter );
231 if ( collName.find(
wildcard_ ) != std::string::npos ) {
238 if ( collTag.
process().empty() ) {
virtual int pdgId() const
PDG identifier.
std::vector< std::string > pathsOrAlgorithms(bool pathLastFilterAccepted, bool pathL3FilterAccepted) const
Gets all HLT path or L1 algorithm names.
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.
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.
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::vector< bool > pathLastFilterAccepted_