ATLAS Offline Software
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
CP::MuonCalibIntScaleSmearTool Class Referenceabstract

#include <MuonCalibIntScaleSmearTool.h>

Inheritance diagram for CP::MuonCalibIntScaleSmearTool:
Collaboration diagram for CP::MuonCalibIntScaleSmearTool:

Classes

struct  ParameterSetScaleSmear
 

Public Member Functions

 MuonCalibIntScaleSmearTool (const std::string &name)
 
virtual ~MuonCalibIntScaleSmearTool ()=default
 
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
virtual CorrectionCode applyCorrection (MCP::MuonObj &mu) const =0
 Declare the interface that the class provides. More...
 
virtual void print () const =0
 Print the state of the tool. More...
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Types

typedef std::map< MCP::ScaleResCorrection, std::shared_ptr< MCP::CalibContainer > > ScaleSmearCorrConstMap
 

Protected Member Functions

StatusCode calcSystematicVariation (const SystematicSet &systConfig, ParameterSetScaleSmear &param) const
 
std::map< MCP::ScaleSmearParam, double > getConstants (const MCP::TrackCalibObj &trk, const std::map< MCP::ScaleSmearParam, ScaleSmearCorrConstMap > &constants, const std::map< MCP::ScaleSmearParam, double > &direction) const
 
double getCorrectedPt (const MCP::MuonObj &mu, const MCP::TrackCalibObj &trk, const std::map< MCP::ScaleSmearParam, double > &calibConstant) const
 
double getSmearCorr (const MCP::MuonObj &mu, const MCP::TrackCalibObj &trk, double r0, double r1, double r2) const
 
double getCorrectedCBPtWithIDMSComb (const MCP::MuonObj &mu, const std::map< MCP::ScaleSmearParam, double > &calibIDConstant, const std::map< MCP::ScaleSmearParam, double > &calibMEConstant) const
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

SG::ReadHandleKey< xAOD::EventInfom_eventInfo {this, "EventInfoContName", "EventInfo", "event info key"}
 
Gaudi::Property< std::string > m_release {this, "release", "Recs2024_05_06_Run2Run3", "Release"}
 
Gaudi::Property< std::string > m_sysScheme {this, "systematicScheme", "Corr_Scale", "Systematic scheme to be configured"}
 
Gaudi::Property< bool > m_doDirectCBCalib {this, "doDirectCBCalib", true, "Do direct calibration of CB tracks, otherwise, do ID+MS"}
 
SystematicsCache< ParameterSetScaleSmearm_Parameters {this}
 
const ParameterSetScaleSmearm_currentParameters {nullptr}
 
std::map< MCP::DataYear, std::map< MCP::ScaleSmearParam, ScaleSmearCorrConstMap > > m_IDparams
 
std::map< MCP::DataYear, std::map< MCP::ScaleSmearParam, ScaleSmearCorrConstMap > > m_MEparams
 
std::map< MCP::DataYear, std::map< MCP::ScaleSmearParam, ScaleSmearCorrConstMap > > m_CBparams
 
std::map< MCP::DataYear, std::map< MCP::ExpectedResParam, std::shared_ptr< MCP::CalibContainer > > > m_IDExpectedResparams
 
std::map< MCP::DataYear, std::map< MCP::ExpectedResParam, std::shared_ptr< MCP::CalibContainer > > > m_MEExpectedResparams
 

Static Protected Attributes

static constexpr std::array< MCP::ScaleSmearParam, 5 > m_paramList {MCP::ScaleSmearParam::s0, MCP::ScaleSmearParam::s1, MCP::ScaleSmearParam::r0, MCP::ScaleSmearParam::r1, MCP::ScaleSmearParam::r2}
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

virtual ASG_TOOL_CLASS3(MuonCalibIntScaleSmearTool, CP::IMuonCalibIntScaleSmearTool, CP::ISystematicsTool, CP::IReentrantSystematicsTool) public double getExpectedResolution (const int &DetType, double pT, double eta, double phi, MCP::DataYear year, bool isData) const override
 Declare the interface that the class provides. More...
 
virtual bool isAffectedBySystematic (const SystematicVariation &systematic) const override
 Declare the interface that this class provides. More...
 
virtual SystematicSet affectingSystematics () const override
 the list of all systematics this tool can be affected by More...
 
virtual SystematicSet recommendedSystematics () const override
 the list of all systematics this tool recommends to use More...
 
virtual StatusCode applySystematicVariation (const SystematicSet &systConfig) override
 effects: configure this tool for the given list of systematic variations. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 27 of file MuonCalibIntScaleSmearTool.h.

Member Typedef Documentation

◆ ScaleSmearCorrConstMap

Definition at line 71 of file MuonCalibIntScaleSmearTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonCalibIntScaleSmearTool()

CP::MuonCalibIntScaleSmearTool::MuonCalibIntScaleSmearTool ( const std::string &  name)

Definition at line 20 of file MuonCalibIntScaleSmearTool.cxx.

21  {}

