CMS 3D CMS Logo

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

#include <EfficiencyAnalyzer.h>

Inheritance diagram for EfficiencyAnalyzer:
MuonAnalyzerBase

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &eventSetup)
 
void beginJob (DQMStore *dbe)
 Inizialize parameters for histo binning. More...
 
 EfficiencyAnalyzer (const edm::ParameterSet &pset, MuonServiceProxy *theService)
 
virtual ~EfficiencyAnalyzer ()
 
- Public Member Functions inherited from MuonAnalyzerBase
void analyze (const edm::Event &, const edm::EventSetup &, reco::Muon &recoMuon)
 Get the analysis of the muon properties. More...
 
void analyze (const edm::Event &, const edm::EventSetup &, reco::Track &recoTrack)
 Get the analysis of the muon track properties. More...
 
 MuonAnalyzerBase (MuonServiceProxy *theServ)
 Constructor. More...
 
MuonServiceProxyservice ()
 
virtual ~MuonAnalyzerBase ()
 Destructor. More...
 

Protected Attributes

bool _doPVCheck
 
int _numPV
 
edm::InputTag bsTag
 
int etaBin_
 
double etaMax_
 
double etaMin_
 
MonitorElementh_allProbes_EB_pt
 
MonitorElementh_allProbes_EB_TightMu_nVtx
 
MonitorElementh_allProbes_EB_TightMu_pt
 
MonitorElementh_allProbes_EE_pt
 
MonitorElementh_allProbes_EE_TightMu_nVtx
 
MonitorElementh_allProbes_EE_TightMu_pt
 
MonitorElementh_allProbes_eta
 
MonitorElementh_allProbes_hp_eta
 
MonitorElementh_allProbes_phi
 
MonitorElementh_allProbes_pt
 
MonitorElementh_allProbes_TightMu_nVtx
 
MonitorElementh_allProbes_TightMu_pt
 
MonitorElementh_failProbes_TightMu_eta
 
MonitorElementh_failProbes_TightMu_phi
 
MonitorElementh_failProbes_TightMu_pt
 
MonitorElementh_passProbes_detIsoTightMu_nVtx
 
MonitorElementh_passProbes_detIsoTightMu_pt
 
MonitorElementh_passProbes_EB_detIsoTightMu_nVtx
 
MonitorElementh_passProbes_EB_detIsoTightMu_pt
 
MonitorElementh_passProbes_EB_pfIsodBTightMu_nVtx
 
MonitorElementh_passProbes_EB_pfIsodBTightMu_pt
 
MonitorElementh_passProbes_EB_pfIsoTightMu_nVtx
 
MonitorElementh_passProbes_EB_pfIsoTightMu_pt
 
MonitorElementh_passProbes_EE_detIsoTightMu_nVtx
 
MonitorElementh_passProbes_EE_detIsoTightMu_pt
 
MonitorElementh_passProbes_EE_pfIsodBTightMu_nVtx
 
MonitorElementh_passProbes_EE_pfIsodBTightMu_pt
 
MonitorElementh_passProbes_EE_pfIsoTightMu_nVtx
 
MonitorElementh_passProbes_EE_pfIsoTightMu_pt
 
MonitorElementh_passProbes_pfIsodBTightMu_nVtx
 
MonitorElementh_passProbes_pfIsodBTightMu_pt
 
MonitorElementh_passProbes_pfIsoTightMu_nVtx
 
MonitorElementh_passProbes_pfIsoTightMu_pt
 
MonitorElementh_passProbes_TightMu_EB_pt
 
MonitorElementh_passProbes_TightMu_EE_pt
 
MonitorElementh_passProbes_TightMu_eta
 
MonitorElementh_passProbes_TightMu_hp_eta
 
MonitorElementh_passProbes_TightMu_phi
 
MonitorElementh_passProbes_TightMu_pt
 
std::string metname
 
edm::ParameterSet parameters
 
int phiBin_
 
double phiMax_
 
double phiMin_
 
int ptBin_
 
double ptMax_
 
double ptMin_
 
MonitorElementtest_TightMu_Minv
 
edm::InputTag theMuonCollectionLabel
 
edm::InputTag theSTACollectionLabel
 
edm::InputTag theTrackCollectionLabel
 
edm::InputTag vertexTag
 
int vtxBin_
 
double vtxMax_
 
double vtxMin_
 

Detailed Description

Class EfficiencyAnalyzer

DQM monitoring for dimuon mass

Author: S.Folgueras, A. Calderon

Definition at line 28 of file EfficiencyAnalyzer.h.

Constructor & Destructor Documentation

EfficiencyAnalyzer::EfficiencyAnalyzer ( const edm::ParameterSet pset,
MuonServiceProxy theService 
)

Definition at line 43 of file EfficiencyAnalyzer.cc.

References parameters.

44  parameters = pSet;
45 }
MuonServiceProxy * theService
edm::ParameterSet parameters
MuonAnalyzerBase(MuonServiceProxy *theServ)
Constructor.
EfficiencyAnalyzer::~EfficiencyAnalyzer ( )
virtual

Definition at line 47 of file EfficiencyAnalyzer.cc.

47 { }

Member Function Documentation

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

to be read from output as "generalTracks"

Definition at line 137 of file EfficiencyAnalyzer.cc.

