CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
EfficiencyAnalyzer Class Reference

#include <EfficiencyAnalyzer.h>

Inheritance diagram for EfficiencyAnalyzer:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &eventSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 EfficiencyAnalyzer (const edm::ParameterSet &pset)
 
 ~EfficiencyAnalyzer () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Attributes

int _numPV
 
bool doPVCheck_
 
int etaBin_
 
double etaMax_
 
double etaMin_
 
MonitorElementh_allProbes_EB_ID_nVtx
 
MonitorElementh_allProbes_EB_ID_pt
 
MonitorElementh_allProbes_EB_pt
 
MonitorElementh_allProbes_EE_ID_nVtx
 
MonitorElementh_allProbes_EE_ID_pt
 
MonitorElementh_allProbes_EE_pt
 
MonitorElementh_allProbes_eta
 
MonitorElementh_allProbes_hp_eta
 
MonitorElementh_allProbes_ID_nVtx
 
MonitorElementh_allProbes_ID_pt
 
MonitorElementh_allProbes_inner_eta
 
MonitorElementh_allProbes_inner_phi
 
MonitorElementh_allProbes_inner_pt
 
MonitorElementh_allProbes_phi
 
MonitorElementh_allProbes_pt
 
MonitorElementh_failProbes_ID_eta
 
MonitorElementh_failProbes_ID_phi
 
MonitorElementh_failProbes_ID_pt
 
MonitorElementh_passProbes_detIsoID_nVtx
 
MonitorElementh_passProbes_detIsoID_pt
 
MonitorElementh_passProbes_EB_detIsoID_nVtx
 
MonitorElementh_passProbes_EB_detIsoID_pt
 
MonitorElementh_passProbes_EB_pfIsodBID_nVtx
 
MonitorElementh_passProbes_EB_pfIsodBID_pt
 
MonitorElementh_passProbes_EB_pfIsoID_nVtx
 
MonitorElementh_passProbes_EB_pfIsoID_pt
 
MonitorElementh_passProbes_EE_detIsoID_nVtx
 
MonitorElementh_passProbes_EE_detIsoID_pt
 
MonitorElementh_passProbes_EE_pfIsodBID_nVtx
 
MonitorElementh_passProbes_EE_pfIsodBID_pt
 
MonitorElementh_passProbes_EE_pfIsoID_nVtx
 
MonitorElementh_passProbes_EE_pfIsoID_pt
 
MonitorElementh_passProbes_ID_EB_pt
 
MonitorElementh_passProbes_ID_EE_pt
 
MonitorElementh_passProbes_ID_eta
 
MonitorElementh_passProbes_ID_hp_eta
 
MonitorElementh_passProbes_ID_inner_eta
 
MonitorElementh_passProbes_ID_inner_phi
 
MonitorElementh_passProbes_ID_inner_pt
 
MonitorElementh_passProbes_ID_phi
 
MonitorElementh_passProbes_ID_pt
 
MonitorElementh_passProbes_pfIsodBID_nVtx
 
MonitorElementh_passProbes_pfIsodBID_pt
 
MonitorElementh_passProbes_pfIsoID_nVtx
 
MonitorElementh_passProbes_pfIsoID_pt
 
std::string ID_
 
std::string metname
 
edm::ParameterSet parameters
 
int phiBin_
 
double phiMax_
 
double phiMin_
 
int ptBin_
 
double ptMax_
 
double ptMin_
 
edm::EDGetTokenT< reco::BeamSpottheBeamSpotLabel_
 
std::string theFolder
 
edm::EDGetTokenT< edm::View
< reco::Muon > > 
theMuonCollectionLabel_
 
edm::EDGetTokenT
< reco::TrackCollection
theTrackCollectionLabel_
 
edm::EDGetTokenT
< reco::VertexCollection
theVertexLabel_
 
int vtxBin_
 
double vtxMax_
 
double vtxMin_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Class EfficiencyAnalyzer

DQM monitoring for dimuon mass

Author: S.Folgueras, A. Calderon

Definition at line 31 of file EfficiencyAnalyzer.h.

Constructor & Destructor Documentation

EfficiencyAnalyzer::EfficiencyAnalyzer ( const edm::ParameterSet pset)

Definition at line 29 of file EfficiencyAnalyzer.cc.

References etaMax_(), etaMin_(), and ptMin_().

