CMS 3D CMS Logo

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

#include <EwkMuLumiMonitorDQM.h>

Inheritance diagram for EwkMuLumiMonitorDQM:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
virtual void endJob ()
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 
 EwkMuLumiMonitorDQM (const edm::ParameterSet &)
 
void init_histograms ()
 
bool IsMuMatchedToHLTMu (const reco::Muon &, const std::vector< reco::Particle > &, double, double)
 
double muIso (const reco::Muon &)
 
double tkIso (const reco::Track &, edm::Handle< reco::TrackCollection >, edm::Handle< CaloTowerCollection >)
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

double acopCut_
 
edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
edm::EDGetTokenT
< CaloTowerCollection
caloTowerToken_
 
double deltaRTrk_
 
double deltaRVetoTrk_
 
double dxyCut_
 
double etaMuCut_
 
MonitorElementhighMass1HLT_
 
MonitorElementhighMass2HLT_
 
MonitorElementhighMassGlbSta_
 
MonitorElementhighMassGlbTrk_
 
MonitorElementhighMassIsBothGlbTrkThanW_
 
MonitorElementhighMassNotIso_
 
HLTConfigProvider hltConfigProvider_
 
bool isCombinedIso_
 
double isoCut03_
 
bool isRelativeIso_
 
bool isValidHltConfig_
 
bool isW_
 
bool isZGlbSta_
 
bool isZGlbTrk_
 
bool isZGolden1HLT_
 
bool isZGolden2HLT_
 
bool isZGoldenNoIso_
 
MonitorElementmass1HLT_
 
MonitorElementmass2HLT_
 
MonitorElementmassGlbSta_
 
MonitorElementmassGlbTrk_
 
MonitorElementmassIsBothGlbTrkThanW_
 
MonitorElementmassNotIso_
 
double maxDeltaR_
 
double maxDPtRel_
 
bool metIncludesMuons_
 
edm::EDGetTokenT< edm::View
< reco::MET > > 
metToken_
 
double mtMax_
 
double mtMin_
 
edm::EDGetTokenT< edm::View
< reco::Muon > > 
muonToken_
 
unsigned int n1hlt
 
unsigned int n2hlt
 
unsigned int nall
 
unsigned int nEvWithHighPtMu
 
unsigned int nGlbSta
 
unsigned int nGlbTrk
 
unsigned int nhlt
 
unsigned int nInKinRange
 
unsigned int niso
 
unsigned int nNotIso
 
unsigned int nsel
 
unsigned int nTMass
 
unsigned int nW
 
double ptMuCut_
 
double ptThreshold_
 
DQMStoretheDbe
 
MonitorElementTMass_
 
edm::EDGetTokenT
< reco::TrackCollection
trackToken_
 
edm::EDGetTokenT
< trigger::TriggerEvent
trigEvToken_
 
edm::InputTag trigTag_
 
edm::EDGetTokenT
< edm::TriggerResults
trigToken_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

DQM offline for EWK MuLumiMonitor: intended for luminosity purposes using Z/W

Authors
: Michele de Gruttola, INFN Naples - Maria Cepeda, CIEMAT on behalf EWK-Muon group

Definition at line 37 of file EwkMuLumiMonitorDQM.h.

Constructor & Destructor Documentation

EwkMuLumiMonitorDQM::EwkMuLumiMonitorDQM ( const edm::ParameterSet cfg)

Definition at line 36 of file EwkMuLumiMonitorDQM.cc.

References init_histograms(), isValidHltConfig_, cppFunctionSkipper::operator, and theDbe.

37  :
38  // Input collections
40  "TrigTag", edm::InputTag("TriggerResults::HLT"))),
41  trigToken_(consumes<edm::TriggerResults>(trigTag_)),
42  trigEvToken_(consumes<trigger::TriggerEvent>(
43  cfg.getUntrackedParameter<edm::InputTag>("triggerEvent"))),
45  consumes<reco::BeamSpot>(cfg.getUntrackedParameter<edm::InputTag>(
46  "offlineBeamSpot", edm::InputTag("offlineBeamSpot")))),
48  cfg.getUntrackedParameter<edm::InputTag>("muons"))),
49  trackToken_(consumes<reco::TrackCollection>(
50  cfg.getUntrackedParameter<edm::InputTag>("tracks"))),
51  caloTowerToken_(consumes<CaloTowerCollection>(
52  cfg.getUntrackedParameter<edm::InputTag>("calotower"))),
54  cfg.getUntrackedParameter<edm::InputTag>("metTag"))),
55  metIncludesMuons_(cfg.getUntrackedParameter<bool>("METIncludesMuons")),
56  // Main cuts
57  // massMin_(cfg.getUntrackedParameter<double>("MtMin", 20.)),
58  // massMax_(cfg.getUntrackedParameter<double>("MtMax", 2000.))
59  // hltPath_(cfg.getUntrackedParameter<std::string> ("hltPath")) ,
60  // L3FilterName_(cfg.getUntrackedParameter<std::string>
61  // ("L3FilterName")),
62  ptMuCut_(cfg.getUntrackedParameter<double>("ptMuCut")),
63  etaMuCut_(cfg.getUntrackedParameter<double>("etaMuCut")),
64  isRelativeIso_(cfg.getUntrackedParameter<bool>("IsRelativeIso")),
65  isCombinedIso_(cfg.getUntrackedParameter<bool>("IsCombinedIso")),
66  isoCut03_(cfg.getUntrackedParameter<double>("IsoCut03")),
67  // deltaRTrk_(cfg.getUntrackedParameter<double>("deltaRTrk")),
68  ptThreshold_(cfg.getUntrackedParameter<double>("ptThreshold")),
69  // deltaRVetoTrk_(cfg.getUntrackedParameter<double>("deltaRVetoTrk")),
70  maxDPtRel_(cfg.getUntrackedParameter<double>("maxDPtRel")),
71  maxDeltaR_(cfg.getUntrackedParameter<double>("maxDeltaR")),
72  mtMin_(cfg.getUntrackedParameter<double>("mtMin")),
73  mtMax_(cfg.getUntrackedParameter<double>("mtMax")),
74  acopCut_(cfg.getUntrackedParameter<double>("acopCut")),
75  dxyCut_(cfg.getUntrackedParameter<double>("DxyCut")) {
76  // just to initialize
77  isValidHltConfig_ = false;
78 
79  // dqm service & histograms
81  theDbe->setCurrentFolder("Physics/EwkMuLumiMonitorDQM");
83 }
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
edm::EDGetTokenT< edm::TriggerResults > trigToken_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< CaloTowerCollection > caloTowerToken_
edm::EDGetTokenT< reco::TrackCollection > trackToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
edm::EDGetTokenT< trigger::TriggerEvent > trigEvToken_

Member Function Documentation