References _doPVCheck, _numPV, SiPixelRawToDigiRegional_cfi::beamSpot, reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthY(), bsTag, reco::MuonIsolation::emEt, error, MonitorElement::Fill(), edm::Event::getByLabel(), h_allProbes_EB_pt, h_allProbes_EB_TightMu_nVtx, h_allProbes_EB_TightMu_pt, h_allProbes_EE_pt, h_allProbes_EE_TightMu_nVtx, h_allProbes_EE_TightMu_pt, h_allProbes_eta, h_allProbes_hp_eta, h_allProbes_phi, h_allProbes_pt, h_allProbes_TightMu_nVtx, h_allProbes_TightMu_pt, h_passProbes_detIsoTightMu_nVtx, h_passProbes_detIsoTightMu_pt, h_passProbes_EB_detIsoTightMu_nVtx, h_passProbes_EB_detIsoTightMu_pt, h_passProbes_EB_pfIsodBTightMu_nVtx, h_passProbes_EB_pfIsodBTightMu_pt, h_passProbes_EB_pfIsoTightMu_nVtx, h_passProbes_EB_pfIsoTightMu_pt, h_passProbes_EE_detIsoTightMu_nVtx, h_passProbes_EE_detIsoTightMu_pt, h_passProbes_EE_pfIsodBTightMu_nVtx, h_passProbes_EE_pfIsodBTightMu_pt, h_passProbes_EE_pfIsoTightMu_nVtx, h_passProbes_EE_pfIsoTightMu_pt, h_passProbes_pfIsodBTightMu_nVtx, h_passProbes_pfIsodBTightMu_pt, h_passProbes_pfIsoTightMu_nVtx, h_passProbes_pfIsoTightMu_pt, h_passProbes_TightMu_EB_pt, h_passProbes_TightMu_EE_pt, h_passProbes_TightMu_eta, h_passProbes_TightMu_hp_eta, h_passProbes_TightMu_phi, h_passProbes_TightMu_pt, reco::MuonIsolation::hadEt, muon::isTightMuon(), edm::HandleBase::isValid(), LogTrace, max(), metname, patZpeak::muons, reco::BeamSpot::position(), position, edm::Handle< T >::product(), reco::BeamSpot::sigmaZ(), reco::MuonIsolation::sumPt, test_TightMu_Minv, theMuonCollectionLabel, theTrackCollectionLabel, testEve_cfg::tracks, findQualityFiles::v, GoodVertex_cfg::vertexCollection, and vertexTag.

