CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
MuonCosmicCompatibilityFiller Class Reference

#include <MuonCosmicCompatibilityFiller.h>

Public Member Functions

reco::MuonCosmicCompatibility fillCompatibility (const reco::Muon &muon, edm::Event &, const edm::EventSetup &)
 fill cosmic compatibility variables More...
 
 MuonCosmicCompatibilityFiller (const edm::ParameterSet &, edm::ConsumesCollector &)
 
 ~MuonCosmicCompatibilityFiller ()
 

Private Member Functions

unsigned int backToBack2LegCosmic (const edm::Event &, const reco::Muon &) const
 return cosmic-likeness based on presence of a track in opp side: 0 == no matching opp tracks More...
 
bool checkMuonID (const reco::Muon &) const
 tag a muon as cosmic based on the muonID information More...
 
bool checkMuonSegments (const reco::Muon &muon) const
 tag a muon as cosmic based on segment compatibility and the number of segment matches More...
 
float combinedCosmicID (const edm::Event &, const edm::EventSetup &iSetup, const reco::Muon &, bool CheckMuonID, bool checkVertex) const
 combined cosmic-likeness: 0 == not cosmic-like More...
 
unsigned int eventActivity (const edm::Event &, const reco::Muon &) const
 returns cosmic-likeness based on the event activity information: tracker track multiplicity and vertex quality. 0 == cosmic-like More...
 
bool isOverlappingMuon (const edm::Event &, const edm::EventSetup &iSetup, const reco::Muon &) const
 returns cosmic-likeness based on overlap with traversing cosmic muon (only muon/STA hits are used) More...
 
float muonTiming (const edm::Event &iEvent, const reco::Muon &muon, bool isLoose) const
 check muon time (DT and CSC) information: 0 == prompt-like More...
 
unsigned int nMuons (const edm::Event &) const
 get number of muons in the vent More...
 
unsigned int pvMatches (const edm::Event &, const reco::Muon &, bool) const
 return cosmic-likeness based on the 2D impact parameters (dxy, dz wrt to PV). 0 == cosmic-like More...
 

Private Attributes

double angleThreshold_
 
double corrTimeNeg_
 
double corrTimePos_
 
edm::EDGetTokenT< reco::MuonCollectioncosmicToken_
 
double deltaPt_
 
double hIpTrdxy_
 
double hIpTrvProb_
 
edm::InputTag inputCosmicMuonCollection_
 
std::vector< edm::InputTaginputMuonCollections_
 
std::vector< edm::InputTaginputTrackCollections_
 
edm::InputTag inputVertexCollection_
 
double ipThreshold_
 
double largedxy_
 
double largedxyMult_
 
double maxdxyLoose_
 
double maxdxyLooseMult_
 
double maxdxyTight_
 
double maxdxyTightMult_
 
double maxdzLoose_
 
double maxdzLooseMult_
 
double maxdzTight_
 
double maxdzTightMult_
 
double maxvertRho_
 
double maxvertZ_
 
double minvProb_
 
std::vector< edm::EDGetTokenT< reco::MuonCollection > > muonTokens_
 
int nChamberMatches_
 
unsigned int nTrackThreshold_
 
double offTimeNegLoose_
 
double offTimeNegLooseMult_
 
double offTimeNegTight_
 
double offTimeNegTightMult_
 
double offTimePosLoose_
 
double offTimePosLooseMult_
 
double offTimePosTight_
 
double offTimePosTightMult_
 
double segmentComp_
 
double sharedFrac_
 
int sharedHits_
 
std::vector< edm::EDGetTokenT< reco::TrackCollection > > trackTokens_
 
edm::EDGetTokenT< reco::VertexCollectionvertexToken_
 

Detailed Description

Description: class for cosmic muon identification

Author
: A. Everett, Purdue University
: A. Svyatkovskiy, Purdue University
: H.D. Yoo, Purdue University

Definition at line 40 of file MuonCosmicCompatibilityFiller.h.

Constructor & Destructor Documentation

◆ MuonCosmicCompatibilityFiller()

MuonCosmicCompatibilityFiller::MuonCosmicCompatibilityFiller ( const edm::ParameterSet iConfig,
edm::ConsumesCollector iC 
)

Definition at line 45 of file MuonCosmicCompatibilityFiller.cc.

47  : inputMuonCollections_(iConfig.getParameter<std::vector<edm::InputTag> >("InputMuonCollections")),
48  inputTrackCollections_(iConfig.getParameter<std::vector<edm::InputTag> >("InputTrackCollections")),
49  inputCosmicMuonCollection_(iConfig.getParameter<edm::InputTag>("InputCosmicMuonCollection")),
50  inputVertexCollection_(iConfig.getParameter<edm::InputTag>("InputVertexCollection")) {
51  //kinematic vars
52  angleThreshold_ = iConfig.getParameter<double>("angleCut");
53  deltaPt_ = iConfig.getParameter<double>("deltaPt");
54  //time
55  offTimePosTightMult_ = iConfig.getParameter<double>("offTimePosTightMult");
56  offTimeNegTightMult_ = iConfig.getParameter<double>("offTimeNegTightMult");
57  offTimePosTight_ = iConfig.getParameter<double>("offTimePosTight");
58  offTimeNegTight_ = iConfig.getParameter<double>("offTimeNegTight");
59  offTimePosLooseMult_ = iConfig.getParameter<double>("offTimePosLooseMult");
60  offTimeNegLooseMult_ = iConfig.getParameter<double>("offTimeNegLooseMult");
61  offTimePosLoose_ = iConfig.getParameter<double>("offTimePosLoose");
62  offTimeNegLoose_ = iConfig.getParameter<double>("offTimeNegLoose");
63  corrTimeNeg_ = iConfig.getParameter<double>("corrTimeNeg");
64  corrTimePos_ = iConfig.getParameter<double>("corrTimePos");
65  //rechits
66  sharedHits_ = iConfig.getParameter<int>("sharedHits");
67  sharedFrac_ = iConfig.getParameter<double>("sharedFrac");
68  ipThreshold_ = iConfig.getParameter<double>("ipCut");
69  //segment comp, matches
70  nChamberMatches_ = iConfig.getParameter<int>("nChamberMatches");
71  segmentComp_ = iConfig.getParameter<double>("segmentComp");
72  //ip, vertex
73  maxdzLooseMult_ = iConfig.getParameter<double>("maxdzLooseMult");
74  maxdxyLooseMult_ = iConfig.getParameter<double>("maxdxyLooseMult");
75  maxdzTightMult_ = iConfig.getParameter<double>("maxdzTightMult");
76  maxdxyTightMult_ = iConfig.getParameter<double>("maxdxyTightMult");
77  maxdzLoose_ = iConfig.getParameter<double>("maxdzLoose");
78  maxdxyLoose_ = iConfig.getParameter<double>("maxdxyLoose");
79  maxdzTight_ = iConfig.getParameter<double>("maxdzTight");
80  maxdxyTight_ = iConfig.getParameter<double>("maxdxyTight");
81  largedxyMult_ = iConfig.getParameter<double>("largedxyMult");
82  largedxy_ = iConfig.getParameter<double>("largedxy");
83  hIpTrdxy_ = iConfig.getParameter<double>("hIpTrdxy");
84  hIpTrvProb_ = iConfig.getParameter<double>("hIpTrvProb");
85  minvProb_ = iConfig.getParameter<double>("minvProb");
86  maxvertZ_ = iConfig.getParameter<double>("maxvertZ");
87  maxvertRho_ = iConfig.getParameter<double>("maxvertRho");
88  // nTrackThreshold_ = iConfig.getParameter<unsigned int>("nTrackThreshold");
89 
90  for (unsigned int i = 0; i < inputMuonCollections_.size(); ++i)
92  for (unsigned int i = 0; i < inputTrackCollections_.size(); ++i)
94 
97 }

