#include <EwkTauDQM.h>
Booking and filling of histograms for data-quality monitoring purposes in Z --> muon + tau-jet channel
Definition at line 225 of file EwkTauDQM.h.
typedef std::vector<std::string> EwkMuTauHistManager::vstring [private] |
Definition at line 253 of file EwkTauDQM.h.
anonymous enum [private] |
Definition at line 315 of file EwkTauDQM.h.
{ kPassedPreselection = 1, kPassedTrigger = 2, kPassedMuonId = 3, kPassedTauLeadTrack = 4, kPassedTauLeadTrackPt = 5, kPassedTauDiscrAgainstMuons = 6, kPassedDeltaR = 7, kPassedMuonTrackIso = 8, kPassedMuonEcalIso = 9, kPassedTauTrackIso = 10, kPassedTauEcalIso = 11};
EwkMuTauHistManager::EwkMuTauHistManager | ( | const edm::ParameterSet & | cfg, |
DQMStore * | dqmStore | ||
) |
Definition at line 527 of file EwkTauDQM.cc.
References beamSpotSource_, caloMEtSource_, cfgError_, deltaRCut_, edm::ParameterSet::exists(), getIsoMode(), edm::ParameterSet::getParameter(), hltPaths_, maxNumWarnings_, muonCombIsoCut_, muonEcalIsoCut_, muonEtaCut_, muonIsoMode_, muonPtCut_, muonSource_, muonTrackIsoCut_, pfMEtSource_, tauDiscrAgainstMuons_, tauDiscrByEcalIso_, tauDiscrByLeadTrackFinding_, tauDiscrByLeadTrackPtCut_, tauDiscrByTrackIso_, tauJetEtaCut_, tauJetPtCut_, tauJetSource_, triggerResultsSource_, vertexSource_, and visMassCut_.
: dqmStore_(dqmStore), dqmDirectory_(cfg.getParameter<std::string>("dqmDirectory")), numEventsAnalyzed_(0), numEventsSelected_(0), cfgError_(0), numWarningsTriggerResults_(0), numWarningsHLTpath_(0), numWarningsVertex_(0), numWarningsBeamSpot_(0), numWarningsMuon_(0), numWarningsTauJet_(0), numWarningsTauDiscrByLeadTrackFinding_(0), numWarningsTauDiscrByLeadTrackPtCut_(0), numWarningsTauDiscrByTrackIso_(0), numWarningsTauDiscrByEcalIso_(0), numWarningsTauDiscrAgainstMuons_(0), numWarningsCaloMEt_(0), numWarningsPFMEt_(0) { triggerResultsSource_ = cfg.getParameter<edm::InputTag>("triggerResultsSource"); vertexSource_ = cfg.getParameter<edm::InputTag>("vertexSource"); beamSpotSource_ = cfg.getParameter<edm::InputTag>("beamSpotSource"); muonSource_ = cfg.getParameter<edm::InputTag>("muonSource"); tauJetSource_ = cfg.getParameter<edm::InputTag>("tauJetSource"); caloMEtSource_ = cfg.getParameter<edm::InputTag>("caloMEtSource"); pfMEtSource_ = cfg.getParameter<edm::InputTag>("pfMEtSource"); tauDiscrByLeadTrackFinding_ = cfg.getParameter<edm::InputTag>("tauDiscrByLeadTrackFinding"); tauDiscrByLeadTrackPtCut_ = cfg.getParameter<edm::InputTag>("tauDiscrByLeadTrackPtCut"); tauDiscrByTrackIso_ = cfg.getParameter<edm::InputTag>("tauDiscrByTrackIso"); tauDiscrByEcalIso_ = cfg.getParameter<edm::InputTag>("tauDiscrByEcalIso"); tauDiscrAgainstMuons_ = cfg.getParameter<edm::InputTag>("tauDiscrAgainstMuons"); hltPaths_ = cfg.getParameter<vstring>("hltPaths"); muonEtaCut_ = cfg.getParameter<double>("muonEtaCut"); muonPtCut_ = cfg.getParameter<double>("muonPtCut"); muonTrackIsoCut_ = cfg.getParameter<double>("muonTrackIsoCut"); muonEcalIsoCut_ = cfg.getParameter<double>("muonEcalIsoCut"); muonCombIsoCut_ = cfg.getParameter<double>("muonCombIsoCut"); std::string muonIsoMode_string = cfg.getParameter<std::string>("muonIsoMode"); muonIsoMode_ = getIsoMode(muonIsoMode_string, cfgError_); tauJetEtaCut_ = cfg.getParameter<double>("tauJetEtaCut"); tauJetPtCut_ = cfg.getParameter<double>("tauJetPtCut"); visMassCut_ = cfg.getParameter<double>("visMassCut"); deltaRCut_ = cfg.getParameter<double>("deltaRCut"); maxNumWarnings_ = cfg.exists("maxNumWarnings") ? cfg.getParameter<int>("maxNumWarnings") : 1; }
void EwkMuTauHistManager::bookHistograms | ( | ) |
Definition at line 580 of file EwkTauDQM.cc.
References DQMStore::book1D(), dqmDirectory_, dqmStore_, hCaloMEtPt_, hCutFlowSummary_, hMtMuPFMEt_, hMuonCombIsoPt_, hMuonEcalIsoPt_, hMuonEta_, hMuonPhi_, hMuonPt_, hMuonTrackIsoPt_, hMuTauAcoplanarity_, hMuTauDeltaR_, hPFMEtPt_, hTauDiscrAgainstMuons_, hTauEcalIsoPt_, hTauJetEta_, hTauJetNumIsoTracks_, hTauJetNumSignalTracks_, hTauJetPhi_, hTauJetPt_, hTauLeadTrackPt_, hTauTrackIsoPt_, hVertexZ_, hVisMass_, hVisMassFinal_, kPassedDeltaR, kPassedMuonEcalIso, kPassedMuonId, kPassedMuonTrackIso, kPassedPreselection, kPassedTauDiscrAgainstMuons, kPassedTauEcalIso, kPassedTauLeadTrack, kPassedTauLeadTrackPt, kPassedTauTrackIso, kPassedTrigger, Pi, MonitorElement::setBinLabel(), and DQMStore::setCurrentFolder().
Referenced by EwkTauDQM::beginJob().
{ dqmStore_->setCurrentFolder(dqmDirectory_); //hNumGlobalMuons_ = dqmStore_->book1D("NumGlobalMuons" , "Num. global Muons", 5, -0.5, 4.5); hMuonPt_ = dqmStore_->book1D("MuonPt" , "P_{T}^{#mu}", 20, 0., 100.); hMuonEta_ = dqmStore_->book1D("MuonEta" , "#eta_{#mu}", 20, -4.0, +4.0); hMuonPhi_ = dqmStore_->book1D("MuonPhi" , "#phi_{#mu}", 20, -TMath::Pi(), +TMath::Pi()); hMuonTrackIsoPt_ = dqmStore_->book1D("MuonTrackIsoPt" , "Muon Track Iso.", 20, -0.01, 10.); hMuonEcalIsoPt_ = dqmStore_->book1D("MuonEcalIsoPt" , "Muon Ecal Iso.", 20, -0.01, 10.); hMuonCombIsoPt_ = dqmStore_->book1D("MuonCombIsoPt" , "Muon Comb Iso.", 20, -0.01, 1.); hTauJetPt_ = dqmStore_->book1D("TauJetPt" , "P_{T}^{#tau-Jet}", 20, 0., 100.); hTauJetEta_ = dqmStore_->book1D("TauJetEta" , "#eta_{#tau-Jet}", 20, -4.0, +4.0); hTauJetPhi_ = dqmStore_->book1D("TauJetPhi" , "#phi_{#tau-Jet}", 20, -TMath::Pi(), +TMath::Pi()); hTauLeadTrackPt_ = dqmStore_->book1D("TauLeadTrackPt" , "P_{T}^{#tau-Jetldg trk}", 20, 0., 50.); hTauTrackIsoPt_ = dqmStore_->book1D("TauTrackIsoPt" , "Tau Track Iso.", 20, -0.01, 40.); hTauEcalIsoPt_ = dqmStore_->book1D("TauEcalIsoPt" , "Tau Ecal Iso.", 10, -0.01, 10.); hTauDiscrAgainstMuons_ = dqmStore_->book1D("TauDiscrAgainstMuons" , "Tau Discr. against Muons", 2, -0.5, +1.5); //hTauJetCharge_ = dqmStore_->book1D("TauJetCharge" , "Q_{#tau-Jet}", 11, -5.5, +5.5); hTauJetNumSignalTracks_ = dqmStore_->book1D("TauJetNumSignalTracks" , "Num. Tau signal Cone Tracks", 20, -0.5, +19.5); hTauJetNumIsoTracks_ = dqmStore_->book1D("TauJetNumIsoTracks" , "Num. Tau isolation Cone Tracks", 20, -0.5, +19.5); hVisMass_ = dqmStore_->book1D("VisMass", "#mu + #tau-Jet visible Mass", 20, 0., 120.); hVisMassFinal_ = dqmStore_->book1D("VisMassFinal", "#mu + #tau-Jet visible final Mass", 20, 0., 120.); //hMtMuCaloMEt_ = dqmStore_->book1D("MtMuCaloMEt", "#mu + E_{T}^{miss} (Calo) transverse Mass", 20, 20., 120.); hMtMuPFMEt_ = dqmStore_->book1D("MtMuPFMEt", "#mu + E_{T}^{miss} (PF) transverse Mass", 20, 0., 120.); //hPzetaCaloMEt_ = dqmStore_->book1D("PzetaCaloMEt", "P_{#zeta} - 1.5*P_{#zeta}^{vis} (Calo)", 20, -40., 40.); //hPzetaPFMEt_ = dqmStore_->book1D("PzetaPFMEt", "P_{#zeta} - 1.5*P_{#zeta}^{vis} (PF)", 20, -40., 40.); hMuTauAcoplanarity_ = dqmStore_->book1D("MuTauAcoplanarity", "#Delta #phi_{#mu #tau-Jet}", 20, -TMath::Pi(), +TMath::Pi()); //hMuTauCharge_ = dqmStore_->book1D("MuTauCharge" , "Q_{#mu + #tau-Jet}", 11, -5.5, +5.5); hMuTauDeltaR_ = dqmStore_->book1D("MuTauDeltaR", "#Delta R_{#mu #tau-Jet}", 20, 0, 5); //hVertexChi2_ = dqmStore_->book1D("VertexChi2", "Event Vertex #chi^{2} / n.d.o.f.", 20, 0., 2.0); hVertexZ_ = dqmStore_->book1D("VertexZ", "Event Vertex z-Position", 20, -25., +25.); //hVertexD0_ = dqmStore_->book1D("VertexD0", "Event Vertex d_{0}", 20, -0.0001, 0.05); hCaloMEtPt_ = dqmStore_->book1D("CaloMEtPt", "E_{T}^{miss} (Calo)", 20, 0., 100.); //hCaloMEtPhi_ = dqmStore_->book1D("CaloMEtPhi", "#phi^{miss} (Calo)", 20, -TMath::Pi(), +TMath::Pi()); hPFMEtPt_ = dqmStore_->book1D("PFMEtPt", "E_{T}^{miss} (PF)", 20, 0., 100.); //hPFMEtPhi_ = dqmStore_->book1D("PFMEtPhi", "#phi^{miss} (PF)", 20, -TMath::Pi(), +TMath::Pi()); hCutFlowSummary_ = dqmStore_->book1D("CutFlowSummary", "Cut-flow Summary", 11, 0.5, 11.5); hCutFlowSummary_->setBinLabel(kPassedPreselection, "Preselection"); hCutFlowSummary_->setBinLabel(kPassedTrigger, "HLT"); hCutFlowSummary_->setBinLabel(kPassedMuonId, "#mu ID"); hCutFlowSummary_->setBinLabel(kPassedMuonTrackIso, "#mu Trk Iso."); hCutFlowSummary_->setBinLabel(kPassedMuonEcalIso, "#mu Ecal Iso."); hCutFlowSummary_->setBinLabel(kPassedTauLeadTrack, "#tau lead. Track"); hCutFlowSummary_->setBinLabel(kPassedTauLeadTrackPt, "#tau lead. Track P_{T}"); hCutFlowSummary_->setBinLabel(kPassedTauTrackIso, "#tau Track Iso."); hCutFlowSummary_->setBinLabel(kPassedTauEcalIso, "#tau Ecal Iso."); hCutFlowSummary_->setBinLabel(kPassedTauDiscrAgainstMuons, "#tau anti-#mu Discr."); //hCutFlowSummary_->setBinLabel(kPassedMuonCombIso, "#mu Comb Iso."); hCutFlowSummary_->setBinLabel(kPassedDeltaR, "#DeltaR(#mu,#tau) "); }
void EwkMuTauHistManager::fillHistograms | ( | const edm::Event & | evt, |
const edm::EventSetup & | es | ||
) |
Definition at line 638 of file EwkTauDQM.cc.
References beamSpotSource_, calcDeltaPhi(), calcMt(), caloMEtSource_, cfgError_, deltaRCut_, reco::LeafCandidate::eta(), MonitorElement::Fill(), getTheMuon(), getTheTauJet(), hCaloMEtPt_, hCutFlowSummary_, hltPaths_, hMtMuPFMEt_, hMuonCombIsoPt_, hMuonEcalIsoPt_, hMuonEta_, hMuonPhi_, hMuonPt_, hMuonTrackIsoPt_, hMuTauAcoplanarity_, hMuTauDeltaR_, hPFMEtPt_, hTauDiscrAgainstMuons_, hTauEcalIsoPt_, hTauJetEta_, hTauJetNumIsoTracks_, hTauJetNumSignalTracks_, hTauJetPhi_, hTauJetPt_, hTauLeadTrackPt_, hTauTrackIsoPt_, hVertexZ_, hVisMass_, hVisMassFinal_, getHLTprescales::index, edm::Ref< C, T, F >::isAvailable(), edm::RefVector< C, T, F >::isAvailable(), reco::Muon::isGlobalMuon(), reco::PFTau::isolationPFChargedHadrCandsPtSum(), reco::PFTau::isolationPFGammaCandsEtSum(), reco::Muon::isolationR05(), reco::BaseTau::isolationTracks(), reco::Muon::isTrackerMuon(), kAbsoluteIso, kPassedDeltaR, kPassedMuonEcalIso, kPassedMuonId, kPassedMuonTrackIso, kPassedPreselection, kPassedTauDiscrAgainstMuons, kPassedTauEcalIso, kPassedTauLeadTrack, kPassedTauLeadTrackPt, kPassedTauTrackIso, kPassedTrigger, kRelativeIso, reco::BaseTau::leadTrack(), maxNumWarnings_, metsig::muon, muonCombIsoCut_, muonEcalIsoCut_, muonEtaCut_, muonIsoMode_, muonPtCut_, patZpeak::muons, muonSource_, numEventsAnalyzed_, numEventsSelected_, numWarningsBeamSpot_, numWarningsCaloMEt_, numWarningsHLTpath_, numWarningsMuon_, numWarningsPFMEt_, numWarningsTauDiscrAgainstMuons_, numWarningsTauDiscrByEcalIso_, numWarningsTauDiscrByLeadTrackFinding_, numWarningsTauDiscrByLeadTrackPtCut_, numWarningsTauDiscrByTrackIso_, numWarningsTauJet_, numWarningsTriggerResults_, numWarningsVertex_, reco::LeafCandidate::p4(), pfMEtSource_, reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), readEventData(), reco::BaseTau::signalTracks(), edm::RefVector< C, T, F >::size(), edm::TriggerNames::size(), tauDiscrAgainstMuons_, tauDiscrByLeadTrackFinding_, tauDiscrByLeadTrackPtCut_, tauDiscrByTrackIso_, tauJetEtaCut_, tauJetPtCut_, tauJetSource_, edm::TriggerNames::triggerIndex(), edm::Event::triggerNames(), triggerResultsSource_, GoodVertex_cfg::vertexCollection, vertexSource_, visMassCut_, and reco::Vertex::z().
Referenced by EwkTauDQM::analyze().
{ if ( cfgError_ ) return; //----------------------------------------------------------------------------- // access event-level information //----------------------------------------------------------------------------- bool readError = false; //--- get decision of high-level trigger for the event edm::Handle<edm::TriggerResults> hltDecision; readEventData(evt, triggerResultsSource_, hltDecision, numWarningsTriggerResults_, maxNumWarnings_, readError, "Failed to access Trigger results"); if ( readError ) return; const edm::TriggerNames & triggerNames = evt.triggerNames(*hltDecision); bool isTriggered = false; for ( vstring::const_iterator hltPath = hltPaths_.begin(); hltPath != hltPaths_.end(); ++hltPath ) { unsigned int index = triggerNames.triggerIndex(*hltPath); if ( index < triggerNames.size() ) { if ( hltDecision->accept(index) ) isTriggered = true; } else { if ( numWarningsHLTpath_ < maxNumWarnings_ || maxNumWarnings_ == -1 ) edm::LogWarning ("EwkMuTauHistManager") << " Undefined HLT path = " << (*hltPath) << " !!"; ++numWarningsHLTpath_; continue; } } //--- get reconstructed primary event vertex of the event // (take as "the" primary event vertex the first entry in the collection // of vertex objects, corresponding to the vertex associated to the highest Pt sum of tracks) edm::Handle<reco::VertexCollection> vertexCollection; readEventData(evt, vertexSource_, vertexCollection, numWarningsVertex_, maxNumWarnings_, readError, "Failed to access Vertex collection"); if ( readError ) return; const reco::Vertex* theEventVertex = ( vertexCollection->size() > 0 ) ? &(vertexCollection->at(0)) : 0; //--- get beam-spot (expected vertex position) for the event edm::Handle<reco::BeamSpot> beamSpot; readEventData(evt, beamSpotSource_, beamSpot, numWarningsBeamSpot_, maxNumWarnings_, readError, "Failed to access Beam-spot"); if ( readError ) return; //--- get collections of reconstructed muons from the event edm::Handle<reco::MuonCollection> muons; readEventData(evt, muonSource_, muons, numWarningsMuon_, maxNumWarnings_, readError, "Failed to access Muon collection"); if ( readError ) return; const reco::Muon* theMuon = getTheMuon(*muons, muonEtaCut_, muonPtCut_); double theMuonTrackIsoPt = 1.e+3; double theMuonEcalIsoPt = 1.e+3; double theMuonCombIsoPt = 1.e+3; if ( theMuon ) { theMuonTrackIsoPt = theMuon->isolationR05().sumPt; //mu.isolationR05().emEt + mu.isolationR05().hadEt + mu.isolationR05().sumPt theMuonEcalIsoPt = theMuon->isolationR05().emEt; if ( muonIsoMode_ == kRelativeIso && theMuon->pt() > 0. ) { theMuonTrackIsoPt /= theMuon->pt(); theMuonEcalIsoPt /= theMuon->pt(); theMuonCombIsoPt=(theMuon->isolationR05().sumPt+theMuon->isolationR05().emEt)/theMuon->pt(); //std::cout<<"Rel Iso ="<<theMuonCombIsoPt<<std::endl; } } //--- get collections of reconstructed tau-jets from the event edm::Handle<reco::PFTauCollection> tauJets; readEventData(evt, tauJetSource_, tauJets, numWarningsTauJet_, maxNumWarnings_, readError, "Failed to access Tau-jet collection"); if ( readError ) return; //--- get collections of tau-jet discriminators for those tau-jets edm::Handle<reco::PFTauDiscriminator> tauDiscrByLeadTrackFinding; readEventData(evt, tauDiscrByLeadTrackFinding_, tauDiscrByLeadTrackFinding, numWarningsTauDiscrByLeadTrackFinding_, maxNumWarnings_, readError, "Failed to access collection of pf. Tau discriminators by leading Track finding"); edm::Handle<reco::PFTauDiscriminator> tauDiscrByLeadTrackPtCut; readEventData(evt, tauDiscrByLeadTrackPtCut_, tauDiscrByLeadTrackPtCut, numWarningsTauDiscrByLeadTrackPtCut_, maxNumWarnings_, readError, "Failed to access collection of pf. Tau discriminators by leading Track Pt cut"); edm::Handle<reco::PFTauDiscriminator> tauDiscrByTrackIso; readEventData(evt, tauDiscrByTrackIso_, tauDiscrByTrackIso, numWarningsTauDiscrByTrackIso_, maxNumWarnings_, readError, "Failed to access collection of pf. Tau discriminators by Track isolation"); edm::Handle<reco::PFTauDiscriminator> tauDiscrByEcalIso; readEventData(evt, tauDiscrByTrackIso_, tauDiscrByEcalIso, numWarningsTauDiscrByEcalIso_, maxNumWarnings_, readError, "Failed to access collection of pf. Tau discriminators by ECAL isolation"); edm::Handle<reco::PFTauDiscriminator> tauDiscrAgainstMuons; readEventData(evt, tauDiscrAgainstMuons_, tauDiscrAgainstMuons, numWarningsTauDiscrAgainstMuons_, maxNumWarnings_, readError, "Failed to access collection of pf. Tau discriminators against Muons"); if ( readError ) return; int theTauJetIndex = -1; const reco::PFTau* theTauJet = getTheTauJet(*tauJets, tauJetEtaCut_, tauJetPtCut_, theTauJetIndex); double theTauDiscrByLeadTrackFinding = -1.; double theTauDiscrByLeadTrackPtCut = -1.; double theTauDiscrByTrackIso = -1.; double theTauDiscrByEcalIso = -1.; double theTauDiscrAgainstMuons = -1.; if ( theTauJetIndex != -1 ) { reco::PFTauRef theTauJetRef(tauJets, theTauJetIndex); theTauDiscrByLeadTrackFinding = (*tauDiscrByLeadTrackFinding)[theTauJetRef]; theTauDiscrByLeadTrackPtCut = (*tauDiscrByLeadTrackPtCut)[theTauJetRef]; theTauDiscrByTrackIso = (*tauDiscrByTrackIso)[theTauJetRef]; theTauDiscrByEcalIso = (*tauDiscrByEcalIso)[theTauJetRef]; theTauDiscrAgainstMuons = (*tauDiscrAgainstMuons)[theTauJetRef]; } //--- get missing transverse momentum // measured by calorimeters/reconstructed by particle-flow algorithm edm::Handle<reco::CaloMETCollection> caloMEtCollection; readEventData(evt, caloMEtSource_, caloMEtCollection, numWarningsCaloMEt_, maxNumWarnings_, readError, "Failed to access calo. MET collection"); if ( readError ) return; const reco::CaloMET& caloMEt = caloMEtCollection->at(0); edm::Handle<reco::PFMETCollection> pfMEtCollection; readEventData(evt, pfMEtSource_, pfMEtCollection, numWarningsPFMEt_, maxNumWarnings_, readError, "Failed to access pf. MET collection"); if ( readError ) return; const reco::PFMET& pfMEt = pfMEtCollection->at(0); if ( !(theMuon && theTauJet && theTauJetIndex != -1) ) return; //----------------------------------------------------------------------------- // compute EWK tau analysis specific quantities //----------------------------------------------------------------------------- double dPhiMuTau = calcDeltaPhi(theMuon->phi(), theTauJet->phi()); //double dRMuTau = calcDeltaR(theMuon->p4(), theTauJet->p4()); double dRMuTau = fabs(ROOT::Math::VectorUtil::DeltaR(theMuon->p4(),theTauJet->p4())); double mMuTau = (theMuon->p4() + theTauJet->p4()).M(); //double mtMuCaloMEt = calcMt(theMuon->px(), theMuon->px(), caloMEt.px(), caloMEt.py()); double mtMuPFMEt = calcMt(theMuon->px(), theMuon->px(), pfMEt.px(), pfMEt.py()); //double pZetaCaloMEt = calcPzeta(theMuon->p4(), theTauJet->p4(), caloMEt.px(), caloMEt.py()); //double pZetaPFMEt = calcPzeta(theMuon->p4(), theTauJet->p4(), pfMEt.px(), pfMEt.py()); //----------------------------------------------------------------------------- // apply selection criteria; fill histograms //----------------------------------------------------------------------------- //--- fill muon multiplicity histogram unsigned numGlobalMuons = 0; for ( reco::MuonCollection::const_iterator muon = muons->begin(); muon != muons->end(); ++muon ) { if ( muon->isGlobalMuon() ) { ++numGlobalMuons; } } //hNumGlobalMuons_->Fill(numGlobalMuons); ++numEventsAnalyzed_; bool isSelected = false; int cutFlowStatus = -1; //if ( muonIsoMode_ == kAbsoluteIso){ if ( mMuTau > visMassCut_ ) { cutFlowStatus = kPassedPreselection; } if ( cutFlowStatus == kPassedPreselection && (isTriggered || hltPaths_.size() == 0) ) { cutFlowStatus = kPassedTrigger; } if ( cutFlowStatus == kPassedTrigger && (theMuon->isGlobalMuon()||theMuon->isTrackerMuon()) ) { cutFlowStatus = kPassedMuonId; } if ( cutFlowStatus == kPassedMuonId && (theTauDiscrByLeadTrackFinding > 0.5) && (theTauJet->eta() < tauJetEtaCut_) && (theTauJet->pt() > tauJetPtCut_) ) { cutFlowStatus = kPassedTauLeadTrack; } if ( cutFlowStatus == kPassedTauLeadTrack && theTauDiscrByLeadTrackPtCut > 0.5 ) { cutFlowStatus = kPassedTauLeadTrackPt; //hTauTrackIsoPt_->Fill(theTauJet->isolationPFChargedHadrCandsPtSum()); } if ( cutFlowStatus == kPassedTauLeadTrackPt && theTauDiscrAgainstMuons > 0.5 ) { cutFlowStatus = kPassedTauDiscrAgainstMuons; //hTauEcalIsoPt_->Fill(theTauJet->isolationPFGammaCandsEtSum()); } if ( cutFlowStatus == kPassedTauDiscrAgainstMuons && dRMuTau > deltaRCut_) { cutFlowStatus = kPassedDeltaR; //hTauDiscrAgainstMuons_->Fill(theTauDiscrAgainstMuons); hMuonPt_->Fill(theMuon->pt()); hMuonEta_->Fill(theMuon->eta()); hMuonPhi_->Fill(theMuon->phi()); hTauJetPt_->Fill(theTauJet->pt()); hTauJetEta_->Fill(theTauJet->eta()); hTauJetPhi_->Fill(theTauJet->phi()); //hTauJetCharge_->Fill(theTauJet->charge()); if ( theTauJet->signalTracks().isAvailable() ) hTauJetNumSignalTracks_->Fill(theTauJet->signalTracks().size()); if ( theTauJet->isolationTracks().isAvailable() ) hTauJetNumIsoTracks_->Fill(theTauJet->isolationTracks().size()); hVisMass_->Fill(mMuTau); //hMtMuCaloMEt_->Fill(mtMuCaloMEt); hMtMuPFMEt_->Fill(mtMuPFMEt); //hPzetaCaloMEt_->Fill(pZetaCaloMEt); //hPzetaPFMEt_->Fill(pZetaPFMEt); hMuTauAcoplanarity_->Fill(dPhiMuTau); hMuTauDeltaR_->Fill(dRMuTau); //hMuTauCharge_->Fill(theMuon->charge() + theTauJet->charge()); if ( theEventVertex ) { //hVertexChi2_->Fill(theEventVertex->normalizedChi2()); hVertexZ_->Fill(theEventVertex->z()); //hVertexD0_->Fill(getVertexD0(*theEventVertex, *beamSpot)); } hCaloMEtPt_->Fill(caloMEt.pt()); //hCaloMEtPhi_->Fill(caloMEt.phi()); hPFMEtPt_->Fill(pfMEt.pt()); //hPFMEtPhi_->Fill(pfMEt.phi()); hMuonTrackIsoPt_->Fill(theMuonTrackIsoPt); hMuonEcalIsoPt_->Fill(theMuonEcalIsoPt); hMuonCombIsoPt_->Fill(theMuonCombIsoPt); //hMuonCombIsoPt_->Fill((theMuonTrackIsoPt+theMuonEcalIsoPt)/theMuon->pt()); // std::cout<<"Rel Iso Hist = "<<(theMuonTrackIsoPt+theMuonEcalIsoPt)/theMuon->pt()<<std::endl; hTauEcalIsoPt_->Fill(theTauJet->isolationPFGammaCandsEtSum()); hTauTrackIsoPt_->Fill(theTauJet->isolationPFChargedHadrCandsPtSum()); hTauDiscrAgainstMuons_->Fill(theTauDiscrAgainstMuons); if ( theTauJet->leadTrack().isAvailable() ) hTauLeadTrackPt_->Fill(theTauJet->leadTrack()->pt()); } if ( (cutFlowStatus == kPassedDeltaR) && (((theMuonTrackIsoPt < muonTrackIsoCut_)&&(muonIsoMode_ == kAbsoluteIso))||((1>0)&&(muonIsoMode_ == kRelativeIso))) ) { cutFlowStatus = kPassedMuonTrackIso; //isSelected = true; } if ( cutFlowStatus == kPassedMuonTrackIso && (((theMuonEcalIsoPt < muonEcalIsoCut_)&&(muonIsoMode_ == kAbsoluteIso))||((theMuonCombIsoPt < muonCombIsoCut_)&&(muonIsoMode_ == kRelativeIso))) ) { cutFlowStatus = kPassedMuonEcalIso; //isSelected = true; } if ( cutFlowStatus == kPassedMuonEcalIso && theTauDiscrByTrackIso > 0.5 ) {cutFlowStatus = kPassedTauTrackIso; } if ( cutFlowStatus == kPassedTauTrackIso && theTauDiscrByEcalIso > 0.5 ) { cutFlowStatus = kPassedTauEcalIso; isSelected = true; } for ( int iCut = 1; iCut <= cutFlowStatus; ++iCut ) { hCutFlowSummary_->Fill(iCut); } for ( int iCut = 1; iCut <= cutFlowStatus; ++iCut ) { hCutFlowSummary_->Fill(iCut); } // } if ( isSelected ) { hVisMassFinal_->Fill(mMuTau); ++numEventsSelected_; } }
void EwkMuTauHistManager::finalizeHistograms | ( | ) |
Definition at line 931 of file EwkTauDQM.cc.
References numEventsAnalyzed_, and numEventsSelected_.
Referenced by EwkTauDQM::endJob().
{ edm::LogInfo ("EwkMuTauHistManager") << "Filter-Statistics Summary:" << std::endl << " Events analyzed = " << numEventsAnalyzed_ << std::endl << " Events selected = " << numEventsSelected_; if ( numEventsAnalyzed_ > 0 ) { double eff = numEventsSelected_/(double)numEventsAnalyzed_; edm::LogInfo ("") << "Overall efficiency = " << std::setprecision(4) << eff*100. << " +/- " << std::setprecision(4) << TMath::Sqrt(eff*(1 - eff)/numEventsAnalyzed_)*100. << ")%"; } }
Definition at line 240 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
Definition at line 243 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
int EwkMuTauHistManager::cfgError_ [private] |
Definition at line 321 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
double EwkMuTauHistManager::deltaRCut_ [private] |
Definition at line 267 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
std::string EwkMuTauHistManager::dqmDirectory_ [private] |
Definition at line 272 of file EwkTauDQM.h.
Referenced by bookHistograms().
DQMStore* EwkMuTauHistManager::dqmStore_ [private] |
Definition at line 269 of file EwkTauDQM.h.
Referenced by bookHistograms().
MonitorElement* EwkMuTauHistManager::hCaloMEtPt_ [private] |
Definition at line 308 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
Definition at line 314 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
vstring EwkMuTauHistManager::hltPaths_ [private] |
Definition at line 254 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
MonitorElement* EwkMuTauHistManager::hMtMuPFMEt_ [private] |
Definition at line 298 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
Definition at line 281 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
Definition at line 280 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
MonitorElement* EwkMuTauHistManager::hMuonEta_ [private] |
Definition at line 277 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
MonitorElement* EwkMuTauHistManager::hMuonPhi_ [private] |
Definition at line 278 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
MonitorElement* EwkMuTauHistManager::hMuonPt_ [private] |
Definition at line 276 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
Definition at line 279 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
Definition at line 301 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
MonitorElement* EwkMuTauHistManager::hMuTauDeltaR_ [private] |
Definition at line 295 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
MonitorElement* EwkMuTauHistManager::hPFMEtPt_ [private] |
Definition at line 311 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
Definition at line 289 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
Definition at line 288 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
Definition at line 290 of file EwkTauDQM.h.
MonitorElement* EwkMuTauHistManager::hTauJetEta_ [private] |
Definition at line 284 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
Definition at line 292 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
Definition at line 291 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
MonitorElement* EwkMuTauHistManager::hTauJetPhi_ [private] |
Definition at line 285 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
MonitorElement* EwkMuTauHistManager::hTauJetPt_ [private] |
Definition at line 283 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
Definition at line 286 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
Definition at line 287 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
MonitorElement* EwkMuTauHistManager::hVertexZ_ [private] |
Definition at line 305 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
MonitorElement* EwkMuTauHistManager::hVisMass_ [private] |
Definition at line 294 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
Definition at line 296 of file EwkTauDQM.h.
Referenced by bookHistograms(), and fillHistograms().
int EwkMuTauHistManager::maxNumWarnings_ [private] |
Definition at line 323 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
double EwkMuTauHistManager::muonCombIsoCut_ [private] |
Definition at line 260 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
double EwkMuTauHistManager::muonEcalIsoCut_ [private] |
Definition at line 259 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
double EwkMuTauHistManager::muonEtaCut_ [private] |
Definition at line 256 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
int EwkMuTauHistManager::muonIsoMode_ [private] |
Definition at line 261 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
double EwkMuTauHistManager::muonPtCut_ [private] |
Definition at line 257 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
Definition at line 241 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
double EwkMuTauHistManager::muonTrackIsoCut_ [private] |
Definition at line 258 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager().
unsigned EwkMuTauHistManager::numEventsAnalyzed_ [private] |
Definition at line 318 of file EwkTauDQM.h.
Referenced by fillHistograms(), and finalizeHistograms().
unsigned EwkMuTauHistManager::numEventsSelected_ [private] |
Definition at line 319 of file EwkTauDQM.h.
Referenced by fillHistograms(), and finalizeHistograms().
long EwkMuTauHistManager::numWarningsBeamSpot_ [private] |
Definition at line 328 of file EwkTauDQM.h.
Referenced by fillHistograms().
long EwkMuTauHistManager::numWarningsCaloMEt_ [private] |
Definition at line 336 of file EwkTauDQM.h.
Referenced by fillHistograms().
long EwkMuTauHistManager::numWarningsHLTpath_ [private] |
Definition at line 326 of file EwkTauDQM.h.
Referenced by fillHistograms().
long EwkMuTauHistManager::numWarningsMuon_ [private] |
Definition at line 329 of file EwkTauDQM.h.
Referenced by fillHistograms().
long EwkMuTauHistManager::numWarningsPFMEt_ [private] |
Definition at line 337 of file EwkTauDQM.h.
Referenced by fillHistograms().
long EwkMuTauHistManager::numWarningsTauDiscrAgainstMuons_ [private] |
Definition at line 335 of file EwkTauDQM.h.
Referenced by fillHistograms().
long EwkMuTauHistManager::numWarningsTauDiscrByEcalIso_ [private] |
Definition at line 334 of file EwkTauDQM.h.
Referenced by fillHistograms().
long EwkMuTauHistManager::numWarningsTauDiscrByLeadTrackFinding_ [private] |
Definition at line 331 of file EwkTauDQM.h.
Referenced by fillHistograms().
long EwkMuTauHistManager::numWarningsTauDiscrByLeadTrackPtCut_ [private] |
Definition at line 332 of file EwkTauDQM.h.
Referenced by fillHistograms().
long EwkMuTauHistManager::numWarningsTauDiscrByTrackIso_ [private] |
Definition at line 333 of file EwkTauDQM.h.
Referenced by fillHistograms().
long EwkMuTauHistManager::numWarningsTauJet_ [private] |
Definition at line 330 of file EwkTauDQM.h.
Referenced by fillHistograms().
long EwkMuTauHistManager::numWarningsTriggerResults_ [private] |
Definition at line 325 of file EwkTauDQM.h.
Referenced by fillHistograms().
long EwkMuTauHistManager::numWarningsVertex_ [private] |
Definition at line 327 of file EwkTauDQM.h.
Referenced by fillHistograms().
Definition at line 244 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
Definition at line 250 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
Definition at line 249 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager().
Definition at line 246 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
Definition at line 247 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
Definition at line 248 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
double EwkMuTauHistManager::tauJetEtaCut_ [private] |
Definition at line 263 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
double EwkMuTauHistManager::tauJetPtCut_ [private] |
Definition at line 264 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
Definition at line 242 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
Definition at line 238 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
Definition at line 239 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().
double EwkMuTauHistManager::visMassCut_ [private] |
Definition at line 266 of file EwkTauDQM.h.
Referenced by EwkMuTauHistManager(), and fillHistograms().