137  {
138 
139  LogTrace(metname)<<"[EfficiencyAnalyzer] Analyze the mu in different eta regions";
140 
142  iEvent.getByLabel(theMuonCollectionLabel, muons);
143 
144 
146  iEvent.getByLabel(theTrackCollectionLabel,tracks);
147 
148 
150  Handle<reco::BeamSpot> beamSpotHandle;
151  iEvent.getByLabel("offlineBeamSpot", beamSpotHandle);
152  beamSpot = *beamSpotHandle;
153 
154 
155  // ==========================================================
156  //Vertex information
157 
159  iEvent.getByLabel(vertexTag, vertex);
160 
161  _numPV = 0;
162  bool bPrimaryVertex = true;
163  if(_doPVCheck){
164  bPrimaryVertex = false;
165 
166  if (!vertex.isValid()) {
167  LogTrace(metname) << "[EfficiencyAnalyzer] Could not find vertex collection" << std::endl;
168  bPrimaryVertex = false;
169  }
170 
171  if ( vertex.isValid() ){
172  const reco::VertexCollection& vertexCollection = *(vertex.product());
173  int vertex_number = vertexCollection.size();
174 
175  reco::VertexCollection::const_iterator v = vertexCollection.begin();
176  for ( ; v != vertexCollection.end(); ++v) {
177  double vertex_chi2 = v->normalizedChi2();
178  double vertex_ndof = v->ndof();
179  bool fakeVtx = v->isFake();
180  double vertex_Z = v->z();
181 
182  if ( !fakeVtx
183  && vertex_number >= 1
184  && vertex_ndof > 4
185  && vertex_chi2 < 999
186  && fabs(vertex_Z)< 24. ) {
187  bPrimaryVertex = true;
188  ++_numPV;
189  }
190  }
191  }
192  }
193  // ==========================================================
194 
195 
196  // ==========================================================
197  // Look for the Primary Vertex (and use the BeamSpot instead, if you can't find it):
198 
199  reco::Vertex::Point posVtx;
200  reco::Vertex::Error errVtx;
201 
202  unsigned int theIndexOfThePrimaryVertex = 999.;
203 
204 
205  if ( vertex.isValid() ){
206 
207  for (unsigned int ind=0; ind<vertex->size(); ++ind) {
208 
209  if ( (*vertex)[ind].isValid() && !((*vertex)[ind].isFake()) ) {
210 
211  theIndexOfThePrimaryVertex = ind;
212  break;
213  }
214  }
215  }
216 
217  if (theIndexOfThePrimaryVertex<100) {
218  posVtx = ((*vertex)[theIndexOfThePrimaryVertex]).position();
219  errVtx = ((*vertex)[theIndexOfThePrimaryVertex]).error();
220  } else {
221 
222  LogInfo("EfficiencyAnalyzer") << "reco::PrimaryVertex not found, use BeamSpot position instead\n";
223 
224 
225  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
226  iEvent.getByLabel(bsTag,recoBeamSpotHandle);
227 
228  reco::BeamSpot bs = *recoBeamSpotHandle;
229 
230  posVtx = bs.position();
231  errVtx(0,0) = bs.BeamWidthX();
232  errVtx(1,1) = bs.BeamWidthY();
233  errVtx(2,2) = bs.sigmaZ();
234 
235  }
236  const reco::Vertex thePrimaryVertex(posVtx,errVtx);
237 
238  // ==========================================================
239 
240 
241 
242 
243 
244  if(!muons.isValid()) return;
245 
246 
247  // Loop on muon collection
248  TLorentzVector Mu1, Mu2;
249 
250  bool isMB = false;
251  bool isME = false;
252 
253  for (reco::MuonCollection::const_iterator recoMu1 = muons->begin(); recoMu1!=muons->end(); ++recoMu1) {
254  LogTrace(metname)<<"[EfficiencyAnalyzer] loop over first muons" << endl;
255 
256  //--- Define combined isolation
257  reco::MuonIsolation Iso_muon = recoMu1->isolationR03();
258  float combIso = (Iso_muon.emEt + Iso_muon.hadEt + Iso_muon.sumPt);
259 
260  //--- Is Global Muon
261  if (!recoMu1->isGlobalMuon()) continue;
262 
263  // get the track combinig the information from both the Tracker and the Spectrometer
264  reco::TrackRef recoCombinedGlbTrack1 = recoMu1->combinedMuon();
265  float muPt1 = recoCombinedGlbTrack1->pt();
266  Mu1.SetPxPyPzE(recoCombinedGlbTrack1->px(), recoCombinedGlbTrack1->py(),recoCombinedGlbTrack1->pz(), recoCombinedGlbTrack1->p());
267 
268 
269  //--- Define if it is a tight muon
270  // Change the Tight muon definition by using the implemented method in: MuonSelectors.cc
271 
272  if (!muon::isTightMuon(*recoMu1, thePrimaryVertex)) continue;
273 
274  //-- is isolated muon
275  if (muPt1 <= 15) continue;
276  if (combIso/muPt1 > 0.1 ) continue;
277 
278  for (reco::MuonCollection::const_iterator recoMu2 = muons->begin(); recoMu2!=muons->end(); ++recoMu2){
279  LogTrace(metname)<<"[EfficiencyAnalyzer] loop over second muon" <<endl;
280  if (recoMu2 == recoMu1) continue;
281 
282  if (recoMu2->eta() < 1.479 ) isMB = true;
283  if (recoMu2->eta() >= 1.479 ) isME = true;
284 
285  //--> should we apply track quality cuts???
286  Mu2.SetPxPyPzE(recoMu2->px(), recoMu2->py(), recoMu2->pz(), recoMu2->p());
287 
288  float Minv = (Mu1+Mu2).M();
289  if (!recoMu2->isTrackerMuon()) continue;
290  if ( recoMu2->pt() < 5 ) continue;
291  if ( (recoMu1->charge())*(recoMu2->charge()) > 0 ) continue;
292  if ( Minv < 70 || Minv > 110 ) continue;
293 
294  h_allProbes_pt->Fill(recoMu2->pt());
295  h_allProbes_eta->Fill(recoMu2->eta());
296  h_allProbes_phi->Fill(recoMu2->phi());
297 
298  if (isMB) h_allProbes_EB_pt->Fill(recoMu2->pt());
299  if (isME) h_allProbes_EE_pt->Fill(recoMu2->pt());
300  if(recoMu2->pt() > 20 ) h_allProbes_hp_eta->Fill(recoMu2->eta());
301 
302  test_TightMu_Minv->Fill(Minv);
303 
304 
305 
306  // Probes passing the tight muon criteria
307 
308  if (!muon::isTightMuon(*recoMu2, thePrimaryVertex)) continue;
309 
310  h_passProbes_TightMu_pt->Fill(recoMu2->pt());
311  h_passProbes_TightMu_eta->Fill(recoMu2->eta());
312  h_passProbes_TightMu_phi->Fill(recoMu2->phi());
313 
314  if (isMB) h_passProbes_TightMu_EB_pt->Fill(recoMu2->pt());
315  if (isME) h_passProbes_TightMu_EE_pt->Fill(recoMu2->pt());
316  if( recoMu2->pt() > 20 ) h_passProbes_TightMu_hp_eta->Fill(recoMu2->eta());
317 
318  h_allProbes_TightMu_pt->Fill(recoMu2->pt());
319  if (isMB) h_allProbes_EB_TightMu_pt->Fill(recoMu2->pt());
320  if (isME) h_allProbes_EE_TightMu_pt->Fill(recoMu2->pt());
321 
322  //------- For PU monitoring -------//
323  if (bPrimaryVertex) h_allProbes_TightMu_nVtx->Fill(_numPV);
324  if (bPrimaryVertex && isMB) h_allProbes_EB_TightMu_nVtx->Fill(_numPV);
325  if (bPrimaryVertex && isME) h_allProbes_EE_TightMu_nVtx->Fill(_numPV);
326 
327  //-- Define det relative isolation
328  float tkIso = recoMu2->isolationR03().sumPt;
329  float emIso = recoMu2->isolationR03().emEt;
330  float hadIso = recoMu2->isolationR03().hadEt + recoMu2->isolationR03().hoEt;
331  float relDetIso = (tkIso + emIso + hadIso) / (recoMu2->pt());
332 
333  if (relDetIso < 0.05 ) {
334  h_passProbes_detIsoTightMu_pt->Fill(recoMu2->pt());
335  if (isMB) h_passProbes_EB_detIsoTightMu_pt->Fill(recoMu2->pt());
336  if (isME) h_passProbes_EE_detIsoTightMu_pt->Fill(recoMu2->pt());
337 
338  if (bPrimaryVertex) h_passProbes_detIsoTightMu_nVtx->Fill(_numPV);
339  if (bPrimaryVertex && isMB) h_passProbes_EB_detIsoTightMu_nVtx->Fill(_numPV);
340  if (bPrimaryVertex && isME) h_passProbes_EE_detIsoTightMu_nVtx->Fill(_numPV);
341  }
342 
343  //-- Define PF relative isolation
344  float chargedIso = recoMu2->pfIsolationR04().sumChargedHadronPt;
345  float neutralIso = recoMu2->pfIsolationR04().sumNeutralHadronEt;
346  float photonIso = recoMu2->pfIsolationR04().sumPhotonEt;
347  float relPFIso = (chargedIso + neutralIso + photonIso) / (recoMu2->pt());
348 
349  float pu = recoMu2->pfIsolationR04().sumPUPt;
350 
351  float neutralphotonPUCorrected = std::max(0.0 , (neutralIso + photonIso - 0.5*pu ) );
352 
353  float relPFIsoPUCorrected = (chargedIso + neutralphotonPUCorrected) / (recoMu2->pt());
354 
355 
356 
357  if (relPFIso < 0.12 ) {
358  h_passProbes_pfIsoTightMu_pt->Fill(recoMu2->pt());
359  if (isMB) h_passProbes_EB_pfIsoTightMu_pt->Fill(recoMu2->pt());
360  if (isME) h_passProbes_EE_pfIsoTightMu_pt->Fill(recoMu2->pt());
361 
362  if( bPrimaryVertex) h_passProbes_pfIsoTightMu_nVtx->Fill(_numPV);
363  if (bPrimaryVertex && isMB) h_passProbes_EB_pfIsoTightMu_nVtx->Fill(_numPV);
364  if (bPrimaryVertex && isME) h_passProbes_EE_pfIsoTightMu_nVtx->Fill(_numPV);
365  }
366 
367 
368 
369  // Apply deltaBeta PU corrections to the PF isolation eficiencies.
370 
371  if ( relPFIsoPUCorrected < 0.12 ) {
372 
373  h_passProbes_pfIsodBTightMu_pt->Fill(recoMu2->pt());
374  if (isMB) h_passProbes_EB_pfIsodBTightMu_pt->Fill(recoMu2->pt());
375  if (isME) h_passProbes_EE_pfIsodBTightMu_pt->Fill(recoMu2->pt());
376 
377  if( bPrimaryVertex) h_passProbes_pfIsodBTightMu_nVtx->Fill(_numPV);
378  if (bPrimaryVertex && isMB) h_passProbes_EB_pfIsodBTightMu_nVtx->Fill(_numPV);
379  if (bPrimaryVertex && isME) h_passProbes_EE_pfIsodBTightMu_nVtx->Fill(_numPV);
380  }
381 
382  }
383  }
384 }
float hadEt
hcal sum-Et
Definition: MuonIsolation.h:9
MonitorElement * h_passProbes_pfIsoTightMu_nVtx
float sumPt
sum-pt of tracks
Definition: MuonIsolation.h:7
MonitorElement * h_passProbes_EB_pfIsoTightMu_pt
MonitorElement * h_passProbes_EB_pfIsodBTightMu_nVtx
MonitorElement * h_allProbes_eta
MonitorElement * h_allProbes_EE_TightMu_nVtx
MonitorElement * h_passProbes_EB_detIsoTightMu_pt
math::Error< dimension >::type Error
covariance error matrix (3x3)
Definition: Vertex.h:44
MonitorElement * h_passProbes_pfIsodBTightMu_nVtx
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
MonitorElement * h_allProbes_EB_TightMu_pt
MonitorElement * h_passProbes_EE_pfIsoTightMu_nVtx
tuple vertexCollection
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
MonitorElement * h_passProbes_EE_detIsoTightMu_pt
void Fill(long long x)
MonitorElement * h_allProbes_pt
MonitorElement * h_allProbes_EB_pt
int iEvent
Definition: GenABIO.cc:243
MonitorElement * h_passProbes_TightMu_EB_pt
MonitorElement * h_passProbes_EE_pfIsoTightMu_pt
MonitorElement * h_passProbes_EB_pfIsoTightMu_nVtx
const T & max(const T &a, const T &b)
MonitorElement * h_passProbes_TightMu_hp_eta
MonitorElement * h_allProbes_EE_pt
MonitorElement * h_passProbes_TightMu_eta
float emEt
ecal sum-Et
Definition: MuonIsolation.h:8
MonitorElement * h_passProbes_EE_detIsoTightMu_nVtx
MonitorElement * h_passProbes_TightMu_phi
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:87
MonitorElement * h_passProbes_TightMu_pt
bool isValid() const
Definition: HandleBase.h:76
MonitorElement * h_allProbes_EB_TightMu_nVtx
edm::InputTag theMuonCollectionLabel
#define LogTrace(id)
MonitorElement * h_passProbes_TightMu_EE_pt
MonitorElement * h_passProbes_EB_detIsoTightMu_nVtx
MonitorElement * h_passProbes_EE_pfIsodBTightMu_nVtx
MonitorElement * h_passProbes_EE_pfIsodBTightMu_pt
MonitorElement * h_allProbes_TightMu_pt
tuple tracks
Definition: testEve_cfg.py:39
double sigmaZ() const
sigma z
Definition: BeamSpot.h:81
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:89
T const * product() const
Definition: Handle.h:74
MonitorElement * test_TightMu_Minv
MonitorElement * h_passProbes_EB_pfIsodBTightMu_pt
edm::InputTag theTrackCollectionLabel
tuple muons
Definition: patZpeak.py:38
MonitorElement * h_passProbes_detIsoTightMu_nVtx
const Point & position() const
position
Definition: BeamSpot.h:63
MonitorElement * h_allProbes_hp_eta
MonitorElement * h_allProbes_EE_TightMu_pt
MonitorElement * h_allProbes_phi
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
edm::InputTag vertexTag
MonitorElement * h_allProbes_TightMu_nVtx
MonitorElement * h_passProbes_pfIsodBTightMu_pt
MonitorElement * h_passProbes_detIsoTightMu_pt
MonitorElement * h_passProbes_pfIsoTightMu_pt
void EfficiencyAnalyzer::beginJob ( DQMStore dbe)
virtual