29  {
30  parameters = pSet;
31 
32  // DATA
33  theMuonCollectionLabel_ = consumes<edm::View<reco::Muon> >(parameters.getParameter<edm::InputTag>("MuonCollection"));
34  theTrackCollectionLabel_ = consumes<reco::TrackCollection>(parameters.getParameter<edm::InputTag>("TrackCollection"));
35  theVertexLabel_ = consumes<reco::VertexCollection>(parameters.getParameter<edm::InputTag>("VertexLabel"));
36  theBeamSpotLabel_ = mayConsume<reco::BeamSpot>(parameters.getParameter<edm::InputTag>("BeamSpotLabel"));
37 
38  //Vertex requirements
39  doPVCheck_ = parameters.getParameter<bool>("doPrimaryVertexCheck");
40 
41  ptBin_ = parameters.getParameter<int>("ptBin");
42  ptMin_ = parameters.getParameter<double>("ptMin");
43  ptMax_ = parameters.getParameter<double>("ptMax");
44 
45  etaBin_ = parameters.getParameter<int>("etaBin");
46  etaMin_ = parameters.getParameter<double>("etaMin");
47  etaMax_ = parameters.getParameter<double>("etaMax");
48 
49  phiBin_ = parameters.getParameter<int>("phiBin");
50  phiMin_ = parameters.getParameter<double>("phiMin");
51  phiMax_ = parameters.getParameter<double>("phiMax");
52 
53  vtxBin_ = parameters.getParameter<int>("vtxBin");
54  vtxMin_ = parameters.getParameter<double>("vtxMin");
55  vtxMax_ = parameters.getParameter<double>("vtxMax");
56 
57  ID_ = parameters.getParameter<string>("ID");
58  theFolder = parameters.getParameter<string>("folder");
59 }
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionLabel_
edm::ParameterSet parameters
edm::EDGetTokenT< reco::VertexCollection > theVertexLabel_
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotLabel_
edm::EDGetTokenT< edm::View< reco::Muon > > theMuonCollectionLabel_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EfficiencyAnalyzer::~EfficiencyAnalyzer ( )
override

Definition at line 61 of file EfficiencyAnalyzer.cc.

61 {}

Member Function Documentation

void EfficiencyAnalyzer::analyze ( const edm::Event event,
const edm::EventSetup eventSetup 
)
overridevirtual

to be read from output as "generalTracks"

Reimplemented from DQMEDAnalyzer.

Definition at line 158 of file EfficiencyAnalyzer.cc.

References reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthY(), cms::cuda::bs, reco::MuonIsolation::emEt, relativeConstraints::error, edm::Event::getByToken(), reco::MuonIsolation::hadEt, muon::isLooseMuon(), muon::isMediumMuon(), muon::isTightMuon(), edm::HandleBase::isValid(), LogTrace, SiStripPI::max, metname, patZpeak::muons, reco::BeamSpot::position(), position, edm::Handle< T >::product(), reco::BeamSpot::sigmaZ(), reco::MuonIsolation::sumPt, tracks, findQualityFiles::v, and GoodVertex_cfg::vertexCollection.