References angleThreshold_, edm::ConsumesCollector::consumes(), corrTimeNeg_, corrTimePos_, cosmicToken_, deltaPt_, edm::ParameterSet::getParameter(), hIpTrdxy_, hIpTrvProb_, mps_fire::i, inputCosmicMuonCollection_, inputMuonCollections_, inputTrackCollections_, inputVertexCollection_, ipThreshold_, largedxy_, largedxyMult_, maxdxyLoose_, maxdxyLooseMult_, maxdxyTight_, maxdxyTightMult_, maxdzLoose_, maxdzLooseMult_, maxdzTight_, maxdzTightMult_, maxvertRho_, maxvertZ_, minvProb_, muonTokens_, nChamberMatches_, offTimeNegLoose_, offTimeNegLooseMult_, offTimeNegTight_, offTimeNegTightMult_, offTimePosLoose_, offTimePosLooseMult_, offTimePosTight_, offTimePosTightMult_, segmentComp_, sharedFrac_, sharedHits_, trackTokens_, and vertexToken_.

◆ ~MuonCosmicCompatibilityFiller()

MuonCosmicCompatibilityFiller::~MuonCosmicCompatibilityFiller ( )

Definition at line 99 of file MuonCosmicCompatibilityFiller.cc.

99 {}

Member Function Documentation

◆ backToBack2LegCosmic()

unsigned int MuonCosmicCompatibilityFiller::backToBack2LegCosmic ( const edm::Event iEvent,
const reco::Muon muon 
) const
private

return cosmic-likeness based on presence of a track in opp side: 0 == no matching opp tracks

Definition at line 212 of file MuonCosmicCompatibilityFiller.cc.

213  {
214  unsigned int result = 0; //no partners - collision
216  if (muon.isGlobalMuon())
217  track = muon.innerTrack();
218  else if (muon.isTrackerMuon())
219  track = muon.track();
220  else if (muon.isStandAloneMuon() || muon.isRPCMuon() || muon.isGEMMuon() || muon.isME0Muon())
221  return false;
222 
223  for (unsigned int iColl = 0; iColl < trackTokens_.size(); ++iColl) {
225  iEvent.getByToken(trackTokens_[iColl], trackHandle);
226  if (muonid::findOppositeTrack(trackHandle, *track, angleThreshold_, deltaPt_).isNonnull()) {
227  result++;
228  }
229  } //loop over track collections
230 
231  return result;
232 }

References angleThreshold_, deltaPt_, muonid::findOppositeTrack(), iEvent, mps_fire::result, HLT_2018_cff::track, and trackTokens_.

Referenced by combinedCosmicID(), and fillCompatibility().

◆ checkMuonID()

bool MuonCosmicCompatibilityFiller::checkMuonID ( const reco::Muon imuon) const
private

tag a muon as cosmic based on the muonID information

Definition at line 620 of file MuonCosmicCompatibilityFiller.cc.

620  {
621  bool result = false;
622  // initial set up using Jordan's study: GlobalMuonPromptTight + TMOneStationLoose
624  result = true;
625 
626  return result;
627 }

References muon::GlobalMuonPromptTight, muon::isGoodMuon(), mps_fire::result, and muon::TMOneStationLoose.

◆ checkMuonSegments()

bool MuonCosmicCompatibilityFiller::checkMuonSegments ( const reco::Muon muon) const
private

tag a muon as cosmic based on segment compatibility and the number of segment matches

Definition at line 629 of file MuonCosmicCompatibilityFiller.cc.

629  {
630  bool result = false;
631  if (imuon.numberOfMatches() < nChamberMatches_ && muon::segmentCompatibility(imuon) < segmentComp_)
632  result = true;
633 
634  return result;
635 }

References nChamberMatches_, reco::Muon::numberOfMatches(), mps_fire::result, segmentComp_, and muon::segmentCompatibility().

◆ combinedCosmicID()

float MuonCosmicCompatibilityFiller::combinedCosmicID ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const reco::Muon muon,
bool  CheckMuonID,
bool  checkVertex 
) const
private

combined cosmic-likeness: 0 == not cosmic-like

Definition at line 490 of file MuonCosmicCompatibilityFiller.cc.