Inizialize parameters for histo binning.

Implements MuonAnalyzerBase.

Definition at line 49 of file EfficiencyAnalyzer.cc.

References _doPVCheck, DQMStore::book1D(), bsTag, gather_cfg::cout, etaBin_, etaMax_, etaMin_, edm::ParameterSet::getParameter(), h_allProbes_EB_pt, h_allProbes_EB_TightMu_nVtx, h_allProbes_EB_TightMu_pt, h_allProbes_EE_pt, h_allProbes_EE_TightMu_nVtx, h_allProbes_EE_TightMu_pt, h_allProbes_eta, h_allProbes_hp_eta, h_allProbes_phi, h_allProbes_pt, h_allProbes_TightMu_nVtx, h_allProbes_TightMu_pt, h_passProbes_detIsoTightMu_nVtx, h_passProbes_detIsoTightMu_pt, h_passProbes_EB_detIsoTightMu_nVtx, h_passProbes_EB_detIsoTightMu_pt, h_passProbes_EB_pfIsodBTightMu_nVtx, h_passProbes_EB_pfIsodBTightMu_pt, h_passProbes_EB_pfIsoTightMu_nVtx, h_passProbes_EB_pfIsoTightMu_pt, h_passProbes_EE_detIsoTightMu_nVtx, h_passProbes_EE_detIsoTightMu_pt, h_passProbes_EE_pfIsodBTightMu_nVtx, h_passProbes_EE_pfIsodBTightMu_pt, h_passProbes_EE_pfIsoTightMu_nVtx, h_passProbes_EE_pfIsoTightMu_pt, h_passProbes_pfIsodBTightMu_nVtx, h_passProbes_pfIsodBTightMu_pt, h_passProbes_pfIsoTightMu_nVtx, h_passProbes_pfIsoTightMu_pt, h_passProbes_TightMu_EB_pt, h_passProbes_TightMu_EE_pt, h_passProbes_TightMu_eta, h_passProbes_TightMu_hp_eta, h_passProbes_TightMu_phi, h_passProbes_TightMu_pt, LogTrace, metname, parameters, phiBin_, phiMax_, phiMin_, ptBin_, ptMax_, ptMin_, DQMStore::setCurrentFolder(), test_TightMu_Minv, theMuonCollectionLabel, theTrackCollectionLabel, vertexTag, vtxBin_, vtxMax_, and vtxMin_.

