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 &) |
TauDiscriminationAgainstCaloMuon (const edm::ParameterSet &) | |
~TauDiscriminationAgainstCaloMuon () | |
Private Attributes | |
const CaloGeometry * | caloGeometry_ |
double | drEcal_ |
double | drHcal_ |
edm::Handle< EcalRecHitCollection > | ebRecHits_ |
edm::Handle< EcalRecHitCollection > | eeRecHits_ |
GlobalPoint | eventVertexPosition_ |
edm::Handle< HBHERecHitCollection > | hbheRecHits_ |
TauLeadTrackExtractor< TauType > | leadTrackExtractor_ |
double | maxEnEcal_ |
double | maxEnHcal_ |
double | maxEnToTrackRatio_ |
double | minLeadTrackPt_ |
double | minLeadTrackPtFraction_ |
edm::InputTag | srcEcalRecHitsBarrel_ |
edm::InputTag | srcEcalRecHitsEndcap_ |
edm::InputTag | srcHcalRecHits_ |
edm::InputTag | srcVertex_ |
const TransientTrackBuilder * | trackBuilder_ |
Definition at line 88 of file TauDiscriminationAgainstCaloMuon.cc.
typedef std::vector<TauType> TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::TauCollection |
Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.
Definition at line 92 of file TauDiscriminationAgainstCaloMuon.cc.
typedef edm::Ref<TauCollection> TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::TauRef |
Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.
Definition at line 93 of file TauDiscriminationAgainstCaloMuon.cc.
TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstCaloMuon | ( | const edm::ParameterSet & | cfg | ) | [explicit] |
Definition at line 132 of file TauDiscriminationAgainstCaloMuon.cc.
References TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::drEcal_, TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::drHcal_, edm::ParameterSet::getParameter(), TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::maxEnEcal_, TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::maxEnHcal_, TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::maxEnToTrackRatio_, TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::minLeadTrackPt_, TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::minLeadTrackPtFraction_, TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::srcEcalRecHitsBarrel_, TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::srcEcalRecHitsEndcap_, TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::srcHcalRecHits_, and TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::srcVertex_.
: TauDiscriminationProducerBase<TauType, TauDiscriminator>(cfg) { srcEcalRecHitsBarrel_ = cfg.getParameter<edm::InputTag>("srcEcalRecHitsBarrel"); srcEcalRecHitsEndcap_ = cfg.getParameter<edm::InputTag>("srcEcalRecHitsEndcap"); srcHcalRecHits_ = cfg.getParameter<edm::InputTag>("srcHcalRecHits"); srcVertex_ = cfg.getParameter<edm::InputTag>("srcVertex"); minLeadTrackPt_ = cfg.getParameter<double>("minLeadTrackPt"); minLeadTrackPtFraction_ = cfg.getParameter<double>("minLeadTrackPtFraction"); drEcal_ = cfg.getParameter<double>("dRecal"); drHcal_ = cfg.getParameter<double>("dRhcal"); maxEnEcal_ = cfg.getParameter<double>("maxEnEcal"); maxEnHcal_ = cfg.getParameter<double>("maxEnHcal"); maxEnToTrackRatio_ = cfg.getParameter<double>("maxEnToTrackRatio"); }
TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::~TauDiscriminationAgainstCaloMuon | ( | ) | [inline] |
Definition at line 96 of file TauDiscriminationAgainstCaloMuon.cc.
{}
void TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::beginEvent | ( | const edm::Event & | evt, |
const edm::EventSetup & | evtSetup | ||
) | [virtual] |
Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.
Definition at line 154 of file TauDiscriminationAgainstCaloMuon.cc.
References edm::EventSetup::get(), edm::Event::getByLabel(), edm::ESHandle< T >::product(), reco::Vertex::x(), reco::Vertex::y(), and reco::Vertex::z().
{ evt.getByLabel(srcEcalRecHitsBarrel_, ebRecHits_); evt.getByLabel(srcEcalRecHitsEndcap_, eeRecHits_); evt.getByLabel(srcHcalRecHits_, hbheRecHits_); edm::ESHandle<TransientTrackBuilder> trackBuilderHandle; evtSetup.get<TransientTrackRecord>().get("TransientTrackBuilder", trackBuilderHandle); trackBuilder_ = trackBuilderHandle.product(); if ( !trackBuilder_ ) { edm::LogError ("TauDiscriminationAgainstCaloMuon::discriminate") << " Failed to access TransientTrackBuilder !!"; } edm::ESHandle<CaloGeometry> caloGeometryHandle; evtSetup.get<CaloGeometryRecord>().get(caloGeometryHandle); caloGeometry_ = caloGeometryHandle.product(); if ( !caloGeometry_ ) { edm::LogError ("TauDiscriminationAgainstCaloMuon::discriminate") << " Failed to access CaloGeometry !!"; } edm::Handle<reco::VertexCollection> vertices; evt.getByLabel(srcVertex_, vertices); eventVertexPosition_ = GlobalPoint(0., 0., 0.); if ( vertices->size() >= 1 ) { const reco::Vertex& thePrimaryEventVertex = (*vertices->begin()); eventVertexPosition_ = GlobalPoint(thePrimaryEventVertex.x(), thePrimaryEventVertex.y(), thePrimaryEventVertex.z()); } }
double TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::discriminate | ( | const TauRef & | tau | ) | [virtual] |
Implements TauDiscriminationProducerBase< TauType, TauDiscriminator >.
Definition at line 275 of file TauDiscriminationAgainstCaloMuon.cc.
References compEcalEnergySum(), compHcalEnergySum(), DetId::Ecal, EcalBarrel, EcalEndcap, DetId::Hcal, HcalBarrel, HcalEndcap, edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), and edm::Ref< C, T, F >::isTransient().
{ if ( !(trackBuilder_ && caloGeometry_) ) return 0.; const CaloSubdetectorGeometry* ebGeometry = caloGeometry_->getSubdetectorGeometry(DetId::Ecal, EcalBarrel); const CaloSubdetectorGeometry* eeGeometry = caloGeometry_->getSubdetectorGeometry(DetId::Ecal, EcalEndcap); const CaloSubdetectorGeometry* hbGeometry = caloGeometry_->getSubdetectorGeometry(DetId::Hcal, HcalBarrel); const CaloSubdetectorGeometry* heGeometry = caloGeometry_->getSubdetectorGeometry(DetId::Hcal, HcalEndcap); TrackRef leadTrackRef = leadTrackExtractor_.getLeadTrack(*tau); if ( (leadTrackRef.isAvailable() || leadTrackRef.isTransient()) && leadTrackRef.isNonnull() ) { double leadTrackPt = leadTrackRef->pt(); double trackPtSum = leadTrackExtractor_.getTrackPtSum(*tau); double leadTrackPtFraction = ( trackPtSum > 0. ) ? (leadTrackPt/trackPtSum) : -1.; if ( leadTrackPt > minLeadTrackPt_ && leadTrackPtFraction > minLeadTrackPtFraction_ ) { reco::TransientTrack transientTrack = trackBuilder_->build(leadTrackRef); double ebEnergySum = compEcalEnergySum(*ebRecHits_, ebGeometry, transientTrack, drEcal_, eventVertexPosition_); double eeEnergySum = compEcalEnergySum(*eeRecHits_, eeGeometry, transientTrack, drEcal_, eventVertexPosition_); double ecalEnergySum = ebEnergySum + eeEnergySum; double hbheEnergySum = compHcalEnergySum(*hbheRecHits_, hbGeometry, heGeometry, transientTrack, drHcal_, eventVertexPosition_); double caloEnergySum = ecalEnergySum + hbheEnergySum; if ( ecalEnergySum < maxEnEcal_ && hbheEnergySum < maxEnHcal_ && caloEnergySum < (maxEnToTrackRatio_*leadTrackPt) ) return 0.; } } return 1.; }
const CaloGeometry* TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::caloGeometry_ [private] |
Definition at line 115 of file TauDiscriminationAgainstCaloMuon.cc.
double TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::drEcal_ [private] |
Definition at line 122 of file TauDiscriminationAgainstCaloMuon.cc.
Referenced by TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstCaloMuon().
double TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::drHcal_ [private] |
Definition at line 123 of file TauDiscriminationAgainstCaloMuon.cc.
Referenced by TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstCaloMuon().
edm::Handle<EcalRecHitCollection> TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::ebRecHits_ [private] |
Definition at line 105 of file TauDiscriminationAgainstCaloMuon.cc.
edm::Handle<EcalRecHitCollection> TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::eeRecHits_ [private] |
Definition at line 107 of file TauDiscriminationAgainstCaloMuon.cc.
GlobalPoint TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::eventVertexPosition_ [private] |
Definition at line 112 of file TauDiscriminationAgainstCaloMuon.cc.
edm::Handle<HBHERecHitCollection> TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::hbheRecHits_ [private] |
Definition at line 109 of file TauDiscriminationAgainstCaloMuon.cc.
TauLeadTrackExtractor<TauType> TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::leadTrackExtractor_ [private] |
Definition at line 117 of file TauDiscriminationAgainstCaloMuon.cc.
double TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::maxEnEcal_ [private] |
Definition at line 125 of file TauDiscriminationAgainstCaloMuon.cc.
Referenced by TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstCaloMuon().
double TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::maxEnHcal_ [private] |
Definition at line 126 of file TauDiscriminationAgainstCaloMuon.cc.
Referenced by TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstCaloMuon().
double TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::maxEnToTrackRatio_ [private] |
Definition at line 128 of file TauDiscriminationAgainstCaloMuon.cc.
Referenced by TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstCaloMuon().
double TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::minLeadTrackPt_ [private] |
Definition at line 119 of file TauDiscriminationAgainstCaloMuon.cc.
Referenced by TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstCaloMuon().
double TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::minLeadTrackPtFraction_ [private] |
Definition at line 120 of file TauDiscriminationAgainstCaloMuon.cc.
Referenced by TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstCaloMuon().
edm::InputTag TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::srcEcalRecHitsBarrel_ [private] |
Definition at line 104 of file TauDiscriminationAgainstCaloMuon.cc.
Referenced by TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstCaloMuon().
edm::InputTag TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::srcEcalRecHitsEndcap_ [private] |
Definition at line 106 of file TauDiscriminationAgainstCaloMuon.cc.
Referenced by TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstCaloMuon().
edm::InputTag TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::srcHcalRecHits_ [private] |
Definition at line 108 of file TauDiscriminationAgainstCaloMuon.cc.
Referenced by TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstCaloMuon().
edm::InputTag TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::srcVertex_ [private] |
Definition at line 111 of file TauDiscriminationAgainstCaloMuon.cc.
Referenced by TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::TauDiscriminationAgainstCaloMuon().
const TransientTrackBuilder* TauDiscriminationAgainstCaloMuon< TauType, TauDiscriminator >::trackBuilder_ [private] |
Definition at line 114 of file TauDiscriminationAgainstCaloMuon.cc.