494  {
495  float result = 0.0;
496 
497  // return >=1 = identify as cosmic muon (the more like cosmics, the higher is the number)
498  // return 0.0 = identify as collision muon
499  if (muon.isGlobalMuon()) {
500  unsigned int cosmicVertex = eventActivity(iEvent, muon);
501  bool isOverlapping = isOverlappingMuon(iEvent, iSetup, muon);
502  unsigned int looseIp = pvMatches(iEvent, muon, true);
503  unsigned int tightIp = pvMatches(iEvent, muon, false);
504  float looseTime = muonTiming(iEvent, muon, true);
505  float tightTime = muonTiming(iEvent, muon, false);
506  unsigned int backToback = backToBack2LegCosmic(iEvent, muon);
507  //bool cosmicSegment = checkMuonSegments(muon);
508 
509  //short cut to reject cosmic event
510  if (checkVertex && cosmicVertex == 0)
511  return 10.0;
512 
513  // compatibility (0 - 10)
514  // weight is assigned by the performance of individual module
515  // btob: ~90% eff / ~0% misid
516  // ip: ~90% eff / ~0% misid
517  // time: ~30% eff / ~0% misid
518  double weight_btob = 2.0;
519  double weight_ip = 2.0;
520  double weight_time = 1.0;
521  double weight_overlap = 0.5;
522 
523  // collision muon should have compatibility < 4 (0 - 4)
524  // cosmic muon should have compatibility >= 4 (4 - 10)
525 
526  // b-to-b (max comp.: 4.0)
527  if (backToback >= 1) {
528  //in this case it is cosmic for sure
529  result += weight_btob * 2.;
530  if (tightIp == 1) {
531  // check with other observables to reduce mis-id (subtract compatibilities)
532  if (looseIp == 1) {
533  if (backToback < 2)
534  result -= weight_btob * 0.5;
535  }
536  }
537  }
538 
539  // ip (max comp.: 4.0)
540  if (tightIp == 0) {
541  //in this case it is cosmic for sure
542  result += weight_ip * 2.0;
543  if (backToback == 0) {
544  // check with other observables to reduce mis-id (subtract compatibilities)
545  if (tightTime == 0) {
546  if (looseTime == 0 && !isOverlapping)
547  result -= weight_ip * 1.0;
548  }
549  }
550  } else if (tightIp >= 2) {
551  // in this case it is almost collision-like (reduce compatibility)
552  // if multi pvs: comp = -2.0
553  if (backToback >= 1)
554  result -= weight_ip * 1.0;
555  }
556 
557  // timing (max comp.: 2.0)
558  if (tightTime > 0) {
559  // bonus track
560  if (looseTime > 0) {
561  if (backToback >= 1) {
562  if (tightIp == 0)
563  result += weight_time * tightTime;
564  else if (looseIp == 0)
565  result += weight_time * 0.25;
566  }
567  } else {
568  if (backToback >= 1 && tightIp == 0)
569  result += weight_time * 0.25;
570  }
571  }
572 
573  // overlapping
574  if (backToback == 0 && isOverlapping) {
575  // bonus track
576  if (tightIp == 0 && tightTime >= 1) {
577  result += weight_overlap * 1.0;
578  }
579  }
580  } //is global muon
581 
582  // if (CheckMuonID && cosmicSegment) result += 4;
583 
584  return result;
585 }

References backToBack2LegCosmic(), eventActivity(), iEvent, isOverlappingMuon(), muonTiming(), pvMatches(), and mps_fire::result.

Referenced by fillCompatibility().

◆ eventActivity()

unsigned int MuonCosmicCompatibilityFiller::eventActivity ( const edm::Event iEvent,
const reco::Muon muon 
) const
private

returns cosmic-likeness based on the event activity information: tracker track multiplicity and vertex quality. 0 == cosmic-like

Definition at line 590 of file MuonCosmicCompatibilityFiller.cc.

590  {
591  unsigned int result = 0; //no good vertices - cosmic-like
592 
593  //check track activity
595  iEvent.getByToken(trackTokens_[0], tracks);
596  if (!tracks.failedToGet() && tracks->size() < 3)
597  return 0;
598 
599  //cosmic event should have zero good vertices
601  if (!iEvent.getByToken(vertexToken_, pvHandle)) {
602  return 0;
603  } else {
604  const reco::VertexCollection& vertices = *pvHandle.product();
605  //check if vertex collection is empty
606  if (vertices.begin() == vertices.end())
607  return 0;
608  for (reco::VertexCollection::const_iterator it = vertices.begin(); it != vertices.end(); ++it) {
609  if ((TMath::Prob(it->chi2(), (int)it->ndof()) > minvProb_) && (fabs(it->z()) <= maxvertZ_) &&
610  (fabs(it->position().rho()) <= maxvertRho_))
611  result++;
612  }
613  }
614  return result;
615 }

References iEvent, createfilelist::int, maxvertRho_, maxvertZ_, minvProb_, edm::Handle< T >::product(), mps_fire::result, PDWG_EXOHSCP_cff::tracks, trackTokens_, vertexToken_, and pwdgSkimBPark_cfi::vertices.

Referenced by combinedCosmicID(), and fillCompatibility().

◆ fillCompatibility()

reco::MuonCosmicCompatibility MuonCosmicCompatibilityFiller::fillCompatibility ( const reco::Muon muon,
edm::Event iEvent,
const edm::EventSetup iSetup 
)

fill cosmic compatibility variables

Definition at line 101 of file MuonCosmicCompatibilityFiller.cc.

103  {
104  const std::string theCategory = "MuonCosmicCompatibilityFiller";
105 
107 
108  float timeCompatibility = muonTiming(iEvent, muon, false);
109  float backToBackCompatibility = backToBack2LegCosmic(iEvent, muon);
110  float overlapCompatibility = isOverlappingMuon(iEvent, iSetup, muon);
111  float ipCompatibility = pvMatches(iEvent, muon, false);
112  float vertexCompatibility = eventActivity(iEvent, muon);
113  float combinedCompatibility = combinedCosmicID(iEvent, iSetup, muon, false, false);
114 
115  returnComp.timeCompatibility = timeCompatibility;
116  returnComp.backToBackCompatibility = backToBackCompatibility;
117  returnComp.overlapCompatibility = overlapCompatibility;
118  returnComp.cosmicCompatibility = combinedCompatibility;
119  returnComp.ipCompatibility = ipCompatibility;
120  returnComp.vertexCompatibility = vertexCompatibility;
121 
122  return returnComp;
123 }

References backToBack2LegCosmic(), reco::MuonCosmicCompatibility::backToBackCompatibility, combinedCosmicID(), reco::MuonCosmicCompatibility::cosmicCompatibility, eventActivity(), iEvent, reco::MuonCosmicCompatibility::ipCompatibility, isOverlappingMuon(), muonTiming(), reco::MuonCosmicCompatibility::overlapCompatibility, pvMatches(), AlCaHLTBitMon_QueryRunRegistry::string, reco::MuonCosmicCompatibility::timeCompatibility, and reco::MuonCosmicCompatibility::vertexCompatibility.

Referenced by CosmicsMuonIdProducer::produce().

◆ isOverlappingMuon()

bool MuonCosmicCompatibilityFiller::isOverlappingMuon ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const reco::Muon muon 
) const
private

returns cosmic-likeness based on overlap with traversing cosmic muon (only muon/STA hits are used)

Definition at line 257 of file MuonCosmicCompatibilityFiller.cc.