49  {
50 #ifdef DEBUG
51  cout << "[EfficiencyAnalyzer] Parameters initialization" <<endl;
52 #endif
53  metname = "EfficiencyAnalyzer";
54  LogTrace(metname)<<"[EfficiencyAnalyzer] Parameters initialization";
55  dbe->setCurrentFolder("Muons/EfficiencyAnalyzer");
56 
59 
60 
61  //Vertex requirements
62  _doPVCheck = parameters.getParameter<bool>("doPrimaryVertexCheck");
65 
66  ptBin_ = parameters.getParameter<int>("ptBin");
67  ptMin_ = parameters.getParameter<double>("ptMin");
68  ptMax_ = parameters.getParameter<double>("ptMax");
69 
70  etaBin_ = parameters.getParameter<int>("etaBin");
71  etaMin_ = parameters.getParameter<double>("etaMin");
72  etaMax_ = parameters.getParameter<double>("etaMax");
73 
74  phiBin_ = parameters.getParameter<int>("phiBin");
75  phiMin_ = parameters.getParameter<double>("phiMin");
76  phiMax_ = parameters.getParameter<double>("phiMax");
77 
78  vtxBin_ = parameters.getParameter<int>("vtxBin");
79  vtxMin_ = parameters.getParameter<double>("vtxMin");
80  vtxMax_ = parameters.getParameter<double>("vtxMax");
81 
82  test_TightMu_Minv = dbe->book1D("test_TightMu_Minv" ,"Minv",50,70,110);
83 
84  h_allProbes_pt = dbe->book1D("allProbes_pt","All Probes Pt", ptBin_, ptMin_, ptMax_);
85  h_allProbes_EB_pt = dbe->book1D("allProbes_EB_pt","Barrel: all Probes Pt", ptBin_, ptMin_, ptMax_);
86  h_allProbes_EE_pt = dbe->book1D("allProbes_EE_pt","Endcap: all Probes Pt", ptBin_, ptMin_, ptMax_);
87  h_allProbes_eta = dbe->book1D("allProbes_eta","All Probes Eta", etaBin_, etaMin_, etaMax_);
88  h_allProbes_hp_eta = dbe->book1D("allProbes_hp_eta","High Pt all Probes Eta", etaBin_, etaMin_, etaMax_);
89  h_allProbes_phi = dbe->book1D("allProbes_phi","All Probes Phi", phiBin_, phiMin_, phiMax_);
90 
91  h_allProbes_TightMu_pt = dbe->book1D("allProbes_TightMu_pt","All TightMu Probes Pt", ptBin_, ptMin_, ptMax_);
92  h_allProbes_EB_TightMu_pt = dbe->book1D("allProbes_EB_TightMu_pt","Barrel: all TightMu Probes Pt", ptBin_, ptMin_, ptMax_);
93  h_allProbes_EE_TightMu_pt = dbe->book1D("allProbes_EE_TightMu_pt","Endcap: all TightMu Probes Pt", ptBin_, ptMin_, ptMax_);
94  h_allProbes_TightMu_nVtx = dbe->book1D("allProbes_TightMu_nVtx","All Probes (TightMu) nVtx", vtxBin_, vtxMin_, vtxMax_);
95  h_allProbes_EB_TightMu_nVtx = dbe->book1D("allProbes_EB_TightMu_nVtx","Barrel: All Probes (TightMu) nVtx", vtxBin_, vtxMin_, vtxMax_);
96  h_allProbes_EE_TightMu_nVtx = dbe->book1D("allProbes_EE_TightMu_nVtx","Endcap: All Probes (TightMu) nVtx", vtxBin_, vtxMin_, vtxMax_);
97 
98  h_passProbes_TightMu_pt = dbe->book1D("passProbes_TightMu_pt","TightMu Passing Probes Pt", ptBin_ , ptMin_ , ptMax_ );
99  h_passProbes_TightMu_EB_pt = dbe->book1D("passProbes_TightMu_EB_pt","Barrel: TightMu Passing Probes Pt", ptBin_ , ptMin_ , ptMax_ );
100  h_passProbes_TightMu_EE_pt = dbe->book1D("passProbes_TightMu_EE_pt","Endcap: TightMu Passing Probes Pt", ptBin_ , ptMin_ , ptMax_ );
101  h_passProbes_TightMu_eta = dbe->book1D("passProbes_TightMu_eta","TightMu Passing Probes #eta", etaBin_, etaMin_, etaMax_);
102  h_passProbes_TightMu_hp_eta = dbe->book1D("passProbes_TightMu_hp_eta","High Pt TightMu Passing Probes #eta", etaBin_, etaMin_, etaMax_);
103  h_passProbes_TightMu_phi = dbe->book1D("passProbes_TightMu_phi","TightMu Passing Probes #phi", phiBin_, phiMin_, phiMax_);
104 
105  h_passProbes_detIsoTightMu_pt = dbe->book1D("passProbes_detIsoTightMu_pt","detIsoTightMu Passing Probes Pt", ptBin_, ptMin_, ptMax_);
106  h_passProbes_EB_detIsoTightMu_pt = dbe->book1D("passProbes_EB_detIsoTightMu_pt","Barrel: detIsoTightMu Passing Probes Pt", ptBin_, ptMin_, ptMax_);
107  h_passProbes_EE_detIsoTightMu_pt = dbe->book1D("passProbes_EE_detIsoTightMu_pt","Endcap: detIsoTightMu Passing Probes Pt", ptBin_, ptMin_, ptMax_);
108 
109  h_passProbes_pfIsoTightMu_pt = dbe->book1D("passProbes_pfIsoTightMu_pt","pfIsoTightMu Passing Probes Pt", ptBin_, ptMin_, ptMax_);
110  h_passProbes_EB_pfIsoTightMu_pt = dbe->book1D("passProbes_EB_pfIsoTightMu_pt","Barrel: pfIsoTightMu Passing Probes Pt", ptBin_, ptMin_, ptMax_);
111  h_passProbes_EE_pfIsoTightMu_pt = dbe->book1D("passProbes_EE_pfIsoTightMu_pt","Endcap: pfIsoTightMu Passing Probes Pt", ptBin_, ptMin_, ptMax_);
112 
113  h_passProbes_detIsoTightMu_nVtx = dbe->book1D("passProbes_detIsoTightMu_nVtx", "detIsoTightMu Passing Probes nVtx (R03)", vtxBin_, vtxMin_, vtxMax_);
114  h_passProbes_pfIsoTightMu_nVtx = dbe->book1D("passProbes_pfIsoTightMu_nVtx", "pfIsoTightMu Passing Probes nVtx (R04)", vtxBin_, vtxMin_, vtxMax_);
115  h_passProbes_EB_detIsoTightMu_nVtx = dbe->book1D("passProbes_EB_detIsoTightMu_nVtx","Barrel: detIsoTightMu Passing Probes nVtx (R03)", vtxBin_, vtxMin_, vtxMax_);
116  h_passProbes_EE_detIsoTightMu_nVtx = dbe->book1D("passProbes_EE_detIsoTightMu_nVtx","Endcap: detIsoTightMu Passing Probes nVtx (R03)", vtxBin_, vtxMin_, vtxMax_);
117  h_passProbes_EB_pfIsoTightMu_nVtx = dbe->book1D("passProbes_EB_pfIsoTightMu_nVtx", "Barrel: pfIsoTightMu Passing Probes nVtx (R04)", vtxBin_, vtxMin_, vtxMax_);
118  h_passProbes_EE_pfIsoTightMu_nVtx = dbe->book1D("passProbes_EE_pfIsoTightMu_nVtx", "Endcap: pfIsoTightMu Passing Probes nVtx (R04)", vtxBin_, vtxMin_, vtxMax_);
119 
120 
121  // Apply deltaBeta PU corrections to the PF isolation eficiencies.
122 
123  h_passProbes_pfIsodBTightMu_pt = dbe->book1D("passProbes_pfIsodBTightMu_pt","pfIsoTightMu Passing Probes Pt (deltaB PU correction)", ptBin_, ptMin_, ptMax_);
124  h_passProbes_EB_pfIsodBTightMu_pt = dbe->book1D("passProbes_EB_pfIsodBTightMu_pt","Barrel: pfIsoTightMu Passing Probes Pt (deltaB PU correction)", ptBin_, ptMin_, ptMax_);
125  h_passProbes_EE_pfIsodBTightMu_pt = dbe->book1D("passProbes_EE_pfIsodBTightMu_pt","Endcap: pfIsoTightMu Passing Probes Pt (deltaB PU correction)", ptBin_, ptMin_, ptMax_);
126  h_passProbes_pfIsodBTightMu_nVtx = dbe->book1D("passProbes_pfIsodBTightMu_nVtx", "pfIsoTightMu Passing Probes nVtx (R04) (deltaB PU correction)", vtxBin_, vtxMin_, vtxMax_);
127 h_passProbes_EB_pfIsodBTightMu_nVtx = dbe->book1D("passProbes_EB_pfIsodBTightMu_nVtx", "Barrel: pfIsoTightMu Passing Probes nVtx (R04) (deltaB PU correction)", vtxBin_, vtxMin_, vtxMax_);
128  h_passProbes_EE_pfIsodBTightMu_nVtx = dbe->book1D("passProbes_EE_pfIsodBTightMu_nVtx", "Endcap: pfIsoTightMu Passing Probes nVtx (R04) (deltaB PU correction)", vtxBin_, vtxMin_, vtxMax_);
129 
130 
131 
132 #ifdef DEBUG
133  cout << "[EfficiencyAnalyzer] Parameters initialization DONE" <<endl;
134 #endif
135 }
T getParameter(std::string const &) const
MonitorElement * h_passProbes_pfIsoTightMu_nVtx
MonitorElement * h_passProbes_EB_pfIsoTightMu_pt
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
MonitorElement * h_passProbes_EB_pfIsodBTightMu_nVtx
MonitorElement * h_allProbes_eta
MonitorElement * h_allProbes_EE_TightMu_nVtx
edm::ParameterSet parameters
MonitorElement * h_passProbes_EB_detIsoTightMu_pt
MonitorElement * h_passProbes_pfIsodBTightMu_nVtx
MonitorElement * h_allProbes_EB_TightMu_pt
MonitorElement * h_passProbes_EE_pfIsoTightMu_nVtx
MonitorElement * h_passProbes_EE_detIsoTightMu_pt
MonitorElement * h_allProbes_pt
MonitorElement * h_allProbes_EB_pt
MonitorElement * h_passProbes_TightMu_EB_pt
MonitorElement * h_passProbes_EE_pfIsoTightMu_pt
MonitorElement * h_passProbes_EB_pfIsoTightMu_nVtx
MonitorElement * h_passProbes_TightMu_hp_eta
MonitorElement * h_allProbes_EE_pt
MonitorElement * h_passProbes_TightMu_eta
MonitorElement * h_passProbes_EE_detIsoTightMu_nVtx
MonitorElement * h_passProbes_TightMu_phi
MonitorElement * h_passProbes_TightMu_pt
MonitorElement * h_allProbes_EB_TightMu_nVtx
edm::InputTag theMuonCollectionLabel
#define LogTrace(id)
MonitorElement * h_passProbes_TightMu_EE_pt
MonitorElement * h_passProbes_EB_detIsoTightMu_nVtx
MonitorElement * h_passProbes_EE_pfIsodBTightMu_nVtx
MonitorElement * h_passProbes_EE_pfIsodBTightMu_pt
MonitorElement * h_allProbes_TightMu_pt
MonitorElement * test_TightMu_Minv
MonitorElement * h_passProbes_EB_pfIsodBTightMu_pt
edm::InputTag theTrackCollectionLabel
MonitorElement * h_passProbes_detIsoTightMu_nVtx
tuple cout
Definition: gather_cfg.py:121
MonitorElement * h_allProbes_hp_eta
MonitorElement * h_allProbes_EE_TightMu_pt
MonitorElement * h_allProbes_phi
edm::InputTag vertexTag
MonitorElement * h_allProbes_TightMu_nVtx
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
MonitorElement * h_passProbes_pfIsodBTightMu_pt
MonitorElement * h_passProbes_detIsoTightMu_pt
MonitorElement * h_passProbes_pfIsoTightMu_pt