158  {
159  LogTrace(metname) << "[EfficiencyAnalyzer] Analyze the mu in different eta regions";
160  // ==========================================================
161  // BEGIN READ DATA:
162  // Muon information
164  iEvent.getByToken(theMuonCollectionLabel_, muons);
165 
166  // Tracks information
168  iEvent.getByToken(theTrackCollectionLabel_, tracks);
169 
170  //Vertex information
172  iEvent.getByToken(theVertexLabel_, vertex);
173  // END READ DATA
174  // ==========================================================
175 
176  _numPV = 0;
177  bool bPrimaryVertex = true;
178  if (doPVCheck_) {
179  bPrimaryVertex = false;
180 
181  if (!vertex.isValid()) {
182  LogTrace(metname) << "[EfficiencyAnalyzer] Could not find vertex collection" << std::endl;
183  bPrimaryVertex = false;
184  }
185 
186  if (vertex.isValid()) {
187  const reco::VertexCollection& vertexCollection = *(vertex.product());
188  int vertex_number = vertexCollection.size();
189 
190  reco::VertexCollection::const_iterator v = vertexCollection.begin();
191  for (; v != vertexCollection.end(); ++v) {
192  double vertex_chi2 = v->normalizedChi2();
193  double vertex_ndof = v->ndof();
194  bool fakeVtx = v->isFake();
195  double vertex_Z = v->z();
196 
197  if (!fakeVtx && vertex_number >= 1 && vertex_ndof > 4 && vertex_chi2 < 999 && fabs(vertex_Z) < 24.) {
198  bPrimaryVertex = true;
199  ++_numPV;
200  }
201  }
202  }
203  }
204 
205  // =================================================================================
206  // Look for the Primary Vertex (and use the BeamSpot instead, if you can't find it):
207  reco::Vertex::Point posVtx;
208  reco::Vertex::Error errVtx;
209  unsigned int theIndexOfThePrimaryVertex = 999.;
210  if (vertex.isValid()) {
211  for (unsigned int ind = 0; ind < vertex->size(); ++ind) {
212  if ((*vertex)[ind].isValid() && !((*vertex)[ind].isFake())) {
213  theIndexOfThePrimaryVertex = ind;
214  break;
215  }
216  }
217  }
218 
219  if (theIndexOfThePrimaryVertex < 100) {
220  posVtx = ((*vertex)[theIndexOfThePrimaryVertex]).position();
221  errVtx = ((*vertex)[theIndexOfThePrimaryVertex]).error();
222  } else {
223  LogInfo("RecoMuonValidator") << "reco::PrimaryVertex not found, use BeamSpot position instead\n";
224 
225  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
226  iEvent.getByToken(theBeamSpotLabel_, recoBeamSpotHandle);
227  reco::BeamSpot bs = *recoBeamSpotHandle;
228 
229  posVtx = bs.position();
230  errVtx(0, 0) = bs.BeamWidthX();
231  errVtx(1, 1) = bs.BeamWidthY();
232  errVtx(2, 2) = bs.sigmaZ();
233  }
234 
235  const reco::Vertex thePrimaryVertex(posVtx, errVtx);
236  // ==========================================================
237 
238  if (!muons.isValid())
239  return;
240 
241  // Loop on muon collection
242  TLorentzVector Mu1, Mu2;
243 
244  bool isMB = false;
245  bool isME = false;
246 
247  for (edm::View<reco::Muon>::const_iterator muon1 = muons->begin(); muon1 != muons->end(); ++muon1) {
248  LogTrace(metname) << "[EfficiencyAnalyzer] loop over first muons" << endl;
249 
250  //--- Define combined isolation
251  reco::MuonIsolation Iso_muon = muon1->isolationR03();
252  float combIso = (Iso_muon.emEt + Iso_muon.hadEt + Iso_muon.sumPt);
253 
254  //--- Is Global Muon
255  if (!muon1->isGlobalMuon())
256  continue;
257 
258  // get the track combinig the information from both the Tracker and the Spectrometer
259  reco::TrackRef recoCombinedGlbTrack1 = muon1->combinedMuon();
260  float muPt1 = recoCombinedGlbTrack1->pt();
261  Mu1.SetPxPyPzE(recoCombinedGlbTrack1->px(),
262  recoCombinedGlbTrack1->py(),
263  recoCombinedGlbTrack1->pz(),
264  recoCombinedGlbTrack1->p());
265 
266  //--- Define if it is a tight muon
267  // Change the Tight muon definition by using the implemented method in: MuonSelectors.cc
268  if (ID_ == "Loose" && !muon::isLooseMuon(*muon1))
269  continue;
270  if (ID_ == "Medium" && !muon::isMediumMuon(*muon1))
271  continue;
272  if (ID_ == "Tight" && !muon::isTightMuon(*muon1, thePrimaryVertex))
273  continue;
274 
275  //-- is isolated muon
276  if (muPt1 <= 15)
277  continue;
278  if (combIso / muPt1 > 0.1)
279  continue;
280 
281  for (edm::View<reco::Muon>::const_iterator muon2 = muons->begin(); muon2 != muons->end(); ++muon2) {
282  LogTrace(metname) << "[EfficiencyAnalyzer] loop over second muon" << endl;
283  if (muon2 == muon1)
284  continue;
285 
286  if (muon2->eta() < 1.479)
287  isMB = true;
288  if (muon2->eta() >= 1.479)
289  isME = true;
290 
291  //--> should we apply track quality cuts???
292  Mu2.SetPxPyPzE(muon2->px(), muon2->py(), muon2->pz(), muon2->p());
293 
294  float Minv = (Mu1 + Mu2).M();
295  if (!muon2->isTrackerMuon())
296  continue;
297  if (muon2->pt() < 5)
298  continue;
299  if ((muon1->charge()) * (muon2->charge()) > 0)
300  continue;
301  if (Minv < 70 || Minv > 110)
302  continue;
303 
304  h_allProbes_pt->Fill(muon2->pt());
305  h_allProbes_eta->Fill(muon2->eta());
306  h_allProbes_phi->Fill(muon2->phi());
307  if (muon2->innerTrack()->extra().isAvailable()) {
308  h_allProbes_inner_pt->Fill(muon2->innerTrack()->innerMomentum().Rho());
309  h_allProbes_inner_eta->Fill(muon2->innerTrack()->innerPosition().Eta());
310  h_allProbes_inner_phi->Fill(muon2->innerTrack()->innerPosition().Phi());
311  }
312  if (isMB)
313  h_allProbes_EB_pt->Fill(muon2->pt());
314  if (isME)
315  h_allProbes_EE_pt->Fill(muon2->pt());
316  if (muon2->pt() > 20)
317  h_allProbes_hp_eta->Fill(muon2->eta());
318 
319  // Probes passing the tight muon criteria
320  if (ID_ == "Loose" && !muon::isLooseMuon(*muon2))
321  continue;
322  if (ID_ == "Medium" && !muon::isMediumMuon(*muon2))
323  continue;
324  if (ID_ == "Tight" && !muon::isTightMuon(*muon2, thePrimaryVertex))
325  continue;
326 
327  h_passProbes_ID_pt->Fill(muon2->pt());
328  h_passProbes_ID_eta->Fill(muon2->eta());
329  h_passProbes_ID_phi->Fill(muon2->phi());
330  if (muon2->innerTrack()->extra().isAvailable()) {
331  h_passProbes_ID_inner_pt->Fill(muon2->innerTrack()->innerMomentum().Rho());
332  h_passProbes_ID_inner_eta->Fill(muon2->innerTrack()->innerPosition().Eta());
333  h_passProbes_ID_inner_phi->Fill(muon2->innerTrack()->innerPosition().Phi());
334  }
335 
336  if (isMB)
337  h_passProbes_ID_EB_pt->Fill(muon2->pt());
338  if (isME)
339  h_passProbes_ID_EE_pt->Fill(muon2->pt());
340  if (muon2->pt() > 20)
341  h_passProbes_ID_hp_eta->Fill(muon2->eta());
342 
343  h_allProbes_ID_pt->Fill(muon2->pt());
344  if (isMB)
345  h_allProbes_EB_ID_pt->Fill(muon2->pt());
346  if (isME)
347  h_allProbes_EE_ID_pt->Fill(muon2->pt());
348 
349  //------- For PU monitoring -------//
350  if (bPrimaryVertex)
352  if (bPrimaryVertex && isMB)
354  if (bPrimaryVertex && isME)
356 
357  //-- Define det relative isolation
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());
362 
363  if (relDetIso < 0.05) {
364  h_passProbes_detIsoID_pt->Fill(muon2->pt());
365  if (isMB)
366  h_passProbes_EB_detIsoID_pt->Fill(muon2->pt());
367  if (isME)
368  h_passProbes_EE_detIsoID_pt->Fill(muon2->pt());
369 
370  if (bPrimaryVertex)
372  if (bPrimaryVertex && isMB)
374  if (bPrimaryVertex && isME)
376  }
377 
378  //-- Define PF relative isolation
379  float chargedIso = muon2->pfIsolationR04().sumChargedHadronPt;
380  float neutralIso = muon2->pfIsolationR04().sumNeutralHadronEt;
381  float photonIso = muon2->pfIsolationR04().sumPhotonEt;
382  float relPFIso = (chargedIso + neutralIso + photonIso) / (muon2->pt());
383 
384  float pu = muon2->pfIsolationR04().sumPUPt;
385  float neutralphotonPUCorrected = std::max(0.0, (neutralIso + photonIso - 0.5 * pu));
386  float relPFIsoPUCorrected = (chargedIso + neutralphotonPUCorrected) / (muon2->pt());
387 
388  if (relPFIso < 0.12) {
389  h_passProbes_pfIsoID_pt->Fill(muon2->pt());
390  if (isMB)
391  h_passProbes_EB_pfIsoID_pt->Fill(muon2->pt());
392  if (isME)
393  h_passProbes_EE_pfIsoID_pt->Fill(muon2->pt());
394 
395  if (bPrimaryVertex)
397  if (bPrimaryVertex && isMB)
399  if (bPrimaryVertex && isME)
401  }
402 
403  // Apply deltaBeta PU corrections to the PF isolation eficiencies.
404  if (relPFIsoPUCorrected < 0.12) {
405  h_passProbes_pfIsodBID_pt->Fill(muon2->pt());
406  if (isMB)
407  h_passProbes_EB_pfIsodBID_pt->Fill(muon2->pt());
408  if (isME)
409  h_passProbes_EE_pfIsodBID_pt->Fill(muon2->pt());
410 
411  if (bPrimaryVertex)
413  if (bPrimaryVertex && isMB)
415  if (bPrimaryVertex && isME)
417  }
418  }
419  }
420 }
MonitorElement * h_allProbes_ID_nVtx
float hadEt
hcal sum-Et
Definition: MuonIsolation.h:8
MonitorElement * h_passProbes_EB_pfIsodBID_nVtx
MonitorElement * h_passProbes_EE_pfIsoID_pt
MonitorElement * h_allProbes_inner_eta
MonitorElement * h_allProbes_EB_ID_nVtx
MonitorElement * h_passProbes_ID_pt
float sumPt
sum-pt of tracks
Definition: MuonIsolation.h:6
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionLabel_
MonitorElement * h_allProbes_eta
MonitorElement * h_passProbes_EE_detIsoID_pt
MonitorElement * h_passProbes_ID_eta
edm::EDGetTokenT< reco::VertexCollection > theVertexLabel_
MonitorElement * h_passProbes_ID_phi
MonitorElement * h_allProbes_EE_ID_nVtx
math::Error< dimension >::type Error
covariance error matrix (3x3)
Definition: Vertex.h:44
MonitorElement * h_allProbes_ID_pt
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
auto const & tracks
cannot be loose
MonitorElement * h_allProbes_inner_phi
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotLabel_
MonitorElement * h_passProbes_EB_pfIsoID_nVtx
MonitorElement * h_passProbes_pfIsoID_pt
tuple vertexCollection
#define LogTrace(id)
bool isLooseMuon(const reco::Muon &)
MonitorElement * h_allProbes_inner_pt
void Fill(long long x)
MonitorElement * h_allProbes_pt
MonitorElement * h_allProbes_EE_ID_pt
MonitorElement * h_passProbes_pfIsodBID_nVtx
MonitorElement * h_allProbes_EB_pt
int iEvent
Definition: GenABIO.cc:224
MonitorElement * h_passProbes_EB_pfIsodBID_pt
MonitorElement * h_allProbes_EE_pt
float emEt
ecal sum-Et
Definition: MuonIsolation.h:7
MonitorElement * h_passProbes_pfIsodBID_pt
MonitorElement * h_passProbes_ID_EB_pt
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:82
MonitorElement * h_passProbes_ID_inner_phi
MonitorElement * h_passProbes_ID_hp_eta
bool isValid() const
Definition: HandleBase.h:70
MonitorElement * h_passProbes_pfIsoID_nVtx
MonitorElement * h_passProbes_EE_pfIsodBID_nVtx
MonitorElement * h_passProbes_EE_pfIsoID_nVtx
MonitorElement * h_passProbes_ID_inner_eta
edm::EDGetTokenT< edm::View< reco::Muon > > theMuonCollectionLabel_
Log< level::Info, false > LogInfo
MonitorElement * h_passProbes_detIsoID_nVtx
MonitorElement * h_passProbes_EB_detIsoID_pt
MonitorElement * h_passProbes_EB_detIsoID_nVtx
T const * product() const
Definition: Handle.h:70
double sigmaZ() const
sigma z
Definition: BeamSpot.h:76
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:84
MonitorElement * h_passProbes_EE_pfIsodBID_pt
tuple muons
Definition: patZpeak.py:39
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
MonitorElement * h_allProbes_EB_ID_pt
static int position[264][3]
Definition: ReadPGInfo.cc:289
MonitorElement * h_passProbes_detIsoID_pt
MonitorElement * h_passProbes_ID_EE_pt
const Point & position() const
position
Definition: BeamSpot.h:59
MonitorElement * h_passProbes_ID_inner_pt
MonitorElement * h_allProbes_hp_eta
MonitorElement * h_passProbes_EE_detIsoID_nVtx
MonitorElement * h_allProbes_phi
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
MonitorElement * h_passProbes_EB_pfIsoID_pt
void EfficiencyAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 63 of file EfficiencyAnalyzer.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), gather_cfg::cout, etaMax_(), etaMin_(), ptMin_(), and dqm::implementation::NavigatorBase::setCurrentFolder().