259  {
260  // 4 steps in this module
261  // step1 : check whether it's 1leg cosmic muon or not
262  // step2 : both muons (muons and muonsFromCosmics1Leg) should have close IP
263  // step3 : both muons should share very close reference point
264  // step4 : check shared hits in both muon tracks
265 
266  // check if this muon is available in muonsFromCosmics collection
267  bool overlappingMuon = false; //false - not cosmic-like
268  if (!muon.isGlobalMuon())
269  return false;
270 
271  // reco muons for cosmics
273  iEvent.getByToken(cosmicToken_, muonHandle);
274 
275  // Global Tracking Geometry
276  ESHandle<GlobalTrackingGeometry> trackingGeometry;
277  iSetup.get<GlobalTrackingGeometryRecord>().get(trackingGeometry);
278 
279  // PV
280  math::XYZPoint RefVtx;
281  RefVtx.SetXYZ(0, 0, 0);
282 
284  iEvent.getByToken(vertexToken_, pvHandle);
285  const reco::VertexCollection& vertices = *pvHandle.product();
286  for (reco::VertexCollection::const_iterator it = vertices.begin(); it != vertices.end(); ++it) {
287  RefVtx = it->position();
288  }
289 
290  if (!muonHandle.failedToGet()) {
291  for (reco::MuonCollection::const_iterator cosmicMuon = muonHandle->begin(); cosmicMuon != muonHandle->end();
292  ++cosmicMuon) {
293  if (cosmicMuon->innerTrack() == muon.innerTrack() || cosmicMuon->outerTrack() == muon.outerTrack())
294  return true;
295 
296  reco::TrackRef outertrack = muon.outerTrack();
297  reco::TrackRef costrack = cosmicMuon->outerTrack();
298 
299  bool isUp = false;
300  if (outertrack->phi() > 0)
301  isUp = true;
302 
303  // shared hits
304  int RecHitsMuon = outertrack->numberOfValidHits();
305  int RecHitsCosmicMuon = 0;
306  int shared = 0;
307  // count hits for same hemisphere
308  if (costrack.isNonnull()) {
309  int nhitsUp = 0;
310  int nhitsDown = 0;
311  // unused
312  // bool isCosmic1Leg = false;
313  // bool isCloseIP = false;
314  // bool isCloseRef = false;
315 
316  for (trackingRecHit_iterator coshit = costrack->recHitsBegin(); coshit != costrack->recHitsEnd(); coshit++) {
317  if ((*coshit)->isValid()) {
318  DetId id((*coshit)->geographicalId());
319  double hity = trackingGeometry->idToDet(id)->position().y();
320  if (hity > 0)
321  nhitsUp++;
322  if (hity < 0)
323  nhitsDown++;
324 
325  if (isUp && hity > 0)
326  RecHitsCosmicMuon++;
327  if (!isUp && hity < 0)
328  RecHitsCosmicMuon++;
329  }
330  }
331  // step1
332  //UNUSED: if( nhitsUp > 0 && nhitsDown > 0 ) isCosmic1Leg = true;
333  //if( !isCosmic1Leg ) continue;
334 
335  if (outertrack.isNonnull()) {
336  // step2
337  //UNUSED: const double ipErr = (double)outertrack->d0Error();
338  //UNUSED: double ipThreshold = max(ipThreshold_, ipErr);
339  //UNUSED: if( fabs(outertrack->dxy(RefVtx) + costrack->dxy(RefVtx)) < ipThreshold ) isCloseIP = true;
340  //if( !isCloseIP ) continue;
341 
342  // step3
343  GlobalPoint muonRefVtx(outertrack->vx(), outertrack->vy(), outertrack->vz());
344  GlobalPoint cosmicRefVtx(costrack->vx(), costrack->vy(), costrack->vz());
345  //UNUSED: float dist = (muonRefVtx - cosmicRefVtx).mag();
346  //UNUSED: if( dist < 0.1 ) isCloseRef = true;
347  //if( !isCloseRef ) continue;
348 
349  for (trackingRecHit_iterator trkhit = outertrack->recHitsBegin(); trkhit != outertrack->recHitsEnd();
350  trkhit++) {
351  if ((*trkhit)->isValid()) {
352  for (trackingRecHit_iterator coshit = costrack->recHitsBegin(); coshit != costrack->recHitsEnd();
353  coshit++) {
354  if ((*coshit)->isValid()) {
355  if ((*trkhit)->geographicalId() == (*coshit)->geographicalId()) {
356  if (((*trkhit)->localPosition() - (*coshit)->localPosition()).mag() < 10e-5)
357  shared++;
358  }
359  }
360  }
361  }
362  }
363  }
364  }
365  // step4
366  double fraction = -1;
367  if (RecHitsMuon != 0)
368  fraction = shared / (double)RecHitsMuon;
369  // std::cout << "shared = " << shared << " " << fraction << " " << RecHitsMuon << " " << RecHitsCosmicMuon << std::endl;
370  if (shared > sharedHits_ && fraction > sharedFrac_) {
371  overlappingMuon = true;
372  break;
373  }
374  }
375  }
376 
377  return overlappingMuon;
378 }

References cosmicToken_, MillePedeFileConverter_cfg::e, edm::HandleBase::failedToGet(), HLT_2018_cff::fraction, edm::EventSetup::get(), get, triggerObjects_cff::id, GlobalTrackingGeometry::idToDet(), iEvent, edm::Ref< C, T, F >::isNonnull(), mag(), GeomDet::position(), edm::Handle< T >::product(), sharedFrac_, sharedHits_, MuonServiceProxy::trackingGeometry(), vertexToken_, pwdgSkimBPark_cfi::vertices, and PV3DBase< T, PVType, FrameType >::y().

Referenced by combinedCosmicID(), and fillCompatibility().

◆ muonTiming()

float MuonCosmicCompatibilityFiller::muonTiming ( const edm::Event iEvent,
const reco::Muon muon,
bool  isLoose 
) const
private

check muon time (DT and CSC) information: 0 == prompt-like

Definition at line 128 of file MuonCosmicCompatibilityFiller.cc.