Member Data Documentation

bool EfficiencyAnalyzer::_doPVCheck
protected

Definition at line 54 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

int EfficiencyAnalyzer::_numPV
protected

Definition at line 124 of file EfficiencyAnalyzer.h.

Referenced by analyze().

edm::InputTag EfficiencyAnalyzer::bsTag
protected

Definition at line 56 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

int EfficiencyAnalyzer::etaBin_
protected

Definition at line 59 of file EfficiencyAnalyzer.h.

Referenced by beginJob().

double EfficiencyAnalyzer::etaMax_
protected

Definition at line 67 of file EfficiencyAnalyzer.h.

Referenced by beginJob().

double EfficiencyAnalyzer::etaMin_
protected

Definition at line 66 of file EfficiencyAnalyzer.h.

Referenced by beginJob().

MonitorElement* EfficiencyAnalyzer::h_allProbes_EB_pt
protected

Definition at line 100 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_allProbes_EB_TightMu_nVtx
protected

Definition at line 109 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_allProbes_EB_TightMu_pt
protected

Definition at line 106 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_allProbes_EE_pt
protected

Definition at line 101 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_allProbes_EE_TightMu_nVtx
protected

Definition at line 110 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_allProbes_EE_TightMu_pt
protected

Definition at line 107 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_allProbes_eta
protected