void EwkMuLumiMonitorDQM::analyze ( const edm::Event ev,
const edm::EventSetup  
)
virtual

number of prescale sets available

Implements edm::EDAnalyzer.

Definition at line 251 of file EwkMuLumiMonitorDQM.cc.

References acopCut_, beamSpotToken_, caloTowerToken_, reco::LeafCandidate::charge(), reco::TrackBase::charge(), reco::TrackBase::dxy(), dxyCut_, eta(), reco::LeafCandidate::eta(), reco::TrackBase::eta(), etaMuCut_, f, MonitorElement::Fill(), edm::Event::getByToken(), highMass1HLT_, highMass2HLT_, highMassGlbSta_, highMassGlbTrk_, highMassIsBothGlbTrkThanW_, highMassNotIso_, hltConfigProvider_, i, reco::Muon::innerTrack(), reco::Muon::isGlobalMuon(), IsMuMatchedToHLTMu(), isoCut03_, reco::Muon::isStandAloneMuon(), isW_, isZGlbSta_, isZGlbTrk_, isZGolden1HLT_, isZGolden2HLT_, isZGoldenNoIso_, j, gen::k, LogTrace, M_PI, mass1HLT_, mass2HLT_, massGlbSta_, massGlbTrk_, massIsBothGlbTrkThanW_, massNotIso_, maxDeltaR_, maxDPtRel_, caloMETBenchmarkGeneric_cfi::met, metIncludesMuons_, metToken_, HLTConfigProvider::moduleLabels(), mtMax_, RPCpg::mu, muIso(), patZpeak::muons, muonToken_, n, n1hlt, n2hlt, nall, mergeVDriftHistosByStation::name, nEvWithHighPtMu, nGlbSta, nGlbTrk, nhlt, niso, nNotIso, nsel, nTMass, nW, dbtoconf::out, AlCaHLTBitMon_ParallelJobs::p, reco::TrackBase::p(), reco::LeafCandidate::p4(), reco::LeafCandidate::phi(), HLTConfigProvider::prescaleSize(), HLTConfigProvider::prescaleValue(), RecoTauCleanerPlugins::pt, reco::TrackBase::pt(), reco::LeafCandidate::pt(), ptMuCut_, reco::LeafCandidate::px(), reco::TrackBase::px(), reco::LeafCandidate::py(), reco::TrackBase::py(), reco::TrackBase::pz(), alignCSCRings::s, findQualityFiles::size, mathSSE::sqrt(), contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, tkIso(), TMass_, testEve_cfg::tracks, trackToken_, trigEvToken_, HLTConfigProvider::triggerIndex(), HLTConfigProvider::triggerNames(), triggerResults, trigToken_, and findQualityFiles::v.