128  {
129  float offTimeNegMult, offTimePosMult, offTimeNeg, offTimePos;
130 
131  if (isLoose) {
132  //use "loose" parameter set
133  offTimeNegMult = offTimeNegLooseMult_;
134  offTimePosMult = offTimePosLooseMult_;
135  offTimeNeg = offTimeNegLoose_;
136  offTimePos = offTimePosLoose_;
137  } else {
138  offTimeNegMult = offTimeNegTightMult_;
139  offTimePosMult = offTimePosTightMult_;
140  offTimeNeg = offTimeNegTight_;
141  offTimePos = offTimePosTight_;
142  }
143 
144  float result = 0.0;
145 
146  if (muon.isTimeValid()) {
147  //case of multiple muon event
148  if (nMuons(iEvent) > 1) {
149  float positiveTime = 0;
150  if (muon.time().timeAtIpInOut < offTimeNegMult || muon.time().timeAtIpInOut > offTimePosMult)
151  result = 1.;
152  if (muon.time().timeAtIpInOut > 0.)
153  positiveTime = muon.time().timeAtIpInOut;
154 
155  //special case, looking for time-correlation
156  // between muons in opposite hemispheres
157  if (!isLoose && result == 0 && positiveTime > corrTimePos_) {
158  //check hemi of this muon
159  bool isUp = false;
160  reco::TrackRef outertrack = muon.outerTrack();
161  if (outertrack.isNonnull()) {
162  if (outertrack->phi() > 0)
163  isUp = true;
164 
165  //loop over muons in that event and find if there are any in the opposite hemi
167  iEvent.getByToken(muonTokens_[1], muonHandle);
168 
169  if (!muonHandle.failedToGet()) {
170  for (reco::MuonCollection::const_iterator iMuon = muonHandle->begin(); iMuon != muonHandle->end();
171  ++iMuon) {
172  if (!iMuon->isGlobalMuon())
173  continue;
174 
175  reco::TrackRef checkedTrack = iMuon->outerTrack();
176  if (muon.isTimeValid()) {
177  // from bottom up
178  if (checkedTrack->phi() < 0 && isUp) {
179  if (iMuon->time().timeAtIpInOut < corrTimeNeg_)
180  result = 1.0;
181  break;
182  } else if (checkedTrack->phi() > 0 && !isUp) {
183  // from top down
184  if (iMuon->time().timeAtIpInOut < corrTimeNeg_)
185  result = 1.0;
186  break;
187  }
188  } //muon is time valid
189  }
190  }
191  } //track is nonnull
192  } //double check timing
193  } else {
194  //case of a single muon event
195  if (muon.time().timeAtIpInOut < offTimeNeg || muon.time().timeAtIpInOut > offTimePos)
196  result = 1.;
197  }
198  } //is time valid
199 
200  if (!isLoose && result > 0) {
201  //check loose ip
202  if (pvMatches(iEvent, muon, true) == 0)
203  result *= 2.;
204  }
205 
206  return result;
207 }

References corrTimeNeg_, corrTimePos_, edm::HandleBase::failedToGet(), iEvent, edm::Ref< C, T, F >::isNonnull(), muonTokens_, nMuons(), offTimeNegLoose_, offTimeNegLooseMult_, offTimeNegTight_, offTimeNegTightMult_, offTimePosLoose_, offTimePosLooseMult_, offTimePosTight_, offTimePosTightMult_, pvMatches(), and mps_fire::result.

Referenced by combinedCosmicID(), and fillCompatibility().

◆ nMuons()

unsigned int MuonCosmicCompatibilityFiller::nMuons ( const edm::Event iEvent) const
private

get number of muons in the vent

Definition at line 237 of file MuonCosmicCompatibilityFiller.cc.

237  {
238  unsigned int nGlb = 0;
239 
241  iEvent.getByToken(muonTokens_[1], muonHandle);
242 
243  if (!muonHandle.failedToGet()) {
244  for (reco::MuonCollection::const_iterator iMuon = muonHandle->begin(); iMuon != muonHandle->end(); ++iMuon) {
245  if (!iMuon->isGlobalMuon())
246  continue;
247  nGlb++;
248  }
249  }
250 
251  return nGlb;
252 }

References edm::HandleBase::failedToGet(), iEvent, and muonTokens_.

Referenced by muonTiming(), and pvMatches().

◆ pvMatches()

unsigned int MuonCosmicCompatibilityFiller::pvMatches ( const edm::Event iEvent,
const reco::Muon muon,
bool  isLoose 
) const
private

return cosmic-likeness based on the 2D impact parameters (dxy, dz wrt to PV). 0 == cosmic-like

Definition at line 383 of file MuonCosmicCompatibilityFiller.cc.

385  {
386  float maxdxyMult, maxdzMult, maxdxy, maxdz;
387 
388  if (isLoose) {
389  //use "loose" parameter set
390  maxdxyMult = maxdxyLooseMult_;
391  maxdzMult = maxdzLooseMult_;
392  maxdxy = maxdxyLoose_;
393  maxdz = maxdzLoose_;
394  } else {
395  maxdxyMult = maxdxyTightMult_;
396  maxdzMult = maxdzTightMult_;
397  maxdxy = maxdxyTight_;
398  maxdz = maxdzTight_;
399  }
400 
401  unsigned int result = 0;
402 
404  if (muon.isGlobalMuon())
405  track = muon.innerTrack();
406  else if (muon.isTrackerMuon() || muon.isRPCMuon())
407  track = muon.track();
408  else if (muon.isStandAloneMuon())
409  track = muon.standAloneMuon();
410 
411  bool multipleMu = false;
412  if (nMuons(iEvent) > 1)
413  multipleMu = true;
414 
415  math::XYZPoint RefVtx;
416  RefVtx.SetXYZ(0, 0, 0);
417 
419  iEvent.getByToken(vertexToken_, pvHandle);
420  const reco::VertexCollection& vertices = *pvHandle.product();
421  for (reco::VertexCollection::const_iterator it = vertices.begin(); it != vertices.end(); ++it) {
422  RefVtx = it->position();
423 
424  if (track.isNonnull()) {
425  if (multipleMu) {
426  //multiple muon event
427 
428  if (fabs((*track).dxy(RefVtx)) < maxdxyMult || fabs((*track).dz(RefVtx)) < maxdzMult) {
429  result++;
430 
431  //case of extra large dxy
432  if (!isLoose && fabs((*track).dxy(RefVtx)) > largedxyMult_)
433  result -= 1;
434  }
435  } else {
436  //single muon event
437 
438  if (fabs((*track).dxy(RefVtx)) < maxdxy || fabs((*track).dz(RefVtx)) < maxdz) {
439  result++;
440 
441  //case of extra large dxy
442  if (!isLoose && fabs((*track).dxy(RefVtx)) > largedxy_)
443  result -= 1;
444  }
445  }
446  } //track is nonnull
447  } //loop over vertices
448 
449  //special case for non-cosmic large ip muons
450  if (result == 0 && multipleMu) {
451  // consider all reco muons in an event
453  iEvent.getByToken(muonTokens_[1], muonHandle);
454 
455  //cosmic event should have zero good vertices
457  iEvent.getByToken(vertexToken_, pvHandle);
458  const reco::VertexCollection& vertices = *pvHandle.product();
459 
460  //find the "other" one
461  if (!muonHandle.failedToGet()) {
462  for (reco::MuonCollection::const_iterator muons = muonHandle->begin(); muons != muonHandle->end(); ++muons) {
463  if (!muons->isGlobalMuon())
464  continue;
465  //skip this track
466  if (muons->innerTrack() == muon.innerTrack() && muons->outerTrack() == muon.outerTrack())
467  continue;
468  //check ip and vertex of the "other" muon
470  if (muons->isGlobalMuon())
471  tracks = muons->innerTrack();
472  if (fabs((*tracks).dxy(RefVtx)) > hIpTrdxy_)
473  continue;
474  //check if vertex collection is empty
475  if (vertices.begin() == vertices.end())
476  continue;
477  //for(reco::VertexCollection::const_iterator it=vertices.begin() ; it!=vertices.end() ; ++it) {
478  //find matching vertex by position
479  //if (fabs(it->z() - tracks->vz()) > 0.01) continue; //means will not be untagged from cosmics
480  if (TMath::Prob(vertices.front().chi2(), (int)(vertices.front().ndof())) > hIpTrvProb_)
481  result = 1;
482  //}
483  }
484  }
485  }
486 
487  return result;
488 }

