#include <TriggerHelper.h>
Public Member Functions | |
reco::CandidateBaseRefVector | triggerMatchCandidates (const pat::TriggerObjectRef &objectRef, const TriggerObjectMatch *matchResult, const edm::Event &event, const TriggerEvent &triggerEvent) const |
reco::CandidateBaseRefVector | triggerMatchCandidates (const pat::TriggerObjectRef &objectRef, const std::string &labelMatcher, const edm::Event &event, const TriggerEvent &triggerEvent) const |
... by matcher module label | |
reco::CandidateBaseRefVector | triggerMatchCandidates (const edm::Handle< TriggerObjectCollection > &trigCollHandle, const size_t iTrig, const TriggerObjectMatch *matchResult, const edm::Event &event, const TriggerEvent &triggerEvent) const |
reco::CandidateBaseRefVector | triggerMatchCandidates (const edm::Handle< TriggerObjectCollection > &trigCollHandle, const size_t iTrig, const std::string &labelMatcher, const edm::Event &event, const TriggerEvent &triggerEvent) const |
... by matcher module label | |
TriggerMatchHelper () | |
Constructors and Destructor. | |
TriggerObjectRef | triggerMatchObject (const reco::CandidateBaseRef &candRef, const std::string &labelMatcher, const edm::Event &event, const TriggerEvent &triggerEvent) const |
... by matcher module label | |
template<class C > | |
TriggerObjectRef | triggerMatchObject (const edm::Handle< C > &candCollHandle, const size_t iCand, const std::string &labelMatcher, const edm::Event &event, const TriggerEvent &triggerEvent) const |
... by matcher module label | |
TriggerObjectRef | triggerMatchObject (const reco::CandidateBaseRef &candRef, const TriggerObjectMatch *matchResult, const edm::Event &event, const TriggerEvent &triggerEvent) const |
Methods. | |
template<class C > | |
TriggerObjectRef | triggerMatchObject (const edm::Handle< C > &candCollHandle, const size_t iCand, const TriggerObjectMatch *matchResult, const edm::Event &event, const TriggerEvent &triggerEvent) const |
template<class C > | |
TriggerObjectMatchMap | triggerMatchObjects (const edm::Handle< C > &candCollHandle, const size_t iCand, const edm::Event &event, const TriggerEvent &triggerEvent) const |
Get a table of references to all trigger objects matched to a certain physics object given by a collection and index. | |
TriggerObjectMatchMap | triggerMatchObjects (const reco::CandidateBaseRef &candRef, const edm::Event &event, const TriggerEvent &triggerEvent) const |
Get a table of references to all trigger objects matched to a certain physics object given by a reference. | |
~TriggerMatchHelper () | |
Destructor. |
Definition at line 36 of file TriggerHelper.h.
pat::helper::TriggerMatchHelper::TriggerMatchHelper | ( | ) | [inline] |
pat::helper::TriggerMatchHelper::~TriggerMatchHelper | ( | ) | [inline] |
reco::CandidateBaseRefVector TriggerMatchHelper::triggerMatchCandidates | ( | const pat::TriggerObjectRef & | objectRef, |
const TriggerObjectMatch * | matchResult, | ||
const edm::Event & | event, | ||
const TriggerEvent & | triggerEvent | ||
) | const |
Get a vector of references to the phyics objects matched to a certain trigger object given by a reference for a certain matcher module ... by resulting association
Definition at line 60 of file TriggerHelper.cc.
References edm::RefToBaseVector< T >::push_back().
{ reco::CandidateBaseRefVector theCands; if ( matchResult ) { edm::AssociativeIterator< reco::CandidateBaseRef, TriggerObjectMatch > it( *matchResult, edm::EdmEventItemGetter< reco::CandidateBaseRef >( event ) ), itEnd( it.end() ); while ( it != itEnd ) { if ( it->first.isNonnull() && it->second.isNonnull() && it->second.isAvailable() ) { if ( it->second == objectRef ) { theCands.push_back( it->first ); } } ++it; } } return theCands; }
reco::CandidateBaseRefVector TriggerMatchHelper::triggerMatchCandidates | ( | const pat::TriggerObjectRef & | objectRef, |
const std::string & | labelMatcher, | ||
const edm::Event & | event, | ||
const TriggerEvent & | triggerEvent | ||
) | const |
... by matcher module label
Definition at line 78 of file TriggerHelper.cc.
References event(), and pat::TriggerEvent::triggerObjectMatchResult().
{ return triggerMatchCandidates( objectRef, triggerEvent.triggerObjectMatchResult( labelMatcher ), event, triggerEvent ); }
reco::CandidateBaseRefVector TriggerMatchHelper::triggerMatchCandidates | ( | const edm::Handle< TriggerObjectCollection > & | trigCollHandle, |
const size_t | iTrig, | ||
const TriggerObjectMatch * | matchResult, | ||
const edm::Event & | event, | ||
const TriggerEvent & | triggerEvent | ||
) | const |
Get a vector of references to the phyics objects matched to a certain trigger object given by a collection and index for a certain matcher module ... by resulting association
Definition at line 87 of file TriggerHelper.cc.
{ return triggerMatchCandidates( TriggerObjectRef( trigCollHandle, iTrig ), matchResult, event, triggerEvent ); }
reco::CandidateBaseRefVector TriggerMatchHelper::triggerMatchCandidates | ( | const edm::Handle< TriggerObjectCollection > & | trigCollHandle, |
const size_t | iTrig, | ||
const std::string & | labelMatcher, | ||
const edm::Event & | event, | ||
const TriggerEvent & | triggerEvent | ||
) | const |
... by matcher module label
Definition at line 93 of file TriggerHelper.cc.
References event(), and pat::TriggerEvent::triggerObjectMatchResult().
{ return triggerMatchCandidates( TriggerObjectRef( trigCollHandle, iTrig ), triggerEvent.triggerObjectMatchResult( labelMatcher ), event, triggerEvent ); }
TriggerObjectRef pat::helper::TriggerMatchHelper::triggerMatchObject | ( | const edm::Handle< C > & | candCollHandle, |
const size_t | iCand, | ||
const TriggerObjectMatch * | matchResult, | ||
const edm::Event & | event, | ||
const TriggerEvent & | triggerEvent | ||
) | const |
Get a reference to the trigger objects matched to a certain physics object given by a collection and index for a certain matcher module ... by resulting association
Definition at line 80 of file TriggerHelper.h.
References triggerMatchObject().
{ const reco::CandidateBaseRef candRef( edm::Ref< C >( candCollHandle, iCand ) ); return triggerMatchObject( candRef, matchResult, event, triggerEvent ); }
TriggerObjectRef pat::helper::TriggerMatchHelper::triggerMatchObject | ( | const edm::Handle< C > & | candCollHandle, |
const size_t | iCand, | ||
const std::string & | labelMatcher, | ||
const edm::Event & | event, | ||
const TriggerEvent & | triggerEvent | ||
) | const |
... by matcher module label
Definition at line 85 of file TriggerHelper.h.
References event(), triggerMatchObject(), and pat::TriggerEvent::triggerObjectMatchResult().
{ return triggerMatchObject( candCollHandle, iCand, triggerEvent.triggerObjectMatchResult( labelMatcher ), event, triggerEvent ); }
TriggerObjectRef TriggerMatchHelper::triggerMatchObject | ( | const reco::CandidateBaseRef & | candRef, |
const std::string & | labelMatcher, | ||
const edm::Event & | event, | ||
const TriggerEvent & | triggerEvent | ||
) | const |
... by matcher module label
Definition at line 39 of file TriggerHelper.cc.
References event(), and pat::TriggerEvent::triggerObjectMatchResult().
{ return triggerMatchObject( candRef, triggerEvent.triggerObjectMatchResult( labelMatcher ), event, triggerEvent ); }
TriggerObjectRef TriggerMatchHelper::triggerMatchObject | ( | const reco::CandidateBaseRef & | candRef, |
const TriggerObjectMatch * | matchResult, | ||
const edm::Event & | event, | ||
const TriggerEvent & | triggerEvent | ||
) | const |
Methods.
Get a reference to the trigger objects matched to a certain physics object given by a reference for a certain matcher module ... by resulting association
Definition at line 22 of file TriggerHelper.cc.
References edm::RefToBase< T >::id(), and edm::RefToBase< T >::key().
Referenced by PatTriggerTagAndProbe::analyze(), and triggerMatchObject().
{ if ( matchResult ) { edm::AssociativeIterator< reco::CandidateBaseRef, TriggerObjectMatch > it( *matchResult, edm::EdmEventItemGetter< reco::CandidateBaseRef >( event ) ), itEnd( it.end() ); while ( it != itEnd ) { if ( it->first.isNonnull() && it->second.isNonnull() && it->second.isAvailable() ) { if ( it->first.id() == candRef.id() && it->first.key() == candRef.key() ) { return TriggerObjectRef( it->second ); } } ++it; } } return TriggerObjectRef(); }
TriggerObjectMatchMap TriggerMatchHelper::triggerMatchObjects | ( | const reco::CandidateBaseRef & | candRef, |
const edm::Event & | event, | ||
const TriggerEvent & | triggerEvent | ||
) | const |
Get a table of references to all trigger objects matched to a certain physics object given by a reference.
Definition at line 46 of file TriggerHelper.cc.
References event(), and pat::TriggerEvent::triggerMatchers().
Referenced by triggerMatchObjects().
{ TriggerObjectMatchMap theContainer; const std::vector< std::string > matchers( triggerEvent.triggerMatchers() ); for ( size_t iMatch = 0; iMatch < matchers.size(); ++iMatch ) { theContainer[ matchers.at( iMatch ) ] = triggerMatchObject( candRef, matchers.at( iMatch ), event, triggerEvent ); } return theContainer; }
TriggerObjectMatchMap pat::helper::TriggerMatchHelper::triggerMatchObjects | ( | const edm::Handle< C > & | candCollHandle, |
const size_t | iCand, | ||
const edm::Event & | event, | ||
const TriggerEvent & | triggerEvent | ||
) | const |
Get a table of references to all trigger objects matched to a certain physics object given by a collection and index.
Definition at line 91 of file TriggerHelper.h.
References triggerMatchObjects().
{ const reco::CandidateBaseRef candRef( edm::Ref< C >( candCollHandle, iCand ) ); return triggerMatchObjects( candRef, event, triggerEvent ); }