251  {
252  nall++;
253  bool hlt_sel = false;
254  double iso1 = -1;
255  double iso2 = -1;
256  bool isMu1Iso = false;
257  bool isMu2Iso = false;
258  bool singleTrigFlag1 = false;
259  bool singleTrigFlag2 = false;
260  isZGolden1HLT_ = false;
261  isZGolden2HLT_ = false;
262  isZGoldenNoIso_ = false;
263  isZGlbSta_ = false;
264  isZGlbTrk_ = false;
265  isW_ = false;
266  // Trigger
267  bool trigger_fired = false;
268 
270  if (!ev.getByToken(trigToken_, triggerResults)) {
271  // LogWarning("") << ">>> TRIGGER collection does not exist !!!";
272  return;
273  }
274 
275  ev.getByToken(trigToken_, triggerResults);
276  /*
277  const edm::TriggerNames & trigNames = ev.triggerNames(*triggerResults);
278 
279 
280  for (size_t i=0; i<triggerResults->size(); i++) {
281  std::string trigName = trigNames.triggerName(i);
282  //std::cout << " trigName == " << trigName << std::endl;
283  if ( trigName == hltPath_ && triggerResults->accept(i)) {
284  trigger_fired = true;
285  hlt_sel=true;
286  nhlt++;
287  }
288  }
289  */
290  // see the trigger single muon which are present
291  string lowestMuonUnprescaledTrig = "";
292  bool lowestMuonUnprescaledTrigFound = false;
293  const std::vector<std::string>& triggerNames =
295  for (size_t ts = 0; ts < triggerNames.size(); ts++) {
296  string trig = triggerNames[ts];
297  size_t f = trig.find("HLT_Mu");
298  if ((f != std::string::npos)) {
299  // std::cout << "single muon trigger present: " << trig << std::endl;
300  // See if the trigger is prescaled;
302  bool prescaled = false;
303  const unsigned int prescaleSize = hltConfigProvider_.prescaleSize();
304  for (unsigned int ps = 0; ps < prescaleSize; ps++) {
305  const unsigned int prescaleValue =
307  if (prescaleValue != 1) prescaled = true;
308  // std::cout<< " prescaleValue[" << ps << "] =" << prescaleValue
309  //<<std::endl;
310  }
311  if (!prescaled) {
312  // looking now for the lowest hlt path not prescaled, with name of the
313  // form HLT_MuX or HLTMuX_vY
314  for (unsigned int n = 9; n < 100; n++) {
315  string lowestTrig = "HLT_Mu";
316  string lowestTrigv0 = "copy";
317  std::stringstream out;
318  out << n;
319  std::string s = out.str();
320  lowestTrig.append(s);
321  lowestTrigv0 = lowestTrig;
322  for (unsigned int v = 1; v < 10; v++) {
323  lowestTrig.append("_v");
324  std::stringstream oout;
325  oout << v;
326  std::string ss = oout.str();
327  lowestTrig.append(ss);
328  if (trig == lowestTrig) lowestMuonUnprescaledTrig = trig;
329  if (trig == lowestTrig) lowestMuonUnprescaledTrigFound = true;
330  if (trig == lowestTrig) break;
331  }
332  if (lowestMuonUnprescaledTrigFound) break;
333 
334  lowestTrig = lowestTrigv0;
335  if (trig == lowestTrig) lowestMuonUnprescaledTrig = trig;
336  // if (trig==lowestTrig) {std::cout << " before break, lowestTrig
337  // lowest single muon trigger present unprescaled: " << lowestTrig <<
338  // std::endl; }
339  if (trig == lowestTrig) lowestMuonUnprescaledTrigFound = true;
340  if (trig == lowestTrig) break;
341  }
342  if (lowestMuonUnprescaledTrigFound) break;
343  }
344  }
345  }
346  // std::cout << "after break, lowest single muon trigger present unprescaled:
347  // " << lowestMuonUnprescaledTrig << std::endl;
348  unsigned int triggerIndex; // index of trigger path
349 
350  // See if event passed trigger paths
351  std::string hltPath_ = lowestMuonUnprescaledTrig;
352 
353  triggerIndex = hltConfigProvider_.triggerIndex(hltPath_);
354  if (triggerIndex < triggerResults->size())
355  trigger_fired = triggerResults->accept(triggerIndex);
356  std::string L3FilterName_ = "";
357  if (trigger_fired) {
358  const std::vector<std::string>& moduleLabs =
360  /*for (size_t k =0; k < moduleLabs.size()-1 ; k++){
361  std::cout << "moduleLabs[" << k << "] == " << moduleLabs[k] << std::endl;
362  }
363  */
364  // the l3 filter name is just the last module....
365  size_t moduleLabsSizeMinus2 = moduleLabs.size() - 2;
366  // std::cout<<"moduleLabs[" << moduleLabsSizeMinus2 << "]== "<<
367  // moduleLabs[moduleLabsSizeMinus2] << std::endl;
368 
369  L3FilterName_ = moduleLabs[moduleLabsSizeMinus2];
370  }
371 
372  edm::Handle<trigger::TriggerEvent> handleTriggerEvent;
373  LogTrace("") << ">>> Trigger bit: " << trigger_fired << " (" << hltPath_
374  << ")";
375  if (!ev.getByToken(trigEvToken_, handleTriggerEvent)) {
376  // LogWarning( "errorTriggerEventValid" ) << "trigger::TriggerEvent product
377  // with InputTag " << trigEv_.encode() << " not in event";
378  return;
379  }
380  ev.getByToken(trigEvToken_, handleTriggerEvent);
381  const trigger::TriggerObjectCollection& toc(handleTriggerEvent->getObjects());
382  size_t nMuHLT = 0;
383  std::vector<reco::Particle> HLTMuMatched;
384  for (size_t ia = 0; ia < handleTriggerEvent->sizeFilters(); ++ia) {
385  std::string fullname = handleTriggerEvent->filterTag(ia).encode();
386  // std::cout<< "fullname::== " << fullname<< std::endl;
388  size_t p = fullname.find_first_of(':');
389  if (p != std::string::npos) {
390  name = fullname.substr(0, p);
391  } else {
392  name = fullname;
393  }
394  if (&toc != 0) {
395  const trigger::Keys& k = handleTriggerEvent->filterKeys(ia);
396  for (trigger::Keys::const_iterator ki = k.begin(); ki != k.end(); ++ki) {
397  // looking at all the single muon l3 trigger present, for example
398  // hltSingleMu15L3Filtered15.....
399  if (name == L3FilterName_) {
400  // trigger_fired = true;
401  hlt_sel = true;
402  nhlt++;
403  HLTMuMatched.push_back(toc[*ki].particle());
404  nMuHLT++;
405  }
406  }
407  }
408  }
409 
410  // Beam spot
411  Handle<reco::BeamSpot> beamSpotHandle;
412  if (!ev.getByToken(beamSpotToken_, beamSpotHandle)) {
413  // LogWarning("") << ">>> No beam spot found !!!";
414  return;
415  }
416 
417  // looping on muon....
419  if (!ev.getByToken(muonToken_, muons)) {
420  // LogError("") << ">>> muon collection does not exist !!!";
421  return;
422  }
423 
424  ev.getByToken(muonToken_, muons);
425  // saving only muons with pt> ptMuCut and eta<etaMuCut, and dxy<dxyCut
426  std::vector<reco::Muon> highPtGlbMuons;
427  std::vector<reco::Muon> highPtStaMuons;
428 
429  for (size_t i = 0; i < muons->size(); i++) {
430  const reco::Muon& mu = muons->at(i);
431  double pt = mu.pt();
432  double eta = mu.eta();
433  if (pt > ptMuCut_ && fabs(eta) < etaMuCut_) {
434  if (mu.isGlobalMuon()) {
435  // check the dxy....
436  double dxy = mu.innerTrack()->dxy(beamSpotHandle->position());
437  if (fabs(dxy) > dxyCut_) continue;
438  highPtGlbMuons.push_back(mu);
439  }
440  if (mu.isGlobalMuon()) continue;
441  // if is not, look if it is a standalone....
442  if (mu.isStandAloneMuon()) highPtStaMuons.push_back(mu);
443  nEvWithHighPtMu++;
444  }
445  }
446  size_t nHighPtGlbMu = highPtGlbMuons.size();
447  size_t nHighPtStaMu = highPtStaMuons.size();
448  if (hlt_sel && (nHighPtGlbMu > 0)) {
449  // loop on high pt muons if there's at least two with opposite charge build
450  // a Z, more then one z candidate is foreseen.........
451  // stop the loop after 10 cicles....
452  (nHighPtGlbMu > 10) ? nHighPtGlbMu = 10 : 1;
453  // Z selection
454  if (nHighPtGlbMu > 1) {
455  for (unsigned int i = 0; i < nHighPtGlbMu; i++) {
456  reco::Muon muon1 = highPtGlbMuons[i];
457  math::XYZTLorentzVector mu1(muon1.p4());
458  // double pt1= muon1.pt();
459  for (unsigned int j = i + 1; j < nHighPtGlbMu; ++j) {
460  reco::Muon muon2 = highPtGlbMuons[j];
461  math::XYZTLorentzVector mu2(muon2.p4());
462  // double pt2= muon2.pt();
463  if (muon1.charge() == muon2.charge()) continue;
464  math::XYZTLorentzVector pair = mu1 + mu2;
465  double mass = pair.M();
466  // checking isolation and hlt maching
467  iso1 = muIso(muon1);
468  iso2 = muIso(muon2);
469  isMu1Iso = (iso1 < isoCut03_);
470  isMu2Iso = (iso2 < isoCut03_);
471  singleTrigFlag1 =
472  IsMuMatchedToHLTMu(muon1, HLTMuMatched, maxDeltaR_, maxDPtRel_);
473  singleTrigFlag2 =
474  IsMuMatchedToHLTMu(muon2, HLTMuMatched, maxDeltaR_, maxDPtRel_);
475  if (singleTrigFlag1 && singleTrigFlag2) isZGolden2HLT_ = true;
476  if ((singleTrigFlag1 && !singleTrigFlag2) ||
477  (!singleTrigFlag1 && singleTrigFlag2))
478  isZGolden1HLT_ = true;
479  // Z Golden passing all criteria, with 2 or 1 muon matched to an HLT
480  // muon. Using the two cathegories as a control sample for the HLT
481  // matching efficiency
483  // a Z golden has been found, let's remove the two muons from the
484  // list, dome for avoiding resolution effect enter muons in the
485  // standalone and tracker collections.........
486  highPtGlbMuons.erase(highPtGlbMuons.begin() + i);
487  highPtGlbMuons.erase(highPtGlbMuons.begin() + j);
488  // and updating the number of high pt muons....
489  nHighPtGlbMu = highPtGlbMuons.size();
490 
491  if (isMu1Iso && isMu2Iso) {
492  niso++;
493  if (isZGolden2HLT_) {
494  n2hlt++;
495  mass2HLT_->Fill(mass);
496  highMass2HLT_->Fill(mass);
497  /*
498  if (pt1 > pt2) {
499  highest_mupt2HLT_ -> Fill (pt1);
500  lowest_mupt2HLT_ -> Fill (pt2);
501  } else {
502  highest_mupt2HLT_ -> Fill (pt2);
503  lowest_mupt2HLT_ -> Fill (pt1);
504  }
505  */
506  }
507  if (isZGolden1HLT_) {
508  n1hlt++;
509  mass1HLT_->Fill(mass);
510  highMass1HLT_->Fill(mass);
511  /*
512  if (pt1 >pt2) {
513  highest_mupt1HLT_ -> Fill (pt1);
514  lowest_mupt1HLT_ -> Fill (pt2);
515  } else {
516  highest_mupt1HLT_ -> Fill (pt2);
517  lowest_mupt1HLT_ -> Fill (pt1);
518  }
519  */
520  }
521  } else {
522  // ZGlbGlb when at least one of the two muon is not isolated and
523  // at least one HLT matched, used as control sample for the
524  // isolation efficiency
525  // filling events with one muon not isolated and both hlt mathced
526  if (((isMu1Iso && !isMu2Iso) || (!isMu1Iso && isMu2Iso)) &&
528  isZGoldenNoIso_ = true;
529  nNotIso++;
530  massNotIso_->Fill(mass);
531  highMassNotIso_->Fill(mass);
532  }
533  /*
534  if (pt1 > pt2) {
535  highest_muptNotIso_ -> Fill (pt1);
536  lowest_muptNotIso_ -> Fill (pt2);
537  } else {
538  highest_muptNotIso_ -> Fill (pt2);
539  lowest_muptNotIso_ -> Fill (pt1);
540  }
541  */
542  }
543  }
544  }
545  }
546  }
547  // W->MuNu selection (if at least one muon has been selected)
548  // looking for a W if a Z is not found.... let's think if we prefer to
549  // exclude zMuMuNotIso or zMuSta....
550  if (!(isZGolden2HLT_ || isZGolden1HLT_)) {
551  Handle<View<MET> > metCollection;
552  if (!ev.getByToken(metToken_, metCollection)) {
553  // LogError("") << ">>> MET collection does not exist !!!";
554  return;
555  }
556  const MET& met = metCollection->at(0);
557  nW = 0;
558  for (unsigned int i = 0; i < nHighPtGlbMu; i++) {
559  reco::Muon muon1 = highPtGlbMuons[i];
560  /*
561  quality cut not implemented
562  Quality Cuts double dxy =
563 gm->dxy(beamSpotHandle->position());
564  Cut in 0.2 double trackerHits =
565 gm->hitPattern().numberOfValidTrackerHits();
566  Cut in 11 bool quality = fabs(dxy)<dxyCut_ &&
567 muon::isGoodMuon(mu,muon::GlobalMuonPromptTight) && trackerHits>=trackerHitsCut_
568 && mu.isTrackerMuon() ;
569 if (!quality) continue;
570  */
571  // isolation cut and hlt maching
572  iso1 = muIso(muon1);
573  isMu1Iso = (iso1 < isoCut03_);
574  if (!isMu1Iso) continue;
575  // checking if muon is matched to any HLT muon....
576  singleTrigFlag1 =
577  IsMuMatchedToHLTMu(muon1, HLTMuMatched, maxDeltaR_, maxDPtRel_);
578  if (!singleTrigFlag1) continue;
579  // std::cout << " is GlobMu macthecd to HLT: " << singleTrigFlag1 <<
580  // std::endl;
581  // MT cuts
582  double met_px = met.px();
583  double met_py = met.py();
584 
585  if (!metIncludesMuons_) {
586  for (unsigned int i = 0; i < nHighPtGlbMu; i++) {
587  reco::Muon muon1 = highPtGlbMuons[i];
588  met_px -= muon1.px();
589  met_py -= muon1.py();
590  }
591  }
592  double met_et = met.pt(); // sqrt(met_px*met_px+met_py*met_py);
593  LogTrace("") << ">>> MET, MET_px, MET_py: " << met_et << ", " << met_px
594  << ", " << met_py << " [GeV]";
595  double w_et = met_et + muon1.pt();
596  double w_px = met_px + muon1.px();
597  double w_py = met_py + muon1.py();
598  double massT = w_et * w_et - w_px * w_px - w_py * w_py;
599  massT = (massT > 0) ? sqrt(massT) : 0;
600  // Acoplanarity cuts
601  Geom::Phi<double> deltaphi(muon1.phi() - atan2(met_py, met_px));
602  double acop = M_PI - fabs(deltaphi.value());
603  // std::cout << " is acp of W candidate less then cut: " << (acop<
604  // acopCut_) << std::endl;
605  if (acop > acopCut_) continue; // Cut in 2.0
606  TMass_->Fill(massT);
607  if (massT < mtMin_ || massT > mtMax_) continue; // Cut in (50,200) GeV
608  // we give the number of W only in the tMass selected but we have a look
609  // at mass tails to check the QCD background
610  isW_ = true;
611  nW++;
612  nTMass++;
613  }
614  }
615  // if a zGlobal is not selected, look at the dimuonGlobalOneStandAlone and
616  // dimuonGlobalOneTrack...., used as a control sample for the tracking
617  // efficiency and muon system efficiency
619  for (unsigned int i = 0; i < nHighPtGlbMu; ++i) {
620  reco::Muon glbMuon = highPtGlbMuons[i];
621  math::XYZTLorentzVector mu1(glbMuon.p4());
622  // double pt1= glbMuon.pt();
623  // checking that the global muon is hlt matched otherwise skip the event
624  singleTrigFlag1 =
625  IsMuMatchedToHLTMu(glbMuon, HLTMuMatched, maxDeltaR_, maxDPtRel_);
626  if (!singleTrigFlag1) continue;
627  // checking that the global muon is isolated matched otherwise skip the
628  // event
629  iso1 = muIso(glbMuon);
630  isMu1Iso = (iso1 < isoCut03_);
631  if (!isMu1Iso) continue;
632  // look at the standalone muon ....
633  // stop the loop after 10 cicles....
634  (nHighPtStaMu > 10) ? nHighPtStaMu = 10 : 1;
635  for (unsigned int j = 0; j < nHighPtStaMu; ++j) {
636  reco::Muon staMuon = highPtStaMuons[j];
637  math::XYZTLorentzVector mu2(staMuon.p4());
638  // double pt2= staMuon.pt();
639  if (glbMuon.charge() == staMuon.charge()) continue;
640  math::XYZTLorentzVector pair = mu1 + mu2;
641  double mass = pair.M();
642  iso2 = muIso(staMuon);
643  isMu2Iso = (iso2 < isoCut03_);
644  LogTrace("") << "\t... isolation value" << iso1 << ", isolated? "
645  << isMu1Iso;
646  LogTrace("") << "\t... isolation value" << iso2 << ", isolated? "
647  << isMu2Iso;
648  // requiring theat the global mu is mathed to the HLT and both are
649  // isolated
650  if (isMu2Iso) {
651  isZGlbSta_ = true;
652  nGlbSta++;
653  massGlbSta_->Fill(mass);
654  highMassGlbSta_->Fill(mass);
655  /*
656  if (pt1 > pt2) {
657  highest_muptGlbSta_ -> Fill (pt1);
658  lowest_muptGlbSta_ -> Fill (pt2);
659  } else {
660  highest_muptGlbSta_ -> Fill (pt2);
661  lowest_muptGlbSta_ -> Fill (pt1);
662  }
663  */
664  }
665  }
666  // look at the tracks....
668  if (!ev.getByToken(trackToken_, tracks)) {
669  // LogError("") << ">>> track collection does not exist !!!";
670  return;
671  }
672  ev.getByToken(trackToken_, tracks);
673  Handle<CaloTowerCollection> calotower;
674  if (!ev.getByToken(caloTowerToken_, calotower)) {
675  // LogError("") << ">>> calotower collection does not exist !!!";
676  return;
677  }
678  ev.getByToken(caloTowerToken_, calotower);
679  // avoid to loop on more than 5000 trks
680  size_t nTrk = tracks->size();
681  (nTrk > 5000) ? nTrk = 5000 : 1;
682  for (unsigned int j = 0; j < nTrk; j++) {
683  const reco::Track& tk = tracks->at(j);
684  if (glbMuon.charge() == tk.charge()) continue;
685  double pt2 = tk.pt();
686  double eta = tk.eta();
687  double dxy = tk.dxy(beamSpotHandle->position());
688  if (pt2 < ptMuCut_ || fabs(eta) > etaMuCut_ || fabs(dxy) > dxyCut_)
689  continue;
690  // assuming that the track is a mu....
692  tk.px(), tk.py(), tk.pz(),
693  sqrt((tk.p() * tk.p()) + (0.10566 * 0.10566)));
694  math::XYZTLorentzVector pair = mu1 + mu2;
695  double mass = pair.M();
696  // now requiring that the tracks is isolated.......
697  iso2 = tkIso(tk, tracks, calotower);
698  isMu2Iso = (iso2 < isoCut03_);
699  // std::cout << "found a track with rel/comb iso: " << iso2
700  //<< std::endl;
701  if (isMu2Iso) {
702  isZGlbTrk_ = true;
703  nGlbTrk++;
704  massGlbTrk_->Fill(mass);
705  highMassGlbTrk_->Fill(mass);
706  if (!isW_) continue;
709  /*
710  if (pt1 > pt2) {
711  highest_muptGlbTrk_ -> Fill (pt1);
712  lowest_muptGlbTrk_ -> Fill (pt2);
713  } else {
714  highest_muptGlbTrk_ -> Fill (pt2);
715  lowest_muptGlbTrk_ -> Fill (pt1);
716  }
717  */
718  }
719  }
720  }
721  }
722  }
723  if ((hlt_sel || isZGolden2HLT_ || isZGolden1HLT_ || isZGoldenNoIso_ ||
724  isZGlbSta_ || isZGlbTrk_ || isW_)) {
725  nsel++;
726  LogTrace("") << ">>>> Event ACCEPTED";
727  } else {
728  LogTrace("") << ">>>> Event REJECTED";
729  }
730  return;
731 }
MonitorElement * highMass1HLT_
double p() const
momentum vector magnitude
Definition: TrackBase.h:591
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
virtual float pt() const
transverse momentum
virtual TrackRef innerTrack() const
Definition: Muon.h:48
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
virtual float phi() const
momentum azimuthal angle
const std::vector< std::string > & triggerNames() const
names of trigger paths
MonitorElement * highMassIsBothGlbTrkThanW_
bool isGlobalMuon() const
Definition: Muon.h:218
MonitorElement * highMassGlbTrk_
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
MonitorElement * massNotIso_
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:603
T eta() const
bool isStandAloneMuon() const
Definition: Muon.h:220
MonitorElement * highMassGlbSta_
edm::EDGetTokenT< edm::TriggerResults > trigToken_
void Fill(long long x)
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
MonitorElement * mass1HLT_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
unsigned int prescaleValue(unsigned int set, const std::string &trigger) const
HLT prescale value in specific prescale set for a specific trigger path.
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:627
MonitorElement * massIsBothGlbTrkThanW_
MonitorElement * massGlbTrk_
bool IsMuMatchedToHLTMu(const reco::Muon &, const std::vector< reco::Particle > &, double, double)
double tkIso(const reco::Track &, edm::Handle< reco::TrackCollection >, edm::Handle< CaloTowerCollection >)
Definition: MET.h:42
virtual float eta() const
momentum pseudorapidity
T sqrt(T t)
Definition: SSEVec.h:48
double pt() const
track transverse momentum
Definition: TrackBase.h:597
virtual int charge() const
electric charge
edm::EDGetTokenT< CaloTowerCollection > caloTowerToken_
int j
Definition: DBlmapReader.cc:9
MonitorElement * highMassNotIso_
double f[11][100]
edm::EDGetTokenT< reco::TrackCollection > trackToken_
const int mu
Definition: Constants.h:22
static std::string const triggerResults
Definition: EdmProvDump.cc:41
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
#define LogTrace(id)
#define M_PI
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:615
int k[5][pyjets_maxn]
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
tuple out
Definition: dbtoconf.py:99
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
MonitorElement * massGlbSta_
virtual double px() const
x coordinate of momentum vector
tuple tracks
Definition: testEve_cfg.py:39
double muIso(const reco::Muon &)
std::vector< size_type > Keys
MonitorElement * TMass_
HLTConfigProvider hltConfigProvider_
tuple muons
Definition: patZpeak.py:38
MonitorElement * mass2HLT_
edm::EDGetTokenT< trigger::TriggerEvent > trigEvToken_
unsigned int prescaleSize() const
MonitorElement * highMass2HLT_
int charge() const
track electric charge
Definition: TrackBase.h:543
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:567
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
tuple size
Write out results.
virtual double py() const
y coordinate of momentum vector
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:609
void EwkMuLumiMonitorDQM::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 110 of file EwkMuLumiMonitorDQM.cc.