References edm::HandleBase::failedToGet(), hIpTrdxy_, hIpTrvProb_, iEvent, createfilelist::int, largedxy_, largedxyMult_, maxdxyLoose_, maxdxyLooseMult_, maxdxyTight_, maxdxyTightMult_, maxdzLoose_, maxdzLooseMult_, maxdzTight_, maxdzTightMult_, PDWG_BPHSkim_cff::muons, muonTokens_, nMuons(), edm::Handle< T >::product(), mps_fire::result, HLT_2018_cff::track, PDWG_EXOHSCP_cff::tracks, vertexToken_, and pwdgSkimBPark_cfi::vertices.

Referenced by combinedCosmicID(), fillCompatibility(), and muonTiming().

Member Data Documentation

◆ angleThreshold_

double MuonCosmicCompatibilityFiller::angleThreshold_
private

◆ corrTimeNeg_

double MuonCosmicCompatibilityFiller::corrTimeNeg_
private

Definition at line 113 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and muonTiming().

◆ corrTimePos_

double MuonCosmicCompatibilityFiller::corrTimePos_
private

Definition at line 112 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and muonTiming().

◆ cosmicToken_

edm::EDGetTokenT<reco::MuonCollection> MuonCosmicCompatibilityFiller::cosmicToken_
private

◆ deltaPt_

double MuonCosmicCompatibilityFiller::deltaPt_
private

◆ hIpTrdxy_

double MuonCosmicCompatibilityFiller::hIpTrdxy_
private

Definition at line 98 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and pvMatches().

◆ hIpTrvProb_

double MuonCosmicCompatibilityFiller::hIpTrvProb_
private

Definition at line 99 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and pvMatches().

◆ inputCosmicMuonCollection_

edm::InputTag MuonCosmicCompatibilityFiller::inputCosmicMuonCollection_
private

Definition at line 80 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller().

◆ inputMuonCollections_

std::vector<edm::InputTag> MuonCosmicCompatibilityFiller::inputMuonCollections_
private

Definition at line 78 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller().

◆ inputTrackCollections_

std::vector<edm::InputTag> MuonCosmicCompatibilityFiller::inputTrackCollections_
private

Definition at line 79 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller().

◆ inputVertexCollection_

edm::InputTag MuonCosmicCompatibilityFiller::inputVertexCollection_
private

Definition at line 81 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller().

◆ ipThreshold_

double MuonCosmicCompatibilityFiller::ipThreshold_
private

Definition at line 118 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller().

◆ largedxy_

double MuonCosmicCompatibilityFiller::largedxy_
private

Definition at line 97 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and pvMatches().

◆ largedxyMult_

double MuonCosmicCompatibilityFiller::largedxyMult_
private

Definition at line 96 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and pvMatches().

◆ maxdxyLoose_

double MuonCosmicCompatibilityFiller::maxdxyLoose_
private

Definition at line 88 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and pvMatches().

◆ maxdxyLooseMult_

double MuonCosmicCompatibilityFiller::maxdxyLooseMult_
private

Definition at line 92 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and pvMatches().

◆ maxdxyTight_

double MuonCosmicCompatibilityFiller::maxdxyTight_
private

Definition at line 90 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and pvMatches().

◆ maxdxyTightMult_

double MuonCosmicCompatibilityFiller::maxdxyTightMult_
private

Definition at line 94 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and pvMatches().

◆ maxdzLoose_

double MuonCosmicCompatibilityFiller::maxdzLoose_
private

Definition at line 89 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and pvMatches().

◆ maxdzLooseMult_

double MuonCosmicCompatibilityFiller::maxdzLooseMult_
private

Definition at line 93 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and pvMatches().

◆ maxdzTight_

double MuonCosmicCompatibilityFiller::maxdzTight_
private

Definition at line 91 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and pvMatches().

◆ maxdzTightMult_

double MuonCosmicCompatibilityFiller::maxdzTightMult_
private

Definition at line 95 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and pvMatches().

◆ maxvertRho_

double MuonCosmicCompatibilityFiller::maxvertRho_
private

◆ maxvertZ_

double MuonCosmicCompatibilityFiller::maxvertZ_
private

◆ minvProb_

double MuonCosmicCompatibilityFiller::minvProb_
private

◆ muonTokens_

std::vector<edm::EDGetTokenT<reco::MuonCollection> > MuonCosmicCompatibilityFiller::muonTokens_
private

◆ nChamberMatches_

int MuonCosmicCompatibilityFiller::nChamberMatches_
private

◆ nTrackThreshold_

unsigned int MuonCosmicCompatibilityFiller::nTrackThreshold_
private

Definition at line 103 of file MuonCosmicCompatibilityFiller.h.

◆ offTimeNegLoose_

double MuonCosmicCompatibilityFiller::offTimeNegLoose_
private

Definition at line 105 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and muonTiming().

◆ offTimeNegLooseMult_

double MuonCosmicCompatibilityFiller::offTimeNegLooseMult_
private

Definition at line 109 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and muonTiming().

◆ offTimeNegTight_