◆ ~MuonCalibIntScaleSmearTool()

virtual CP::MuonCalibIntScaleSmearTool::~MuonCalibIntScaleSmearTool ( )
virtualdefault

Member Function Documentation

◆ affectingSystematics()

SystematicSet CP::MuonCalibIntScaleSmearTool::affectingSystematics ( ) const
overrideprivatevirtual

the list of all systematics this tool can be affected by

Scale Systematics

Implements CP::IReentrantSystematicsTool.

Definition at line 273 of file MuonCalibIntScaleSmearTool.cxx.

274  {
275  SystematicSet result;
277  // Resolution systematics
279  if (m_doDirectCBCalib || m_sysScheme == "AllSys") {
280  // CB systematics
281  result.insert(SystematicVariation("MUON_CB", 1));
282  result.insert(SystematicVariation("MUON_CB", -1));
283  }
284  if (!m_doDirectCBCalib || m_sysScheme == "AllSys") {
285  // ID systematics
286  result.insert(SystematicVariation("MUON_ID", 1));
287  result.insert(SystematicVariation("MUON_ID", -1));
288 
289  // MS systematics
290  result.insert(SystematicVariation("MUON_MS", 1));
291  result.insert(SystematicVariation("MUON_MS", -1));
292  }
293 
297  if (m_sysScheme == "Corr_Scale") {
298  result.insert(SystematicVariation("MUON_SCALE", 1));
299  result.insert(SystematicVariation("MUON_SCALE", -1));
300  }
301  else if (m_sysScheme == "Decorr_Scale" || m_sysScheme == "AllSys") {
302  // Either doing direct calib of CB or asking for all the sys
303  if (m_doDirectCBCalib || m_sysScheme == "AllSys") {
304  result.insert(SystematicVariation("MUON_SCALE_CB", 1));
305  result.insert(SystematicVariation("MUON_SCALE_CB", -1));
306 
307  result.insert(SystematicVariation("MUON_SCALE_CB_ELOSS", 1));
308  result.insert(SystematicVariation("MUON_SCALE_CB_ELOSS", -1));
309  }
310 
311  // Either not doing direct calib of CB or asking for all the sys
312  if (!m_doDirectCBCalib || m_sysScheme == "AllSys") {
313  result.insert(SystematicVariation("MUON_SCALE_ID", 1));
314  result.insert(SystematicVariation("MUON_SCALE_ID", -1));
315 
316  result.insert(SystematicVariation("MUON_SCALE_MS", 1));
317  result.insert(SystematicVariation("MUON_SCALE_MS", -1));
318 
319  result.insert(SystematicVariation("MUON_SCALE_MS_ELOSS", 1));
320  result.insert(SystematicVariation("MUON_SCALE_MS_ELOSS", -1));
321  }
322  }
323 
324 
325 
326 
327  return result;
328  }

◆ applyCorrection()

virtual CorrectionCode CP::IMuonCalibIntTool::applyCorrection ( MCP::MuonObj mu) const
pure virtualinherited

Declare the interface that the class provides.

Apply the correction on a modifyable object

◆ applySystematicVariation()

StatusCode CP::MuonCalibIntScaleSmearTool::applySystematicVariation ( const SystematicSet systConfig)
overrideprivatevirtual

effects: configure this tool for the given list of systematic variations.

any requested systematics that are not affecting this tool will be silently ignored (unless they cause other errors). failures: systematic unknown failures: requesting multiple variations on the same systematic (e.g. up & down) failures: requesting an unsupported variation on an otherwise supported systematic (e.g. a 2 sigma variation and the tool only supports 1 sigma variations) failures: unsupported combination of supported systematic failures: other tool specific errors

Implements CP::ISystematicsTool.

Definition at line 462 of file MuonCalibIntScaleSmearTool.cxx.

463  {
464  return m_Parameters.get(systConfig, m_currentParameters);
465  }

◆ calcSystematicVariation()

StatusCode CP::MuonCalibIntScaleSmearTool::calcSystematicVariation ( const SystematicSet systConfig,
ParameterSetScaleSmear param 
) const
protected

Definition at line 332 of file MuonCalibIntScaleSmearTool.cxx.