Definition at line 102 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_allProbes_hp_eta
protected

Definition at line 103 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_allProbes_phi
protected

Definition at line 104 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_allProbes_pt
protected

Definition at line 99 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_allProbes_TightMu_nVtx
protected

Definition at line 108 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_allProbes_TightMu_pt
protected

Definition at line 105 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_failProbes_TightMu_eta
protected

Definition at line 96 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_failProbes_TightMu_phi
protected

Definition at line 97 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_failProbes_TightMu_pt
protected

Definition at line 95 of file EfficiencyAnalyzer.h.

MonitorElement* EfficiencyAnalyzer::h_passProbes_detIsoTightMu_nVtx
protected

Definition at line 88 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_detIsoTightMu_pt
protected

Definition at line 82 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_EB_detIsoTightMu_nVtx
protected

Definition at line 90 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_EB_detIsoTightMu_pt
protected

Definition at line 83 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_EB_pfIsodBTightMu_nVtx
protected

Definition at line 120 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_EB_pfIsodBTightMu_pt
protected

Definition at line 117 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_EB_pfIsoTightMu_nVtx
protected

Definition at line 92 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_EB_pfIsoTightMu_pt
protected

Definition at line 86 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_EE_detIsoTightMu_nVtx
protected

Definition at line 91 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_EE_detIsoTightMu_pt
protected