double MuonCosmicCompatibilityFiller::offTimeNegTight_
private

Definition at line 107 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and muonTiming().

◆ offTimeNegTightMult_

double MuonCosmicCompatibilityFiller::offTimeNegTightMult_
private

Definition at line 111 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and muonTiming().

◆ offTimePosLoose_

double MuonCosmicCompatibilityFiller::offTimePosLoose_
private

Definition at line 104 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and muonTiming().

◆ offTimePosLooseMult_

double MuonCosmicCompatibilityFiller::offTimePosLooseMult_
private

Definition at line 108 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and muonTiming().

◆ offTimePosTight_

double MuonCosmicCompatibilityFiller::offTimePosTight_
private

Definition at line 106 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and muonTiming().

◆ offTimePosTightMult_

double MuonCosmicCompatibilityFiller::offTimePosTightMult_
private

Definition at line 110 of file MuonCosmicCompatibilityFiller.h.

Referenced by MuonCosmicCompatibilityFiller(), and muonTiming().

◆ segmentComp_

double MuonCosmicCompatibilityFiller::segmentComp_
private

◆ sharedFrac_

double MuonCosmicCompatibilityFiller::sharedFrac_
private

◆ sharedHits_

int MuonCosmicCompatibilityFiller::sharedHits_
private

◆ trackTokens_

std::vector<edm::EDGetTokenT<reco::TrackCollection> > MuonCosmicCompatibilityFiller::trackTokens_
private

◆ vertexToken_

