#include <DQMTauProducer.h>
Public Member Functions | |
DQMTauProducer (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~DQMTauProducer () | |
Private Attributes | |
double | isolationCone_ |
double | matchingCone_ |
double | ptMin_ |
double | ptMinLeadTk_ |
double | rmax_ |
double | rmin_ |
double | signalCone_ |
edm::InputTag | trackIsolatedJets_ |
Definition at line 18 of file DQMTauProducer.h.
DQMTauProducer::DQMTauProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 8 of file DQMTauProducer.cc.
References edm::ParameterSet::getParameter(), isolationCone_, matchingCone_, ptMin_, signalCone_, and trackIsolatedJets_.
{ trackIsolatedJets_ = iConfig.getParameter<edm::InputTag>("TrackIsoJets"); matchingCone_ = iConfig.getParameter<double>("MatchingCone"); signalCone_ = iConfig.getParameter<double>("SignalCone"); ptMin_ = iConfig.getParameter<double>("MinPtTracks"); isolationCone_ = iConfig.getParameter<double>("IsolationCone"); produces<reco::HLTTauCollection>(); }
DQMTauProducer::~DQMTauProducer | ( | ) |
Definition at line 19 of file DQMTauProducer.cc.
{ }
void DQMTauProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iES | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 21 of file DQMTauProducer.cc.
References edm::Event::getByLabel(), i, isolationCone_, matchingCone_, ptMin_, edm::Event::put(), dt_offlineAnalysis_common_cff::reco, reco::HLTTau::setNL25TrackIsolation(), reco::HLTTau::setNL3TrackIsolation(), signalCone_, metsig::tau, and trackIsolatedJets_.
{ using namespace reco; using namespace edm; using namespace std; HLTTauCollection * jetCollection = new HLTTauCollection; edm::Handle<IsolatedTauTagInfoCollection> tauL25Jets; iEvent.getByLabel(trackIsolatedJets_, tauL25Jets ); IsolatedTauTagInfoCollection tau = *(tauL25Jets.product()); float eta_, phi_, pt_; float ptLeadTk=0.; int trackIsolation=1000.; int nTracks=1000.; for(unsigned int i=0; i<tau.size();i++) { JetTracksAssociationRef jetTracks = tau[i].jtaRef(); math::XYZVector jetDir(jetTracks->first->px(),jetTracks->first->py(),jetTracks->first->pz()); eta_ = jetDir.eta(); phi_ = jetDir.phi(); pt_ = jetTracks->first->pt(); const TrackRef leadTk = tau[i].leadingSignalTrack(jetDir,matchingCone_, 1.); if(!leadTk) {}else{ trackIsolation = (int)tau[i].discriminator(jetDir,matchingCone_, signalCone_, isolationCone_,1.,1.,0); ptLeadTk = (*leadTk).pt(); nTracks = (tau[i].tracksInCone((*leadTk).momentum(), isolationCone_, ptMin_ )).size() - (tau[i].tracksInCone((*leadTk).momentum(), signalCone_, ptMin_ )).size(); } HLTTau pippo(eta_,phi_,pt_,-1,trackIsolation,ptLeadTk,trackIsolation,ptLeadTk); pippo.setNL25TrackIsolation(nTracks); pippo.setNL3TrackIsolation(nTracks); jetCollection->push_back(pippo); } auto_ptr<reco::HLTTauCollection> selectedTaus(jetCollection); iEvent.put(selectedTaus); }
double DQMTauProducer::isolationCone_ [private] |
Definition at line 26 of file DQMTauProducer.h.
Referenced by DQMTauProducer(), and produce().
double DQMTauProducer::matchingCone_ [private] |
Definition at line 26 of file DQMTauProducer.h.
Referenced by DQMTauProducer(), and produce().
double DQMTauProducer::ptMin_ [private] |
Definition at line 26 of file DQMTauProducer.h.
Referenced by DQMTauProducer(), and produce().
double DQMTauProducer::ptMinLeadTk_ [private] |
Definition at line 26 of file DQMTauProducer.h.
double DQMTauProducer::rmax_ [private] |
Definition at line 26 of file DQMTauProducer.h.
double DQMTauProducer::rmin_ [private] |
Definition at line 26 of file DQMTauProducer.h.
double DQMTauProducer::signalCone_ [private] |
Definition at line 26 of file DQMTauProducer.h.
Referenced by DQMTauProducer(), and produce().
Definition at line 25 of file DQMTauProducer.h.
Referenced by DQMTauProducer(), and produce().