110 {}
void EwkMuLumiMonitorDQM::beginRun ( const edm::Run r,
const edm::EventSetup iSetup 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 85 of file EwkMuLumiMonitorDQM.cc.

References hltConfigProvider_, HLTConfigProvider::init(), isValidHltConfig_, n1hlt, n2hlt, nall, nEvWithHighPtMu, nGlbSta, nGlbTrk, nhlt, nInKinRange, niso, nNotIso, nsel, nTMass, nW, edm::InputTag::process(), and trigTag_.

85  {
86  nall = 0;
87  nEvWithHighPtMu = 0;
88  nInKinRange = 0;
89  nsel = 0;
90  niso = 0;
91  nhlt = 0;
92  n1hlt = 0;
93  n2hlt = 0;
94  nNotIso = 0;
95  nGlbSta = 0;
96  nGlbTrk = 0;
97  nTMass = 0;
98  nW = 0;
99 
100  // passed as parameter to HLTConfigProvider::init(), not yet used
101  bool isConfigChanged = false;
102 
103  // isValidHltConfig_ used to short-circuit analyze() in case of problems
105  hltConfigProvider_.init(r, iSetup, trigTag_.process(), isConfigChanged);
106  // std::cout << "hlt config trigger is valid??" << isValidHltConfig_ <<
107  // std::endl;
108 }
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
std::string const & process() const
Definition: InputTag.h:46
HLTConfigProvider hltConfigProvider_
void EwkMuLumiMonitorDQM::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 230 of file EwkMuLumiMonitorDQM.cc.

230 {}
void EwkMuLumiMonitorDQM::endRun ( const edm::Run r,
const edm::EventSetup  
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 232 of file EwkMuLumiMonitorDQM.cc.

References n1hlt, n2hlt, nall, nGlbSta, nhlt, nNotIso, nsel, and nTMass.

232  {
233 
234  LogVerbatim("") << "\n>>>>>> Z/W SELECTION SUMMARY BEGIN >>>>>>>>>>>>>>>";
235  LogVerbatim("") << "Total numer of events analyzed: " << nall << " [events]";
236  LogVerbatim("") << "Total numer of events selected: " << nsel << " [events]";
237 
238  LogVerbatim("") << "Passing HLT criteria: " << nhlt << " [events] ";
239  LogVerbatim("") << "Passing 2 HLT match criteria: " << n2hlt
240  << " [events] ";
241  LogVerbatim("") << "Passing 1 HLT match criteria: " << n1hlt
242  << " [events] ";
243  LogVerbatim("") << "Passing Not Iso criteria: " << nNotIso
244  << " [events] ";
245  LogVerbatim("") << "Passing GlbSta criteria: " << nGlbSta
246  << " [events] ";
247  LogVerbatim("") << "Passing W criteria: " << nTMass << " [events] ";
248  LogVerbatim("") << ">>>>>> Z/W SELECTION SUMMARY END >>>>>>>>>>>>>>>\n";
249 }
void EwkMuLumiMonitorDQM::init_histograms ( )

Definition at line 112 of file EwkMuLumiMonitorDQM.cc.

References highMass1HLT_, highMass2HLT_, highMassGlbSta_, highMassGlbTrk_, highMassIsBothGlbTrkThanW_, highMassNotIso_, mass1HLT_, mass2HLT_, massGlbSta_, massGlbTrk_, massIsBothGlbTrkThanW_, massNotIso_, theDbe, and TMass_.

Referenced by EwkMuLumiMonitorDQM().

112  {
113 
114  mass2HLT_ =
115  theDbe->book1D("Z_2HLT_MASS", "Z mass [GeV/c^{2}]", 200, 0., 200.);
116  mass1HLT_ =
117  theDbe->book1D("Z_1HLT_MASS", "Z mass [GeV/c^{2}]", 200, 0., 200.);
118  massNotIso_ =
119  theDbe->book1D("Z_NOTISO_MASS", "Z mass [GeV/c^{2}]", 200, 0., 200.);
120  massGlbSta_ =
121  theDbe->book1D("Z_GLBSTA_MASS", "Z mass [GeV/c^{2}]", 200, 0., 200.);
122  massGlbTrk_ =
123  theDbe->book1D("Z_GLBTRK_MASS", "Z mass [GeV/c^{2}]", 200, 0., 200.);
124  massIsBothGlbTrkThanW_ = theDbe->book1D("Z_ISBOTHGLBTRKTHANW_MASS",
125  "Z mass [GeV/c^{2}]", 200, 0., 200.);
126 
127  highMass2HLT_ = theDbe->book1D("Z_2HLT_HIGHMASS", "Z high mass [GeV/c^{2}]",
128  2000, 0., 2000.);
129  highMass1HLT_ = theDbe->book1D("Z_1HLT_HIGHMASS", "Z high mass [GeV/c^{2}]",
130  2000, 0., 2000.);
131  highMassNotIso_ = theDbe->book1D("Z_NOTISO_HIGHMASS",
132  "Z high mass [GeV/c^{2}]", 2000, 0., 2000.);
133  highMassGlbSta_ = theDbe->book1D("Z_GLBSTA_HIGHMASS",
134  "Z high mass [GeV/c^{2}]", 2000, 0., 2000.);
135  highMassGlbTrk_ = theDbe->book1D("Z_GLBTRK_HIGHMASS",
136  "Z high mass [GeV/c^{2}]", 2000, 0., 2000.);
138  theDbe->book1D("Z_ISBOTHGLBTRKTHANW_HIGHMASS", "Z high mass [GeV/c^{2}]",
139  2000, 0., 2000.);
140 
141  /*
142  highest_mupt2HLT_ = theDbe->book1D("HIGHEST_MU_PT_2HLT","Highest muon
143  p_{t}[GeV/c]",200,0.,200.);
144  highest_mupt1HLT_ = theDbe->book1D("HIGHEST_MU_PT_1HLT","Highest muon
145  p_{t}[GeV/c]",200,0.,200.);
146  highest_muptNotIso_ = theDbe->book1D("HIGHEST_MU_PT_NOTISO","Highest muon
147  p_{t}[GeV/c]",200,0.,200.);
148  highest_muptGlbSta_ = theDbe->book1D("HIGHEST_MU_PT_GLBSTA","Highest muon
149  p_{t}[GeV/c]",200,0.,200.);
150  highest_muptGlbTrk_ = theDbe->book1D("HIGHEST_MU_PT_GLBTRK","Highest muon
151  p_{t}[GeV/c]",200,0.,200.);
152 
153  lowest_mupt2HLT_ = theDbe->book1D("LOWEST_MU_PT_2HLT","Lowest muon p_{t}
154  [GeV/c]",200,0.,200.);
155  lowest_mupt1HLT_ = theDbe->book1D("LOWEST_MU_PT_1HLT","Lowest muon p_{t}
156  [GeV/c]",200,0.,200.);
157  lowest_muptNotIso_ = theDbe->book1D("LOWEST_MU_PT_NOTISO","Lowest muon p_{t}
158  [GeV/c]",200,0.,200.);
159  lowest_muptGlbSta_ = theDbe->book1D("LOWEST_MU_PT_GLBSTA","Lowest muon p_{t}
160  [GeV/c]",200,0.,200.);
161  lowest_muptGlbTrk_ = theDbe->book1D("LOWEST_MU_PT_GLBTRK","Lowest muon p_{t}
162  [GeV/c]",200,0.,200.);
163  */
164 
165  TMass_ = theDbe->book1D("TMASS", "Transverse mass [GeV]", 300, 0., 300.);
166 }
MonitorElement * highMass1HLT_
MonitorElement * highMassIsBothGlbTrkThanW_
MonitorElement * highMassGlbTrk_
MonitorElement * massNotIso_
MonitorElement * highMassGlbSta_
MonitorElement * mass1HLT_
MonitorElement * massIsBothGlbTrkThanW_
MonitorElement * massGlbTrk_
MonitorElement * highMassNotIso_
MonitorElement * massGlbSta_
MonitorElement * TMass_
MonitorElement * mass2HLT_
MonitorElement * highMass2HLT_
bool EwkMuLumiMonitorDQM::IsMuMatchedToHLTMu ( const reco::Muon mu,
const std::vector< reco::Particle > &  HLTMu,
double  DR,
double  DPtRel 
)

Definition at line 215 of file EwkMuLumiMonitorDQM.cc.

References deltaR(), gen::k, RecoTauCleanerPlugins::pt, and reco::LeafCandidate::pt().

Referenced by analyze().

217  {
218  size_t dim = HLTMu.size();
219  size_t nPass = 0;
220  if (dim == 0) return false;
221  for (size_t k = 0; k < dim; k++) {
222  if ((deltaR(HLTMu[k], mu) < DR) &&
223  (fabs(HLTMu[k].pt() - mu.pt()) / HLTMu[k].pt() < DPtRel)) {
224  nPass++;
225  }
226  }
227  return (nPass > 0);
228 }
virtual float pt() const
transverse momentum
int k[5][pyjets_maxn]
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
double EwkMuLumiMonitorDQM::muIso ( const reco::Muon mu)

Definition at line 168 of file EwkMuLumiMonitorDQM.cc.

References reco::MuonIsolation::emEt, reco::MuonIsolation::hadEt, isCombinedIso_, reco::Muon::isolationR03(), isRelativeIso_, reco::LeafCandidate::pt(), and reco::MuonIsolation::sumPt.

Referenced by analyze().

168  {
169  double isovar = mu.isolationR03().sumPt;
170  if (isCombinedIso_) {
171  isovar += mu.isolationR03().emEt;
172  isovar += mu.isolationR03().hadEt;
173  }
174  if (isRelativeIso_) isovar /= mu.pt();
175  return isovar;
176 }
float hadEt
hcal sum-Et
Definition: MuonIsolation.h:9
float sumPt
sum-pt of tracks
Definition: MuonIsolation.h:7
virtual float pt() const
transverse momentum
float emEt
ecal sum-Et
Definition: MuonIsolation.h:8
const MuonIsolation & isolationR03() const
Definition: Muon.h:158
double EwkMuLumiMonitorDQM::tkIso ( const reco::Track tk,
edm::Handle< reco::TrackCollection tracks,
edm::Handle< CaloTowerCollection calotower 
)

Definition at line 178 of file EwkMuLumiMonitorDQM.cc.

References deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, HTMLExport::elem(), reco::TrackBase::eta(), i, isCombinedIso_, isRelativeIso_, reco::Track::outerEta(), reco::Track::outerPhi(), reco::TrackBase::phi(), reco::TrackBase::pt(), ptThreshold_, mathSSE::sqrt(), reco::TrackBase::vx(), reco::TrackBase::vy(), and reco::TrackBase::vz().

Referenced by analyze().

180  {
181  double ptSum = 0;
182  for (size_t i = 0; i < tracks->size(); ++i) {
183  const reco::Track& elem = tracks->at(i);
184  double elemPt = elem.pt();
185  // same parameter used for muIsolation: dR [0.01, IsoCut03_], |dZ|<0.2,
186  // |d_r(xy)|<0.1
187  double elemVx = elem.vx();
188  double elemVy = elem.vy();
189  double elemD0 = sqrt(elemVx * elemVx + elemVy * elemVy);
190  if (elemD0 > 0.2) continue;
191  double dz = fabs(elem.vz() - tk.vz());
192  if (dz > 0.1) continue;
193  // evaluate only for tracks with pt>ptTreshold
194  if (elemPt < ptThreshold_) continue;
195  double dR = deltaR(elem.eta(), elem.phi(), tk.eta(), tk.phi());
196  // isolation in a cone with dR=0.3, and vetoing the track itself
197  if ((dR < 0.01) || (dR > 0.3)) continue;
198  ptSum += elemPt;
199  }
200  if (isCombinedIso_) {
201  // loop on clusters....
202  for (CaloTowerCollection::const_iterator it = calotower->begin();
203  it != calotower->end(); ++it) {
204  double dR = deltaR(it->eta(), it->phi(), tk.outerEta(), tk.outerPhi());
205  // veto value is 0.1 for towers....
206  if ((dR < 0.1) || (dR > 0.3)) continue;
207  ptSum += it->emEnergy();
208  ptSum += it->hadEnergy();
209  }
210  }
211  if (isRelativeIso_) ptSum /= tk.pt();
212  return ptSum;
213 }
int i
Definition: DBlmapReader.cc:9
std::vector< CaloTower >::const_iterator const_iterator
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:621
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:627
T sqrt(T t)
Definition: SSEVec.h:48
double pt() const
track transverse momentum
Definition: TrackBase.h:597
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:645
double outerEta() const
pseudorapidity of the momentum vector at the outermost hit position
Definition: Track.h:169
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:639
double outerPhi() const
azimuthal angle of the momentum vector at the outermost hit position
Definition: Track.h:164
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:633

Member Data Documentation

double EwkMuLumiMonitorDQM::acopCut_
private

Definition at line 81 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

edm::EDGetTokenT<reco::BeamSpot> EwkMuLumiMonitorDQM::beamSpotToken_
private

Definition at line 57 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

edm::EDGetTokenT<CaloTowerCollection> EwkMuLumiMonitorDQM::caloTowerToken_
private

Definition at line 60 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

double EwkMuLumiMonitorDQM::deltaRTrk_
private

Definition at line 74 of file EwkMuLumiMonitorDQM.h.

double EwkMuLumiMonitorDQM::deltaRVetoTrk_
private

Definition at line 76 of file EwkMuLumiMonitorDQM.h.

double EwkMuLumiMonitorDQM::dxyCut_
private

Definition at line 82 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

double EwkMuLumiMonitorDQM::etaMuCut_
private

Definition at line 68 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

MonitorElement* EwkMuLumiMonitorDQM::highMass1HLT_
private

Definition at line 92 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and init_histograms().

MonitorElement* EwkMuLumiMonitorDQM::highMass2HLT_
private

Definition at line 87 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and init_histograms().

MonitorElement* EwkMuLumiMonitorDQM::highMassGlbSta_
private

Definition at line 102 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and init_histograms().

MonitorElement* EwkMuLumiMonitorDQM::highMassGlbTrk_
private

Definition at line 107 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and init_histograms().

MonitorElement* EwkMuLumiMonitorDQM::highMassIsBothGlbTrkThanW_
private

Definition at line 114 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and init_histograms().

MonitorElement* EwkMuLumiMonitorDQM::highMassNotIso_
private

Definition at line 97 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and init_histograms().

HLTConfigProvider EwkMuLumiMonitorDQM::hltConfigProvider_
private

Definition at line 138 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and beginRun().

bool EwkMuLumiMonitorDQM::isCombinedIso_
private

Definition at line 71 of file EwkMuLumiMonitorDQM.h.

Referenced by muIso(), and tkIso().

double EwkMuLumiMonitorDQM::isoCut03_
private

Definition at line 72 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

bool EwkMuLumiMonitorDQM::isRelativeIso_
private

Definition at line 70 of file EwkMuLumiMonitorDQM.h.

Referenced by muIso(), and tkIso().

bool EwkMuLumiMonitorDQM::isValidHltConfig_
private

Definition at line 137 of file EwkMuLumiMonitorDQM.h.

Referenced by beginRun(), and EwkMuLumiMonitorDQM().

bool EwkMuLumiMonitorDQM::isW_
private

Definition at line 135 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

bool EwkMuLumiMonitorDQM::isZGlbSta_
private

Definition at line 133 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

bool EwkMuLumiMonitorDQM::isZGlbTrk_
private

Definition at line 134 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

bool EwkMuLumiMonitorDQM::isZGolden1HLT_
private

Definition at line 130 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

bool EwkMuLumiMonitorDQM::isZGolden2HLT_
private

Definition at line 131 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

bool EwkMuLumiMonitorDQM::isZGoldenNoIso_
private

Definition at line 132 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

MonitorElement* EwkMuLumiMonitorDQM::mass1HLT_
private

Definition at line 91 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and init_histograms().

MonitorElement* EwkMuLumiMonitorDQM::mass2HLT_
private

Definition at line 86 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and init_histograms().

MonitorElement* EwkMuLumiMonitorDQM::massGlbSta_
private

Definition at line 101 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and init_histograms().

MonitorElement* EwkMuLumiMonitorDQM::massGlbTrk_
private

Definition at line 106 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and init_histograms().

MonitorElement* EwkMuLumiMonitorDQM::massIsBothGlbTrkThanW_
private

Definition at line 113 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and init_histograms().

MonitorElement* EwkMuLumiMonitorDQM::massNotIso_
private

Definition at line 96 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and init_histograms().

double EwkMuLumiMonitorDQM::maxDeltaR_
private

Definition at line 78 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

double EwkMuLumiMonitorDQM::maxDPtRel_
private

Definition at line 77 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

bool EwkMuLumiMonitorDQM::metIncludesMuons_
private

Definition at line 62 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

edm::EDGetTokenT<edm::View<reco::MET> > EwkMuLumiMonitorDQM::metToken_
private

Definition at line 61 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

double EwkMuLumiMonitorDQM::mtMax_
private

Definition at line 80 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

double EwkMuLumiMonitorDQM::mtMin_
private

Definition at line 79 of file EwkMuLumiMonitorDQM.h.

edm::EDGetTokenT<edm::View<reco::Muon> > EwkMuLumiMonitorDQM::muonToken_
private

Definition at line 58 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

unsigned int EwkMuLumiMonitorDQM::n1hlt
private

Definition at line 122 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), beginRun(), and endRun().

unsigned int EwkMuLumiMonitorDQM::n2hlt
private

Definition at line 123 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), beginRun(), and endRun().