333  {
339 
345 
351 
352 
353  // ID systematics
354  SystematicVariation syst = systConfig.getSystematicByBaseName("MUON_ID");
355 
356  if (syst == SystematicVariation("MUON_ID", 1)) {
360  } else if (syst == SystematicVariation("MUON_ID", -1)) {
364  } else if (!syst.empty()) return StatusCode::FAILURE;
365 
366  // MS systematics
367  syst = systConfig.getSystematicByBaseName("MUON_MS");
368 
369  if (syst == SystematicVariation("MUON_MS", 1)) {
373  } else if (syst == SystematicVariation("MUON_MS", -1)) {
377  } else if (!syst.empty()) return StatusCode::FAILURE;
378 
379  // CB systematics
380  syst = systConfig.getSystematicByBaseName("MUON_CB");
381 
382  if (syst == SystematicVariation("MUON_CB", 1)) {
386  } else if (syst == SystematicVariation("MUON_CB", -1)) {
390  } else if (!syst.empty()) return StatusCode::FAILURE;
391 
392  // Scale systematics
393  syst = systConfig.getSystematicByBaseName("MUON_SCALE");
394 
395  if (syst == SystematicVariation("MUON_SCALE", 1)) {
398 
401 
404 
405  } else if (syst == SystematicVariation("MUON_SCALE", -1)) {
408 
411 
414  } else if (!syst.empty()) return StatusCode::FAILURE;
415 
416  // Split scale ID/MS/EGloss
417  syst = systConfig.getSystematicByBaseName("MUON_SCALE_ID");
418 
419  if (syst == SystematicVariation("MUON_SCALE_ID", 1)) {
422  } else if (syst == SystematicVariation("MUON_SCALE_ID", -1)) {
425  } else if (!syst.empty()) return StatusCode::FAILURE;
426 
427  syst = systConfig.getSystematicByBaseName("MUON_SCALE_MS");
428 
429  if (syst == SystematicVariation("MUON_SCALE_MS", 1)) {
431  } else if (syst == SystematicVariation("MUON_SCALE_MS", -1)) {
433  } else if (!syst.empty()) return StatusCode::FAILURE;
434 
435  syst = systConfig.getSystematicByBaseName("MUON_SCALE_MS_ELOSS");
436 
437  if (syst == SystematicVariation("MUON_SCALE_MS_ELOSS", 1)) {
439  } else if (syst == SystematicVariation("MUON_SCALE_MS_ELOSS", -1)) {
441  } else if (!syst.empty()) return StatusCode::FAILURE;
442 
443  syst = systConfig.getSystematicByBaseName("MUON_SCALE_CB");
444 
445  if (syst == SystematicVariation("MUON_SCALE_CB", 1)) {
447  } else if (syst == SystematicVariation("MUON_SCALE_CB", -1)) {
449  } else if (!syst.empty()) return StatusCode::FAILURE;
450 
451  syst = systConfig.getSystematicByBaseName("MUON_SCALE_CB_ELOSS");
452 
453  if (syst == SystematicVariation("MUON_SCALE_CB_ELOSS", 1)) {
455  } else if (syst == SystematicVariation("MUON_SCALE_CB_ELOSS", -1)) {
457  } else if (!syst.empty()) return StatusCode::FAILURE;
458 
459  return StatusCode::SUCCESS;
460  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getConstants()

std::map< MCP::ScaleSmearParam, double > CP::MuonCalibIntScaleSmearTool::getConstants ( const MCP::TrackCalibObj trk,
const std::map< MCP::ScaleSmearParam, ScaleSmearCorrConstMap > &  constants,
const std::map< MCP::ScaleSmearParam, double > &  direction 
) const
protected

Definition at line 108 of file MuonCalibIntScaleSmearTool.cxx.

109  {
110 
111  std::map<MCP::ScaleSmearParam, double> calibConstants;
112 
113  // Extra the constants from container into a simple map
114  for(const auto& param: m_paramList)
115  {
116  const auto & contantList = constants.at(param);
117 
118  double val = contantList.at(MCP::ScaleResCorrection::Nominal)->getCalibConstant(trk);
119  if(direction.at(param) == MCP::SystVariation::Up)
120  {
121  val += contantList.at(MCP::ScaleResCorrection::SystErr__1up)->getCalibConstant(trk);
122  }
123  else if (direction.at(param) == MCP::SystVariation::Down)
124  {
125  val -= contantList.at(MCP::ScaleResCorrection::SystErr__1down)->getCalibConstant(trk);
126  }
127 
128  // Remove unphysical smearing
130  {
131  val = std::max(0.0, val);
132  }
133 
134  calibConstants[param] = val;
135  }
136 
137  return calibConstants;
138  }

◆ getCorrectedCBPtWithIDMSComb()

double CP::MuonCalibIntScaleSmearTool::getCorrectedCBPtWithIDMSComb ( const MCP::MuonObj mu,
const std::map< MCP::ScaleSmearParam, double > &  calibIDConstant,
const std::map< MCP::ScaleSmearParam, double > &  calibMEConstant 
) const
protected

Definition at line 178 of file MuonCalibIntScaleSmearTool.cxx.

179  {
180  // calculate the relative of ID and ME for the corrections
181  double weightID = 0.5;
182  double weightME = 0.5;
183 
184  double deltaCBME = mu.CB.calib_pt - mu.ME.calib_pt;
185  double deltaCBID = mu.CB.calib_pt - mu.ID.calib_pt;
186 
187  if (mu.ME.calib_pt == 0)
188  {
189  weightID = 1.0;
190  weightME = 0.0;
191  }
192  else if (mu.ID.calib_pt == 0)
193  {
194  weightID = 0.0;
195  weightME = 1.0;
196  }
197  else if (mu.CB.calib_pt != 0)
198  {
199  if (std::abs(deltaCBME) > 0 || std::abs(deltaCBID) > 0)
200  {
201  double R = 1, Rplus = 1;
202  if (std::abs(deltaCBME) == std::abs(deltaCBID))
203  {
204  // do nothing
205  }
206  else if (std::abs(deltaCBME) != 0 &&
207  std::abs(deltaCBME) > std::abs(deltaCBID)) {
208  R = (-deltaCBID) / deltaCBME; /* R~wMS/wID */
209  Rplus = 1 + R;
210  if (Rplus != 0 && R > 0) {
211  weightID = 1 / Rplus;
212  weightME = R / Rplus;
213  }
214  }
215  else if (std::abs(deltaCBID) != 0 &&
216  std::abs(deltaCBME) < std::abs(deltaCBID)) {
217  R = (-deltaCBME) / (deltaCBID); /* R~wID/wMS */
218  Rplus = 1 + R;
219  if (Rplus != 0 && R > 0) {
220  weightID = R / Rplus;
221  weightME = 1 / Rplus;
222  }
223  }
224  }
225  }
226  // If no correction was found
227  if(weightID == 0.5 && weightME == 0.5)
228  {
229  double wME = mu.ME.calib_pt / mu.CB.calib_pt / std::pow(mu.expectedPercentResME, 2);
230  double wID = mu.ID.calib_pt / mu.CB.calib_pt / std::pow(mu.expectedPercentResID, 2);
231  weightID = wID / (wME + wID);
232  weightME = wME / (wME + wID);
233  }
234 
235 
236  // Calculate the denominator for the scale correction
237  double smearIDCorr = getSmearCorr(mu, mu.ID, calibIDConstant.at(MCP::ScaleSmearParam::r0), calibIDConstant.at(MCP::ScaleSmearParam::r1), calibIDConstant.at(MCP::ScaleSmearParam::r2));
238  double smearMECorr = getSmearCorr(mu, mu.ME, calibMEConstant.at(MCP::ScaleSmearParam::r0), calibMEConstant.at(MCP::ScaleSmearParam::r1), calibMEConstant.at(MCP::ScaleSmearParam::r2));
239  double smearCorr = weightID * smearIDCorr + weightME * smearMECorr;
240  double scaleCB = 0;
241 
242  // apply the full correction
243  if(weightID == 0) scaleCB = (calibMEConstant.at(MCP::ScaleSmearParam::s1) + calibMEConstant.at(MCP::ScaleSmearParam::s0) / mu.ME.calib_pt) * weightME;
244  else if(weightME == 0) scaleCB = calibIDConstant.at(MCP::ScaleSmearParam::s1) * weightID ;
245  else scaleCB = (calibIDConstant.at(MCP::ScaleSmearParam::s1) * weightID + (calibMEConstant.at(MCP::ScaleSmearParam::s1) + calibMEConstant.at(MCP::ScaleSmearParam::s0) / mu.ME.calib_pt) * weightME);
246 
247  ATH_MSG_VERBOSE("mu.ID.calib_pt: "<<mu.ID.calib_pt);
248  ATH_MSG_VERBOSE("mu.ME.calib_pt: "<<mu.ME.calib_pt);
249  ATH_MSG_VERBOSE("mu.CB.calib_pt: "<<mu.CB.calib_pt);
250  ATH_MSG_VERBOSE("mu.expectedPercentResME: "<<mu.expectedPercentResME);
251  ATH_MSG_VERBOSE("mu.expectedPercentResID: "<<mu.expectedPercentResID);
252 
253  ATH_MSG_VERBOSE("weightID: "<<weightID);
254  ATH_MSG_VERBOSE("weightME: "<<weightME);
255  ATH_MSG_VERBOSE("smearIDCorr: "<<smearIDCorr);
256  ATH_MSG_VERBOSE("smearMECorr: "<<smearMECorr);
257  ATH_MSG_VERBOSE("smearCorr: "<<smearCorr);
258  ATH_MSG_VERBOSE("scaleCB: "<<scaleCB);
259 
260  double pT = mu.CB.calib_pt;
261  double corrpT = (pT + pT * scaleCB)/(1 + smearCorr);
262 
263  return corrpT;
264  }

◆ getCorrectedPt()

double CP::MuonCalibIntScaleSmearTool::getCorrectedPt ( const MCP::MuonObj mu,
const MCP::TrackCalibObj trk,
const std::map< MCP::ScaleSmearParam, double > &  calibConstant 
) const
protected

Definition at line 141 of file MuonCalibIntScaleSmearTool.cxx.

142  {
143  if(trk.calib_pt == 0) return 0;
144 
145  // For debugging:: Todo add checking if in verbose mode
146  ATH_MSG_VERBOSE("MuonType: "<<MCP::toString(trk.type));
147  for(const auto& var: calibConstant) ATH_MSG_VERBOSE("var: "<<MCP::toString(var.first)<<" = "<<var.second);
148 
149  double pT = trk.calib_pt;
150 
151  // Calculate the denominator for the scale correction
152  double smearCorr = getSmearCorr(mu, trk, calibConstant.at(MCP::ScaleSmearParam::r0), calibConstant.at(MCP::ScaleSmearParam::r1), calibConstant.at(MCP::ScaleSmearParam::r2));
153  ATH_MSG_VERBOSE("smearCorr: "<<smearCorr);
154 
155  // apply the full correction
156  double corrpT = (pT + pT * calibConstant.at(MCP::ScaleSmearParam::s1) + calibConstant.at(MCP::ScaleSmearParam::s0))/(1 + smearCorr);
157 
158  return corrpT;
159  }

◆ getExpectedResolution()

double CP::MuonCalibIntScaleSmearTool::getExpectedResolution ( const int &  DetType,
double  pT,
double  eta,
double  phi,
MCP::DataYear  year,
bool  addMCCorrectionSmearing 
) const
overrideprivatevirtual

Declare the interface that the class provides.

Apply the correction on a modifyable object

Implements CP::IMuonCalibIntScaleSmearTool.

Definition at line 468 of file MuonCalibIntScaleSmearTool.cxx.

469  {
470 
471  const auto & IDcorrConstants = m_IDparams.at(year);
472  const auto & MEcorrConstants = m_MEparams.at(year);
473  const auto & IDExpectedResConstants = m_IDExpectedResparams.at(year);
474  const auto & MEExpectedResConstants = m_MEExpectedResparams.at(year);
475 
478 
479  auto trk = MCP::TrackCalibObj(type, pT * GeVtoMeV, eta, phi, year, false);
480 
481 
482  double expRes = 0.;
484  {
485  if (pT == 0) return 1e12;
486 
487  double p0 = 0;
488  double p1 = 0;
489  double p2 = 0;
490 
491  if(!addMCCorrectionSmearing)
492  {
493  p0 = MEExpectedResConstants.at(MCP::ExpectedResParam::r0)->getCalibConstant(trk);
494  p1 = MEExpectedResConstants.at(MCP::ExpectedResParam::r1)->getCalibConstant(trk);
495  p2 = MEExpectedResConstants.at(MCP::ExpectedResParam::r2)->getCalibConstant(trk);
496  }
497  else
498  {
499  double expectedP0 = MEExpectedResConstants.at(MCP::ExpectedResParam::r0)->getCalibConstant(trk);
500  double expectedP1 = MEExpectedResConstants.at(MCP::ExpectedResParam::r1)->getCalibConstant(trk);
501  double expectedP2 = MEExpectedResConstants.at(MCP::ExpectedResParam::r2)->getCalibConstant(trk);
502 
503  double r0 = MEcorrConstants.at(MCP::ScaleSmearParam::r0).at(MCP::ScaleResCorrection::Nominal)->getCalibConstant(trk);
504  double r1 = MEcorrConstants.at(MCP::ScaleSmearParam::r1).at(MCP::ScaleResCorrection::Nominal)->getCalibConstant(trk);
505  double r2 = MEcorrConstants.at(MCP::ScaleSmearParam::r2).at(MCP::ScaleResCorrection::Nominal)->getCalibConstant(trk);
506 
507  p0 = std::sqrt(std::pow(expectedP0, 2) + std::pow(r0, 2));
508  p1 = std::sqrt(std::pow(expectedP1, 2) + std::pow(r1, 2));
509  p2 = std::sqrt(std::pow(expectedP2, 2) + std::pow(r2, 2));
510  }
511 
512  expRes = std::sqrt(std::pow(p0 / pT, 2) + std::pow(p1, 2) + std::pow(p2 * pT, 2));
513 
514  }
515  else if (DetType == MCP::DetectorType::ID)
516  {
517  if (pT == 0) return 1e12;
518 
519  double p1 = 0;
520  double p2 = 0;
521 
522  if(!addMCCorrectionSmearing)
523  {
524  p1 = IDExpectedResConstants.at(MCP::ExpectedResParam::r1)->getCalibConstant(trk);
525  p2 = IDExpectedResConstants.at(MCP::ExpectedResParam::r2)->getCalibConstant(trk);
526  double p2Tan = IDExpectedResConstants.at(MCP::ExpectedResParam::r2tan2)->getCalibConstant(trk);
527  if(p2Tan) p2 = p2Tan;
528  }
529  else
530  {
531  double expectedP1 = IDExpectedResConstants.at(MCP::ExpectedResParam::r1)->getCalibConstant(trk);
532  double expectedP2 = IDExpectedResConstants.at(MCP::ExpectedResParam::r2)->getCalibConstant(trk);
533  double p2Tan = IDExpectedResConstants.at(MCP::ExpectedResParam::r2tan2)->getCalibConstant(trk);
534  if(p2Tan) expectedP2 = p2Tan;
535 
536  double r1 = IDcorrConstants.at(MCP::ScaleSmearParam::r1).at(MCP::ScaleResCorrection::Nominal)->getCalibConstant(trk);
537  double r2 = IDcorrConstants.at(MCP::ScaleSmearParam::r2).at(MCP::ScaleResCorrection::Nominal)->getCalibConstant(trk);
538 
539  p1 = std::sqrt(std::pow(expectedP1, 2) + std::pow(r1, 2));
540  p2 = std::sqrt(std::pow(expectedP2, 2) + std::pow(r2, 2));
541 
542  if(p2Tan) p2 = p2 * std::sinh(eta) * std::sinh(eta);
543  }
544 
545  expRes = std::sqrt(std::pow(p1, 2) + std::pow(p2 * pT, 2));
546  return expRes;
547  }
548  else
549  {
550  ATH_MSG_ERROR("wrong DetType in input " << DetType);
551  return 0.;
552  }
553 
554  return expRes;
555  }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ getSmearCorr()

double CP::MuonCalibIntScaleSmearTool::getSmearCorr ( const MCP::MuonObj mu,
const MCP::TrackCalibObj trk,
double  r0,
double  r1,
double  r2 
) const
protected

Definition at line 161 of file MuonCalibIntScaleSmearTool.cxx.

162  {
163  if(trk.calib_pt == 0) return 1;
164 
165  double pT = trk.calib_pt;
166  if(trk.type == MCP::TrackType::ID)
167  {
168  // ID applies a tan(theta) correction for r2 for high eta muons
169  double additional_weight = 1.;
170  if (std::abs(trk.eta) > 2) additional_weight = sinh(trk.eta);
171 
172  return r1 * mu.rnd_g3 + r2 * mu.rnd_g4 * pT * additional_weight;
173  }
174  return r0 * mu.rnd_g0 / pT + r1 * mu.rnd_g1 + r2 * mu.rnd_g2 * pT;
175  }

◆ initialize()

StatusCode CP::MuonCalibIntScaleSmearTool::initialize ( )
overridevirtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented from asg::AsgTool.

Definition at line 23 of file MuonCalibIntScaleSmearTool.cxx.

24  {
25  // Greet the user:
26  ATH_MSG_INFO("Initializing MuonCalibIntScaleSmearTool");
27 
28  // Get the m_eventinfo container
30 
31 
32  // Load the constants
33  for(const auto & year: MCP::dataYearList)
34  {
35  for(const auto & param: m_paramList)
36  {
40  }
41 
44  }
45 
46 
47  m_currentParameters = nullptr;
48  // Init the systematics
49  m_Parameters.initialize(affectingSystematics(), [this](const SystematicSet &systConfig, ParameterSetScaleSmear &param)
50  { return calcSystematicVariation(systConfig, param); });
51  if (!applySystematicVariation(SystematicSet()))
52  {
53  ATH_MSG_ERROR("Unable to run with no systematic");
54  return StatusCode::FAILURE;
55  }
56  SystematicRegistry &registry = SystematicRegistry::getInstance();
57  if (registry.registerSystematics(*this) != StatusCode::SUCCESS)
58  {
59  ATH_MSG_ERROR("Unkown systematic list");
60  return StatusCode::FAILURE;
61  }
62  // Return gracefully:
63  return StatusCode::SUCCESS;
64  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isAffectedBySystematic()

bool CP::MuonCalibIntScaleSmearTool::isAffectedBySystematic ( const SystematicVariation systematic) const
overrideprivatevirtual

Declare the interface that this class provides.

returns: whether this tool is affected by the given systematics

Implements CP::ISystematicsTool.

Definition at line 267 of file MuonCalibIntScaleSmearTool.cxx.

268  {
269  SystematicSet sys = affectingSystematics();
270  return sys.find(systematic) != sys.end();
271  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ print() [1/2]

void asg::AsgTool::print ( ) const
virtualinherited

◆ print() [2/2]

virtual void asg::IAsgTool::print ( ) const
pure virtualinherited

◆ recommendedSystematics()

SystematicSet CP::MuonCalibIntScaleSmearTool::recommendedSystematics ( ) const
overrideprivatevirtual

the list of all systematics this tool recommends to use

Implements CP::IReentrantSystematicsTool.

Definition at line 330 of file MuonCalibIntScaleSmearTool.cxx.

330 { return affectingSystematics(); }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_CBparams

std::map<MCP::DataYear, std::map<MCP::ScaleSmearParam, ScaleSmearCorrConstMap> > CP::MuonCalibIntScaleSmearTool::m_CBparams
protected

Definition at line 90 of file MuonCalibIntScaleSmearTool.h.

◆ m_currentParameters

const ParameterSetScaleSmear* CP::MuonCalibIntScaleSmearTool::m_currentParameters {nullptr}
protected

Definition at line 85 of file MuonCalibIntScaleSmearTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doDirectCBCalib

Gaudi::Property<bool> CP::MuonCalibIntScaleSmearTool::m_doDirectCBCalib {this, "doDirectCBCalib", true, "Do direct calibration of CB tracks, otherwise, do ID+MS"}
protected

Definition at line 69 of file MuonCalibIntScaleSmearTool.h.

◆ m_eventInfo

SG::ReadHandleKey<xAOD::EventInfo> CP::MuonCalibIntScaleSmearTool::m_eventInfo {this, "EventInfoContName", "EventInfo", "event info key"}
protected

Definition at line 60 of file MuonCalibIntScaleSmearTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_IDExpectedResparams

std::map<MCP::DataYear, std::map<MCP::ExpectedResParam, std::shared_ptr<MCP::CalibContainer> > > CP::MuonCalibIntScaleSmearTool::m_IDExpectedResparams
protected

Definition at line 94 of file MuonCalibIntScaleSmearTool.h.

◆ m_IDparams

std::map<MCP::DataYear, std::map<MCP::ScaleSmearParam, ScaleSmearCorrConstMap> > CP::MuonCalibIntScaleSmearTool::m_IDparams
protected

Definition at line 88 of file MuonCalibIntScaleSmearTool.h.

◆ m_MEExpectedResparams

std::map<MCP::DataYear, std::map<MCP::ExpectedResParam, std::shared_ptr<MCP::CalibContainer> > > CP::MuonCalibIntScaleSmearTool::m_MEExpectedResparams
protected

Definition at line 95 of file MuonCalibIntScaleSmearTool.h.

◆ m_MEparams

std::map<MCP::DataYear, std::map<MCP::ScaleSmearParam, ScaleSmearCorrConstMap> > CP::MuonCalibIntScaleSmearTool::m_MEparams
protected

Definition at line 89 of file MuonCalibIntScaleSmearTool.h.

◆ m_Parameters

SystematicsCache<ParameterSetScaleSmear> CP::MuonCalibIntScaleSmearTool::m_Parameters {this}
protected

Definition at line 84 of file MuonCalibIntScaleSmearTool.h.

◆ m_paramList

constexpr std::array<MCP::ScaleSmearParam,5> CP::MuonCalibIntScaleSmearTool::m_paramList {MCP::ScaleSmearParam::s0, MCP::ScaleSmearParam::s1, MCP::ScaleSmearParam::r0, MCP::ScaleSmearParam::r1, MCP::ScaleSmearParam::r2}
staticconstexprprotected

Definition at line 97 of file MuonCalibIntScaleSmearTool.h.

◆ m_release

Gaudi::Property<std::string> CP::MuonCalibIntScaleSmearTool::m_release {this, "release", "Recs2024_05_06_Run2Run3", "Release"}
protected

Definition at line 63 of file MuonCalibIntScaleSmearTool.h.

◆ m_sysScheme

Gaudi::Property<std::string> CP::MuonCalibIntScaleSmearTool::m_sysScheme {this, "systematicScheme", "Corr_Scale", "Systematic scheme to be configured"}
protected

Definition at line 66 of file MuonCalibIntScaleSmearTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.Dso.registry
registry
Definition: Control/AthenaServices/python/Dso.py:159
CalculateHighPtTerm.pT
pT
Definition: ICHEP2016/CalculateHighPtTerm.py:57
beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
CP::MuonCalibIntScaleSmearTool::applySystematicVariation
virtual StatusCode applySystematicVariation(const SystematicSet &systConfig) override
effects: configure this tool for the given list of systematic variations.
Definition: MuonCalibIntScaleSmearTool.cxx:462
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
MCP::ScaleResCorrection::Nominal
@ Nominal
MCP::CalibInitializer::createExpectedResMap
std::map< ExpectedResParam, std::shared_ptr< CalibContainer > > createExpectedResMap(DataYear dataYear, TrackType type, const std::string &recommendationPath)
Definition: CalibInitializer.cxx:73
get_generator_info.result
result
Definition: get_generator_info.py:21
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
max
#define max(a, b)
Definition: cfImp.cxx:41
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CP::MuonCalibIntScaleSmearTool::m_doDirectCBCalib
Gaudi::Property< bool > m_doDirectCBCalib
Definition: MuonCalibIntScaleSmearTool.h:69
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CP::MuonCalibIntScaleSmearTool::affectingSystematics
virtual SystematicSet affectingSystematics() const override
the list of all systematics this tool can be affected by
Definition: MuonCalibIntScaleSmearTool.cxx:273
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
MCP::ScaleSmearParam::s0
@ s0
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
MCP::ScaleSmearParam::r2
@ r2
python.AtlRunQueryAMI.year
year
Definition: AtlRunQueryAMI.py:226
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
CP::MuonCalibIntScaleSmearTool::m_currentParameters
const ParameterSetScaleSmear * m_currentParameters
Definition: MuonCalibIntScaleSmearTool.h:85
MCP::ExpectedResParam::r1
@ r1
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
CP::MuonCalibIntScaleSmearTool::m_MEparams
std::map< MCP::DataYear, std::map< MCP::ScaleSmearParam, ScaleSmearCorrConstMap > > m_MEparams
Definition: MuonCalibIntScaleSmearTool.h:89
MCP::ExpectedResParam::r0
@ r0
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
MCP::ExpectedResParam::r2
@ r2
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
MCP::toString
std::string toString(TrackType trkType)
Definition: EnumDef.h:39
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MCP::ScaleSmearParam::s1
@ s1
MCP::ScaleResCorrection::SystErr__1down
@ SystErr__1down
CP::MuonCalibIntScaleSmearTool::m_IDparams
std::map< MCP::DataYear, std::map< MCP::ScaleSmearParam, ScaleSmearCorrConstMap > > m_IDparams
Definition: MuonCalibIntScaleSmearTool.h:88
TRT_PAI_physicsConstants::r0
const double r0
electron radius{cm}
Definition: TRT_PAI_physicsConstants.h:20
CP::MuonCalibIntScaleSmearTool::m_release
Gaudi::Property< std::string > m_release
Definition: MuonCalibIntScaleSmearTool.h:63
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
MCP::DetectorType::MS
@ MS
Definition: EnumDef.h:37
MCP::SystVariation::Up
@ Up
Definition: EnumDef.h:73
MCP::TrackCalibObj::eta
const double eta
Value of the track-eta.
Definition: MuonObj.h:104
CP::MuonCalibIntScaleSmearTool::m_IDExpectedResparams
std::map< MCP::DataYear, std::map< MCP::ExpectedResParam, std::shared_ptr< MCP::CalibContainer > > > m_IDExpectedResparams
Definition: MuonCalibIntScaleSmearTool.h:94
MCP::ScaleResCorrection::SystErr__1up
@ SystErr__1up
MCP::CalibInitializer::createScaleResCorrMap
std::map< ScaleResCorrection, std::shared_ptr< CalibContainer > > createScaleResCorrMap(DataYear dataYear, TrackType type, const std::string &recommendationPath, ScaleSmearParam param)
Definition: CalibInitializer.cxx:40
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
CP::MuonCalibIntScaleSmearTool::m_eventInfo
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
Definition: MuonCalibIntScaleSmearTool.h:60
MCP::TrackCalibObj::type
const TrackType type
Flag telling the code whether this is CB/ME/ID.
Definition: MuonObj.h:96
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
CP::MuonCalibIntScaleSmearTool::getSmearCorr
double getSmearCorr(const MCP::MuonObj &mu, const MCP::TrackCalibObj &trk, double r0, double r1, double r2) const
Definition: MuonCalibIntScaleSmearTool.cxx:161
MCP::SystVariation::Default
@ Default
Definition: EnumDef.h:73
MCP::ExpectedResParam::r2tan2
@ r2tan2
MCP::TrackCalibObj::calib_pt
double calib_pt
Smeared track pt.
Definition: MuonObj.h:102
CP::MuonCalibIntScaleSmearTool::m_sysScheme
Gaudi::Property< std::string > m_sysScheme
Definition: MuonCalibIntScaleSmearTool.h:66
MCP::TrackType::CB
@ CB
CP::MuonCalibIntScaleSmearTool::m_CBparams
std::map< MCP::DataYear, std::map< MCP::ScaleSmearParam, ScaleSmearCorrConstMap > > m_CBparams
Definition: MuonCalibIntScaleSmearTool.h:90
a
TList * a
Definition: liststreamerinfos.cxx:10
CP::MuonCalibIntScaleSmearTool::m_paramList
static constexpr std::array< MCP::ScaleSmearParam, 5 > m_paramList
Definition: MuonCalibIntScaleSmearTool.h:97
h
MCP::ScaleSmearParam::r0
@ r0
CP::MuonCalibIntScaleSmearTool::m_Parameters
SystematicsCache< ParameterSetScaleSmear > m_Parameters
Definition: MuonCalibIntScaleSmearTool.h:84
constants
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:1
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CP::MuonCalibIntScaleSmearTool::m_MEExpectedResparams
std::map< MCP::DataYear, std::map< MCP::ExpectedResParam, std::shared_ptr< MCP::CalibContainer > > > m_MEExpectedResparams
Definition: MuonCalibIntScaleSmearTool.h:95
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
CP::MuonCalibIntScaleSmearTool::calcSystematicVariation
StatusCode calcSystematicVariation(const SystematicSet &systConfig, ParameterSetScaleSmear &param) const
Definition: MuonCalibIntScaleSmearTool.cxx:332
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
MCP::SystVariation::Down
@ Down
Definition: EnumDef.h:73
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
DetType
Definition: DetType.h:10
MCP::ScaleSmearParam::r1
@ r1
SG::DataProxy
Definition: DataProxy.h:44
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
MCP::TrackCalibObj
Basic object to cache all relevant information from the track.
Definition: MuonObj.h:21
MCP::DetectorType::ID
@ ID
Definition: EnumDef.h:37
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
MCP::TrackType
TrackType
Definition: EnumDef.h:13
MCP::TrackType::ME
@ ME
TRTCalib_cfilter.p0
p0
Definition: TRTCalib_cfilter.py:129
fitman.k
k
Definition: fitman.py:528
CP::SystematicRegistry::getInstance
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.
Definition: SystematicRegistry.cxx:25
MCP::TrackType::ID
@ ID