65  {
66  ibooker.cd();
67  ibooker.setCurrentFolder(theFolder + ID_);
68 
69  h_allProbes_pt = ibooker.book1D("allProbes_pt", "All Probes Pt", ptBin_, ptMin_, ptMax_);
70  h_allProbes_inner_pt = ibooker.book1D("allProbes_inner_pt", "All Probes inner Pt", ptBin_, ptMin_, ptMax_);
71  h_allProbes_inner_eta = ibooker.book1D("allProbes_inner_eta", "All Probes inner eta", etaBin_, etaMin_, etaMax_);
72  h_allProbes_inner_phi = ibooker.book1D("allProbes_inner_phi", "All Probes inner phi", phiBin_, phiMin_, phiMax_);
73  h_allProbes_EB_pt = ibooker.book1D("allProbes_EB_pt", "Barrel: all Probes Pt", ptBin_, ptMin_, ptMax_);
74  h_allProbes_EE_pt = ibooker.book1D("allProbes_EE_pt", "Endcap: all Probes Pt", ptBin_, ptMin_, ptMax_);
75  h_allProbes_eta = ibooker.book1D("allProbes_eta", "All Probes Eta", etaBin_, etaMin_, etaMax_);
76  h_allProbes_hp_eta = ibooker.book1D("allProbes_hp_eta", "High Pt all Probes Eta", etaBin_, etaMin_, etaMax_);
77  h_allProbes_phi = ibooker.book1D("allProbes_phi", "All Probes Phi", phiBin_, phiMin_, phiMax_);
78 
79  h_allProbes_ID_pt = ibooker.book1D("allProbes_ID_pt", "All ID Probes Pt", ptBin_, ptMin_, ptMax_);
80  h_allProbes_EB_ID_pt = ibooker.book1D("allProbes_EB_ID_pt", "Barrel: all ID Probes Pt", ptBin_, ptMin_, ptMax_);
81  h_allProbes_EE_ID_pt = ibooker.book1D("allProbes_EE_ID_pt", "Endcap: all ID Probes Pt", ptBin_, ptMin_, ptMax_);
82  h_allProbes_ID_nVtx = ibooker.book1D("allProbes_ID_nVtx", "All Probes (ID) nVtx", vtxBin_, vtxMin_, vtxMax_);
84  ibooker.book1D("allProbes_EB_ID_nVtx", "Barrel: All Probes (ID) nVtx", vtxBin_, vtxMin_, vtxMax_);
86  ibooker.book1D("allProbes_EE_ID_nVtx", "Endcap: All Probes (ID) nVtx", vtxBin_, vtxMin_, vtxMax_);
87 
88  h_passProbes_ID_pt = ibooker.book1D("passProbes_ID_pt", "ID Passing Probes Pt", ptBin_, ptMin_, ptMax_);
90  ibooker.book1D("passProbes_ID_inner_pt", "ID Passing Probes inner Pt", ptBin_, ptMin_, ptMax_);
92  ibooker.book1D("passProbes_ID_inner_eta", "ID Passing Probes inner eta", etaBin_, etaMin_, etaMax_);
94  ibooker.book1D("passProbes_ID_inner_phi", "ID Passing Probes inner phi", phiBin_, phiMin_, phiMax_);
95  h_passProbes_ID_EB_pt = ibooker.book1D("passProbes_ID_EB_pt", "Barrel: ID Passing Probes Pt", ptBin_, ptMin_, ptMax_);
96  h_passProbes_ID_EE_pt = ibooker.book1D("passProbes_ID_EE_pt", "Endcap: ID Passing Probes Pt", ptBin_, ptMin_, ptMax_);
97  h_passProbes_ID_eta = ibooker.book1D("passProbes_ID_eta", "ID Passing Probes #eta", etaBin_, etaMin_, etaMax_);
99  ibooker.book1D("passProbes_ID_hp_eta", "High Pt ID Passing Probes #eta", etaBin_, etaMin_, etaMax_);
100  h_passProbes_ID_phi = ibooker.book1D("passProbes_ID_phi", "ID Passing Probes #phi", phiBin_, phiMin_, phiMax_);
101 
103  ibooker.book1D("passProbes_detIsoID_pt", "detIsoID Passing Probes Pt", ptBin_, ptMin_, ptMax_);
105  ibooker.book1D("passProbes_EB_detIsoID_pt", "Barrel: detIsoID Passing Probes Pt", ptBin_, ptMin_, ptMax_);
107  ibooker.book1D("passProbes_EE_detIsoID_pt", "Endcap: detIsoID Passing Probes Pt", ptBin_, ptMin_, ptMax_);
108 
110  ibooker.book1D("passProbes_pfIsoID_pt", "pfIsoID Passing Probes Pt", ptBin_, ptMin_, ptMax_);
112  ibooker.book1D("passProbes_EB_pfIsoID_pt", "Barrel: pfIsoID Passing Probes Pt", ptBin_, ptMin_, ptMax_);
114  ibooker.book1D("passProbes_EE_pfIsoID_pt", "Endcap: pfIsoID Passing Probes Pt", ptBin_, ptMin_, ptMax_);
115 
117  ibooker.book1D("passProbes_detIsoID_nVtx", "detIsoID Passing Probes nVtx (R03)", vtxBin_, vtxMin_, vtxMax_);
119  ibooker.book1D("passProbes_pfIsoID_nVtx", "pfIsoID Passing Probes nVtx (R04)", vtxBin_, vtxMin_, vtxMax_);
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_);
128 
129  // Apply deltaBeta PU corrections to the PF isolation eficiencies.
130 
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_);
137  h_passProbes_pfIsodBID_nVtx = ibooker.book1D("passProbes_pfIsodBID_nVtx",
138  "pfIsoID Passing Probes nVtx (R04) (deltaB PU correction)",
139  vtxBin_,
140  vtxMin_,
141  vtxMax_);
142  h_passProbes_EB_pfIsodBID_nVtx = ibooker.book1D("passProbes_EB_pfIsodBID_nVtx",
143  "Barrel: pfIsoID Passing Probes nVtx (R04) (deltaB PU correction)",
144  vtxBin_,
145  vtxMin_,
146  vtxMax_);
147  h_passProbes_EE_pfIsodBID_nVtx = ibooker.book1D("passProbes_EE_pfIsodBID_nVtx",
148  "Endcap: pfIsoID Passing Probes nVtx (R04) (deltaB PU correction)",
149  vtxBin_,
150  vtxMin_,
151  vtxMax_);
152 
153 #ifdef DEBUG
154  cout << "[EfficiencyAnalyzer] Parameters initialization DONE" << endl;
155 #endif
156 }
MonitorElement * h_allProbes_ID_nVtx
MonitorElement * h_passProbes_EB_pfIsodBID_nVtx
MonitorElement * h_passProbes_EE_pfIsoID_pt
MonitorElement * h_allProbes_inner_eta
MonitorElement * h_allProbes_EB_ID_nVtx
MonitorElement * h_passProbes_ID_pt
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * h_allProbes_eta
MonitorElement * h_passProbes_EE_detIsoID_pt
MonitorElement * h_passProbes_ID_eta
MonitorElement * h_passProbes_ID_phi
MonitorElement * h_allProbes_EE_ID_nVtx
MonitorElement * h_allProbes_ID_pt
MonitorElement * h_allProbes_inner_phi
MonitorElement * h_passProbes_EB_pfIsoID_nVtx
MonitorElement * h_passProbes_pfIsoID_pt
MonitorElement * h_allProbes_inner_pt
MonitorElement * h_allProbes_pt
MonitorElement * h_allProbes_EE_ID_pt
MonitorElement * h_passProbes_pfIsodBID_nVtx
MonitorElement * h_allProbes_EB_pt
MonitorElement * h_passProbes_EB_pfIsodBID_pt
MonitorElement * h_allProbes_EE_pt
MonitorElement * h_passProbes_pfIsodBID_pt
MonitorElement * h_passProbes_ID_EB_pt
MonitorElement * h_passProbes_ID_inner_phi
MonitorElement * h_passProbes_ID_hp_eta
MonitorElement * h_passProbes_pfIsoID_nVtx
MonitorElement * h_passProbes_EE_pfIsodBID_nVtx
MonitorElement * h_passProbes_EE_pfIsoID_nVtx
MonitorElement * h_passProbes_ID_inner_eta
MonitorElement * h_passProbes_detIsoID_nVtx
MonitorElement * h_passProbes_EB_detIsoID_pt
MonitorElement * h_passProbes_EB_detIsoID_nVtx
MonitorElement * h_passProbes_EE_pfIsodBID_pt
MonitorElement * h_allProbes_EB_ID_pt
MonitorElement * h_passProbes_detIsoID_pt
MonitorElement * h_passProbes_ID_EE_pt
tuple cout
Definition: gather_cfg.py:144
MonitorElement * h_passProbes_ID_inner_pt
MonitorElement * h_allProbes_hp_eta
MonitorElement * h_passProbes_EE_detIsoID_nVtx
MonitorElement * h_allProbes_phi
MonitorElement * h_passProbes_EB_pfIsoID_pt
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

