ATLAS Offline Software
Muons.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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::Decorator<char> dec_passedHighPtCuts("passedHighPtCuts");
42 
43  const static SG::Decorator<char> dec_passSignalID("passSignalID");
44  const static SG::ConstAccessor<char> acc_passSignalID("passSignalID");
45 
46  const static SG::Decorator<float> dec_DFCommonJetDr("DFCommonJetDr");
47  const static SG::ConstAccessor<float> acc_DFCommonJetDr("DFCommonJetDr");
48  const static SG::Decorator<float> dec_dRJet("dRJet");
49  const static SG::Decorator<float> dec_z0sinTheta("z0sinTheta");
50  const static SG::Decorator<float> dec_d0sig("d0sig");
51  const static SG::Decorator<char> dec_isLRT("isLRT");
52  const static SG::Decorator<char> dec_cosmic("cosmic");
53 
54 
55 StatusCode SUSYObjDef_xAOD::MergeMuons(const xAOD::MuonContainer & muons, const std::vector<bool> &writeMuon, xAOD::MuonContainer* outputCol) const{
56  if (muons.empty()) return StatusCode::SUCCESS;
57  for (const xAOD::Muon* muon: muons) {
58  // add muon into output
59  if (writeMuon.at(muon->index())){
60  auto newMuon = new xAOD::Muon(*muon);
61 
62  if ( getOriginalObject(*muon) != nullptr ) {
64  } else {
65  setOriginalObjectLink(*muon, *newMuon);
66  }
67  outputCol->push_back(newMuon);
68  }
69  }
70  return StatusCode::SUCCESS;
71 }
72 
74  for (const xAOD::Muon *muon: *inMuons){
75  const xAOD::TrackParticle* idtrack = muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
76 
77  // Save muon if the id track passes the LRT filter
78  if ( acc_lrtFilter.isAvailable(*idtrack) )
79  {
80  if ( static_cast<int>(acc_lrtFilter(*idtrack) ) ){
81  std::unique_ptr<xAOD::Muon> copyMuon = std::make_unique<xAOD::Muon>(*muon);
82 
83  // transfer original muon link
84  setOriginalObjectLink(*muon, *copyMuon);
85  copy->push_back( std::move(copyMuon) );
86  }
87  }
88  else // Keep muon if flag is not available
89  {
90  std::unique_ptr<xAOD::Muon> copyMuon = std::make_unique<xAOD::Muon>(*muon);
91 
92  setOriginalObjectLink(*muon, *copyMuon);
93  copy->push_back( std::move(copyMuon) );
94  }
95 
96  }
97  return StatusCode::SUCCESS;
98 }
99 
100 StatusCode SUSYObjDef_xAOD::GetMuons(xAOD::MuonContainer*& copy, xAOD::ShallowAuxContainer*& copyaux, bool recordSG, const std::string& muonkey, const std::string& lrtmuonkey, const xAOD::MuonContainer* containerToBeCopied)
101 {
102  if (!m_tool_init) {
103  ATH_MSG_ERROR("SUSYTools was not initialized!!");
104  return StatusCode::FAILURE;
105  }
106 
107  // Initializing prompt/LRT OR procedure
108  auto outputCol = std::make_unique<xAOD::MuonContainer>();
109  std::unique_ptr<xAOD::MuonAuxContainer> outputAuxCol;
110  outputAuxCol = std::make_unique<xAOD::MuonAuxContainer>();
111  outputCol->setStore(outputAuxCol.get());
112  ATH_CHECK( m_outMuonLocation.initialize() );
113 
114  if (bool(m_muLRT) && !lrtmuonkey.empty() && evtStore()->contains<xAOD::MuonContainer>(lrtmuonkey)){
115  ATH_MSG_DEBUG("Applying prompt/LRT muon OR procedure");
116 
117  // First identify if merged container has already been made (for instances where GetMuons() is called more than once)
118  if (evtStore()->contains<xAOD::MuonContainer>("StdWithLRTMuons")) {
119  ATH_MSG_DEBUG("Merged prompt/LRT container already created in TStore");
120  } else {
121  ATH_MSG_DEBUG("Creating merged prompt/LRT container in TStore");
122 
123  // Retrieve prompt and LRT muons from TStore
124  ATH_CHECK( evtStore()->retrieve(prompt_muons, muonkey) );
125  ATH_CHECK( evtStore()->retrieve(lrt_muons, lrtmuonkey) );
126 
127  // Remove LRT muons as flagged by filter for uncertainty
128  auto filtered_muons = std::make_unique<xAOD::MuonContainer>();
129  std::unique_ptr<xAOD::MuonAuxContainer> filtered_muons_aux = std::make_unique<xAOD::MuonAuxContainer>();
130  filtered_muons->setStore(filtered_muons_aux.get());
131  ATH_CHECK(prepareLRTMuons(lrt_muons, filtered_muons.get()));
132 
133  // Check overlap between prompt and LRT collections
134  std::vector<bool> writePromptMuon;
135  std::vector<bool> writeLRTMuon;
136  m_muonLRTORTool->checkOverlap(*prompt_muons, *filtered_muons, writePromptMuon, writeLRTMuon);
137 
138  // Decorate muons with prompt/LRT
139  for (const xAOD::Muon* mu : *prompt_muons) dec_isLRT(*mu) = 0;
140  for (const xAOD::Muon* mu : *filtered_muons) dec_isLRT(*mu) = 1;
141 
142  // Create merged StdWithLRTMuons container
143  outputCol->reserve(prompt_muons->size() + filtered_muons->size());
144  ATH_CHECK(MergeMuons(*prompt_muons, writePromptMuon, outputCol.get()) );
145  ATH_CHECK(MergeMuons(*filtered_muons, writeLRTMuon, outputCol.get()) );
146 
147  // Save merged StdWithLRTMuons container to TStore
148  ATH_CHECK(evtStore()->record(std::move(outputCol), m_outMuonLocation.key()));
149  ATH_CHECK(evtStore()->record(std::move(outputAuxCol), m_outMuonLocation.key() + "Aux.") );
150 
151  }
152  } else if (!lrtmuonkey.empty()) {
153  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!");
154  ATH_MSG_DEBUG("Not applying prompt/LRT muon OR procedure");
155  }
156 
157  if (m_isPHYSLITE && muonkey.find("AnalysisMuons")==std::string::npos){
158  ATH_MSG_ERROR("You are running on PHYSLITE derivation. Please change the Muons container to 'AnalysisMuons'");
159  return StatusCode::FAILURE;
160  }
161 
162  const xAOD::MuonContainer* muons = nullptr;
163  if (bool(m_muLRT) && evtStore()->contains<xAOD::MuonContainer>(lrtmuonkey)){
164  ATH_MSG_DEBUG("Using container: " << m_outMuonLocation.key());
165  ATH_CHECK( evtStore()->retrieve(muons, m_outMuonLocation.key()));
166  }
167  else {
168  if (copy==nullptr) { // empty container provided
169  ATH_MSG_DEBUG("Empty container provided");
170  if (containerToBeCopied != nullptr) {
171  ATH_MSG_DEBUG("Containter to be copied not nullptr");
172  muons = containerToBeCopied;
173  }
174  else {
175  ATH_MSG_DEBUG("Getting Muons collection");
176  ATH_CHECK( evtStore()->retrieve(muons, muonkey) );
177  }
178  }
179  }
180 
181  std::pair<xAOD::MuonContainer*, xAOD::ShallowAuxContainer*> shallowcopy = xAOD::shallowCopyContainer(*muons);
182  copy = shallowcopy.first;
183  copyaux = shallowcopy.second;
184  bool setLinks = xAOD::setOriginalObjectLink(*muons, *copy);
185  if (!setLinks) {
186  ATH_MSG_WARNING("Failed to set original object links on " << muonkey);
187  } else { // use the user-supplied collection instead
188  ATH_MSG_DEBUG("Not retrieving muon collection, using existing one provided by user");
189  muons=copy;
190  }
191 
192  for (const auto& muon : *copy) {
196  this->IsBadMuon(*muon, m_badmuQoverP);
197  }
198  if (recordSG) {
199  ATH_CHECK( evtStore()->record(copy, "STCalib" + muonkey + m_currentSyst.name()) );
200  ATH_CHECK( evtStore()->record(copyaux, "STCalib" + muonkey + m_currentSyst.name() + "Aux.") );
201  }
202  return StatusCode::SUCCESS;
203 }
204 
206 
207  ATH_MSG_VERBOSE( "Starting FillMuon on mu with pt=" << input.pt() );
208 
209  dec_baseline(input) = false;
210  dec_selected(input) = 0;
211  dec_signal(input) = false;
212  dec_isol(input) = false;
213  dec_isolHighPt(input) = false;
214  dec_passedHighPtCuts(input) = false;
215  dec_passSignalID(input) = false;
216 
217  if (m_muEffCorrForce1D) {
218  dec_DFCommonJetDr(input) = -2.0;
219  } else if (!acc_DFCommonJetDr.isAvailable(input)) {
220  dec_dRJet(input) = -2.0;
221  }
222 
223  // don't bother calibrating or computing WP
224  if ( input.pt() < 3e3 ) return StatusCode::SUCCESS;
225 
226  ATH_MSG_VERBOSE( "MUON pt before calibration " << input.pt() );
227 
228  ATH_MSG_VERBOSE( "MUON eta = " << input.eta() );
229  ATH_MSG_VERBOSE( "MUON type = " << input.muonType() );
230  ATH_MSG_VERBOSE( "MUON author = " << input.author() );
231 
233  ATH_MSG_VERBOSE("FillMuon: applyCorrection out of validity range");
234  }
235 
236  ATH_MSG_VERBOSE( "MUON pt after calibration " << input.pt() );
237 
238  const xAOD::EventInfo* evtInfo = nullptr;
239  ATH_CHECK( evtStore()->retrieve( evtInfo, "EventInfo" ) );
240  const xAOD::Vertex* pv = this->GetPrimVtx();
241  double primvertex_z = pv ? pv->z() : 0;
242  //const xAOD::TrackParticle* track = input.primaryTrackParticle();
243  const xAOD::TrackParticle* track;
244  if (input.muonType() == xAOD::Muon::SiliconAssociatedForwardMuon) {
245  track = input.trackParticle(xAOD::Muon::CombinedTrackParticle);
246  if (!track) return StatusCode::SUCCESS; // don't treat SAF muons without CB track further
247  }
248  else {
249  track = input.primaryTrackParticle();
250  }
251 
252  //impact parameters (after applyCorrection() so to have the primaryTrack links restored in old buggy samples)
253  if (track){
254  dec_z0sinTheta(input) = (track->z0() + track->vz() - primvertex_z) * TMath::Sin(input.p4().Theta());
255  } else {
256  ATH_MSG_WARNING("FillMuon: Muon of pT and eta " << input.pt() << " MeV " << input.eta() << " has no associated track");
257  }
258  //protect against exception thrown for null or negative d0sig
259  try {
260  if (track)
261  dec_d0sig(input) = xAOD::TrackingHelpers::d0significance( track , evtInfo->beamPosSigmaX(), evtInfo->beamPosSigmaY(), evtInfo->beamPosSigmaXY() );
262  else
263  dec_d0sig(input) = -99.;
264  }
265  catch (...) {
266  float d0sigError = -99.;
267  ATH_MSG_WARNING("FillMuon : Exception caught from d0significance() calculation. Setting dummy decoration d0sig=" << d0sigError );
268  dec_d0sig(input) = d0sigError;
269  }
270 
271  if (m_debug) {
272  // Summary variables in
273  // /cvmfs/atlas.cern.ch/repo/sw/ASG/AnalysisBase/2.0.3/xAODTracking/Root/TrackSummaryAccessors_v1.cxx
274 
275  unsigned char nBLHits(0), nPixHits(0), nPixelDeadSensors(0), nPixHoles(0),
276  nSCTHits(0), nSCTDeadSensors(0), nSCTHoles(0), nTRTHits(0), nTRTOutliers(0);
277 
278  if (track){
279  track->summaryValue( nBLHits, xAOD::numberOfBLayerHits);
280  track->summaryValue( nPixHits, xAOD::numberOfPixelHits);
281  track->summaryValue( nPixelDeadSensors, xAOD::numberOfPixelDeadSensors);
282  track->summaryValue( nPixHoles, xAOD::numberOfPixelHoles);
283 
284  track->summaryValue( nSCTHits, xAOD::numberOfSCTHits);
285  track->summaryValue( nSCTDeadSensors, xAOD::numberOfSCTDeadSensors);
286  track->summaryValue( nSCTHoles, xAOD::numberOfSCTHoles);
287 
288  track->summaryValue( nTRTHits, xAOD::numberOfTRTHits);
289  track->summaryValue( nTRTOutliers, xAOD::numberOfTRTOutliers);
290  }
291 
292  ATH_MSG_INFO( "MUON pt: " << input.pt() );
293  ATH_MSG_INFO( "MUON eta: " << input.eta() );
294  ATH_MSG_INFO( "MUON phi: " << input.phi() );
295  ATH_MSG_INFO( "MUON comb: " << (input.muonType() == xAOD::Muon::Combined));
296  ATH_MSG_INFO( "MUON sTag: " << (input.muonType() == xAOD::Muon::SegmentTagged));
297  ATH_MSG_INFO( "MUON loose:" << (input.quality() == xAOD::Muon::Loose));
298  ATH_MSG_INFO( "MUON bHit: " << static_cast<int>( nBLHits ));
299  ATH_MSG_INFO( "MUON pHit: " << static_cast<int>( nPixHits ));
300  ATH_MSG_INFO( "MUON pDead:" << static_cast<int>( nPixelDeadSensors ));
301  ATH_MSG_INFO( "MUON pHole:" << static_cast<int>( nPixHoles ));
302  ATH_MSG_INFO( "MUON sHit: " << static_cast<int>( nSCTHits));
303  ATH_MSG_INFO( "MUON sDead:" << static_cast<int>( nSCTDeadSensors ));
304  ATH_MSG_INFO( "MUON sHole:" << static_cast<int>( nSCTHoles ));
305  ATH_MSG_INFO( "MUON tHit: " << static_cast<int>( nTRTHits ));
306  ATH_MSG_INFO( "MUON tOut: " << static_cast<int>( nTRTOutliers ));
307 
308  const xAOD::TrackParticle* idtrack =
309  input.trackParticle( xAOD::Muon::InnerDetectorTrackParticle );
310 
311  if ( !idtrack) {
312  ATH_MSG_VERBOSE( "No ID track!! " );
313  } else {
314  ATH_MSG_VERBOSE( "ID track pt: " << idtrack->pt());
315  }
316  }
317 
318  if ( !m_force_noMuId && !m_muonSelectionToolBaseline->accept(input)) return StatusCode::SUCCESS;
319 
320  if (input.pt() <= ptcut || std::abs(input.eta()) >= etacut) return StatusCode::SUCCESS;
321 
322  if (m_mubaselinez0>0. && std::abs(acc_z0sinTheta(input))>m_mubaselinez0) return StatusCode::SUCCESS;
323  if (m_mubaselined0sig>0. && std::abs(acc_d0sig(input))>m_mubaselined0sig) return StatusCode::SUCCESS;
324 
325  //--- Do baseline isolation check
326  if ( !( m_muBaselineIso_WP.empty() ) && !( m_isoBaselineTool->accept(input) ) ) return StatusCode::SUCCESS;
327 
328  dec_baseline(input) = true;
329  dec_selected(input) = 2;
330 
331  //disable if (!m_muIso_WP.empty() && m_muIso_WP.find("PLV")!=std::string::npos) ATH_CHECK( m_isoToolLowPtPLV->augmentPLV(input) );
332  if (!m_muIso_WP.empty()) dec_isol(input) = bool(m_isoTool->accept(input));
333  if (!m_muIsoHighPt_WP.empty()) dec_isolHighPt(input) = bool(m_isoHighPtTool->accept(input));
334  dec_passSignalID(input) = bool(m_muonSelectionTool->accept(input));
335 
336  ATH_MSG_VERBOSE("FillMuon: passed baseline selection");
337  return StatusCode::SUCCESS;
338 }
339 
340 
341 bool SUSYObjDef_xAOD::IsSignalMuon(const xAOD::Muon & input, float ptcut, float d0sigcut, float z0cut, float etacut) const
342 {
343  if (!acc_baseline(input)) return false;
344  if (!acc_passSignalID(input)) return false;
345 
346  if (input.pt() <= ptcut || input.pt() == 0) return false; // pT cut (might be necessary for leading muon to pass trigger)
347  if ( etacut==DUMMYDEF ){
348  if(std::abs(input.eta()) > m_muEta ) return false;
349  }
350  else if ( std::abs(input.eta()) > etacut ) return false;
351 
352  if (z0cut > 0.0 && std::abs(acc_z0sinTheta(input)) > z0cut) return false; // longitudinal IP cut
353  if (acc_d0sig(input) != 0) {
354  if (d0sigcut > 0.0 && std::abs(acc_d0sig(input)) > d0sigcut) return false; // transverse IP cut
355  }
356 
357  if (m_doMuIsoSignal) {
358  if ( !( (acc_isol(input) && input.pt()<m_muIsoHighPtThresh) || (acc_isolHighPt(input) && input.pt()>m_muIsoHighPtThresh)) ) return false;
359  ATH_MSG_VERBOSE( "IsSignalMuon: passed isolation");
360  }
361 
362  //set HighPtMuon decoration
364 
365  dec_signal(input) = true;
366 
367  if (m_muId == 4) { //i.e. HighPt muons
368  ATH_MSG_VERBOSE( "IsSignalMuon: mu pt " << input.pt()
369  << " signal? " << static_cast<int>(acc_signal(input))
370  << " isolation? " << static_cast<int>(acc_isol(input))
371  << " passedHighPtCuts? " << static_cast<int>(acc_passedHighPtCuts(input)));
372  } else {
373  ATH_MSG_VERBOSE( "IsSignalMuon: mu pt " << input.pt()
374  << " signal? " << static_cast<int>( acc_signal(input))
375  << " isolation? " << static_cast<int>( acc_isol(input)));
376  // Don't show HighPtFlag ... we didn't set it!
377  }
378 
379  return acc_signal(input);
380 }
381 
382 
384 // See https://indico.cern.ch/event/371499/contribution/1/material/slides/0.pdf and
385 // https://indico.cern.ch/event/397325/contribution/19/material/slides/0.pdf and
386 // https://twiki.cern.ch/twiki/bin/view/Atlas/MuonSelectionTool
387 {
388  if (input.pt() < 3e3){
389  ATH_MSG_DEBUG("No HighPt check supported for muons below 3GeV! False.");
390  dec_passedHighPtCuts(input) = false;
391  return false;
392  }
393 
394  bool isHighPt=false;
395  isHighPt = bool(m_muonSelectionHighPtTool->accept(input));
396  dec_passedHighPtCuts(input) = isHighPt;
397 
398  return isHighPt;
399 }
400 
401 
402 bool SUSYObjDef_xAOD::IsBadMuon(const xAOD::Muon& input, float qopcut) const
403 {
404  const static SG::Decorator<char> dec_bad("bad");
405  dec_bad(input) = false;
406 
407  const static SG::Decorator<char> dec_bad_highPt("bad_highPt");
408  dec_bad_highPt(input) = false;
409 
410  const xAOD::TrackParticle* track;
411  if (input.muonType() == xAOD::Muon::SiliconAssociatedForwardMuon) {
412  track = input.trackParticle(xAOD::Muon::CombinedTrackParticle);
413  if (!track) return false; // don't treat SAF muons without CB track further
414  }
415  else{
416  track = input.primaryTrackParticle();
417  if (!track){
418  ATH_MSG_WARNING("Non-SAF muon without a track; cannot test IsBadMuon criteria");
419  return false;
420  }
421  }
422 
423  float Rerr = Amg::error(track->definingParametersCovMatrix(), 4) / std::abs(track->qOverP());
424  ATH_MSG_VERBOSE( "Track momentum error (%): " << Rerr * 100 );
425  bool isbad = Rerr > qopcut;
426  bool isbadHighPt = Rerr > qopcut;
427 
428  //new recommendation from MCP
430 
431  //new recommendation from MCP (at HighPT)
432  isbadHighPt |= m_muonSelectionHighPtTool->isBadMuon(input);
433 
434  dec_bad(input) = isbad;
435  dec_bad_highPt(input) = isbadHighPt;
436 
437  ATH_MSG_VERBOSE( "MUON isbad?: " << isbad );
438  return isbad;
439 }
440 
441 bool SUSYObjDef_xAOD::IsCosmicMuon(const xAOD::Muon& input, float z0cut, float d0cut) const
442 {
443  dec_cosmic(input) = false;
444 
445  const xAOD::TrackParticle* track(nullptr);
446  if (input.muonType() == xAOD::Muon::SiliconAssociatedForwardMuon) {
447  track = input.trackParticle(xAOD::Muon::CombinedTrackParticle);
448  if (!track){
449  ATH_MSG_VERBOSE("WARNING: SAF muon without CB track found. Not possible to check cosmic muon criteria");
450  return false; // don't treat SAF muons without CB track further
451  }
452  }
453  else {
454  track = input.primaryTrackParticle();
455  if (!track){
456  ATH_MSG_WARNING("Non-SAF muon without primary track particle found. Not possible to check cosmic muon criteria");
457  return false;
458  }
459  }
460 
461  double mu_d0 = track->d0();
462  const xAOD::Vertex* pv = this->GetPrimVtx();
463  double primvertex_z = pv ? pv->z() : 0;
464  double mu_z0_exPV = track->z0() + track->vz() - primvertex_z;
465 
466  bool isCosmicMuon = (std::abs(mu_z0_exPV) >= z0cut || std::abs(mu_d0) >= d0cut);
467 
468  if (isCosmicMuon) {
469  ATH_MSG_VERBOSE("COSMIC PV Z = " << primvertex_z << ", track z0 = " << mu_z0_exPV << ", track d0 = " << mu_d0);
470  }
471 
472  dec_cosmic(input) = isCosmicMuon;
473  return isCosmicMuon;
474 }
475 
476 
477  float SUSYObjDef_xAOD::GetSignalMuonSF(const xAOD::Muon& mu, const bool recoSF, const bool isoSF, const bool doBadMuonHP, const bool warnOVR)
478 {
479  float sf(1.);
480 
481  if (recoSF) {
482  float sf_reco(1.);
484  if(warnOVR) ATH_MSG_WARNING(" GetSignalMuonSF: Reco getEfficiencyScaleFactor out of validity range");
485  }
486  ATH_MSG_VERBOSE( "MuonReco ScaleFactor " << sf_reco );
487  sf *= sf_reco;
488 
489  float sf_ttva(1.);
490  if(m_doTTVAsf){
492  if(warnOVR) ATH_MSG_WARNING(" GetSignalMuonSF: TTVA getEfficiencyScaleFactor out of validity range");
493  }
494  ATH_MSG_VERBOSE( "MuonTTVA ScaleFactor " << sf_ttva );
495  sf *= sf_ttva;
496  }
497 
498  float sf_badHighPt(1.);
499  if(m_muId == 4 && doBadMuonHP){
501  if(warnOVR) ATH_MSG_WARNING(" GetSignalMuonSF: BadMuonHighPt getEfficiencyScaleFactor out of validity range");
502  }
503  ATH_MSG_VERBOSE( "MuonBadMuonHighPt ScaleFactor " << sf_badHighPt );
504  sf *= sf_badHighPt;
505  }
506  }
507 
508 
509  if (isoSF) {
510  float sf_iso(1.);
511  if (acc_isolHighPt(mu) && mu.pt()>m_muIsoHighPtThresh) {
513  if(warnOVR) ATH_MSG_WARNING(" GetSignalMuonSF: high-pt Iso getEfficiencyScaleFactor out of validity range");
514  }
515  } else if (acc_isol(mu) && mu.pt()<m_muIsoHighPtThresh) {
517  if(warnOVR) ATH_MSG_WARNING(" GetSignalMuonSF: Iso getEfficiencyScaleFactor out of validity range");
518  }
519  }
520  ATH_MSG_VERBOSE( "MuonIso ScaleFactor " << sf_iso );
521  sf *= sf_iso;
522  }
523 
524 
525  dec_effscalefact(mu) = sf;
526  return sf;
527 }
528 
529 
530 double SUSYObjDef_xAOD::GetMuonTriggerEfficiency(const xAOD::Muon& mu, const std::string& trigExpr, const bool isdata) {
531 
532  double eff(1.);
533 
535  ATH_MSG_WARNING("Problem retrieving signal muon trigger efficiency for " << trigExpr );
536  }
537  else{
538  ATH_MSG_DEBUG("Got efficiency " << eff << " for " << trigExpr );
539  }
540  return eff;
541 }
542 
543 
544 double SUSYObjDef_xAOD::GetTotalMuonTriggerSF(const xAOD::MuonContainer& sfmuons, const std::string& trigExpr) {
545 
546  if (trigExpr.empty() || sfmuons.empty()) return 1.;
547 
548 
549  double trig_sf = 1.;
550 
551  int mulegs = 0;
552  const char *tmp = trigExpr.c_str();
553  while( (tmp = strstr(tmp, "mu")) ){
554  mulegs++;
555  tmp++;
556  }
557 
558  bool isdimuon = (trigExpr.find("2mu") != std::string::npos);
559  bool isOR = (trigExpr.find("OR") != std::string::npos);
560 
561  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
562  if (m_muonTriggerSFTool->getTriggerScaleFactor( sfmuons, trig_sf, trigExpr ) == CP::CorrectionCode::Ok) {
563  ATH_MSG_DEBUG( "MuonTrig ScaleFactor " << trig_sf );
564  }
565  else{
566  ATH_MSG_DEBUG( "MuonTrig FAILED SOMEHOW");
567  }
568  }
569  else if(mulegs!=2 && isOR){ //Case 2: not supported. Not efficiency defined for (at least) one leg. Sorry...
570  ATH_MSG_WARNING( "SF for " << trigExpr << " are only supported for two muon events!");
571  }
572  else{ //Case 3: let's go the hard way...
573  //Following https://twiki.cern.ch/twiki/bin/view/Atlas/TrigMuonEfficiency
574  std::string newtrigExpr = TString(trigExpr).Copy().ReplaceAll("HLT_2","").Data();
575 
576  //redefine dimuon triggers here (2mu14 --> mu14_mu14)
577  if (isdimuon) { newtrigExpr += "_"+newtrigExpr; }
578  boost::replace_all(newtrigExpr, "HLT_", "");
579  boost::char_separator<char> sep("_");
580 
581  for (const auto& mutrig : boost::tokenizer<boost::char_separator<char>>(newtrigExpr, sep)) {
582  double dataFactor = 1.;
583  double mcFactor = 1.;
584 
585  for (const xAOD::Muon* mu : sfmuons) {
586  // No need for additional trigger matching
587  dataFactor *= (1 - GetMuonTriggerEfficiency(*mu, "HLT_"+mutrig, true));
588  mcFactor *= (1 - GetMuonTriggerEfficiency(*mu, "HLT_"+mutrig, false));
589  }
590  if( (1-mcFactor) > 0. )
591  trig_sf *= (1-dataFactor)/(1-mcFactor);
592  }
593  }
594 
595  return trig_sf;
596 }
597 
598 
599 double SUSYObjDef_xAOD::GetTotalMuonSF(const xAOD::MuonContainer& muons, const bool recoSF, const bool isoSF, const std::string& trigExpr, const bool bmhptSF) {
600  double sf(1.);
601 
603  for (const xAOD::Muon* muon : muons) {
604  if( !acc_passOR(*muon) ) continue;
605  if (acc_signal(*muon)) {
606  sfmuons.push_back(muon);
607  if (recoSF || isoSF) { sf *= this->GetSignalMuonSF(*muon, recoSF, isoSF, bmhptSF); }
608  } else { // decorate baseline muons as well
609  if (recoSF || isoSF) { this->GetSignalMuonSF(*muon, recoSF, isoSF, bmhptSF, false); } //avoid OVR warnings in this case
610  }
611  }
612 
613  sf *= GetTotalMuonTriggerSF(*sfmuons.asDataVector(), trigExpr);
614 
615  return sf;
616 }
617 
618 
619  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) {
620  double sf(1.);
621  //Set the new systematic variation
623  if ( ret != StatusCode::SUCCESS) {
624  ATH_MSG_ERROR("Cannot configure MuonEfficiencyScaleFactors for systematic var. " << systConfig.name() );
625  }
626 
628  if ( ret != StatusCode::SUCCESS) {
629  ATH_MSG_ERROR("Cannot configure MuonBadMuonHighPtScaleFactors for systematic var. " << systConfig.name() );
630  }
631 
633  if ( ret != StatusCode::SUCCESS) {
634  ATH_MSG_ERROR("Cannot configure MuonTTVAEfficiencyScaleFactors for systematic var. " << systConfig.name() );
635  }
636 
638  if ( ret != StatusCode::SUCCESS) {
639  ATH_MSG_ERROR("Cannot configure MuonIsolationScaleFactors for systematic var. " << systConfig.name() );
640  }
641 
643  if ( ret != StatusCode::SUCCESS) {
644  ATH_MSG_ERROR("Cannot configure MuonHighPtIsolationScaleFactors for systematic var. " << systConfig.name() );
645  }
646 
648  if ( ret != StatusCode::SUCCESS) {
649  ATH_MSG_ERROR("Cannot configure MuonTriggerScaleFactors for systematic var. " << systConfig.name() );
650  }
651 
653  if (ret != StatusCode::SUCCESS) {
654  ATH_MSG_ERROR("Cannot configure TrigGlobalEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() );
655  }
656 
658  if (ret != StatusCode::SUCCESS) {
659  ATH_MSG_ERROR("Cannot configure TrigGlobalEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() );
660  }
661 
662  sf = GetTotalMuonSF(muons, recoSF, isoSF, trigExpr, bmhptSF);
663 
664  //Roll back to default
666  if ( ret != StatusCode::SUCCESS) {
667  ATH_MSG_ERROR("Cannot configure MuonEfficiencyScaleFactors back to default.");
668  }
669 
671  if ( ret != StatusCode::SUCCESS) {
672  ATH_MSG_ERROR("Cannot configure MuonBadMuonHighPtScaleFactors back to default.");
673  }
674 
676  if ( ret != StatusCode::SUCCESS) {
677  ATH_MSG_ERROR("Cannot configure MuonTTVAEfficiencyScaleFactors back to default.");
678  }
679 
681  if ( ret != StatusCode::SUCCESS) {
682  ATH_MSG_ERROR("Cannot configure MuonIsolationScaleFactors back to default.");
683  }
684 
686  if ( ret != StatusCode::SUCCESS) {
687  ATH_MSG_ERROR("Cannot configure MuonIsolationScaleFactors back to default.");
688  }
689 
691  if ( ret != StatusCode::SUCCESS) {
692  ATH_MSG_ERROR("Cannot configure MuonTriggerScaleFactors back to default.");
693  }
694 
696  if (ret != StatusCode::SUCCESS) {
697  ATH_MSG_ERROR("Cannot configure TrigGlobalEfficiencyCorrectionTool (trigger) back to default.");
698  }
699 
701  if (ret != StatusCode::SUCCESS) {
702  ATH_MSG_ERROR("Cannot configure TrigGlobalEfficiencyCorrectionTool (trigger) back to default.");
703  }
704 
705  return sf;
706 }
707 
708 }
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:860
ST::SUSYObjDef_xAOD::m_isoHighPtTool
asg::AnaToolHandle< CP::IIsolationSelectionTool > m_isoHighPtTool
Definition: SUSYObjDef_xAOD.h:962
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:383
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:697
ST::SUSYObjDef_xAOD::m_trigGlobalEffCorrTool_multiLep
asg::AnaToolHandle< ITrigGlobalEfficiencyCorrectionTool > m_trigGlobalEffCorrTool_multiLep
Definition: SUSYObjDef_xAOD.h:942
ST::SUSYObjDef_xAOD::prepareLRTMuons
StatusCode prepareLRTMuons(const xAOD::MuonContainer *inMuons, xAOD::MuonContainer *copy) const override final
Definition: Muons.cxx:73
TrackParticlexAODHelpers.h
ST::SUSYObjDef_xAOD::GetTotalMuonTriggerSF
double GetTotalMuonTriggerSF(const xAOD::MuonContainer &sfmuons, const std::string &trigExpr) override final
Definition: Muons.cxx:544
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:861
ST::SUSYObjDef_xAOD::m_muBaselinePt
double m_muBaselinePt
Definition: SUSYObjDef_xAOD.h:696
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:205
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:599
ST::SUSYObjDef_xAOD::IsBadMuon
bool IsBadMuon(const xAOD::Muon &input, const float qopcut) const override final
Definition: Muons.cxx:402
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:961
ST::SUSYObjDef_xAOD::m_muPt
double m_muPt
Definition: SUSYObjDef_xAOD.h:698
ST::SUSYObjDef_xAOD::IsCosmicMuon
bool IsCosmicMuon(const xAOD::Muon &input, const float z0cut, const float d0cut) const override final
Definition: Muons.cxx:441
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:643
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:862
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:702
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:661
SG::ConstAccessor< char >
ST::SUSYObjDef_xAOD::GetPrimVtx
const xAOD::Vertex * GetPrimVtx() const override final
Definition: SUSYObjDef_xAOD.cxx:2877
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:341
ST::SUSYObjDef_xAOD::m_debug
bool m_debug
Definition: SUSYObjDef_xAOD.h:533
ST::SUSYObjDef_xAOD::m_doMuIsoSignal
bool m_doMuIsoSignal
Definition: SUSYObjDef_xAOD.h:787
ST::SUSYObjDef_xAOD::m_muCosmicd0
double m_muCosmicd0
Definition: SUSYObjDef_xAOD.h:706
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:558
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:867
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:934
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:796
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< char >
ST::SUSYObjDef_xAOD::GetMuonTriggerEfficiency
double GetMuonTriggerEfficiency(const xAOD::Muon &mu, const std::string &trigExpr, const bool isdata=false) override final
Definition: Muons.cxx:530
IDTPM::nSCTHits
float nSCTHits(const U &p)
Definition: TrackParametersHelper.h:393
IDTPM::nTRTHits
float nTRTHits(const U &p)
Definition: TrackParametersHelper.h:446
ST::SUSYObjDef_xAOD::m_muonIsolationSFTool
asg::AnaToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonIsolationSFTool
Definition: SUSYObjDef_xAOD.h:863
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:699
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
ST::SUSYObjDef_xAOD::m_muonCalibTool
asg::AnaToolHandle< CP::IMuonCalibrationAndSmearingTool > m_muonCalibTool
Definition: SUSYObjDef_xAOD.h:859
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:664
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:662
xAOD::numberOfSCTHoles
@ numberOfSCTHoles
number of SCT holes [unit8_t].
Definition: TrackingPrimitives.h:270
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
IDTPM::nSCTHoles
float nSCTHoles(const U &p)
Definition: TrackParametersHelper.h:403
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
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:858
ST::SUSYObjDef_xAOD::m_muz0
double m_muz0
Definition: SUSYObjDef_xAOD.h:701
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:666
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:857
ST::SUSYObjDef_xAOD::m_badmuQoverP
double m_badmuQoverP
Definition: SUSYObjDef_xAOD.h:707
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
ST::SUSYObjDef_xAOD::m_outMuonLocation
SG::WriteHandleKey< xAOD::MuonContainer > m_outMuonLocation
Definition: SUSYObjDef_xAOD.h:868
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:705
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:865
ST::SUSYObjDef_xAOD::m_mubaselinez0
double m_mubaselinez0
Definition: SUSYObjDef_xAOD.h:703
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:100
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:477
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:808
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
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
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:709
ST::SUSYObjDef_xAOD::MergeMuons
StatusCode MergeMuons(const xAOD::MuonContainer &muons, const std::vector< bool > &writeMuon, xAOD::MuonContainer *outputCol) const override final
Definition: Muons.cxx:55
ST::SUSYObjDef_xAOD::m_mud0sig
double m_mud0sig
Definition: SUSYObjDef_xAOD.h:700
ST::SUSYObjDef_xAOD::m_muIsoHighPt_WP
std::string m_muIsoHighPt_WP
Definition: SUSYObjDef_xAOD.h:663
ST::SUSYObjDef_xAOD::m_muonHighPtIsolationSFTool
asg::AnaToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonHighPtIsolationSFTool
Definition: SUSYObjDef_xAOD.h:864
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:619
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:856
ST::SUSYObjDef_xAOD::m_isoTool
asg::AnaToolHandle< CP::IIsolationSelectionTool > m_isoTool
Definition: SUSYObjDef_xAOD.h:959