ATLAS Offline Software
Functions
CutsMETMaker Namespace Reference

Functions

StatusCode accept (const xAOD::Muon *mu)
 
StatusCode accept (const xAOD::Electron *mu)
 
StatusCode accept (const xAOD::Photon *mu)
 
StatusCode accept (const xAOD::TauJet *mu)
 

Function Documentation

◆ accept() [1/4]

StatusCode CutsMETMaker::accept ( const xAOD::Electron mu)

Definition at line 47 of file CutsMETMaker.cxx.

48 {
49 
50  //ATH_MSG_VERBOSE("Test electron quality."
51  // << " pT = " << el->pt()
52  // << " eta = " << el->eta()
53  // << " phi = " << el->phi());
54 
55  bool testPID = 0;
56  el->passSelection(testPID,"Medium");
57  //ATH_MSG_VERBOSE("Electron PID \"Medium\" tests " << (testPID ? " GOOD" : "BAD") );
58  if( !testPID ) return StatusCode::FAILURE;
59 
60  //ATH_MSG_VERBOSE("Electron author = " << el->author() << " test " << (el->author()&17));
61  if( !(el->author()&17) ) return StatusCode::FAILURE;
62 
63  if( el->pt()<10e3 ) return StatusCode::FAILURE;
64  if( fabs(el->eta())>2.47 ) return StatusCode::FAILURE;
65 
66  // if( m_el_rejectCrack ) {
67  // if( fabs(el->eta())>1.37 &&
68  // fabs(el->eta())<1.52 ) return StatusCode::FAILURE;
69  // }
70 
71  //ATH_MSG_VERBOSE("CutMETMaker::Accepted this electron");
72 
73  return StatusCode::SUCCESS;
74 }

◆ accept() [2/4]

StatusCode CutsMETMaker::accept ( const xAOD::Muon mu)

Definition at line 18 of file CutsMETMaker.cxx.

19 {
20 
21  if(mu->pt()<2.5e3 || mu->pt()/cosh(mu->eta())<4e3) return StatusCode::FAILURE;
22  if(mu->muonType()==xAOD::Muon::MuonStandAlone) {
23  // only take forward SA -- need a max eta cut?
24  if(fabs(mu->eta())<2.5) return StatusCode::FAILURE;
25  uint8_t nPrecision=0;
26  if(!mu->primaryTrackParticleLink().isValid()) return StatusCode::FAILURE;
27  mu->primaryTrackParticle()->summaryValue(nPrecision,xAOD::numberOfPrecisionLayers);
28  if(nPrecision<3) return StatusCode::FAILURE;
29  } // selection for StandAlone muons
30  else if(mu->muonType()==xAOD::Muon::Combined || mu->muonType()==xAOD::Muon::SegmentTagged) {
31  if(fabs(mu->eta())>2.5) return StatusCode::FAILURE;
32 
33  // could add some error checking to make sure we successfully read the details
34  uint8_t nPixHits(0), nSctHits(0);
35  if(!mu->primaryTrackParticleLink().isValid()) return StatusCode::FAILURE;
36  mu->primaryTrackParticle()->summaryValue(nPixHits,xAOD::numberOfPixelHits);
37  mu->primaryTrackParticle()->summaryValue(nSctHits,xAOD::numberOfSCTHits);
38 
39  if(nPixHits<3) return StatusCode::FAILURE;
40  if(nPixHits+nSctHits<5) return StatusCode::FAILURE;
41  } // selection for SegmentTagged and Combined muons
42  else {return StatusCode::FAILURE;} // don't CutMETMaker::accept forward muons or calo tagged
43 
44  return StatusCode::SUCCESS;
45 }

◆ accept() [3/4]

StatusCode CutsMETMaker::accept ( const xAOD::Photon mu)

Definition at line 76 of file CutsMETMaker.cxx.

77 {
78 
79  //ATH_MSG_VERBOSE("Test photon quality."
80  // << " pT = " << ph->pt()
81  // << " eta = " << ph->eta()
82  // << " phi = " << ph->phi());
83 
84  bool testPID = 0;
85  ph->passSelection(testPID,"Tight");
86  //ATH_MSG_VERBOSE("Photon PID \"Tight\" tests " << (testPID ? " GOOD" : "BAD") );
87  if( !testPID ) return StatusCode::FAILURE;
88 
89  //ATH_MSG_VERBOSE("Photon author = " << ph->author() << " test " << (ph->author()&20));
90  if( !(ph->author()&20) ) return StatusCode::FAILURE;
91 
92  if( ph->pt()<10e3 ) return StatusCode::FAILURE;
93  if( fabs(ph->eta())>2.47 ) return StatusCode::FAILURE;
94 
95  //ATH_MSG_VERBOSE("CutMETMaker::Accepted this photon");
96 
97  return StatusCode::SUCCESS;
98 }

◆ accept() [4/4]

StatusCode CutsMETMaker::accept ( const xAOD::TauJet mu)

Definition at line 100 of file CutsMETMaker.cxx.

101 {
102  //ATH_MSG_VERBOSE("Testing tau with pt " << tau->pt() << ", eta " << tau->eta());
103  //ATH_MSG_VERBOSE("Tau ID discriminants:"
104  // << " jet " << tau->discriminant(xAOD::TauJetParameters::BDTJetScore)
105  // << " el " << tau->discriminant(xAOD::TauJetParameters::BDTEleScore)
106  // << " mu " << tau->flag(xAOD::TauJetParameters::MuonFlag));
107 
108  if(tau->pt()<20e3 || fabs(tau->eta())>2.5) return StatusCode::FAILURE;
109  // need to accommodate more than one of these?
110  if(!tau->isTau( xAOD::TauJetParameters::IsTauFlag(xAOD::TauJetParameters::JetRNNSigMedium) )) return StatusCode::FAILURE;
111  if(tau->isTau( xAOD::TauJetParameters::IsTauFlag(xAOD::TauJetParameters::EleRNNMedium) )) return StatusCode::FAILURE;
112  if(tau->isTau( xAOD::TauJetParameters::IsTauFlag(xAOD::TauJetParameters::MuonVeto) )) return StatusCode::FAILURE;
113 
114  return StatusCode::SUCCESS;
115 }
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
xAOD::TauJetParameters::EleRNNMedium
@ EleRNNMedium
Definition: TauDefs.h:133
Trk::Combined
@ Combined
Definition: TrackSummaryTool.h:32
xAOD::TauJetParameters::JetRNNSigMedium
@ JetRNNSigMedium
Definition: TauDefs.h:147
xAOD::TauJetParameters::MuonVeto
@ MuonVeto
Definition: TauDefs.h:121
xAOD::TauJetParameters::IsTauFlag
IsTauFlag
Enum for IsTau flags.
Definition: TauDefs.h:116
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
xAOD::numberOfPrecisionLayers
@ numberOfPrecisionLayers
layers with at least 3 hits [unit8_t].
Definition: TrackingPrimitives.h:288