Member Data Documentation

int EfficiencyAnalyzer::_numPV
private

Definition at line 119 of file EfficiencyAnalyzer.h.

bool EfficiencyAnalyzer::doPVCheck_
private

Definition at line 126 of file EfficiencyAnalyzer.h.

int EfficiencyAnalyzer::etaBin_
private

Definition at line 50 of file EfficiencyAnalyzer.h.

double EfficiencyAnalyzer::etaMax_
private

Definition at line 58 of file EfficiencyAnalyzer.h.

double EfficiencyAnalyzer::etaMin_
private

Definition at line 57 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_EB_ID_nVtx
private

Definition at line 108 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_EB_ID_pt
private

Definition at line 105 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_EB_pt
private

Definition at line 96 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_EE_ID_nVtx
private

Definition at line 109 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_EE_ID_pt
private

Definition at line 106 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_EE_pt
private

Definition at line 97 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_eta
private

Definition at line 98 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_hp_eta
private

Definition at line 99 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_ID_nVtx
private

Definition at line 107 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_ID_pt
private

Definition at line 101 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_inner_eta
private

Definition at line 103 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_inner_phi
private

Definition at line 104 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_inner_pt
private

Definition at line 102 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_phi
private

Definition at line 100 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_allProbes_pt
private

Definition at line 95 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_failProbes_ID_eta
private

Definition at line 92 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_failProbes_ID_phi
private

Definition at line 93 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_failProbes_ID_pt
private

Definition at line 91 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_detIsoID_nVtx
private

Definition at line 84 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_detIsoID_pt
private

Definition at line 78 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_EB_detIsoID_nVtx
private

Definition at line 86 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_EB_detIsoID_pt
private

Definition at line 79 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_EB_pfIsodBID_nVtx
private

Definition at line 116 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_EB_pfIsodBID_pt
private

Definition at line 113 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_EB_pfIsoID_nVtx
private

Definition at line 88 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_EB_pfIsoID_pt
private

Definition at line 82 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_EE_detIsoID_nVtx
private

Definition at line 87 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_EE_detIsoID_pt
private

Definition at line 80 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_EE_pfIsodBID_nVtx
private

Definition at line 117 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_EE_pfIsodBID_pt
private

Definition at line 114 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_EE_pfIsoID_nVtx
private

Definition at line 89 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_EE_pfIsoID_pt
private

Definition at line 83 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_ID_EB_pt
private

Definition at line 73 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_ID_EE_pt
private

Definition at line 74 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_ID_eta
private

Definition at line 75 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_ID_hp_eta
private

Definition at line 76 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_ID_inner_eta
private

Definition at line 71 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_ID_inner_phi
private

