Public Types | |
typedef std::vector< TauType > | TauCollection |
typedef edm::Ref< TauCollection > | TauRef |
Public Member Functions | |
void | beginEvent (const edm::Event &, const edm::EventSetup &) |
double | discriminate (const TauRef &) |
TauDiscriminationAgainstMuon (const edm::ParameterSet &) | |
~TauDiscriminationAgainstMuon () | |
Private Types | |
enum | { kNoSegMatch, kTwoDCut, kMerePresence, kCombined } |
Private Member Functions | |
bool | evaluateMuonVeto (const reco::Muon &) |
Private Attributes | |
double | coeffCaloComp_ |
double | coeffSegmComp_ |
int | discriminatorOption_ |
double | dRmatch_ |
double | muonCompCut_ |
edm::Handle< reco::MuonCollection > | muons_ |
edm::InputTag | muonSource_ |
Definition at line 24 of file TauDiscriminationAgainstMuon.cc.
typedef std::vector<TauType> TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::TauCollection |
Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.
Definition at line 28 of file TauDiscriminationAgainstMuon.cc.
typedef edm::Ref<TauCollection> TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::TauRef |
Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.
Definition at line 29 of file TauDiscriminationAgainstMuon.cc.
anonymous enum [private] |
Definition at line 46 of file TauDiscriminationAgainstMuon.cc.
{ kNoSegMatch, kTwoDCut, kMerePresence, kCombined };
TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstMuon | ( | const edm::ParameterSet & | cfg | ) | [explicit] |
Definition at line 55 of file TauDiscriminationAgainstMuon.cc.
References TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::coeffCaloComp_, TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::coeffSegmComp_, TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::discriminatorOption_, TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::dRmatch_, Exception, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::kCombined, TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::kMerePresence, TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::kNoSegMatch, TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::kTwoDCut, TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::muonCompCut_, TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::muonSource_, AlCaHLTBitMon_QueryRunRegistry::string, and edm::errors::UnimplementedFeature.
: TauDiscriminationProducerBase<TauType, TauDiscriminator>(cfg) { //if ( cfg.exists("muonSource") ) muonSource_ = cfg.getParameter<edm::InputTag>("muonSource"); muonSource_ = cfg.getParameter<edm::InputTag>("muonSource"); dRmatch_ = ( cfg.exists("dRmatch") ) ? cfg.getParameter<double>("dRmatch") : 0.5; std::string discriminatorOption_string = cfg.getParameter<std::string>("discriminatorOption"); if ( discriminatorOption_string == "noSegMatch" ) discriminatorOption_ = kNoSegMatch; else if ( discriminatorOption_string == "twoDCut" ) discriminatorOption_ = kTwoDCut; else if ( discriminatorOption_string == "merePresence" ) discriminatorOption_ = kMerePresence; else if ( discriminatorOption_string == "combined" ) discriminatorOption_ = kCombined; else { throw edm::Exception(edm::errors::UnimplementedFeature) << " Invalid Discriminator Option! Please check cfi file \n"; } coeffCaloComp_ = cfg.getParameter<double>("caloCompCoefficient"); coeffSegmComp_ = cfg.getParameter<double>("segmCompCoefficient"); muonCompCut_ = cfg.getParameter<double>("muonCompCut"); }
TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::~TauDiscriminationAgainstMuon | ( | ) | [inline] |
Definition at line 32 of file TauDiscriminationAgainstMuon.cc.
{}
void TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::beginEvent | ( | const edm::Event & | evt, |
const edm::EventSetup & | evtSetup | ||
) | [virtual] |
Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.
Definition at line 77 of file TauDiscriminationAgainstMuon.cc.
References edm::Event::getByLabel().
{ evt.getByLabel(muonSource_, muons_); }
double TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::discriminate | ( | const TauRef & | tau | ) | [virtual] |
Implements TauDiscriminationProducerBase< TauType, TauDiscriminator >.
Definition at line 111 of file TauDiscriminationAgainstMuon.cc.
References reco::deltaR(), and metsig::muon.
bool TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::evaluateMuonVeto | ( | const reco::Muon & | muon | ) | [private] |
Definition at line 83 of file TauDiscriminationAgainstMuon.cc.
References reco::Muon::caloCompatibility(), reco::LeafCandidate::eta(), reco::Muon::isCaloMuon(), reco::Muon::isGlobalMuon(), reco::Muon::isTrackerMuon(), reco::Muon::numberOfMatches(), reco::LeafCandidate::phi(), and muon::segmentCompatibility().
{ bool decision = true; if ( discriminatorOption_ == kNoSegMatch ) { if ( muon.numberOfMatches() > 0 ) decision = false; } else if ( discriminatorOption_ == kTwoDCut ) { double segmComp = muon::segmentCompatibility(muon); double caloComp = muon.caloCompatibility(); if ( (coeffCaloComp_*segmComp + coeffSegmComp_*caloComp) > muonCompCut_ ) decision = false; } else if ( discriminatorOption_ == kMerePresence ) { decision = false; } else if ( discriminatorOption_ == kCombined ) { // testing purpose only unsigned int muonType = 0; if ( muon.isGlobalMuon() ) muonType = 1; else if ( muon.isCaloMuon() ) muonType = 2; else if ( muon.isTrackerMuon() ) muonType = 3; bool eta_veto = ( fabs(muon.eta()) > 2.3 || (fabs(muon.eta()) > 1.4 && fabs(muon.eta()) < 1.6) ) ? true : false; bool phi_veto = ( muon.phi() < 0.1 && muon.phi() > -0.1 ) ? true : false; if ( muonType != 1 || muon.numberOfMatches() > 0 || eta_veto || phi_veto ) decision = false; } return decision; }
double TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::coeffCaloComp_ [private] |
Definition at line 49 of file TauDiscriminationAgainstMuon.cc.
Referenced by TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstMuon().
double TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::coeffSegmComp_ [private] |
Definition at line 50 of file TauDiscriminationAgainstMuon.cc.
Referenced by TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstMuon().
int TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::discriminatorOption_ [private] |
Definition at line 47 of file TauDiscriminationAgainstMuon.cc.
Referenced by TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstMuon().
double TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::dRmatch_ [private] |
Definition at line 44 of file TauDiscriminationAgainstMuon.cc.
Referenced by TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstMuon().
double TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::muonCompCut_ [private] |
Definition at line 51 of file TauDiscriminationAgainstMuon.cc.
Referenced by TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstMuon().
edm::Handle<reco::MuonCollection> TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::muons_ [private] |
Definition at line 43 of file TauDiscriminationAgainstMuon.cc.
edm::InputTag TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::muonSource_ [private] |
Definition at line 42 of file TauDiscriminationAgainstMuon.cc.
Referenced by TauDiscriminationAgainstMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstMuon().