#include <HLTTauDQMTrkPlotter.h>
Public Member Functions | |
void | analyze (const edm::Event &, const edm::EventSetup &, const std::map< int, LVColl > &) |
HLTTauDQMTrkPlotter (const edm::ParameterSet &, int, int, int, double, bool, double, std::string) | |
const std::string | name () |
~HLTTauDQMTrkPlotter () | |
Private Member Functions | |
bool | matchJet (const reco::Jet &, const reco::CaloJetCollection &) |
Private Attributes | |
bool | doRef_ |
MonitorElement * | EtaEffDenom |
MonitorElement * | EtaEffNum |
MonitorElement * | EtEffDenom |
MonitorElement * | EtEffNum |
double | EtMax_ |
MonitorElement * | hasLeadTrack |
MonitorElement * | isoJetEt |
MonitorElement * | isoJetEta |
MonitorElement * | isoJetPhi |
edm::InputTag | isolJets_ |
MonitorElement * | jetEt |
MonitorElement * | jetEta |
MonitorElement * | jetPhi |
edm::InputTag | jetTagSrc_ |
double | mcMatch_ |
int | NEtaBins_ |
int | NPhiBins_ |
int | NPtBins_ |
MonitorElement * | nPxlTrksInL25Jet |
MonitorElement * | nQPxlTrksInL25Jet |
MonitorElement * | PhiEffDenom |
MonitorElement * | PhiEffNum |
MonitorElement * | signalLeadTrkPt |
std::string | type_ |
Definition at line 13 of file HLTTauDQMTrkPlotter.h.
HLTTauDQMTrkPlotter::HLTTauDQMTrkPlotter | ( | const edm::ParameterSet & | iConfig, |
int | etbins, | ||
int | etabins, | ||
int | phibins, | ||
double | maxpt, | ||
bool | ref, | ||
double | dr, | ||
std::string | dqmBaseFolder | ||
) |
Definition at line 3 of file HLTTauDQMTrkPlotter.cc.
References DQMStore::book1D(), doRef_, HLTTauDQMPlotter::dqmBaseFolder_, alignCSCRings::e, EtaEffDenom, EtaEffNum, EtEffDenom, EtEffNum, EtMax_, MonitorElement::getTH1F(), edm::ParameterSet::getUntrackedParameter(), hasLeadTrack, isoJetEt, isoJetEta, isoJetPhi, isolJets_, jetEt, jetEta, jetPhi, jetTagSrc_, mcMatch_, HLTTauDQMPlotter::name_, NEtaBins_, NPhiBins_, NPtBins_, nPxlTrksInL25Jet, nQPxlTrksInL25Jet, PhiEffDenom, PhiEffNum, DQMStore::removeContents(), DQMStore::setCurrentFolder(), signalLeadTrkPt, HLTTauDQMPlotter::store_, HLTTauDQMPlotter::triggerTag(), HLTTauDQMPlotter::triggerTag_, HLTTauDQMPlotter::triggerTagAlias_, type_, HLTTauDQMPlotter::validity_, and cms::Exception::what().
{ //Initialize Plotter name_ = "HLTTauDQMTrkPlotter"; //Process PSet try { jetTagSrc_ = iConfig.getUntrackedParameter<edm::InputTag>("ConeIsolation"); isolJets_ = iConfig.getUntrackedParameter<edm::InputTag>("IsolatedJets"); triggerTag_ = iConfig.getUntrackedParameter<std::string>("DQMFolder"); triggerTagAlias_ = iConfig.getUntrackedParameter<std::string>("Alias",""); type_ = iConfig.getUntrackedParameter<std::string>("Type"); mcMatch_ = dr; EtMax_ = maxpt; NPtBins_ = etbins; NEtaBins_ = etabins; NPhiBins_ = phibins; dqmBaseFolder_ = dqmBaseFolder; doRef_ = ref; validity_ = true; } catch ( cms::Exception &e ) { edm::LogWarning("HLTTauDQMTrkPlotter::HLTTauDQMTrkPlotter") << e.what() << std::endl; validity_ = false; return; } if (store_) { //Create the histograms store_->setCurrentFolder(triggerTag()); store_->removeContents(); jetEt = store_->book1D((type_+"TauEt").c_str(), "#tau E_{T}",NPtBins_,0,EtMax_); jetEta = store_->book1D((type_+"TauEta").c_str(), "#tau #eta", NEtaBins_, -2.5, 2.5); jetPhi = store_->book1D((type_+"TauPhi").c_str(), "#tau #phi", NPhiBins_, -3.2, 3.2); isoJetEt = store_->book1D((type_+"IsolJetEt").c_str(), "Selected Jet E_{T}", NPtBins_, 0,EtMax_); isoJetEta = store_->book1D((type_+"IsolJetEta").c_str(), "Selected Jet #eta", NEtaBins_, -2.5, 2.5); isoJetPhi = store_->book1D((type_+"IsolJetPhi").c_str(), "Selected jet #phi", NPhiBins_, -3.2, 3.2); nPxlTrksInL25Jet = store_->book1D((type_+"nTracks").c_str(), "# RECO Tracks", 30, 0, 30); nQPxlTrksInL25Jet = store_->book1D((type_+"nQTracks").c_str(),"# Quality RECO Tracks", 15, 0, 15); signalLeadTrkPt = store_->book1D((type_+"LeadTrackPt").c_str(), "Lead Track p_{T}", 75, 0, 150); hasLeadTrack = store_->book1D((type_+"HasLeadTrack").c_str(), "Lead Track ?", 2, 0, 2); EtEffNum = store_->book1D((type_+"TauEtEffNum").c_str(),"Efficiency vs E_{T} (Numerator)",NPtBins_,0,EtMax_); EtEffNum->getTH1F()->Sumw2(); EtEffDenom = store_->book1D((type_+"TauEtEffDenom").c_str(),"Efficiency vs E_{T} (Denominator)",NPtBins_,0,EtMax_); EtEffDenom->getTH1F()->Sumw2(); EtaEffNum = store_->book1D((type_+"TauEtaEffNum").c_str(),"Efficiency vs #eta (Numerator)",NEtaBins_,-2.5,2.5); EtaEffNum->getTH1F()->Sumw2(); EtaEffDenom = store_->book1D((type_+"TauEtaEffDenom").c_str(),"Efficiency vs #eta (Denominator)",NEtaBins_,-2.5,2.5); EtaEffDenom->getTH1F()->Sumw2(); PhiEffNum = store_->book1D((type_+"TauPhiEffNum").c_str(),"Efficiency vs #phi (Numerator)",NPhiBins_,-3.2,3.2); PhiEffNum->getTH1F()->Sumw2(); PhiEffDenom = store_->book1D((type_+"TauPhiEffDenom").c_str(),"Efficiency vs #phi (Denominator)",NPhiBins_,-3.2,3.2); PhiEffDenom->getTH1F()->Sumw2(); } }
HLTTauDQMTrkPlotter::~HLTTauDQMTrkPlotter | ( | ) |
Definition at line 66 of file HLTTauDQMTrkPlotter.cc.
{ }
void HLTTauDQMTrkPlotter::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup, | ||
const std::map< int, LVColl > & | mcInfo | ||
) |
Definition at line 69 of file HLTTauDQMTrkPlotter.cc.
References reco::IsolatedTauTagInfo::allTracks(), doRef_, EtaEffDenom, EtaEffNum, EtEffDenom, EtEffNum, MonitorElement::Fill(), edm::Event::getByLabel(), hasLeadTrack, i, isoJetEt, isoJetEta, isoJetPhi, isolJets_, reco::JTATagInfo::jet(), jetEt, jetEta, jetPhi, jetTagSrc_, reco::IsolatedTauTagInfo::leadingSignalTrack(), m, HLTTauDQMPlotter::match(), matchJet(), mcMatch_, nPxlTrksInL25Jet, nQPxlTrksInL25Jet, PhiEffDenom, PhiEffNum, dt_dqm_sourceclient_common_cff::reco, reco::IsolatedTauTagInfo::selectedTracks(), signalLeadTrkPt, and edm::RefVector< C, T, F >::size().
{ using namespace edm; using namespace reco; //Tau reference std::map<int,LVColl>::const_iterator iref; iref = mcInfo.find(15); Handle<IsolatedTauTagInfoCollection> tauTagInfos; Handle<CaloJetCollection> isolJets; bool gotL3 = iEvent.getByLabel(jetTagSrc_, tauTagInfos) && tauTagInfos.isValid(); if ( gotL3 ) { for ( unsigned int i = 0; i < tauTagInfos->size(); ++i ) { IsolatedTauTagInfo tauTagInfo = (*tauTagInfos)[i]; if ( &(*tauTagInfo.jet()) ) { LV theJet = tauTagInfo.jet()->p4(); std::pair<bool,LV> m(false,LV()); if ( iref != mcInfo.end() ) m = match(theJet,iref->second,mcMatch_); if ( (doRef_ && m.first) || (!doRef_) ) { jetEt->Fill(theJet.Et()); jetEta->Fill(theJet.Eta()); jetPhi->Fill(theJet.Phi()); nPxlTrksInL25Jet->Fill(tauTagInfo.allTracks().size()); nQPxlTrksInL25Jet->Fill(tauTagInfo.selectedTracks().size()); const TrackRef leadTrk = tauTagInfo.leadingSignalTrack(); if ( !leadTrk ) { hasLeadTrack->Fill(0.5); } else { hasLeadTrack->Fill(1.5); signalLeadTrkPt->Fill(leadTrk->pt()); } LV refV; if ( doRef_ ) { refV = m.second; } else { refV = theJet; } EtEffDenom->Fill(refV.pt()); EtaEffDenom->Fill(refV.eta()); PhiEffDenom->Fill(refV.phi()); bool gotIsoL3 = iEvent.getByLabel(isolJets_, isolJets) && isolJets.isValid(); if ( gotIsoL3 ) { if ( matchJet(*(tauTagInfo.jet()),*isolJets) ) { isoJetEta->Fill(theJet.Eta()); isoJetEt->Fill(theJet.Et()); isoJetPhi->Fill(theJet.Phi()); EtEffNum->Fill(refV.pt()); EtaEffNum->Fill(refV.eta()); PhiEffNum->Fill(refV.phi()); } } } } } } }
bool HLTTauDQMTrkPlotter::matchJet | ( | const reco::Jet & | jet, |
const reco::CaloJetCollection & | McInfo | ||
) | [private] |
Definition at line 136 of file HLTTauDQMTrkPlotter.cc.
References delta, mcMatch_, and reco::LeafCandidate::p4().
Referenced by analyze().
{ //Loop On the Collection and see if your tau jet is matched to one there //Also find the nearest Matched MC Particle to your Jet (to be complete) bool matched = false; for ( reco::CaloJetCollection::const_iterator it = McInfo.begin(); it != McInfo.end(); ++it ) { double delta = ROOT::Math::VectorUtil::DeltaR(jet.p4().Vect(),it->p4().Vect()); if ( delta < mcMatch_ ) { matched = true; } } return matched; }
const std::string HLTTauDQMTrkPlotter::name | ( | void | ) | [inline, virtual] |
Implements HLTTauDQMPlotter.
Definition at line 17 of file HLTTauDQMTrkPlotter.h.
References HLTTauDQMPlotter::name_.
{ return name_; }
bool HLTTauDQMTrkPlotter::doRef_ [private] |
Definition at line 51 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::EtaEffDenom [private] |
Definition at line 47 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::EtaEffNum [private] |
Definition at line 46 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::EtEffDenom [private] |
Definition at line 45 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::EtEffNum [private] |
Definition at line 44 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
double HLTTauDQMTrkPlotter::EtMax_ [private] |
Definition at line 54 of file HLTTauDQMTrkPlotter.h.
Referenced by HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::hasLeadTrack [private] |
Definition at line 42 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::isoJetEt [private] |
Definition at line 35 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::isoJetEta [private] |
Definition at line 36 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::isoJetPhi [private] |
Definition at line 37 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
edm::InputTag HLTTauDQMTrkPlotter::isolJets_ [private] |
Definition at line 25 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::jetEt [private] |
Definition at line 31 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::jetEta [private] |
Definition at line 32 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::jetPhi [private] |
Definition at line 33 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
edm::InputTag HLTTauDQMTrkPlotter::jetTagSrc_ [private] |
Definition at line 24 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
double HLTTauDQMTrkPlotter::mcMatch_ [private] |
Definition at line 29 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), HLTTauDQMTrkPlotter(), and matchJet().
int HLTTauDQMTrkPlotter::NEtaBins_ [private] |
Definition at line 56 of file HLTTauDQMTrkPlotter.h.
Referenced by HLTTauDQMTrkPlotter().
int HLTTauDQMTrkPlotter::NPhiBins_ [private] |
Definition at line 57 of file HLTTauDQMTrkPlotter.h.
Referenced by HLTTauDQMTrkPlotter().
int HLTTauDQMTrkPlotter::NPtBins_ [private] |
Definition at line 55 of file HLTTauDQMTrkPlotter.h.
Referenced by HLTTauDQMTrkPlotter().
Definition at line 39 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
Definition at line 40 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::PhiEffDenom [private] |
Definition at line 49 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::PhiEffNum [private] |
Definition at line 48 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
Definition at line 41 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
std::string HLTTauDQMTrkPlotter::type_ [private] |
Definition at line 28 of file HLTTauDQMTrkPlotter.h.
Referenced by HLTTauDQMTrkPlotter().