|
|
#include <EfficiencyAnalyzer.h>
Class EfficiencyAnalyzer
DQM monitoring for dimuon mass
Author: S.Folgueras, A. Calderon
Definition at line 31 of file EfficiencyAnalyzer.h.
◆ EfficiencyAnalyzer()
◆ ~EfficiencyAnalyzer()
EfficiencyAnalyzer::~EfficiencyAnalyzer |
( |
| ) |
|
|
override |
◆ analyze()
to be read from output as "generalTracks"
Reimplemented from DQMEDAnalyzer.
Definition at line 158 of file EfficiencyAnalyzer.cc.
159 LogTrace(
metname) <<
"[EfficiencyAnalyzer] Analyze the mu in different eta regions";
177 bool bPrimaryVertex =
true;
179 bPrimaryVertex =
false;
182 LogTrace(
metname) <<
"[EfficiencyAnalyzer] Could not find vertex collection" << std::endl;
183 bPrimaryVertex =
false;
192 double vertex_chi2 =
v->normalizedChi2();
193 double vertex_ndof =
v->ndof();
194 bool fakeVtx =
v->isFake();
195 double vertex_Z =
v->z();
197 if (!fakeVtx && vertex_number >= 1 && vertex_ndof > 4 && vertex_chi2 < 999 && fabs(vertex_Z) < 24.) {
198 bPrimaryVertex =
true;
209 unsigned int theIndexOfThePrimaryVertex = 999.;
211 for (
unsigned int ind = 0; ind <
vertex->size(); ++ind) {
212 if ((*
vertex)[ind].isValid() && !((*vertex)[ind].isFake())) {
213 theIndexOfThePrimaryVertex = ind;
219 if (theIndexOfThePrimaryVertex < 100) {
220 posVtx = ((*vertex)[theIndexOfThePrimaryVertex]).
position();
221 errVtx = ((*vertex)[theIndexOfThePrimaryVertex]).
error();
223 LogInfo(
"RecoMuonValidator") <<
"reco::PrimaryVertex not found, use BeamSpot position instead\n";
229 posVtx =
bs.position();
230 errVtx(0, 0) =
bs.BeamWidthX();
231 errVtx(1, 1) =
bs.BeamWidthY();
232 errVtx(2, 2) =
bs.sigmaZ();
238 if (!
muons.isValid())
242 TLorentzVector Mu1, Mu2;
248 LogTrace(
metname) <<
"[EfficiencyAnalyzer] loop over first muons" << endl;
252 float combIso = (Iso_muon.
emEt + Iso_muon.
hadEt + Iso_muon.
sumPt);
255 if (!muon1->isGlobalMuon())
260 float muPt1 = recoCombinedGlbTrack1->pt();
261 Mu1.SetPxPyPzE(recoCombinedGlbTrack1->px(),
262 recoCombinedGlbTrack1->py(),
263 recoCombinedGlbTrack1->pz(),
264 recoCombinedGlbTrack1->p());
278 if (combIso / muPt1 > 0.1)
282 LogTrace(
metname) <<
"[EfficiencyAnalyzer] loop over second muon" << endl;
286 if (muon2->eta() < 1.479)
288 if (muon2->eta() >= 1.479)
292 Mu2.SetPxPyPzE(muon2->px(), muon2->py(), muon2->pz(), muon2->p());
294 float Minv = (Mu1 + Mu2).M();
295 if (!muon2->isTrackerMuon())
299 if ((muon1->charge()) * (muon2->charge()) > 0)
301 if (Minv < 70 || Minv > 110)
307 if (muon2->innerTrack()->extra().isAvailable()) {
316 if (muon2->pt() > 20)
330 if (muon2->innerTrack()->extra().isAvailable()) {
340 if (muon2->pt() > 20)
352 if (bPrimaryVertex && isMB)
354 if (bPrimaryVertex && isME)
358 float tkIso = muon2->isolationR03().sumPt;
359 float emIso = muon2->isolationR03().emEt;
360 float hadIso = muon2->isolationR03().hadEt + muon2->isolationR03().hoEt;
361 float relDetIso = (tkIso + emIso + hadIso) / (muon2->pt());
363 if (relDetIso < 0.05) {
372 if (bPrimaryVertex && isMB)
374 if (bPrimaryVertex && isME)
379 float chargedIso = muon2->pfIsolationR04().sumChargedHadronPt;
380 float neutralIso = muon2->pfIsolationR04().sumNeutralHadronEt;
381 float photonIso = muon2->pfIsolationR04().sumPhotonEt;
384 float pu = muon2->pfIsolationR04().sumPUPt;
386 float relPFIsoPUCorrected = (
chargedIso + neutralphotonPUCorrected) / (muon2->pt());
388 if (relPFIso < 0.12) {
397 if (bPrimaryVertex && isMB)
399 if (bPrimaryVertex && isME)
404 if (relPFIsoPUCorrected < 0.12) {
413 if (bPrimaryVertex && isMB)
415 if (bPrimaryVertex && isME)
References cms::cuda::bs, boostedTaus_cff::chargedIso, reco::MuonIsolation::emEt, relativeConstraints::error, reco::MuonIsolation::hadEt, iEvent, muon::isLooseMuon(), muon::isMediumMuon(), muon::isTightMuon(), LogTrace, SiStripPI::max, metname, PDWG_BPHSkim_cff::muons, boostedTaus_cff::neutralIso, gedPhotonSequence_cff::photonIso, position, muons2muons_cfi::pu, reco::MuonIsolation::sumPt, tracks, findQualityFiles::v, bphysicsOniaDQM_cfi::vertex, and spclusmultinvestigator_cfi::vertexCollection.
◆ bookHistograms()
Implements DQMEDAnalyzer.
Definition at line 63 of file EfficiencyAnalyzer.cc.
121 "passProbes_EB_detIsoID_nVtx",
"Barrel: detIsoID Passing Probes nVtx (R03)",
vtxBin_,
vtxMin_,
vtxMax_);
123 "passProbes_EE_detIsoID_nVtx",
"Endcap: detIsoID Passing Probes nVtx (R03)",
vtxBin_,
vtxMin_,
vtxMax_);
125 "passProbes_EB_pfIsoID_nVtx",
"Barrel: pfIsoID Passing Probes nVtx (R04)",
vtxBin_,
vtxMin_,
vtxMax_);
127 "passProbes_EE_pfIsoID_nVtx",
"Endcap: pfIsoID Passing Probes nVtx (R04)",
vtxBin_,
vtxMin_,
vtxMax_);
132 "passProbes_pfIsodBID_pt",
"pfIsoID Passing Probes Pt (deltaB PU correction)",
ptBin_,
ptMin_,
ptMax_);
134 "passProbes_EB_pfIsodBID_pt",
"Barrel: pfIsoID Passing Probes Pt (deltaB PU correction)",
ptBin_,
ptMin_,
ptMax_);
136 "passProbes_EE_pfIsodBID_pt",
"Endcap: pfIsoID Passing Probes Pt (deltaB PU correction)",
ptBin_,
ptMin_,
ptMax_);
138 "pfIsoID Passing Probes nVtx (R04) (deltaB PU correction)",
143 "Barrel: pfIsoID Passing Probes nVtx (R04) (deltaB PU correction)",
148 "Endcap: pfIsoID Passing Probes nVtx (R04) (deltaB PU correction)",
154 cout <<
"[EfficiencyAnalyzer] Parameters initialization DONE" << endl;
References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), gather_cfg::cout, and dqm::implementation::NavigatorBase::setCurrentFolder().
◆ _numPV
int EfficiencyAnalyzer::_numPV |
|
private |
◆ doPVCheck_
bool EfficiencyAnalyzer::doPVCheck_ |
|
private |
◆ etaBin_
int EfficiencyAnalyzer::etaBin_ |
|
private |
◆ etaMax_
double EfficiencyAnalyzer::etaMax_ |
|
private |
◆ etaMin_
double EfficiencyAnalyzer::etaMin_ |
|
private |
◆ h_allProbes_EB_ID_nVtx
◆ h_allProbes_EB_ID_pt
◆ h_allProbes_EB_pt
◆ h_allProbes_EE_ID_nVtx
◆ h_allProbes_EE_ID_pt
◆ h_allProbes_EE_pt
◆ h_allProbes_eta
◆ h_allProbes_hp_eta
◆ h_allProbes_ID_nVtx
◆ h_allProbes_ID_pt
◆ h_allProbes_inner_eta
◆ h_allProbes_inner_phi
◆ h_allProbes_inner_pt
◆ h_allProbes_phi
◆ h_allProbes_pt
◆ h_failProbes_ID_eta
◆ h_failProbes_ID_phi
◆ h_failProbes_ID_pt
◆ h_passProbes_detIsoID_nVtx
◆ h_passProbes_detIsoID_pt
◆ h_passProbes_EB_detIsoID_nVtx
◆ h_passProbes_EB_detIsoID_pt
◆ h_passProbes_EB_pfIsodBID_nVtx
◆ h_passProbes_EB_pfIsodBID_pt
◆ h_passProbes_EB_pfIsoID_nVtx
◆ h_passProbes_EB_pfIsoID_pt
◆ h_passProbes_EE_detIsoID_nVtx
◆ h_passProbes_EE_detIsoID_pt
◆ h_passProbes_EE_pfIsodBID_nVtx
◆ h_passProbes_EE_pfIsodBID_pt
◆ h_passProbes_EE_pfIsoID_nVtx
◆ h_passProbes_EE_pfIsoID_pt
◆ h_passProbes_ID_EB_pt
◆ h_passProbes_ID_EE_pt
◆ h_passProbes_ID_eta
◆ h_passProbes_ID_hp_eta
◆ h_passProbes_ID_inner_eta
◆ h_passProbes_ID_inner_phi
◆ h_passProbes_ID_inner_pt
◆ h_passProbes_ID_phi
◆ h_passProbes_ID_pt
◆ h_passProbes_pfIsodBID_nVtx
◆ h_passProbes_pfIsodBID_pt
◆ h_passProbes_pfIsoID_nVtx
◆ h_passProbes_pfIsoID_pt
◆ ID_
std::string EfficiencyAnalyzer::ID_ |
|
private |
◆ metname
std::string EfficiencyAnalyzer::metname |
|
private |
◆ parameters
◆ phiBin_
int EfficiencyAnalyzer::phiBin_ |
|
private |
◆ phiMax_
double EfficiencyAnalyzer::phiMax_ |
|
private |
◆ phiMin_
double EfficiencyAnalyzer::phiMin_ |
|
private |
◆ ptBin_
int EfficiencyAnalyzer::ptBin_ |
|
private |
◆ ptMax_
double EfficiencyAnalyzer::ptMax_ |
|
private |
◆ ptMin_
double EfficiencyAnalyzer::ptMin_ |
|
private |
◆ theBeamSpotLabel_
◆ theFolder
std::string EfficiencyAnalyzer::theFolder |
|
private |
◆ theMuonCollectionLabel_
◆ theTrackCollectionLabel_
◆ theVertexLabel_
◆ vtxBin_
int EfficiencyAnalyzer::vtxBin_ |
|
private |
◆ vtxMax_
double EfficiencyAnalyzer::vtxMax_ |
|
private |
◆ vtxMin_
double EfficiencyAnalyzer::vtxMin_ |
|
private |
MonitorElement * h_passProbes_EE_pfIsodBID_nVtx
MonitorElement * h_passProbes_pfIsodBID_nVtx
MonitorElement * h_passProbes_ID_inner_eta
edm::EDGetTokenT< edm::View< reco::Muon > > theMuonCollectionLabel_
MonitorElement * h_passProbes_EB_detIsoID_pt
MonitorElement * h_passProbes_pfIsoID_nVtx
MonitorElement * h_passProbes_pfIsodBID_pt
MonitorElement * h_passProbes_EE_pfIsoID_nVtx
MonitorElement * h_passProbes_EB_pfIsodBID_pt
MonitorElement * h_allProbes_EE_pt
MonitorElement * h_passProbes_ID_EB_pt
math::Error< dimension >::type Error
covariance error matrix (3x3)
MonitorElement * h_passProbes_EE_pfIsodBID_pt
std::vector< Vertex > VertexCollection
collection of Vertex objects
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * h_passProbes_ID_hp_eta
MonitorElement * h_allProbes_EB_ID_pt
MonitorElement * h_passProbes_ID_EE_pt
MonitorElement * h_passProbes_detIsoID_nVtx
MonitorElement * h_passProbes_ID_inner_pt
Log< level::Info, false > LogInfo
MonitorElement * h_passProbes_EB_detIsoID_nVtx
MonitorElement * h_allProbes_phi
MonitorElement * h_passProbes_EB_pfIsoID_pt
float sumPt
sum-pt of tracks
bool isLooseMuon(const reco::Muon &)
MonitorElement * h_passProbes_detIsoID_pt
MonitorElement * h_allProbes_ID_nVtx
MonitorElement * h_allProbes_hp_eta
MonitorElement * h_passProbes_EE_pfIsoID_pt
MonitorElement * h_passProbes_EE_detIsoID_nVtx
MonitorElement * h_passProbes_ID_pt
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionLabel_
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
static int position[264][3]
MonitorElement * h_passProbes_ID_phi
MonitorElement * h_allProbes_EE_ID_nVtx
MonitorElement * h_passProbes_EB_pfIsodBID_nVtx
MonitorElement * h_allProbes_inner_eta
MonitorElement * h_allProbes_EB_ID_nVtx
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotLabel_
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
MonitorElement * h_passProbes_EB_pfIsoID_nVtx
MonitorElement * h_passProbes_pfIsoID_pt
MonitorElement * h_allProbes_inner_phi
MonitorElement * h_allProbes_inner_pt
math::XYZPoint Point
point in the space
MonitorElement * h_passProbes_ID_eta
MonitorElement * h_allProbes_eta
MonitorElement * h_passProbes_EE_detIsoID_pt
edm::EDGetTokenT< reco::VertexCollection > theVertexLabel_
MonitorElement * h_allProbes_ID_pt
edm::ParameterSet parameters
T getParameter(std::string const &) const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
MonitorElement * h_allProbes_EE_ID_pt
MonitorElement * h_allProbes_EB_pt
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * h_passProbes_ID_inner_phi
MonitorElement * h_allProbes_pt