Definition at line 72 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_ID_inner_pt
private

Definition at line 70 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_ID_phi
private

Definition at line 77 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_ID_pt
private

Definition at line 69 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_pfIsodBID_nVtx
private

Definition at line 115 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_pfIsodBID_pt
private

Definition at line 112 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_pfIsoID_nVtx
private

Definition at line 85 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_pfIsoID_pt
private

Definition at line 81 of file EfficiencyAnalyzer.h.

std::string EfficiencyAnalyzer::ID_
private

Definition at line 67 of file EfficiencyAnalyzer.h.

std::string EfficiencyAnalyzer::metname
private

Definition at line 47 of file EfficiencyAnalyzer.h.

edm::ParameterSet EfficiencyAnalyzer::parameters
private

Definition at line 44 of file EfficiencyAnalyzer.h.

int EfficiencyAnalyzer::phiBin_
private

Definition at line 51 of file EfficiencyAnalyzer.h.

double EfficiencyAnalyzer::phiMax_
private

Definition at line 61 of file EfficiencyAnalyzer.h.

double EfficiencyAnalyzer::phiMin_
private

Definition at line 60 of file EfficiencyAnalyzer.h.

int EfficiencyAnalyzer::ptBin_
private

Definition at line 52 of file EfficiencyAnalyzer.h.

