ATLAS Offline Software
Muons.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // This source file implements all of the functions related to Muons
6 // in the SUSYObjDef_xAOD class
7 
8 // Local include(s):
10 
16 
18 
25 
28 //disable #include "IsolationSelection/IIsolationLowPtPLVTool.h"
29 
31 
32 #include <boost/tokenizer.hpp>
33 #include <boost/algorithm/string/replace.hpp>
34 
35 #ifndef XAOD_STANDALONE // For now metadata is Athena-only
37 #endif
38 
39 namespace ST {
40 
41  const static SG::AuxElement::Decorator<char> dec_passedHighPtCuts("passedHighPtCuts");
42  const static SG::AuxElement::ConstAccessor<char> acc_passedHighPtCuts("passedHighPtCuts");
43 
44  const static SG::AuxElement::Decorator<char> dec_passSignalID("passSignalID");
45  const static SG::AuxElement::ConstAccessor<char> acc_passSignalID("passSignalID");
46 
47  const static SG::AuxElement::Decorator<float> dec_DFCommonJetDr("DFCommonJetDr");
48  const static SG::AuxElement::Decorator<float> dec_dRJet("dRJet");
49  const static SG::AuxElement::Decorator<float> dec_z0sinTheta("z0sinTheta");
50  const static SG::AuxElement::ConstAccessor<float> acc_z0sinTheta("z0sinTheta");
51  const static SG::AuxElement::Decorator<float> dec_d0sig("d0sig");
52  const static SG::AuxElement::ConstAccessor<float> acc_d0sig("d0sig");
53  const static SG::AuxElement::Decorator<char> dec_isLRT("isLRT");
54 
55 
56 StatusCode SUSYObjDef_xAOD::MergeMuons(const xAOD::MuonContainer & muons, const std::vector<bool> &writeMuon, xAOD::MuonContainer* outputCol) const{
57  if (muons.empty()) return StatusCode::SUCCESS;
58  for (const xAOD::Muon* muon: muons) {
59  // add muon into output
60  if (writeMuon.at(muon->index())){
61  auto newMuon = new xAOD::Muon(*muon);
62 
63  if ( getOriginalObject(*muon) != nullptr ) {
65  } else {
66  setOriginalObjectLink(*muon, *newMuon);
67  }
68  outputCol->push_back(newMuon);
69  }
70  }
71  return StatusCode::SUCCESS;
72 }
73 
75  for (const xAOD::Muon *muon: *inMuons){
76  const xAOD::TrackParticle* idtrack = muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
77 
78  // Save muon if the id track passes the LRT filter
79  if ( idtrack->isAvailable<char>("passLRTFilter") )
80  {
81  if ( static_cast<int>(acc_lrtFilter(*idtrack) ) ){
82  std::unique_ptr<xAOD::Muon> copyMuon = std::make_unique<xAOD::Muon>(*muon);
83 
84  // transfer original muon link
85  setOriginalObjectLink(*muon, *copyMuon);
86  copy->push_back( std::move(copyMuon) );
87  }
88  }
89  else // Keep muon if flag is not available
90  {
91  std::unique_ptr<xAOD::Muon> copyMuon = std::make_unique<xAOD::Muon>(*muon);
92 
93  setOriginalObjectLink(*muon, *copyMuon);
94  copy->push_back( std::move(copyMuon) );
95  }
96 
97  }
98  return StatusCode::SUCCESS;
99 }
100 
101 StatusCode SUSYObjDef_xAOD::GetMuons(xAOD::MuonContainer*& copy, xAOD::ShallowAuxContainer*& copyaux, bool recordSG, const std::string& muonkey, const std::string& lrtmuonkey, const xAOD::MuonContainer* containerToBeCopied)
102 {
103  if (!m_tool_init) {
104  ATH_MSG_ERROR("SUSYTools was not initialized!!");
105  return StatusCode::FAILURE;
106  }
107 
108  // Initializing prompt/LRT OR procedure
109  auto outputCol = std::make_unique<xAOD::MuonContainer>();
110  std::unique_ptr<xAOD::MuonAuxContainer> outputAuxCol;
111  outputAuxCol = std::make_unique<xAOD::MuonAuxContainer>();
112  outputCol->setStore(outputAuxCol.get());
113  ATH_CHECK( m_outMuonLocation.initialize() );
114 
115  if (bool(m_muLRT) && !lrtmuonkey.empty() && evtStore()->contains<xAOD::MuonContainer>(lrtmuonkey)){
116  ATH_MSG_DEBUG("Applying prompt/LRT muon OR procedure");
117 
118  // First identify if merged container has already been made (for instances where GetMuons() is called more than once)
119  if (evtStore()->contains<xAOD::MuonContainer>("StdWithLRTMuons")) {
120  ATH_MSG_DEBUG("Merged prompt/LRT container already created in TStore");
121  } else {
122  ATH_MSG_DEBUG("Creating merged prompt/LRT container in TStore");
123 
124  // Retrieve prompt and LRT muons from TStore
125  ATH_CHECK( evtStore()->retrieve(prompt_muons, muonkey) );
126  ATH_CHECK( evtStore()->retrieve(lrt_muons, lrtmuonkey) );
127 
128  // Remove LRT muons as flagged by filter for uncertainty
129  auto filtered_muons = std::make_unique<xAOD::MuonContainer>();
130  std::unique_ptr<xAOD::MuonAuxContainer> filtered_muons_aux = std::make_unique<xAOD::MuonAuxContainer>();
131  filtered_muons->setStore(filtered_muons_aux.get());
132  ATH_CHECK(prepareLRTMuons(lrt_muons, filtered_muons.get()));
133 
134  // Check overlap between prompt and LRT collections
135  std::vector<bool> writePromptMuon;
136  std::vector<bool> writeLRTMuon;
137  m_muonLRTORTool->checkOverlap(*prompt_muons, *filtered_muons, writePromptMuon, writeLRTMuon);
138 
139  // Decorate muons with prompt/LRT
140  for (const xAOD::Muon* mu : *prompt_muons) dec_isLRT(*mu) = 0;
141  for (const xAOD::Muon* mu : *filtered_muons) dec_isLRT(*mu) = 1;
142 
143  // Create merged StdWithLRTMuons container
144  outputCol->reserve(prompt_muons->size() + filtered_muons->size());
145  ATH_CHECK(MergeMuons(*prompt_muons, writePromptMuon, outputCol.get()) );
146  ATH_CHECK(MergeMuons(*filtered_muons, writeLRTMuon, outputCol.get()) );
147 
148  // Save merged StdWithLRTMuons container to TStore
149  ATH_CHECK(evtStore()->record(std::move(outputCol), m_outMuonLocation.key()));
150  ATH_CHECK(evtStore()->record(std::move(outputAuxCol), m_outMuonLocation.key() + "Aux.") );
151 
152  }
153  } else if (!lrtmuonkey.empty()) {
154  if (evtStore()->contains<xAOD::MuonContainer>(lrtmuonkey) == false && bool(m_muLRT) == true) ATH_MSG_WARNING("prompt/LRT OR procedure attempted but " << lrtmuonkey << " not in ROOT file, check config!");
155  ATH_MSG_DEBUG("Not applying prompt/LRT muon OR procedure");
156  }
157 
158  if (m_isPHYSLITE && muonkey.find("AnalysisMuons")==std::string::npos){
159  ATH_MSG_ERROR("You are running on PHYSLITE derivation. Please change the Muons container to 'AnalysisMuons'");
160  return StatusCode::FAILURE;
161  }
162 
163  const xAOD::MuonContainer* muons = nullptr;
164  if (bool(m_muLRT) && evtStore()->contains<xAOD::MuonContainer>(lrtmuonkey)){
165  ATH_MSG_DEBUG("Using container: " << m_outMuonLocation.key());
166  ATH_CHECK( evtStore()->retrieve(muons, m_outMuonLocation.key()));
167  }
168  else {
169  if (copy==nullptr) { // empty container provided
170  ATH_MSG_DEBUG("Empty container provided");
171  if (containerToBeCopied != nullptr) {
172  ATH_MSG_DEBUG("Containter to be copied not nullptr");
173  muons = containerToBeCopied;
174  }
175  else {
176  ATH_MSG_DEBUG("Getting Muons collection");
177  ATH_CHECK( evtStore()->retrieve(muons, muonkey) );
178  }
179  }
180  }
181 
182  std::pair<xAOD::MuonContainer*, xAOD::ShallowAuxContainer*> shallowcopy = xAOD::shallowCopyContainer(*muons);
183  copy = shallowcopy.first;
184  copyaux = shallowcopy.second;
185  bool setLinks = xAOD::setOriginalObjectLink(*muons, *copy);
186  if (!setLinks) {
187  ATH_MSG_WARNING("Failed to set original object links on " << muonkey);
188  } else { // use the user-supplied collection instead
189  ATH_MSG_DEBUG("Not retrieving muon collection, using existing one provided by user");
190  muons=copy;
191  }
192 
193  for (const auto& muon : *copy) {
197  this->IsBadMuon(*muon, m_badmuQoverP);
198  }
199  if (recordSG) {
200  ATH_CHECK( evtStore()->record(copy, "STCalib" + muonkey + m_currentSyst.name()) );
201  ATH_CHECK( evtStore()->record(copyaux, "STCalib" + muonkey + m_currentSyst.name() + "Aux.") );
202  }
203  return StatusCode::SUCCESS;
204 }
205 
207 
208  ATH_MSG_VERBOSE( "Starting FillMuon on mu with pt=" << input.pt() );
209 
210  dec_baseline(input) = false;
211  dec_selected(input) = 0;
212  dec_signal(input) = false;
213  dec_isol(input) = false;
214  dec_isolHighPt(input) = false;
215  dec_passedHighPtCuts(input) = false;
216  dec_passSignalID(input) = false;
217 
218  if (m_muEffCorrForce1D) {
219  dec_DFCommonJetDr(input) = -2.0;
220  } else if (!input.isAvailable<float>("DFCommonJetDr")) {
221  dec_dRJet(input) = -2.0;
222  }
223 
224  // don't bother calibrating or computing WP
225  if ( input.pt() < 3e3 ) return StatusCode::SUCCESS;
226 
227  ATH_MSG_VERBOSE( "MUON pt before calibration " << input.pt() );
228 
229  ATH_MSG_VERBOSE( "MUON eta = " << input.eta() );
230  ATH_MSG_VERBOSE( "MUON type = " << input.muonType() );
231  ATH_MSG_VERBOSE( "MUON author = " << input.author() );
232 
234  ATH_MSG_VERBOSE("FillMuon: applyCorrection out of validity range");
235  }
236 
237  ATH_MSG_VERBOSE( "MUON pt after calibration " << input.pt() );
238 
239  const xAOD::EventInfo* evtInfo = nullptr;
240  ATH_CHECK( evtStore()->retrieve( evtInfo, "EventInfo" ) );
241  const xAOD::Vertex* pv = this->GetPrimVtx();
242  double primvertex_z = pv ? pv->z() : 0;
243  //const xAOD::TrackParticle* track = input.primaryTrackParticle();
244  const xAOD::TrackParticle* track;
245  if (input.muonType() == xAOD::Muon::SiliconAssociatedForwardMuon) {
246  track = input.trackParticle(xAOD::Muon::CombinedTrackParticle);
247  if (!track) return StatusCode::SUCCESS; // don't treat SAF muons without CB track further
248  }
249  else {
250  track = input.primaryTrackParticle();
251  }
252 
253  //impact parameters (after applyCorrection() so to have the primaryTrack links restored in old buggy samples)
254  if (track){
255  dec_z0sinTheta(input) = (track->z0() + track->vz() - primvertex_z) * TMath::Sin(input.p4().Theta());
256  } else {
257  ATH_MSG_WARNING("FillMuon: Muon of pT and eta " << input.pt() << " MeV " << input.eta() << " has no associated track");
258  }
259  //protect against exception thrown for null or negative d0sig
260  try {
261  if (track)
262  dec_d0sig(input) = xAOD::TrackingHelpers::d0significance( track , evtInfo->beamPosSigmaX(), evtInfo->beamPosSigmaY(), evtInfo->beamPosSigmaXY() );
263  else
264  dec_d0sig(input) = -99.;
265  }
266  catch (...) {
267  float d0sigError = -99.;
268  ATH_MSG_WARNING("FillMuon : Exception caught from d0significance() calculation. Setting dummy decoration d0sig=" << d0sigError );
269  dec_d0sig(input) = d0sigError;
270  }
271 
272  if (m_debug) {
273  // Summary variables in
274  // /cvmfs/atlas.cern.ch/repo/sw/ASG/AnalysisBase/2.0.3/xAODTracking/Root/TrackSummaryAccessors_v1.cxx
275 
276  unsigned char nBLHits(0), nPixHits(0), nPixelDeadSensors(0), nPixHoles(0),
277  nSCTHits(0), nSCTDeadSensors(0), nSCTHoles(0), nTRTHits(0), nTRTOutliers(0);
278 
279  if (track){
280  track->summaryValue( nBLHits, xAOD::numberOfBLayerHits);
281  track->summaryValue( nPixHits, xAOD::numberOfPixelHits);
282  track->summaryValue( nPixelDeadSensors, xAOD::numberOfPixelDeadSensors);
283  track->summaryValue( nPixHoles, xAOD::numberOfPixelHoles);
284 
285  track->summaryValue( nSCTHits, xAOD::numberOfSCTHits);
286  track->summaryValue( nSCTDeadSensors, xAOD::numberOfSCTDeadSensors);
287  track->summaryValue( nSCTHoles, xAOD::numberOfSCTHoles);
288 
289  track->summaryValue( nTRTHits, xAOD::numberOfTRTHits);
290  track->summaryValue( nTRTOutliers, xAOD::numberOfTRTOutliers);
291  }
292 
293  ATH_MSG_INFO( "MUON pt: " << input.pt() );
294  ATH_MSG_INFO( "MUON eta: " << input.eta() );
295  ATH_MSG_INFO( "MUON phi: " << input.phi() );
296  ATH_MSG_INFO( "MUON comb: " << (input.muonType() == xAOD::Muon::Combined));
297  ATH_MSG_INFO( "MUON sTag: " << (input.muonType() == xAOD::Muon::SegmentTagged));
298  ATH_MSG_INFO( "MUON loose:" << (input.quality() == xAOD::Muon::Loose));
299  ATH_MSG_INFO( "MUON bHit: " << static_cast<int>( nBLHits ));
300  ATH_MSG_INFO( "MUON pHit: " << static_cast<int>( nPixHits ));
301  ATH_MSG_INFO( "MUON pDead:" << static_cast<int>( nPixelDeadSensors ));
302  ATH_MSG_INFO( "MUON pHole:" << static_cast<int>( nPixHoles ));
303  ATH_MSG_INFO( "MUON sHit: " << static_cast<int>( nSCTHits));
304  ATH_MSG_INFO( "MUON sDead:" << static_cast<int>( nSCTDeadSensors ));
305  ATH_MSG_INFO( "MUON sHole:" << static_cast<int>( nSCTHoles ));
306  ATH_MSG_INFO( "MUON tHit: " << static_cast<int>( nTRTHits ));
307  ATH_MSG_INFO( "MUON tOut: " << static_cast<int>( nTRTOutliers ));
308 
309  const xAOD::TrackParticle* idtrack =
310  input.trackParticle( xAOD::Muon::InnerDetectorTrackParticle );
311 
312  if ( !idtrack) {
313  ATH_MSG_VERBOSE( "No ID track!! " );
314  } else {
315  ATH_MSG_VERBOSE( "ID track pt: " << idtrack->pt());
316  }
317  }
318 
319  if ( !m_force_noMuId && !m_muonSelectionToolBaseline->accept(input)) return StatusCode::SUCCESS;
320 
321  if (input.pt() <= ptcut || std::abs(input.eta()) >= etacut) return StatusCode::SUCCESS;
322 
323  if (m_mubaselinez0>0. && std::abs(acc_z0sinTheta(input))>m_mubaselinez0) return StatusCode::SUCCESS;
324  if (m_mubaselined0sig>0. && std::abs(acc_d0sig(input))>m_mubaselined0sig) return StatusCode::SUCCESS;
325 
326  //--- Do baseline isolation check
327  if ( !( m_muBaselineIso_WP.empty() ) && !( m_isoBaselineTool->accept(input) ) ) return StatusCode::SUCCESS;
328 
329  dec_baseline(input) = true;
330  dec_selected(input) = 2;
331 
332  //disable if (!m_muIso_WP.empty() && m_muIso_WP.find("PLV")!=std::string::npos) ATH_CHECK( m_isoToolLowPtPLV->augmentPLV(input) );
333  if (!m_muIso_WP.empty()) dec_isol(input) = bool(m_isoTool->accept(input));
334  if (!m_muIsoHighPt_WP.empty()) dec_isolHighPt(input) = bool(m_isoHighPtTool->accept(input));
335  dec_passSignalID(input) = bool(m_muonSelectionTool->accept(input));
336 
337  ATH_MSG_VERBOSE("FillMuon: passed baseline selection");
338  return StatusCode::SUCCESS;
339 }
340 
341 
342 bool SUSYObjDef_xAOD::IsSignalMuon(const xAOD::Muon & input, float ptcut, float d0sigcut, float z0cut, float etacut) const
343 {
344  if (!acc_baseline(input)) return false;
345  if (!acc_passSignalID(input)) return false;
346 
347  if (input.pt() <= ptcut || input.pt() == 0) return false; // pT cut (might be necessary for leading muon to pass trigger)
348  if ( etacut==DUMMYDEF ){
349  if(std::abs(input.eta()) > m_muEta ) return false;
350  }
351  else if ( std::abs(input.eta()) > etacut ) return false;
352 
353  if (z0cut > 0.0 && std::abs(acc_z0sinTheta(input)) > z0cut) return false; // longitudinal IP cut
354  if (acc_d0sig(input) != 0) {
355  if (d0sigcut > 0.0 && std::abs(acc_d0sig(input)) > d0sigcut) return false; // transverse IP cut
356  }
357 
358  if (m_doMuIsoSignal) {
359  if ( !( (acc_isol(input) && input.pt()<m_muIsoHighPtThresh) || (acc_isolHighPt(input) && input.pt()>m_muIsoHighPtThresh)) ) return false;
360  ATH_MSG_VERBOSE( "IsSignalMuon: passed isolation");
361  }
362 
363  //set HighPtMuon decoration
365 
366  dec_signal(input) = true;
367 
368  if (m_muId == 4) { //i.e. HighPt muons
369  ATH_MSG_VERBOSE( "IsSignalMuon: mu pt " << input.pt()
370  << " signal? " << static_cast<int>(acc_signal(input))
371  << " isolation? " << static_cast<int>(acc_isol(input))
372  << " passedHighPtCuts? " << static_cast<int>(acc_passedHighPtCuts(input)));
373  } else {
374  ATH_MSG_VERBOSE( "IsSignalMuon: mu pt " << input.pt()
375  << " signal? " << static_cast<int>( acc_signal(input))
376  << " isolation? " << static_cast<int>( acc_isol(input)));
377  // Don't show HighPtFlag ... we didn't set it!
378  }
379 
380  return acc_signal(input);
381 }
382 
383 
385 // See https://indico.cern.ch/event/371499/contribution/1/material/slides/0.pdf and
386 // https://indico.cern.ch/event/397325/contribution/19/material/slides/0.pdf and
387 // https://twiki.cern.ch/twiki/bin/view/Atlas/MuonSelectionTool
388 {
389  if (input.pt() < 3e3){
390  ATH_MSG_DEBUG("No HighPt check supported for muons below 3GeV! False.");
391  dec_passedHighPtCuts(input) = false;
392  return false;
393  }
394 
395  bool isHighPt=false;
396  isHighPt = bool(m_muonSelectionHighPtTool->accept(input));
397  dec_passedHighPtCuts(input) = isHighPt;
398 
399  return isHighPt;
400 }
401 
402 
403 bool SUSYObjDef_xAOD::IsBadMuon(const xAOD::Muon& input, float qopcut) const
404 {
405  const static SG::AuxElement::Decorator<char> dec_bad("bad");
406  dec_bad(input) = false;
407 
408  const static SG::AuxElement::Decorator<char> dec_bad_highPt("bad_highPt");
409  dec_bad_highPt(input) = false;
410 
411  const xAOD::TrackParticle* track;
412  if (input.muonType() == xAOD::Muon::SiliconAssociatedForwardMuon) {
413  track = input.trackParticle(xAOD::Muon::CombinedTrackParticle);
414  if (!track) return false; // don't treat SAF muons without CB track further
415  }
416  else{
417  track = input.primaryTrackParticle();
418  if (!track){
419  ATH_MSG_WARNING("Non-SAF muon without a track; cannot test IsBadMuon criteria");
420  return false;
421  }
422  }
423 
424  float Rerr = Amg::error(track->definingParametersCovMatrix(), 4) / std::abs(track->qOverP());
425  ATH_MSG_VERBOSE( "Track momentum error (%): " << Rerr * 100 );
426  bool isbad = Rerr > qopcut;
427  bool isbadHighPt = Rerr > qopcut;
428 
429  //new recommendation from MCP
431 
432  //new recommendation from MCP (at HighPT)
433  isbadHighPt |= m_muonSelectionHighPtTool->isBadMuon(input);
434 
435  dec_bad(input) = isbad;
436  dec_bad_highPt(input) = isbadHighPt;
437 
438  ATH_MSG_VERBOSE( "MUON isbad?: " << isbad );
439  return isbad;
440 }
441 
442 bool SUSYObjDef_xAOD::IsCosmicMuon(const xAOD::Muon& input, float z0cut, float d0cut) const
443 {
444  const static SG::AuxElement::Decorator<char> dec_cosmic("cosmic");
445  dec_cosmic(input) = false;
446 
447  const xAOD::TrackParticle* track(nullptr);
448  if (input.muonType() == xAOD::Muon::SiliconAssociatedForwardMuon) {
449  track = input.trackParticle(xAOD::Muon::CombinedTrackParticle);
450  if (!track){
451  ATH_MSG_VERBOSE("WARNING: SAF muon without CB track found. Not possible to check cosmic muon criteria");
452  return false; // don't treat SAF muons without CB track further
453  }
454  }
455  else {
456  track = input.primaryTrackParticle();
457  if (!track){
458  ATH_MSG_WARNING("Non-SAF muon without primary track particle found. Not possible to check cosmic muon criteria");
459  return false;
460  }
461  }
462 
463  double mu_d0 = track->d0();
464  const xAOD::Vertex* pv = this->GetPrimVtx();
465  double primvertex_z = pv ? pv->z() : 0;
466  double mu_z0_exPV = track->z0() + track->vz() - primvertex_z;
467 
468  bool isCosmicMuon = (std::abs(mu_z0_exPV) >= z0cut || std::abs(mu_d0) >= d0cut);
469 
470  if (isCosmicMuon) {
471  ATH_MSG_VERBOSE("COSMIC PV Z = " << primvertex_z << ", track z0 = " << mu_z0_exPV << ", track d0 = " << mu_d0);
472  }
473 
474  dec_cosmic(input) = isCosmicMuon;
475  return isCosmicMuon;
476 }
477 
478 
479  float SUSYObjDef_xAOD::GetSignalMuonSF(const xAOD::Muon& mu, const bool recoSF, const bool isoSF, const bool doBadMuonHP, const bool warnOVR)
480 {
481  float sf(1.);
482 
483  if (recoSF) {
484  float sf_reco(1.);
486  if(warnOVR) ATH_MSG_WARNING(" GetSignalMuonSF: Reco getEfficiencyScaleFactor out of validity range");
487  }
488  ATH_MSG_VERBOSE( "MuonReco ScaleFactor " << sf_reco );
489  sf *= sf_reco;
490 
491  float sf_ttva(1.);
492  if(m_doTTVAsf){
494  if(warnOVR) ATH_MSG_WARNING(" GetSignalMuonSF: TTVA getEfficiencyScaleFactor out of validity range");
495  }
496  ATH_MSG_VERBOSE( "MuonTTVA ScaleFactor " << sf_ttva );
497  sf *= sf_ttva;
498  }
499 
500  float sf_badHighPt(1.);
501  if(m_muId == 4 && doBadMuonHP){
503  if(warnOVR) ATH_MSG_WARNING(" GetSignalMuonSF: BadMuonHighPt getEfficiencyScaleFactor out of validity range");
504  }
505  ATH_MSG_VERBOSE( "MuonBadMuonHighPt ScaleFactor " << sf_badHighPt );
506  sf *= sf_badHighPt;
507  }
508  }
509 
510 
511  if (isoSF) {
512  float sf_iso(1.);
513  if (acc_isolHighPt(mu) && mu.pt()>m_muIsoHighPtThresh) {
515  if(warnOVR) ATH_MSG_WARNING(" GetSignalMuonSF: high-pt Iso getEfficiencyScaleFactor out of validity range");
516  }
517  } else if (acc_isol(mu) && mu.pt()<m_muIsoHighPtThresh) {
519  if(warnOVR) ATH_MSG_WARNING(" GetSignalMuonSF: Iso getEfficiencyScaleFactor out of validity range");
520  }
521  }
522  ATH_MSG_VERBOSE( "MuonIso ScaleFactor " << sf_iso );
523  sf *= sf_iso;
524  }
525 
526 
527  dec_effscalefact(mu) = sf;
528  return sf;
529 }
530 
531 
532 double SUSYObjDef_xAOD::GetMuonTriggerEfficiency(const xAOD::Muon& mu, const std::string& trigExpr, const bool isdata) {
533 
534  double eff(1.);
535 
537  ATH_MSG_WARNING("Problem retrieving signal muon trigger efficiency for " << trigExpr );
538  }
539  else{
540  ATH_MSG_DEBUG("Got efficiency " << eff << " for " << trigExpr );
541  }
542  return eff;
543 }
544 
545 
546 double SUSYObjDef_xAOD::GetTotalMuonTriggerSF(const xAOD::MuonContainer& sfmuons, const std::string& trigExpr) {
547 
548  if (trigExpr.empty() || sfmuons.empty()) return 1.;
549 
550 
551  double trig_sf = 1.;
552 
553  int mulegs = 0;
554  const char *tmp = trigExpr.c_str();
555  while( (tmp = strstr(tmp, "mu")) ){
556  mulegs++;
557  tmp++;
558  }
559 
560  bool isdimuon = (trigExpr.find("2mu") != std::string::npos);
561  bool isOR = (trigExpr.find("OR") != std::string::npos);
562 
563  if((!isdimuon && mulegs<2) || (isdimuon && sfmuons.size()==2) || (mulegs>=2 && isOR)){ //Case 1: the tool takes easy care of the single, standard-dimuon and OR-of-single chains
564  if (m_muonTriggerSFTool->getTriggerScaleFactor( sfmuons, trig_sf, trigExpr ) == CP::CorrectionCode::Ok) {
565  ATH_MSG_DEBUG( "MuonTrig ScaleFactor " << trig_sf );
566  }
567  else{
568  ATH_MSG_DEBUG( "MuonTrig FAILED SOMEHOW");
569  }
570  }
571  else if(mulegs!=2 && isOR){ //Case 2: not supported. Not efficiency defined for (at least) one leg. Sorry...
572  ATH_MSG_WARNING( "SF for " << trigExpr << " are only supported for two muon events!");
573  }
574  else{ //Case 3: let's go the hard way...
575  //Following https://twiki.cern.ch/twiki/bin/view/Atlas/TrigMuonEfficiency
576  std::string newtrigExpr = TString(trigExpr).Copy().ReplaceAll("HLT_2","").Data();
577 
578  //redefine dimuon triggers here (2mu14 --> mu14_mu14)
579  if (isdimuon) { newtrigExpr += "_"+newtrigExpr; }
580  boost::replace_all(newtrigExpr, "HLT_", "");
581  boost::char_separator<char> sep("_");
582 
583  for (const auto& mutrig : boost::tokenizer<boost::char_separator<char>>(newtrigExpr, sep)) {
584  double dataFactor = 1.;
585  double mcFactor = 1.;
586 
587  for (const xAOD::Muon* mu : sfmuons) {
588  // No need for additional trigger matching
589  dataFactor *= (1 - GetMuonTriggerEfficiency(*mu, "HLT_"+mutrig, true));
590  mcFactor *= (1 - GetMuonTriggerEfficiency(*mu, "HLT_"+mutrig, false));
591  }
592  if( (1-mcFactor) > 0. )
593  trig_sf *= (1-dataFactor)/(1-mcFactor);
594  }
595  }
596 
597  return trig_sf;
598 }
599 
600 
601 double SUSYObjDef_xAOD::GetTotalMuonSF(const xAOD::MuonContainer& muons, const bool recoSF, const bool isoSF, const std::string& trigExpr, const bool bmhptSF) {
602  double sf(1.);
603 
605  for (const xAOD::Muon* muon : muons) {
606  if( !acc_passOR(*muon) ) continue;
607  if (acc_signal(*muon)) {
608  sfmuons.push_back(muon);
609  if (recoSF || isoSF) { sf *= this->GetSignalMuonSF(*muon, recoSF, isoSF, bmhptSF); }
610  } else { // decorate baseline muons as well
611  if (recoSF || isoSF) { this->GetSignalMuonSF(*muon, recoSF, isoSF, bmhptSF, false); } //avoid OVR warnings in this case
612  }
613  }
614 
615  sf *= GetTotalMuonTriggerSF(*sfmuons.asDataVector(), trigExpr);
616 
617  return sf;
618 }
619 
620 
621  double SUSYObjDef_xAOD::GetTotalMuonSFsys(const xAOD::MuonContainer& muons, const CP::SystematicSet& systConfig, const bool recoSF, const bool isoSF, const std::string& trigExpr, const bool bmhptSF) {
622  double sf(1.);
623  //Set the new systematic variation
625  if ( ret != StatusCode::SUCCESS) {
626  ATH_MSG_ERROR("Cannot configure MuonEfficiencyScaleFactors for systematic var. " << systConfig.name() );
627  }
628 
630  if ( ret != StatusCode::SUCCESS) {
631  ATH_MSG_ERROR("Cannot configure MuonBadMuonHighPtScaleFactors for systematic var. " << systConfig.name() );
632  }
633 
635  if ( ret != StatusCode::SUCCESS) {
636  ATH_MSG_ERROR("Cannot configure MuonTTVAEfficiencyScaleFactors for systematic var. " << systConfig.name() );
637  }
638 
640  if ( ret != StatusCode::SUCCESS) {
641  ATH_MSG_ERROR("Cannot configure MuonIsolationScaleFactors for systematic var. " << systConfig.name() );
642  }
643 
645  if ( ret != StatusCode::SUCCESS) {
646  ATH_MSG_ERROR("Cannot configure MuonHighPtIsolationScaleFactors for systematic var. " << systConfig.name() );
647  }
648 
650  if ( ret != StatusCode::SUCCESS) {
651  ATH_MSG_ERROR("Cannot configure MuonTriggerScaleFactors for systematic var. " << systConfig.name() );
652  }
653 
655  if (ret != StatusCode::SUCCESS) {
656  ATH_MSG_ERROR("Cannot configure TrigGlobalEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() );
657  }
658 
660  if (ret != StatusCode::SUCCESS) {
661  ATH_MSG_ERROR("Cannot configure TrigGlobalEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() );
662  }
663 
664  sf = GetTotalMuonSF(muons, recoSF, isoSF, trigExpr, bmhptSF);
665 
666  //Roll back to default
668  if ( ret != StatusCode::SUCCESS) {
669  ATH_MSG_ERROR("Cannot configure MuonEfficiencyScaleFactors back to default.");
670  }
671 
673  if ( ret != StatusCode::SUCCESS) {
674  ATH_MSG_ERROR("Cannot configure MuonBadMuonHighPtScaleFactors back to default.");
675  }
676 
678  if ( ret != StatusCode::SUCCESS) {
679  ATH_MSG_ERROR("Cannot configure MuonTTVAEfficiencyScaleFactors back to default.");
680  }
681 
683  if ( ret != StatusCode::SUCCESS) {
684  ATH_MSG_ERROR("Cannot configure MuonIsolationScaleFactors back to default.");
685  }
686 
688  if ( ret != StatusCode::SUCCESS) {
689  ATH_MSG_ERROR("Cannot configure MuonIsolationScaleFactors back to default.");
690  }
691 
693  if ( ret != StatusCode::SUCCESS) {
694  ATH_MSG_ERROR("Cannot configure MuonTriggerScaleFactors back to default.");
695  }
696 
698  if (ret != StatusCode::SUCCESS) {
699  ATH_MSG_ERROR("Cannot configure TrigGlobalEfficiencyCorrectionTool (trigger) back to default.");
700  }
701 
703  if (ret != StatusCode::SUCCESS) {
704  ATH_MSG_ERROR("Cannot configure TrigGlobalEfficiencyCorrectionTool (trigger) back to default.");
705  }
706 
707  return sf;
708 }
709 
710 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
ST::SUSYObjDef_xAOD::m_muonEfficiencySFTool
asg::AnaToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonEfficiencySFTool
Definition: SUSYObjDef_xAOD.h:853
ST::SUSYObjDef_xAOD::m_isoHighPtTool
asg::AnaToolHandle< CP::IIsolationSelectionTool > m_isoHighPtTool
Definition: SUSYObjDef_xAOD.h:955
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
xAOD::numberOfPixelHoles
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
Definition: TrackingPrimitives.h:261
LikeEnum::Loose
@ Loose
Definition: LikelihoodEnums.h:12
ST::SUSYObjDef_xAOD::IsHighPtMuon
bool IsHighPtMuon(const xAOD::Muon &input) const override final
Definition: Muons.cxx:384
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
ST::SUSYObjDef_xAOD::m_doTTVAsf
bool m_doTTVAsf
Definition: SUSYObjDef_xAOD.h:520
ST::SUSYObjDef_xAOD::m_muBaselineEta
double m_muBaselineEta
Definition: SUSYObjDef_xAOD.h:690
ST::SUSYObjDef_xAOD::m_trigGlobalEffCorrTool_multiLep
asg::AnaToolHandle< ITrigGlobalEfficiencyCorrectionTool > m_trigGlobalEffCorrTool_multiLep
Definition: SUSYObjDef_xAOD.h:935
ST::SUSYObjDef_xAOD::prepareLRTMuons
StatusCode prepareLRTMuons(const xAOD::MuonContainer *inMuons, xAOD::MuonContainer *copy) const override final
Definition: Muons.cxx:74
TrackParticlexAODHelpers.h
ST::SUSYObjDef_xAOD::GetTotalMuonTriggerSF
double GetTotalMuonTriggerSF(const xAOD::MuonContainer &sfmuons, const std::string &trigExpr) override final
Definition: Muons.cxx:546
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CP::IMuonTriggerScaleFactors::getTriggerEfficiency
virtual CorrectionCode getTriggerEfficiency(const xAOD::Muon &mu, Double_t &efficiency, const std::string &trigger, Bool_t dataType) const =0
ST::SUSYObjDef_xAOD::m_muonEfficiencyBMHighPtSFTool
asg::AnaToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonEfficiencyBMHighPtSFTool
Definition: SUSYObjDef_xAOD.h:854
ST::SUSYObjDef_xAOD::m_muBaselinePt
double m_muBaselinePt
Definition: SUSYObjDef_xAOD.h:689
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
ITrigGlobalEfficiencyCorrectionTool.h
ST::SUSYObjDef_xAOD::FillMuon
StatusCode FillMuon(xAOD::Muon &input, const float ptcut, const float etacut) override final
Definition: Muons.cxx:206
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
xAODP4Helpers.h
ST::SUSYObjDef_xAOD::GetTotalMuonSF
double GetTotalMuonSF(const xAOD::MuonContainer &muons, const bool recoSF=true, const bool isoSF=true, const std::string &trigExpr="HLT_mu20_iloose_L1MU15_OR_HLT_mu50", const bool bmhptSF=true) override final
Definition: Muons.cxx:601
ST::SUSYObjDef_xAOD::IsBadMuon
bool IsBadMuon(const xAOD::Muon &input, const float qopcut) const override final
Definition: Muons.cxx:403
ST::SUSYObjDef_xAOD::lrt_muons
const xAOD::MuonContainer * lrt_muons
Definition: SUSYObjDef_xAOD.h:205
ST
Definition: Electrons.cxx:41
EventPrimitivesHelpers.h
ST::SUSYObjDef_xAOD::m_isoBaselineTool
asg::AnaToolHandle< CP::IIsolationSelectionTool > m_isoBaselineTool
Definition: SUSYObjDef_xAOD.h:954
ST::SUSYObjDef_xAOD::m_muPt
double m_muPt
Definition: SUSYObjDef_xAOD.h:691
ST::SUSYObjDef_xAOD::IsCosmicMuon
bool IsCosmicMuon(const xAOD::Muon &input, const float z0cut, const float d0cut) const override final
Definition: Muons.cxx:442
xAOD::TrackingHelpers::d0significance
double d0significance(const xAOD::TrackParticle *tp, double d0_uncert_beam_spot_2)
Definition: TrackParticlexAODHelpers.cxx:42
xAOD::ShallowAuxContainer
Class creating a shallow copy of an existing auxiliary container.
Definition: ShallowAuxContainer.h:54
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
ST::SUSYObjDef_xAOD::m_muId
int m_muId
Definition: SUSYObjDef_xAOD.h:640
DataVector::get
const T * get(size_type n) const
Access an element, as an rvalue.
CP::SystematicSet::name
std::string name() const
returns: the systematics joined into a single string.
Definition: SystematicSet.cxx:278
xAOD::EventInfo_v1::beamPosSigmaX
float beamPosSigmaX() const
The width of the beam spot in the X direction.
ST::SUSYObjDef_xAOD::m_muonTTVAEfficiencySFTool
asg::AnaToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonTTVAEfficiencySFTool
Definition: SUSYObjDef_xAOD.h:855
SUSYObjDef_xAOD.h
CP::IMuonCalibrationAndSmearingTool::applyCorrection
virtual CorrectionCode applyCorrection(xAOD::Muon &mu) const =0
Declare the interface that the class provides.
ST::SUSYObjDef_xAOD::m_mubaselined0sig
double m_mubaselined0sig
Definition: SUSYObjDef_xAOD.h:695
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
CP::IIsolationSelectionTool::accept
virtual asg::AcceptData accept(const xAOD::Photon &x) const =0
Declare the interface that the class provides.
xAOD::numberOfTRTHits
@ numberOfTRTHits
number of TRT hits [unit8_t].
Definition: TrackingPrimitives.h:275
ST::SUSYObjDef_xAOD::m_muBaselineIso_WP
std::string m_muBaselineIso_WP
Definition: SUSYObjDef_xAOD.h:658
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:54
ST::SUSYObjDef_xAOD::GetPrimVtx
const xAOD::Vertex * GetPrimVtx() const override final
Definition: SUSYObjDef_xAOD.cxx:2837
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ST::SUSYObjDef_xAOD::IsSignalMuon
bool IsSignalMuon(const xAOD::Muon &input, const float ptcut, const float d0sigcut, const float z0cut, const float etacut=DUMMYDEF) const override final
Definition: Muons.cxx:342
ST::SUSYObjDef_xAOD::m_debug
bool m_debug
Definition: SUSYObjDef_xAOD.h:532
ST::SUSYObjDef_xAOD::m_doMuIsoSignal
bool m_doMuIsoSignal
Definition: SUSYObjDef_xAOD.h:780
ST::SUSYObjDef_xAOD::m_muCosmicd0
double m_muCosmicd0
Definition: SUSYObjDef_xAOD.h:699
xAOD::numberOfBLayerHits
@ numberOfBLayerHits
these are the hits in the first pixel layer, i.e.
Definition: TrackingPrimitives.h:231
CP::IMuonLRTOverlapRemovalTool::checkOverlap
virtual void checkOverlap(const xAOD::MuonContainer &promptCollection, const xAOD::MuonContainer &lrtCollection, std::vector< bool > &promptMuonsSelectedToKeep, std::vector< bool > &lrtMuonsSelectedToKeep) const =0
check the overlap between the prompt and LRT muon collections.
Pythia8_A14_NNPDF23LO_forMGHT_EvtGen.ptcut
float ptcut
Definition: Pythia8_A14_NNPDF23LO_forMGHT_EvtGen.py:9
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
ST::SUSYObjDef_xAOD::m_tool_init
bool m_tool_init
Definition: SUSYObjDef_xAOD.h:557
ConstDataVector::asDataVector
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
ST::SUSYObjDef_xAOD::m_muonLRTORTool
asg::AnaToolHandle< CP::IMuonLRTOverlapRemovalTool > m_muonLRTORTool
Definition: SUSYObjDef_xAOD.h:860
CP::IMuonSelectionTool::isBadMuon
virtual bool isBadMuon(const xAOD::Muon &) const =0
Returns true if a CB muon fails some loose quaility requirements designed to remove pathological trac...
MuonAuxContainer.h
IMuonSelectionTool.h
CP::IMuonTriggerScaleFactors::getTriggerScaleFactor
virtual CorrectionCode getTriggerScaleFactor(const xAOD::MuonContainer &mucont, Double_t &triggersf, const std::string &trigger) const =0
ST::SUSYObjDef_xAOD::m_trigGlobalEffCorrTool_diLep
asg::AnaToolHandle< ITrigGlobalEfficiencyCorrectionTool > m_trigGlobalEffCorrTool_diLep
Definition: SUSYObjDef_xAOD.h:927
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
IMuonEfficiencyScaleFactors.h
ST::SUSYObjDef_xAOD::m_isPHYSLITE
bool m_isPHYSLITE
Definition: SUSYObjDef_xAOD.h:789
CP::CorrectionCode::OutOfValidityRange
@ OutOfValidityRange
Input object is out of validity range.
Definition: CorrectionCode.h:37
IIsolationCorrectionTool.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
IPileupReweightingTool.h
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:58
ST::SUSYObjDef_xAOD::GetMuonTriggerEfficiency
double GetMuonTriggerEfficiency(const xAOD::Muon &mu, const std::string &trigExpr, const bool isdata=false) override final
Definition: Muons.cxx:532
ret
T ret(T t)
Definition: rootspy.cxx:260
ST::SUSYObjDef_xAOD::m_muonIsolationSFTool
asg::AnaToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonIsolationSFTool
Definition: SUSYObjDef_xAOD.h:856
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ST::SUSYObjDef_xAOD::m_muEta
double m_muEta
Definition: SUSYObjDef_xAOD.h:692
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
ST::SUSYObjDef_xAOD::m_muonCalibTool
asg::AnaToolHandle< CP::IMuonCalibrationAndSmearingTool > m_muonCalibTool
Definition: SUSYObjDef_xAOD.h:852
IMuonTriggerScaleFactors.h
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ST::SUSYObjDef_xAOD::prompt_muons
const xAOD::MuonContainer * prompt_muons
Definition: SUSYObjDef_xAOD.h:204
ST::SUSYObjDef_xAOD::m_muIsoHighPtThresh
double m_muIsoHighPtThresh
Definition: SUSYObjDef_xAOD.h:661
CP::IMuonSelectionTool::accept
virtual asg::AcceptData accept(const xAOD::Muon &mu) const =0
Decide whether the muon in question is a "good muon" or not.
ST::SUSYObjDef_xAOD::m_muIso_WP
std::string m_muIso_WP
Definition: SUSYObjDef_xAOD.h:659
xAOD::numberOfSCTHoles
@ numberOfSCTHoles
number of SCT holes [unit8_t].
Definition: TrackingPrimitives.h:270
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
Trk::Combined
@ Combined
Definition: TrackSummaryTool.h:32
xAOD::EventInfo_v1::beamPosSigmaY
float beamPosSigmaY() const
The width of the beam spot in the Y direction.
grepfile.sep
sep
Definition: grepfile.py:38
xAOD::Muon
Muon_v1 Muon
Reference the current persistent version:
Definition: Event/xAOD/xAODMuon/xAODMuon/Muon.h:13
IMuonLRTOverlapRemovalTool.h
ST::SUSYObjDef_xAOD::m_muonSelectionToolBaseline
asg::AnaToolHandle< CP::IMuonSelectionTool > m_muonSelectionToolBaseline
Definition: SUSYObjDef_xAOD.h:851
ST::SUSYObjDef_xAOD::m_muz0
double m_muz0
Definition: SUSYObjDef_xAOD.h:694
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
IIsolationSelectionTool.h
ST::SUSYObjDef_xAOD::m_force_noMuId
bool m_force_noMuId
Definition: SUSYObjDef_xAOD.h:519
ST::SUSYObjDef_xAOD::m_muEffCorrForce1D
bool m_muEffCorrForce1D
Definition: SUSYObjDef_xAOD.h:663
TauGNNUtils::Variables::Track::nSCTHits
bool nSCTHits(const xAOD::TauJet &, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:549
IMuonCalibrationAndSmearingTool.h
ConstDataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
ST::SUSYObjDef_xAOD::m_muonSelectionHighPtTool
asg::AnaToolHandle< CP::IMuonSelectionTool > m_muonSelectionHighPtTool
Definition: SUSYObjDef_xAOD.h:850
ST::SUSYObjDef_xAOD::m_badmuQoverP
double m_badmuQoverP
Definition: SUSYObjDef_xAOD.h:700
xAOD::shallowCopyContainer
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, [[maybe_unused]] const EventContext &ctx)
Function making a shallow copy of a constant container.
Definition: ShallowCopy.h:110
xAOD::IParticle::isAvailable
bool isAvailable(const std::string &name, const std::string &clsname="") const
Check if a user property is available for reading or not.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:131
ST::SUSYObjDef_xAOD::m_outMuonLocation
SG::WriteHandleKey< xAOD::MuonContainer > m_outMuonLocation
Definition: SUSYObjDef_xAOD.h:861
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
ST::SUSYObjDef_xAOD::m_muCosmicz0
double m_muCosmicz0
Definition: SUSYObjDef_xAOD.h:698
AthAnalysisHelper.h
xAOD::numberOfTRTOutliers
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
Definition: TrackingPrimitives.h:276
ST::SUSYObjDef_xAOD::m_muonTriggerSFTool
asg::AnaToolHandle< CP::IMuonTriggerScaleFactors > m_muonTriggerSFTool
Definition: SUSYObjDef_xAOD.h:858
ST::SUSYObjDef_xAOD::m_mubaselinez0
double m_mubaselinez0
Definition: SUSYObjDef_xAOD.h:696
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
xAOD::EventInfo_v1::beamPosSigmaXY
float beamPosSigmaXY() const
The beam spot shape's X-Y correlation.
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ST::SUSYObjDef_xAOD::GetMuons
StatusCode GetMuons(xAOD::MuonContainer *&copy, xAOD::ShallowAuxContainer *&copyaux, const bool recordSG=true, const std::string &muonkey="Muons", const std::string &lrtmuonkey="MuonsLRT", const xAOD::MuonContainer *containerToBeCopied=nullptr) override final
Definition: Muons.cxx:101
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::numberOfSCTDeadSensors
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
Definition: TrackingPrimitives.h:273
ST::SUSYObjDef_xAOD::GetSignalMuonSF
float GetSignalMuonSF(const xAOD::Muon &mu, const bool recoSF=true, const bool isoSF=true, const bool doBadMuonHP=true, const bool warnOVR=true) override final
Definition: Muons.cxx:479
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition: ConstDataVector.h:76
xAOD::setOriginalObjectLink
bool setOriginalObjectLink(const IParticle &original, IParticle &copy)
This function should be used by CP tools when they make a deep copy of an object in their correctedCo...
Definition: IParticleHelpers.cxx:30
ST::SUSYObjDef_xAOD::m_currentSyst
CP::SystematicSet m_currentSyst
Definition: SUSYObjDef_xAOD.h:801
python.changerun.pv
pv
Definition: changerun.py:81
CP::IMuonEfficiencyScaleFactors::getEfficiencyScaleFactor
virtual CorrectionCode getEfficiencyScaleFactor(const xAOD::Muon &mu, float &sf, const xAOD::EventInfo *info=0) const =0
Retrieve the Scale factor.
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
dqt_zlumi_alleff_HIST.eff
int eff
Definition: dqt_zlumi_alleff_HIST.py:113
IParticleHelpers.h
xAOD::numberOfPixelDeadSensors
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
Definition: TrackingPrimitives.h:266
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
calibdata.copy
bool copy
Definition: calibdata.py:27
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
xAOD::getOriginalObject
const IParticle * getOriginalObject(const IParticle &copy)
This function can be used to conveniently get a pointer back to the original object from which a copy...
Definition: IParticleHelpers.cxx:140
ST::SUSYObjDef_xAOD::m_muLRT
bool m_muLRT
Definition: SUSYObjDef_xAOD.h:702
ST::SUSYObjDef_xAOD::MergeMuons
StatusCode MergeMuons(const xAOD::MuonContainer &muons, const std::vector< bool > &writeMuon, xAOD::MuonContainer *outputCol) const override final
Definition: Muons.cxx:56
ST::SUSYObjDef_xAOD::m_mud0sig
double m_mud0sig
Definition: SUSYObjDef_xAOD.h:693
ST::SUSYObjDef_xAOD::m_muIsoHighPt_WP
std::string m_muIsoHighPt_WP
Definition: SUSYObjDef_xAOD.h:660
ST::SUSYObjDef_xAOD::m_muonHighPtIsolationSFTool
asg::AnaToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonHighPtIsolationSFTool
Definition: SUSYObjDef_xAOD.h:857
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
ST::SUSYObjDef_xAOD::GetTotalMuonSFsys
double GetTotalMuonSFsys(const xAOD::MuonContainer &muons, const CP::SystematicSet &systConfig, const bool recoSF=true, const bool isoSF=true, const std::string &trigExpr="HLT_mu20_iloose_L1MU15_OR_HLT_mu50", const bool bmhptSF=true) override final
Definition: Muons.cxx:621
CP::ISystematicsTool::applySystematicVariation
virtual StatusCode applySystematicVariation(const SystematicSet &systConfig)=0
effects: configure this tool for the given list of systematic variations.
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
ST::SUSYObjDef_xAOD::m_muonSelectionTool
asg::AnaToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool
Definition: SUSYObjDef_xAOD.h:849
ST::SUSYObjDef_xAOD::m_isoTool
asg::AnaToolHandle< CP::IIsolationSelectionTool > m_isoTool
Definition: SUSYObjDef_xAOD.h:952