#include <HLTTauDQMTrkPlotter.h>
Definition at line 37 of file HLTTauDQMTrkPlotter.h.
HLTTauDQMTrkPlotter::HLTTauDQMTrkPlotter | ( | const edm::ParameterSet & | iConfig, |
int | etbins, | ||
int | etabins, | ||
int | phibins, | ||
double | maxpt, | ||
bool | ref, | ||
double | dr | ||
) |
Definition at line 4 of file HLTTauDQMTrkPlotter.cc.
References DQMStore::book1D(), doRef_, EtaEffDenom, EtaEffNum, EtEffDenom, EtEffNum, EtMax_, folder_, edm::ParameterSet::getParameter(), MonitorElement::getTH1F(), hasLeadTrack, isoJetEt, isoJetEta, isoJetPhi, isolJets_, jetEt, jetEta, jetPhi, jetTagSrc_, mcMatch_, NEtaBins_, NPhiBins_, NPtBins_, nPxlTrksInL25Jet, nQPxlTrksInL25Jet, PhiEffDenom, PhiEffNum, MultipleCompare::ref, DQMStore::setCurrentFolder(), signalLeadTrkPt, store, and type_.
{ jetTagSrc_ = iConfig.getParameter<edm::InputTag>("ConeIsolation"); isolJets_ = iConfig.getParameter<edm::InputTag>("IsolatedJets"); mcMatch_ = dr; doRef_ = ref; folder_ = iConfig.getParameter<std::string>("DQMFolder"); type_ = iConfig.getParameter<std::string>("Type"); EtMax_ = maxpt; NPtBins_ = etbins; NEtaBins_ = etabins; NPhiBins_ = phibins; store = &*edm::Service<DQMStore>(); if(store) { //Create the histograms store->setCurrentFolder(folder_); jetEt = store->book1D((type_+"TauEt").c_str(), "Tau Et",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 57 of file HLTTauDQMTrkPlotter.cc.
{ }
void HLTTauDQMTrkPlotter::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup, | ||
const LVColl & | mcInfo | ||
) |
Definition at line 63 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, match(), matchJet(), 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; 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 = match(theJet,mcInfo); 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()); } } } } } }
std::pair< bool, LV > HLTTauDQMTrkPlotter::match | ( | const LV & | recoJet, |
const LVColl & | matchingObject | ||
) | [private] |
Definition at line 138 of file HLTTauDQMTrkPlotter.cc.
References deltaR(), i, mcMatch_, and AlCaHLTBitMon_ParallelJobs::p.
Referenced by analyze().
{ bool matched = false; LV mLV; if(matchingObject.size() !=0 ) { for(LVColl::const_iterator i = matchingObject.begin();i != matchingObject.end(); ++i) { double deltaR = ROOT::Math::VectorUtil::DeltaR(jet, *i); if(deltaR < mcMatch_) { matched = true; mLV = *i; } } } std::pair<bool,LV> p = std::make_pair(matched,mLV); return p; }
bool HLTTauDQMTrkPlotter::matchJet | ( | const reco::Jet & | jet, |
const reco::CaloJetCollection & | McInfo | ||
) | [private] |
Definition at line 162 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; if(McInfo.size()>0) 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; }
bool HLTTauDQMTrkPlotter::doRef_ [private] |
Definition at line 80 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::EtaEffDenom [private] |
Definition at line 72 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::EtaEffNum [private] |
Definition at line 71 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::EtEffDenom [private] |
Definition at line 70 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::EtEffNum [private] |
Definition at line 69 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
double HLTTauDQMTrkPlotter::EtMax_ [private] |
Definition at line 84 of file HLTTauDQMTrkPlotter.h.
Referenced by HLTTauDQMTrkPlotter().
std::string HLTTauDQMTrkPlotter::folder_ [private] |
Definition at line 52 of file HLTTauDQMTrkPlotter.h.
Referenced by HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::hasLeadTrack [private] |
Definition at line 67 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::isoJetEt [private] |
Definition at line 60 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::isoJetEta [private] |
Definition at line 61 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::isoJetPhi [private] |
Definition at line 62 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
edm::InputTag HLTTauDQMTrkPlotter::isolJets_ [private] |
Definition at line 49 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::jetEt [private] |
Definition at line 56 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::jetEta [private] |
Definition at line 57 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::jetPhi [private] |
Definition at line 58 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
edm::InputTag HLTTauDQMTrkPlotter::jetTagSrc_ [private] |
Definition at line 48 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
double HLTTauDQMTrkPlotter::mcMatch_ [private] |
Definition at line 54 of file HLTTauDQMTrkPlotter.h.
Referenced by HLTTauDQMTrkPlotter(), match(), and matchJet().
int HLTTauDQMTrkPlotter::NEtaBins_ [private] |
Definition at line 86 of file HLTTauDQMTrkPlotter.h.
Referenced by HLTTauDQMTrkPlotter().
int HLTTauDQMTrkPlotter::NPhiBins_ [private] |
Definition at line 87 of file HLTTauDQMTrkPlotter.h.
Referenced by HLTTauDQMTrkPlotter().
int HLTTauDQMTrkPlotter::NPtBins_ [private] |
Definition at line 85 of file HLTTauDQMTrkPlotter.h.
Referenced by HLTTauDQMTrkPlotter().
Definition at line 64 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
Definition at line 65 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::PhiEffDenom [private] |
Definition at line 74 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
MonitorElement* HLTTauDQMTrkPlotter::PhiEffNum [private] |
Definition at line 73 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
Definition at line 66 of file HLTTauDQMTrkPlotter.h.
Referenced by analyze(), and HLTTauDQMTrkPlotter().
DQMStore* HLTTauDQMTrkPlotter::store [private] |
Definition at line 78 of file HLTTauDQMTrkPlotter.h.
Referenced by HLTTauDQMTrkPlotter().
std::string HLTTauDQMTrkPlotter::type_ [private] |
Definition at line 53 of file HLTTauDQMTrkPlotter.h.
Referenced by HLTTauDQMTrkPlotter().