double EfficiencyAnalyzer::ptMax_
private

Definition at line 55 of file EfficiencyAnalyzer.h.

double EfficiencyAnalyzer::ptMin_
private

Definition at line 54 of file EfficiencyAnalyzer.h.

edm::EDGetTokenT<reco::BeamSpot> EfficiencyAnalyzer::theBeamSpotLabel_
private

Definition at line 128 of file EfficiencyAnalyzer.h.

std::string EfficiencyAnalyzer::theFolder
private

Definition at line 130 of file EfficiencyAnalyzer.h.

edm::EDGetTokenT<edm::View<reco::Muon> > EfficiencyAnalyzer::theMuonCollectionLabel_
private

Definition at line 122 of file EfficiencyAnalyzer.h.

edm::EDGetTokenT<reco::TrackCollection> EfficiencyAnalyzer::theTrackCollectionLabel_
private

Definition at line 123 of file EfficiencyAnalyzer.h.

edm::EDGetTokenT<reco::VertexCollection> EfficiencyAnalyzer::theVertexLabel_
private

Definition at line 127 of file EfficiencyAnalyzer.h.

int EfficiencyAnalyzer::vtxBin_
private

Definition at line 63 of file EfficiencyAnalyzer.h.

double EfficiencyAnalyzer::vtxMax_
private

Definition at line 65 of file EfficiencyAnalyzer.h.

double EfficiencyAnalyzer::vtxMin_
private

Definition at line 64 of file EfficiencyAnalyzer.h.