unsigned int EwkMuLumiMonitorDQM::nall
private

Definition at line 116 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), beginRun(), and endRun().

unsigned int EwkMuLumiMonitorDQM::nEvWithHighPtMu
private

Definition at line 117 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and beginRun().

unsigned int EwkMuLumiMonitorDQM::nGlbSta
private

Definition at line 125 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), beginRun(), and endRun().

unsigned int EwkMuLumiMonitorDQM::nGlbTrk
private

Definition at line 126 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and beginRun().

unsigned int EwkMuLumiMonitorDQM::nhlt
private

Definition at line 121 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), beginRun(), and endRun().

unsigned int EwkMuLumiMonitorDQM::nInKinRange
private

Definition at line 118 of file EwkMuLumiMonitorDQM.h.

Referenced by beginRun().

unsigned int EwkMuLumiMonitorDQM::niso
private

Definition at line 120 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and beginRun().

unsigned int EwkMuLumiMonitorDQM::nNotIso
private

Definition at line 124 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), beginRun(), and endRun().

unsigned int EwkMuLumiMonitorDQM::nsel
private

Definition at line 119 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), beginRun(), and endRun().

unsigned int EwkMuLumiMonitorDQM::nTMass
private

Definition at line 127 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), beginRun(), and endRun().

unsigned int EwkMuLumiMonitorDQM::nW
private

