#include <PhysicsTools/PatAlgos/plugins/PATTriggerMatchSelector.h>
Public Member Functions | |
bool | operator() (const T1 &patObj, const T2 &trigObj) const |
PATTriggerMatchSelector (const edm::ParameterSet &iConfig) | |
Private Attributes | |
bool | andOr_ |
std::vector< std::string > | collectionTags_ |
std::vector< unsigned > | filterIds_ |
std::vector< std::string > | filterIdsEnum_ |
std::vector< std::string > | filterLabels_ |
std::vector< std::string > | pathNames_ |
Definition at line 39 of file PATTriggerMatchSelector.h.
pat::PATTriggerMatchSelector< T1, T2 >::PATTriggerMatchSelector | ( | const edm::ParameterSet & | iConfig | ) | [inline] |
Definition at line 50 of file PATTriggerMatchSelector.h.
00050 : 00051 andOr_( iConfig.getParameter< bool >( "andOr" ) ), 00052 filterIds_( iConfig.getParameter< std::vector< unsigned > >( "filterIds" ) ), 00053 filterIdsEnum_( iConfig.getParameter< std::vector< std::string > >( "filterIdsEnum" ) ), 00054 filterLabels_( iConfig.getParameter< std::vector< std::string > >( "filterLabels" ) ), 00055 pathNames_( iConfig.getParameter< std::vector< std::string > >( "pathNames" ) ), 00056 collectionTags_( iConfig.getParameter< std::vector< std::string > >( "collectionTags" ) ) 00057 { 00058 }
bool pat::PATTriggerMatchSelector< T1, T2 >::operator() | ( | const T1 & | patObj, | |
const T2 & | trigObj | |||
) | const [inline] |
Definition at line 60 of file PATTriggerMatchSelector.h.
References pat::PATTriggerMatchSelector< T1, T2 >::andOr_, pat::PATTriggerMatchSelector< T1, T2 >::collectionTags_, pat::PATTriggerMatchSelector< T1, T2 >::filterIds_, pat::PATTriggerMatchSelector< T1, T2 >::filterIdsEnum_, pat::PATTriggerMatchSelector< T1, T2 >::filterLabels_, i, iter, j, k, edm::es::l(), m, pat::PATTriggerMatchSelector< T1, T2 >::pathNames_, trigger::TriggerBJet, trigger::TriggerCluster, trigger::TriggerElectron, trigger::TriggerELongit, trigger::TriggerHT, trigger::TriggerJet, trigger::TriggerL1CenJet, trigger::TriggerL1ETM, trigger::TriggerL1ETT, trigger::TriggerL1ForJet, trigger::TriggerL1HTT, trigger::TriggerL1IsoEG, trigger::TriggerL1JetCounts, trigger::TriggerL1Mu, trigger::TriggerL1NoIsoEG, trigger::TriggerL1TauJet, trigger::TriggerMET, trigger::TriggerMETSig, trigger::TriggerMuon, trigger::TriggerPhoton, trigger::TriggerTau, and trigger::TriggerTrack.
00060 { 00061 std::map< std::string, trigger::TriggerObjectType > filterIdsEnumMap; 00062 filterIdsEnumMap.insert( std::make_pair( "TriggerL1Mu" , trigger::TriggerL1Mu ) ); 00063 filterIdsEnumMap.insert( std::make_pair( "TriggerL1NoIsoEG" , trigger::TriggerL1NoIsoEG ) ); 00064 filterIdsEnumMap.insert( std::make_pair( "TriggerL1IsoEG" , trigger::TriggerL1IsoEG ) ); 00065 filterIdsEnumMap.insert( std::make_pair( "TriggerL1CenJet" , trigger::TriggerL1CenJet ) ); 00066 filterIdsEnumMap.insert( std::make_pair( "TriggerL1ForJet" , trigger::TriggerL1ForJet ) ); 00067 filterIdsEnumMap.insert( std::make_pair( "TriggerL1TauJet" , trigger::TriggerL1TauJet ) ); 00068 filterIdsEnumMap.insert( std::make_pair( "TriggerL1ETM" , trigger::TriggerL1ETM ) ); 00069 filterIdsEnumMap.insert( std::make_pair( "TriggerL1ETT" , trigger::TriggerL1ETT ) ); 00070 filterIdsEnumMap.insert( std::make_pair( "TriggerL1HTT" , trigger::TriggerL1HTT ) ); 00071 filterIdsEnumMap.insert( std::make_pair( "TriggerL1JetCounts", trigger::TriggerL1JetCounts ) ); 00072 filterIdsEnumMap.insert( std::make_pair( "TriggerPhoton" , trigger::TriggerPhoton ) ); 00073 filterIdsEnumMap.insert( std::make_pair( "TriggerElectron" , trigger::TriggerElectron ) ); 00074 filterIdsEnumMap.insert( std::make_pair( "TriggerMuon" , trigger::TriggerMuon ) ); 00075 filterIdsEnumMap.insert( std::make_pair( "TriggerTau" , trigger::TriggerTau ) ); 00076 filterIdsEnumMap.insert( std::make_pair( "TriggerJet" , trigger::TriggerJet ) ); 00077 filterIdsEnumMap.insert( std::make_pair( "TriggerBJet" , trigger::TriggerBJet ) ); 00078 filterIdsEnumMap.insert( std::make_pair( "TriggerMET" , trigger::TriggerMET ) ); 00079 filterIdsEnumMap.insert( std::make_pair( "TriggerHT" , trigger::TriggerHT ) ); 00080 filterIdsEnumMap.insert( std::make_pair( "TriggerTrack" , trigger::TriggerTrack ) ); 00081 filterIdsEnumMap.insert( std::make_pair( "TriggerCluster" , trigger::TriggerCluster ) ); 00082 filterIdsEnumMap.insert( std::make_pair( "TriggerMETSig" , trigger::TriggerMETSig ) ); 00083 filterIdsEnumMap.insert( std::make_pair( "TriggerELongit" , trigger::TriggerELongit ) ); 00084 if ( andOr_ ) { // OR 00085 for ( size_t i = 0; i < filterIds_.size(); ++i ) { 00086 if ( filterIds_.at( i ) == 0 || trigObj.hasFilterId( filterIds_.at( i ) ) ) return true; 00087 } 00088 for ( size_t j = 0; j < filterLabels_.size(); ++j ) { 00089 if ( filterLabels_.at( j ) == "*" || filterLabels_.at( j ) == "@" || trigObj.hasFilterLabel( filterLabels_.at( j ) ) ) return true; 00090 } 00091 for ( size_t k = 0; k < pathNames_.size(); ++k ) { 00092 if ( pathNames_.at( k ) == "*" || pathNames_.at( k ) == "@" || trigObj.hasPathName( pathNames_.at( k ) ) ) return true; 00093 } 00094 for ( size_t l = 0; l < collectionTags_.size(); ++l ) { 00095 if ( collectionTags_.at( l ) == "*" || collectionTags_.at( l ) == "@" || collectionTags_.at( l ) == trigObj.collection() ) return true; 00096 } 00097 for ( size_t m = 0; m < filterIdsEnum_.size(); ++m ) { 00098 if ( filterIdsEnum_.at( m ) == "*" || filterIdsEnum_.at( m ) == "@" ) return true; 00099 std::map< std::string, trigger::TriggerObjectType >::const_iterator iter( filterIdsEnumMap.find( filterIdsEnum_.at( m ) ) ); 00100 if ( iter != filterIdsEnumMap.end() && trigObj.hasFilterId( iter->second ) ) return true; 00101 } 00102 return false; 00103 } else { // AND 00104 for ( size_t i = 0; i < filterIds_.size(); ++i ) { 00105 if ( filterIds_.at( i ) == 0 || trigObj.hasFilterId( filterIds_.at( i ) ) ) { 00106 for ( size_t j = 0; j < filterLabels_.size(); ++j ) { 00107 if ( filterLabels_.at( j ) == "*" || filterLabels_.at( j ) == "@" || trigObj.hasFilterLabel( filterLabels_.at( j ) ) ) { 00108 for ( size_t k = 0; k < pathNames_.size(); ++k ) { 00109 if ( pathNames_.at( k ) == "*" || pathNames_.at( k ) == "@" || trigObj.hasPathName( pathNames_.at( k ) ) ) { 00110 for ( size_t l = 0; l < collectionTags_.size(); ++l ) { 00111 if ( collectionTags_.at( l ) == "*" || collectionTags_.at( l ) == "@" || collectionTags_.at( l ) == trigObj.collection() ) { 00112 for ( size_t m = 0; m < filterIdsEnum_.size(); ++m ) { 00113 if ( filterIdsEnum_.at( m ) == "*" || filterIdsEnum_.at( m ) == "@" ) return true; 00114 std::map< std::string, trigger::TriggerObjectType >::const_iterator iter( filterIdsEnumMap.find( filterIdsEnum_.at( m ) ) ); 00115 if ( iter != filterIdsEnumMap.end() && trigObj.hasFilterId( iter->second ) ) return true; 00116 } 00117 } 00118 } 00119 } 00120 } 00121 } 00122 } 00123 } 00124 } 00125 return false; 00126 } 00127 return false; 00128 }
bool pat::PATTriggerMatchSelector< T1, T2 >::andOr_ [private] |
Definition at line 41 of file PATTriggerMatchSelector.h.
Referenced by pat::PATTriggerMatchSelector< T1, T2 >::operator()().
std::vector< std::string > pat::PATTriggerMatchSelector< T1, T2 >::collectionTags_ [private] |
Definition at line 46 of file PATTriggerMatchSelector.h.
Referenced by pat::PATTriggerMatchSelector< T1, T2 >::operator()().
std::vector< unsigned > pat::PATTriggerMatchSelector< T1, T2 >::filterIds_ [private] |
Definition at line 42 of file PATTriggerMatchSelector.h.
Referenced by pat::PATTriggerMatchSelector< T1, T2 >::operator()().
std::vector< std::string > pat::PATTriggerMatchSelector< T1, T2 >::filterIdsEnum_ [private] |
Definition at line 43 of file PATTriggerMatchSelector.h.
Referenced by pat::PATTriggerMatchSelector< T1, T2 >::operator()().
std::vector< std::string > pat::PATTriggerMatchSelector< T1, T2 >::filterLabels_ [private] |
Definition at line 44 of file PATTriggerMatchSelector.h.
Referenced by pat::PATTriggerMatchSelector< T1, T2 >::operator()().
std::vector< std::string > pat::PATTriggerMatchSelector< T1, T2 >::pathNames_ [private] |
Definition at line 45 of file PATTriggerMatchSelector.h.
Referenced by pat::PATTriggerMatchSelector< T1, T2 >::operator()().