#include <RecoTauTag/HLTProducers/interface/HLTTauProducer.h>
Public Member Functions | |
HLTTauProducer (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~HLTTauProducer () | |
Private Attributes | |
edm::InputTag | emIsolatedJetsL2_ |
double | isolationCone_ |
double | matchingCone_ |
double | ptMinLeadTk_ |
double | rmax_ |
double | rmin_ |
double | signalCone_ |
edm::InputTag | trackIsolatedJetsL25_ |
edm::InputTag | trackIsolatedJetsL3_ |
Definition at line 18 of file HLTTauProducer.h.
HLTTauProducer::HLTTauProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 8 of file HLTTauProducer.cc.
References emIsolatedJetsL2_, edm::ParameterSet::getParameter(), isolationCone_, matchingCone_, signalCone_, trackIsolatedJetsL25_, and trackIsolatedJetsL3_.
00009 { 00010 emIsolatedJetsL2_ = iConfig.getParameter<edm::InputTag>("L2EcalIsoJets"); 00011 trackIsolatedJetsL25_ = iConfig.getParameter<edm::InputTag>("L25TrackIsoJets"); 00012 trackIsolatedJetsL3_ = iConfig.getParameter<edm::InputTag>("L3TrackIsoJets"); 00013 matchingCone_ = iConfig.getParameter<double>("MatchingCone"); 00014 signalCone_ = iConfig.getParameter<double>("SignalCone"); 00015 isolationCone_ = iConfig.getParameter<double>("IsolationCone"); 00016 produces<reco::HLTTauCollection>(); 00017 }
HLTTauProducer::~HLTTauProducer | ( | ) |
void HLTTauProducer::produce | ( | edm::Event & | iEvent, | |
const edm::EventSetup & | iES | |||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 21 of file HLTTauProducer.cc.
References emIsolatedJetsL2_, edm::Event::getByLabel(), i, int, isolationCone_, matchingCone_, p, edm::Handle< T >::product(), ptMinLeadTk_, edm::Event::put(), HcalSimpleRecAlgoImpl::reco(), signalCone_, std, trackIsolatedJetsL25_, and trackIsolatedJetsL3_.
00022 { 00023 00024 using namespace reco; 00025 using namespace edm; 00026 using namespace std; 00027 00028 00029 HLTTauCollection * jetCollection = new HLTTauCollection; 00030 00031 edm::Handle<L2TauInfoAssociation> tauL2Jets; 00032 iEvent.getByLabel(emIsolatedJetsL2_ , tauL2Jets ); 00033 00034 edm::Handle<IsolatedTauTagInfoCollection> tauL25Jets; 00035 iEvent.getByLabel(trackIsolatedJetsL25_, tauL25Jets ); 00036 00037 edm::Handle<IsolatedTauTagInfoCollection> tauL3Jets; 00038 iEvent.getByLabel(trackIsolatedJetsL3_, tauL3Jets ); 00039 00040 IsolatedTauTagInfoCollection tauL25 = *(tauL25Jets.product()); 00041 IsolatedTauTagInfoCollection tauL3 = *(tauL3Jets.product()); 00042 00043 int i=0; 00044 float eta_, phi_, pt_; 00045 00046 for(L2TauInfoAssociation::const_iterator p = tauL2Jets->begin();p!=tauL2Jets->end();++p) 00047 { 00048 //Retrieve The L2TauIsolationInfo Class from the AssociationMap 00049 const L2TauIsolationInfo l2info = p->val; 00050 //Retrieve the Jet 00051 // const CaloJet& jet =*(p->key); 00052 00053 00054 double emIsol = l2info.ECALIsolConeCut; 00055 00056 JetTracksAssociationRef jetTracks = tauL25[i].jtaRef(); 00057 math::XYZVector jetDirL25(jetTracks->first->px(),jetTracks->first->py(),jetTracks->first->pz()); 00058 eta_ = jetDirL25.eta(); 00059 phi_ = jetDirL25.phi(); 00060 pt_ = jetTracks->first->pt(); 00061 00062 int trackIsolationL25 = (int)tauL25[i].discriminator(jetDirL25,matchingCone_, signalCone_, isolationCone_,1.,1.,0); 00063 const TrackRef leadTkL25 = tauL25[i].leadingSignalTrack(jetDirL25,matchingCone_, 1.); 00064 double ptLeadTkL25=0.; 00065 00066 if(!leadTkL25) 00067 {}else{ 00068 ptLeadTkL25 = (*leadTkL25).pt(); 00069 } 00070 jetTracks = tauL3[i].jtaRef(); 00071 math::XYZVector jetDirL3(jetTracks->first->px(),jetTracks->first->py(),jetTracks->first->pz()); 00072 int trackIsolationL3 = (int)tauL3[i].discriminator(jetDirL3,matchingCone_, signalCone_, isolationCone_,ptMinLeadTk_,1.,0); 00073 const TrackRef leadTkL3 = tauL3[i].leadingSignalTrack(jetDirL3,matchingCone_,1.); 00074 double ptLeadTkL3=0.; 00075 if(!leadTkL3) 00076 {}else{ 00077 ptLeadTkL3 = (*leadTkL3).pt(); 00078 } 00079 00080 HLTTau pippo(eta_,phi_,pt_,emIsol,trackIsolationL25,ptLeadTkL25,trackIsolationL3,ptLeadTkL3); 00081 jetCollection->push_back(pippo); 00082 i++; 00083 } 00084 00085 auto_ptr<reco::HLTTauCollection> selectedTaus(jetCollection); 00086 00087 iEvent.put(selectedTaus); 00088 00089 00090 00091 00092 }
double HLTTauProducer::isolationCone_ [private] |
double HLTTauProducer::matchingCone_ [private] |
double HLTTauProducer::ptMinLeadTk_ [private] |
double HLTTauProducer::rmax_ [private] |
Definition at line 28 of file HLTTauProducer.h.
double HLTTauProducer::rmin_ [private] |
Definition at line 28 of file HLTTauProducer.h.
double HLTTauProducer::signalCone_ [private] |