edm::EDGetTokenT<reco::VertexCollection> MuonCosmicCompatibilityFiller::vertexToken_
private
GeomDet::position
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
reco::MuonCosmicCompatibility::timeCompatibility
float timeCompatibility
cosmic-likeness based on time: 0 == prompt-like
Definition: MuonCosmicCompatibility.h:9
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
MuonCosmicCompatibilityFiller::segmentComp_
double segmentComp_
Definition: MuonCosmicCompatibilityFiller.h:120
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
MuonCosmicCompatibilityFiller::hIpTrvProb_
double hIpTrvProb_
Definition: MuonCosmicCompatibilityFiller.h:99
mps_fire.i
i
Definition: mps_fire.py:355
MuonCosmicCompatibilityFiller::offTimeNegLoose_
double offTimeNegLoose_
Definition: MuonCosmicCompatibilityFiller.h:105
MuonCosmicCompatibilityFiller::offTimeNegLooseMult_
double offTimeNegLooseMult_
Definition: MuonCosmicCompatibilityFiller.h:109
MuonCosmicCompatibilityFiller::inputTrackCollections_
std::vector< edm::InputTag > inputTrackCollections_
Definition: MuonCosmicCompatibilityFiller.h:79
edm::Handle::product
T const * product() const
Definition: Handle.h:70
MuonCosmicCompatibilityFiller::cosmicToken_
edm::EDGetTokenT< reco::MuonCollection > cosmicToken_
Definition: MuonCosmicCompatibilityFiller.h:85
MuonCosmicCompatibilityFiller::trackTokens_
std::vector< edm::EDGetTokenT< reco::TrackCollection > > trackTokens_
Definition: MuonCosmicCompatibilityFiller.h:84
muon
Definition: MuonCocktails.h:17
muon::segmentCompatibility
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
Definition: MuonSelectors.cc:61
MuonCosmicCompatibilityFiller::maxdzTightMult_
double maxdzTightMult_
Definition: MuonCosmicCompatibilityFiller.h:95
MuonCosmicCompatibilityFiller::maxdxyLoose_
double maxdxyLoose_
Definition: MuonCosmicCompatibilityFiller.h:88
MuonCosmicCompatibilityFiller::hIpTrdxy_
double hIpTrdxy_
Definition: MuonCosmicCompatibilityFiller.h:98
MuonCosmicCompatibilityFiller::maxdzLoose_
double maxdzLoose_
Definition: MuonCosmicCompatibilityFiller.h:89
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
MuonCosmicCompatibilityFiller::nMuons
unsigned int nMuons(const edm::Event &) const
get number of muons in the vent
Definition: MuonCosmicCompatibilityFiller.cc:237
MuonCosmicCompatibilityFiller::largedxyMult_
double largedxyMult_
Definition: MuonCosmicCompatibilityFiller.h:96
muon::GlobalMuonPromptTight
Definition: MuonSelectors.h:26
reco::MuonCosmicCompatibility::backToBackCompatibility
float backToBackCompatibility
cosmic-likeness based on presence of a track in opp side: 0 == no matching opp tracks
Definition: MuonCosmicCompatibility.h:11
GlobalTrackingGeometryRecord
Definition: GlobalTrackingGeometryRecord.h:17
MuonCosmicCompatibilityFiller::offTimePosLoose_
double offTimePosLoose_
Definition: MuonCosmicCompatibilityFiller.h:104
edm::Handle< reco::TrackCollection >
MuonCosmicCompatibilityFiller::maxdzTight_
double maxdzTight_
Definition: MuonCosmicCompatibilityFiller.h:91
edm::Ref< TrackCollection >
MuonCosmicCompatibilityFiller::maxdxyTight_
double maxdxyTight_
Definition: MuonCosmicCompatibilityFiller.h:90
MuonCosmicCompatibilityFiller::largedxy_
double largedxy_
Definition: MuonCosmicCompatibilityFiller.h:97
MuonCosmicCompatibilityFiller::deltaPt_
double deltaPt_
Definition: MuonCosmicCompatibilityFiller.h:114
DetId
Definition: DetId.h:17
muon::isGoodMuon
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
Definition: MuonSelectors.cc:664
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
MuonCosmicCompatibilityFiller::sharedFrac_
double sharedFrac_
Definition: MuonCosmicCompatibilityFiller.h:117
MuonCosmicCompatibilityFiller::minvProb_
double minvProb_
Definition: MuonCosmicCompatibilityFiller.h:100
MuonCosmicCompatibilityFiller::pvMatches
unsigned int pvMatches(const edm::Event &, const reco::Muon &, bool) const
return cosmic-likeness based on the 2D impact parameters (dxy, dz wrt to PV). 0 == cosmic-like
Definition: MuonCosmicCompatibilityFiller.cc:383
MuonCosmicCompatibilityFiller::combinedCosmicID
float combinedCosmicID(const edm::Event &, const edm::EventSetup &iSetup, const reco::Muon &, bool CheckMuonID, bool checkVertex) const
combined cosmic-likeness: 0 == not cosmic-like
Definition: MuonCosmicCompatibilityFiller.cc:490
reco::MuonCollection
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
MuonCosmicCompatibilityFiller::maxdxyTightMult_
double maxdxyTightMult_
Definition: MuonCosmicCompatibilityFiller.h:94
MuonCosmicCompatibilityFiller::offTimeNegTightMult_
double offTimeNegTightMult_
Definition: MuonCosmicCompatibilityFiller.h:111
reco::MuonCosmicCompatibility::cosmicCompatibility
float cosmicCompatibility
combined cosmic-likeness: 0 == not cosmic-like
Definition: MuonCosmicCompatibility.h:7
edm::ESHandle< GlobalTrackingGeometry >
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
MuonCosmicCompatibilityFiller::maxvertZ_
double maxvertZ_
Definition: MuonCosmicCompatibilityFiller.h:101
Point3DBase< float, GlobalTag >
reco::MuonCosmicCompatibility::vertexCompatibility
float vertexCompatibility
cosmic-likeness based on the event activity information: tracker track multiplicity and vertex qualit...
Definition: MuonCosmicCompatibility.h:17
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::HandleBase::failedToGet
bool failedToGet() const
Definition: HandleBase.h:72
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
MuonCosmicCompatibilityFiller::inputCosmicMuonCollection_
edm::InputTag inputCosmicMuonCollection_
Definition: MuonCosmicCompatibilityFiller.h:80
MuonCosmicCompatibilityFiller::eventActivity
unsigned int eventActivity(const edm::Event &, const reco::Muon &) const
returns cosmic-likeness based on the event activity information: tracker track multiplicity and verte...
Definition: MuonCosmicCompatibilityFiller.cc:590
MuonCosmicCompatibilityFiller::offTimePosTight_
double offTimePosTight_
Definition: MuonCosmicCompatibilityFiller.h:106
MuonCosmicCompatibilityFiller::muonTiming
float muonTiming(const edm::Event &iEvent, const reco::Muon &muon, bool isLoose) const
check muon time (DT and CSC) information: 0 == prompt-like
Definition: MuonCosmicCompatibilityFiller.cc:128
MuonCosmicCompatibilityFiller::vertexToken_
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
Definition: MuonCosmicCompatibilityFiller.h:86
MuonCosmicCompatibilityFiller::offTimeNegTight_
double offTimeNegTight_
Definition: MuonCosmicCompatibilityFiller.h:107
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
reco::MuonCosmicCompatibility
Definition: MuonCosmicCompatibility.h:5
reco::MuonCosmicCompatibility::overlapCompatibility
float overlapCompatibility
cosmic-likeness based on overlap with traversing cosmic muon (only muon/STA hits are used)
Definition: MuonCosmicCompatibility.h:13
MuonCosmicCompatibilityFiller::inputMuonCollections_
std::vector< edm::InputTag > inputMuonCollections_
Definition: MuonCosmicCompatibilityFiller.h:78
MuonCosmicCompatibilityFiller::backToBack2LegCosmic
unsigned int backToBack2LegCosmic(const edm::Event &, const reco::Muon &) const
return cosmic-likeness based on presence of a track in opp side: 0 == no matching opp tracks
Definition: MuonCosmicCompatibilityFiller.cc:212
MuonCosmicCompatibilityFiller::corrTimePos_
double corrTimePos_
Definition: MuonCosmicCompatibilityFiller.h:112
MuonCosmicCompatibilityFiller::muonTokens_
std::vector< edm::EDGetTokenT< reco::MuonCollection > > muonTokens_
Definition: MuonCosmicCompatibilityFiller.h:83
MuonCosmicCompatibilityFiller::angleThreshold_
double angleThreshold_
Definition: MuonCosmicCompatibilityFiller.h:115
reco::MuonCosmicCompatibility::ipCompatibility
float ipCompatibility
cosmic-likeness based on the 2D impact parameters (dxy, dz wrt to PV). 0 == cosmic-like
Definition: MuonCosmicCompatibility.h:15
get
#define get
muon::TMOneStationLoose
Definition: MuonSelectors.h:31
MuonCosmicCompatibilityFiller::inputVertexCollection_
edm::InputTag inputVertexCollection_
Definition: MuonCosmicCompatibilityFiller.h:81
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
MuonCosmicCompatibilityFiller::sharedHits_
int sharedHits_
Definition: MuonCosmicCompatibilityFiller.h:116
MuonCosmicCompatibilityFiller::offTimePosTightMult_
double offTimePosTightMult_
Definition: MuonCosmicCompatibilityFiller.h:110
MuonCosmicCompatibilityFiller::isOverlappingMuon
bool isOverlappingMuon(const edm::Event &, const edm::EventSetup &iSetup, const reco::Muon &) const
returns cosmic-likeness based on overlap with traversing cosmic muon (only muon/STA hits are used)
Definition: MuonCosmicCompatibilityFiller.cc:257
MuonCosmicCompatibilityFiller::corrTimeNeg_
double corrTimeNeg_
Definition: MuonCosmicCompatibilityFiller.h:113
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
GlobalTrackingGeometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition: GlobalTrackingGeometry.cc:44
MuonCosmicCompatibilityFiller::maxvertRho_
double maxvertRho_
Definition: MuonCosmicCompatibilityFiller.h:102
MuonCosmicCompatibilityFiller::maxdxyLooseMult_
double maxdxyLooseMult_
Definition: MuonCosmicCompatibilityFiller.h:92
MuonCosmicCompatibilityFiller::ipThreshold_
double ipThreshold_
Definition: MuonCosmicCompatibilityFiller.h:118
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
mps_fire.result
result
Definition: mps_fire.py:303
MuonCosmicCompatibilityFiller::offTimePosLooseMult_
double offTimePosLooseMult_
Definition: MuonCosmicCompatibilityFiller.h:108
MuonCosmicCompatibilityFiller::maxdzLooseMult_
double maxdzLooseMult_
Definition: MuonCosmicCompatibilityFiller.h:93
MuonCosmicCompatibilityFiller::nChamberMatches_
int nChamberMatches_
Definition: MuonCosmicCompatibilityFiller.h:119
muonid::findOppositeTrack
reco::TrackRef findOppositeTrack(const edm::Handle< reco::TrackCollection > &collection, const reco::Track &muon, double angleMatch=0.01, double momentumMatch=0.05)
Definition: MuonCosmicsId.cc:28
HLT_2018_cff.fraction
fraction
Definition: HLT_2018_cff.py:51317
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
pwdgSkimBPark_cfi.vertices
vertices
Definition: pwdgSkimBPark_cfi.py:7
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37