Definition at line 84 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_EE_pfIsodBTightMu_nVtx
protected

Definition at line 121 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_EE_pfIsodBTightMu_pt
protected

Definition at line 118 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_EE_pfIsoTightMu_nVtx
protected

Definition at line 93 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_EE_pfIsoTightMu_pt
protected

Definition at line 87 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_pfIsodBTightMu_nVtx
protected

Definition at line 119 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_pfIsodBTightMu_pt
protected

Definition at line 116 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_pfIsoTightMu_nVtx
protected

Definition at line 89 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_pfIsoTightMu_pt
protected

Definition at line 85 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_TightMu_EB_pt
protected

Definition at line 77 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_TightMu_EE_pt
protected

Definition at line 78 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_TightMu_eta
protected

Definition at line 79 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_TightMu_hp_eta
protected

Definition at line 80 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_TightMu_phi
protected

Definition at line 81 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* EfficiencyAnalyzer::h_passProbes_TightMu_pt
protected

Definition at line 76 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

std::string EfficiencyAnalyzer::metname
protected

Definition at line 46 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

edm::ParameterSet EfficiencyAnalyzer::parameters
protected
int EfficiencyAnalyzer::phiBin_
protected

Definition at line 60 of file EfficiencyAnalyzer.h.

Referenced by beginJob().

double EfficiencyAnalyzer::phiMax_
protected

Definition at line 70 of file EfficiencyAnalyzer.h.

Referenced by beginJob().

double EfficiencyAnalyzer::phiMin_
protected

Definition at line 69 of file EfficiencyAnalyzer.h.

Referenced by beginJob().

int EfficiencyAnalyzer::ptBin_
protected

Definition at line 61 of file EfficiencyAnalyzer.h.

Referenced by beginJob().

double EfficiencyAnalyzer::ptMax_
protected

Definition at line 64 of file EfficiencyAnalyzer.h.

Referenced by beginJob().

double EfficiencyAnalyzer::ptMin_
protected

Definition at line 63 of file EfficiencyAnalyzer.h.

Referenced by beginJob().

MonitorElement* EfficiencyAnalyzer::test_TightMu_Minv
protected

Definition at line 113 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

edm::InputTag EfficiencyAnalyzer::theMuonCollectionLabel
protected

Definition at line 50 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

edm::InputTag EfficiencyAnalyzer::theSTACollectionLabel
protected

Definition at line 49 of file EfficiencyAnalyzer.h.

edm::InputTag EfficiencyAnalyzer::theTrackCollectionLabel
protected

Definition at line 51 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

edm::InputTag EfficiencyAnalyzer::vertexTag
protected

Definition at line 55 of file EfficiencyAnalyzer.h.

Referenced by analyze(), and beginJob().

int EfficiencyAnalyzer::vtxBin_
protected

Definition at line 72 of file EfficiencyAnalyzer.h.

Referenced by beginJob().

double EfficiencyAnalyzer::vtxMax_
protected

Definition at line 74 of file EfficiencyAnalyzer.h.

Referenced by beginJob().

double EfficiencyAnalyzer::vtxMin_
protected

Definition at line 73 of file EfficiencyAnalyzer.h.

Referenced by beginJob().