Definition at line 128 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and beginRun().

double EwkMuLumiMonitorDQM::ptMuCut_
private

Definition at line 67 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

double EwkMuLumiMonitorDQM::ptThreshold_
private

Definition at line 75 of file EwkMuLumiMonitorDQM.h.

Referenced by tkIso().

DQMStore* EwkMuLumiMonitorDQM::theDbe
private

Definition at line 84 of file EwkMuLumiMonitorDQM.h.

Referenced by EwkMuLumiMonitorDQM(), and init_histograms().

MonitorElement* EwkMuLumiMonitorDQM::TMass_
private

Definition at line 111 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze(), and init_histograms().

edm::EDGetTokenT<reco::TrackCollection> EwkMuLumiMonitorDQM::trackToken_
private

Definition at line 59 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

edm::EDGetTokenT<trigger::TriggerEvent> EwkMuLumiMonitorDQM::trigEvToken_
private

Definition at line 56 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().

edm::InputTag EwkMuLumiMonitorDQM::trigTag_
private

Definition at line 54 of file EwkMuLumiMonitorDQM.h.

Referenced by beginRun().

edm::EDGetTokenT<edm::TriggerResults> EwkMuLumiMonitorDQM::trigToken_
private

Definition at line 55 of file EwkMuLumiMonitorDQM.h.

Referenced by analyze().