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

#include <MuonCalibTool.h>

Inheritance diagram for CP::MuonCalibTool:
Collaboration diagram for CP::MuonCalibTool:

Public Member Functions

 MuonCalibTool (const std::string &name)
 
virtual ~MuonCalibTool ()=default
 
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function. 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 Member Functions

MCP::MuonObj convertToMuonObj (const xAOD::Muon &mu) const
 
MCP::MuonObj convertToMuonObj (const xAOD::TrackParticle &inTrk, const int DetType) const
 
void initializeRandNumbers (MCP::MuonObj &obj) const
 Decorate all information that's needed to ensure reproducibility of the smearing. More...
 
MCP::DataYear getPeriod (bool isData) 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< bool > m_isRun3 {this, "IsRun3Geo", false, "Needed for MuonSelectionTool"}
 
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_validationMode {this, "expert_validationMode", false, "Expert only option. Puts the tool in the validation mode setup"}
 
Gaudi::Property< bool > m_expertMode_isData {this, "expertMode_isData", false, "Expert only option. Overwrites the isData Flag"}
 
Gaudi::Property< int > m_expertMode_RunNumber {this, "expertMode_RunNumber", 0, "Expert only option. Overwrites RunNumber"}
 
Gaudi::Property< unsigned long long > m_expertMode_EvtNumber {this, "expertMode_EvtNumber", 0, "Expert only option. Overwrites EventNumber"}
 
Gaudi::Property< bool > m_useRndRun {this, "useRandomRunNumber", false, "To use the random run number for deciding which calibration to apply"}
 
Gaudi::Property< int > m_calibMode {this, "calibMode", -1, "Calib mode"}
 
Gaudi::Property< bool > m_excludeNSWFromPrecisionLayers {this, "ExcludeNSWFromPrecisionLayers", false, "Cut on the number of precision layers ignores the NSW"}
 
Gaudi::Property< bool > m_doDirectCBCalib {this, "doDirectCBCalib", true, "Do direct calibration of CB tracks, otherwise, do ID+MS"}
 
Gaudi::Property< bool > m_doEtaSagittaSys {this, "doEtaSagittaSys", false, "Do Eta dependant systematic system"}
 
Gaudi::Property< bool > m_applyCorrectionOnData {this, "applyCorrectionOnData", true, "If to apply sagitta corrections on data, or take the full effect as systematic"}
 
Gaudi::Property< bool > m_2stations_highpt_smearing {this, "do2StationsHighPt", false, "Extra smearing to be applied if high pT WP is used"}
 
Gaudi::Property< bool > m_extra_highpt_smearing {this, "doExtraSmearing", false, "Flag provided to test if analysis are sensitive to high pT calibration. NOT TO BE USED FOR RESULTS. Please see twiki"}
 
Gaudi::Property< float > m_HighPtSystThreshold {this, "HighPtSystThr", 300.0, "Thershold for high pT smearing in GeV"}
 
asg::AnaToolHandle< CP::IMuonSelectionToolm_MuonSelectionTool {""}
 
asg::AnaToolHandle< CP::IMuonCalibIntToolm_MuonIntSagittaTool {""}
 
asg::AnaToolHandle< CP::IMuonCalibIntScaleSmearToolm_MuonIntScaleSmearTool {""}
 
asg::AnaToolHandle< CP::IMuonCalibIntToolm_MuonIntHighTSmearTool {""}
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

virtual ASG_TOOL_CLASS3(MuonCalibTool, CP::IMuonCalibrationAndSmearingTool, CP::ISystematicsTool, CP::IReentrantSystematicsTool) public CorrectionCode applyCorrection (xAOD::Muon &mu) const override
 Declare the interface that the class provides. More...
 
virtual CorrectionCode correctedCopy (const xAOD::Muon &input, xAOD::Muon *&output) const override
 Create a corrected copy from a constant muon. 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...
 
virtual double expectedResolution (const std::string &DetType, const xAOD::Muon &mu, const bool addMCCorrectionSmearing) const override
 Get the expected pT resolution. More...
 
virtual double expectedResolution (const int &DetType, const xAOD::Muon &mu, const bool addMCCorrectionSmearing) const override
 Get the expected pT resolution - int argument is more efficient. More...
 
virtual CorrectionCode applyCorrectionTrkOnly (xAOD::TrackParticle &inTrk, const int DetType) const override
 
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

bool m_MuonIntHighTSmearToolInitialized {false}
 
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 24 of file MuonCalibTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonCalibTool()

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

These properties are meant to be expert properties for debugging of the code and shall not touched by the common

Definition at line 18 of file MuonCalibTool.cxx.

18  : asg::AsgTool(name){
19 
21  m_MuonSelectionTool.declarePropertyFor(this,"MuonSelectionTool", "Instance of the MuonSelectionTool needed for the HighPt categorization");
22  m_MuonIntSagittaTool.declarePropertyFor(this, "SagittaTool", "Instance of the Sagitta bias corrections sub tool");
23  m_MuonIntScaleSmearTool.declarePropertyFor(this, "ScaleAndSmearTool", "Instance of the tool that applies the smearing & scale corrections");
24  m_MuonIntHighTSmearTool.declarePropertyFor(this, "HighPtSmearingTool", "Extra smearing of the high pt working point");
25  }

◆ ~MuonCalibTool()

virtual CP::MuonCalibTool::~MuonCalibTool ( )
virtualdefault

Member Function Documentation

◆ affectingSystematics()

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

the list of all systematics this tool can be affected by

Implements CP::IReentrantSystematicsTool.

Definition at line 289 of file MuonCalibTool.cxx.

◆ applyCorrection()

CorrectionCode CP::MuonCalibTool::applyCorrection ( xAOD::Muon mu) const
overrideprivatevirtual

Declare the interface that the class provides.

Apply the correction on a modifyable object

Implements CP::IMuonCalibrationAndSmearingTool.

Definition at line 129 of file MuonCalibTool.cxx.

130  {
131  ATH_MSG_VERBOSE("Muon Type = " << mu.muonType() << " ( 0: Combined, 1: StandAlone, 2: SegmentTagged, 3: CaloTagged, 4: SiliconAssociatedForwardMuon)");
132  ATH_MSG_VERBOSE("Muon Author = " << mu.author());
133 
134  // Convert to the internal object
135  MCP::MuonObj muonObj = convertToMuonObj(mu);
136  static const SG::AuxElement::Decorator<float> dec_idPt("InnerDetectorPt");
137  static const SG::AuxElement::Decorator<float> dec_mePt("MuonSpectrometerPt");
138  static const SG::AuxElement::Accessor<float> acc_id_pt("InnerDetectorPt");
139  static const SG::AuxElement::Accessor<float> acc_me_pt("MuonSpectrometerPt");
140  static const SG::AuxElement::Decorator<float> dec_idCharge("InnerDetectorCharge");
141  static const SG::AuxElement::Decorator<float> dec_meCharge("MuonSpectrometerCharge");
142  static const SG::AuxElement::Accessor<float> acc_id_charge("InnerDetectorCharge");
143  static const SG::AuxElement::Accessor<float> acc_me_charge("MuonSpectrometerCharge");
144 
145  ATH_MSG_VERBOSE("input ID pT "<<muonObj.ID.calib_pt);
146  ATH_MSG_VERBOSE("input ME pT "<<muonObj.ME.calib_pt);
147  ATH_MSG_VERBOSE("input CB pT "<<muonObj.CB.calib_pt);
148  ATH_MSG_VERBOSE("input eta "<<muonObj.CB.eta);
149  ATH_MSG_VERBOSE("input phi "<<muonObj.CB.phi);
150 
151  if (muonObj.CB.isData)
152  {
153  ATH_MSG_VERBOSE("Doing data corrections");
154 
155  // Sagitta Correction specifics
157  {
158  CorrectionCode sgCode = m_MuonIntSagittaTool->applyCorrection(muonObj);
159  if (sgCode != CorrectionCode::Ok) return sgCode;
160  }
161 
162  // Override combined momentum for special cases
163  if (std::abs(muonObj.ME.calib_pt) == 0) muonObj.CB.calib_pt = muonObj.ID.calib_pt;
164  if (std::abs(muonObj.ID.calib_pt) == 0) muonObj.CB.calib_pt = muonObj.ME.calib_pt;
165 
166  // Only for combined set it
167  if (mu.muonType() == xAOD::Muon::Combined)
168  {
169  mu.setP4(muonObj.CB.calib_pt * GeVtoMeV, muonObj.CB.eta, muonObj.CB.phi);
170  }
171 
172 
173  dec_idPt(mu) = muonObj.ID.calib_pt * GeVtoMeV;
174  dec_mePt(mu) = muonObj.ME.calib_pt * GeVtoMeV;
175  dec_idCharge(mu) = muonObj.ID.calib_charge;
176  dec_meCharge(mu) = muonObj.ME.calib_charge;
177 
178  ATH_MSG_DEBUG("Checking Output Muon Info for data - Pt_ID: " << acc_id_pt(mu));
179  ATH_MSG_DEBUG("Checking Output Muon Info for data - Pt_MS: " << acc_me_pt(mu));
180  ATH_MSG_DEBUG("Checking Output Muon Info for data - Pt_CB: " << mu.pt());
181 
182  return CorrectionCode::Ok;
183  }
184 
185  // Do Scale and Smearing corrections
186  CorrectionCode sgCode = m_MuonIntScaleSmearTool->applyCorrection(muonObj);
187  if (sgCode != CorrectionCode::Ok) return sgCode;
188 
189  // Systematics for sagitta correction
190  if ((mu.muonType() != xAOD::Muon::SiliconAssociatedForwardMuon))
191  {
192  ATH_MSG_VERBOSE("Systematic uncertainties for sagitta bias ");
193  // TODO:: something specific for calo tags
194  CorrectionCode sgCode = m_MuonIntSagittaTool->applyCorrection(muonObj);
195  if (sgCode != CorrectionCode::Ok) return sgCode;
196  }
197 
198  // Override combined momentum for special cases
199  if (std::abs(muonObj.ME.calib_pt) == 0) muonObj.CB.calib_pt = muonObj.ID.calib_pt;
200  if (std::abs(muonObj.ID.calib_pt) == 0) muonObj.CB.calib_pt = muonObj.ME.calib_pt;
201 
202  // Setting the output object properties right now, so the resolution category get the corrected info
203  mu.setP4(muonObj.CB.calib_pt * GeVtoMeV, muonObj.CB.eta, muonObj.CB.phi);
204  mu.setCharge(muonObj.CB.calib_charge);
205  dec_idPt(mu) = muonObj.ID.calib_pt * GeVtoMeV;
206  dec_mePt(mu) = muonObj.ME.calib_pt * GeVtoMeV;
207  dec_idCharge(mu) = muonObj.ID.calib_charge;
208  dec_meCharge(mu) = muonObj.ME.calib_charge;
209 
210  if(!m_validationMode)
211  {
213  }
214 
215  // Special case: if the proper flags are selected (m_extra_highpt_smearing or m_2stations_highpt_smearing)
216  // an ad-hoc smearing of the combined momentum has to be applied
217  bool extra_smearing = (m_extra_highpt_smearing && (muonObj.raw_mst_category >= 0) && !( muonObj.raw_mst_category & IMuonSelectionTool::CategoryFour)); // Extra smearing, if selected, gets anyway only applied to non-3-station muons!
218  bool highpt_smearing = (m_2stations_highpt_smearing && (muonObj.raw_mst_category >= 0) && ( muonObj.raw_mst_category & IMuonSelectionTool::CategoryThree)); // Special highpt smearing, if selected, gets anyway only applied to missing-inner, 2-station muons only!
219 
220  if (((extra_smearing || highpt_smearing)) && (mu.pt() > m_HighPtSystThreshold * GeVtoMeV))
221  {
222  sgCode = m_MuonIntHighTSmearTool->applyCorrection(muonObj);
223  if (sgCode != CorrectionCode::Ok) return sgCode;
224  }
225 
226  // Final info to be written to the muon object
227  mu.setP4(muonObj.CB.calib_pt * GeVtoMeV, muonObj.CB.eta, muonObj.CB.phi);
228  dec_idPt(mu) = muonObj.ID.calib_pt * GeVtoMeV;
229  dec_mePt(mu) = muonObj.ME.calib_pt * GeVtoMeV;
230 
231 
232  ATH_MSG_DEBUG("Checking Output Muon Info - Pt_ID: " << acc_id_pt(mu));
233  ATH_MSG_DEBUG("Checking Output Muon Info - Pt_MS: " << acc_me_pt(mu));
234  ATH_MSG_DEBUG("Checking Output Muon Info - Pt_CB: " << mu.pt());
235 
236  // If saggita was out of validity, return it here
237  if (sgCode == CorrectionCode::OutOfValidityRange) return sgCode;
238 
239  // Return gracefully:
240  return CorrectionCode::Ok;
241  }

◆ applyCorrectionTrkOnly()

CorrectionCode CP::MuonCalibTool::applyCorrectionTrkOnly ( xAOD::TrackParticle inTrk,
const int  DetType 
) const
overrideprivatevirtual

Implements CP::IMuonCalibrationAndSmearingTool.

Definition at line 243 of file MuonCalibTool.cxx.

244  {
245  // Convert to the internal object
246  MCP::MuonObj muonObj = convertToMuonObj(inTrk, DetType);
247 
248  // Do Scale and Smearing corrections
249  CorrectionCode sgCode = m_MuonIntScaleSmearTool->applyCorrection(muonObj);
250  if (sgCode != CorrectionCode::Ok) return sgCode;
251 
252  double res_pt = (DetType == MCP::DetectorType::MS) ? muonObj.ME.calib_pt*GeVtoMeV : muonObj.ID.calib_pt*GeVtoMeV;
253 
254  inTrk.setDefiningParameters(inTrk.d0(), inTrk.z0(), inTrk.phi0(), inTrk.theta(),
255  inTrk.charge() / (res_pt * std::cosh(inTrk.eta())));
256 
257  // Return gracefully:
258  return CorrectionCode::Ok;
259  }

◆ applySystematicVariation()

StatusCode CP::MuonCalibTool::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 299 of file MuonCalibTool.cxx.

300  {
301  // Apply to the underlying tool
303  if(code != StatusCode::SUCCESS) return code;
304 
306  if(code != StatusCode::SUCCESS) return code;
307 
310  if(code != StatusCode::SUCCESS) return code;
311  }
312  return code;
313  }

◆ convertToMuonObj() [1/2]

MCP::MuonObj CP::MuonCalibTool::convertToMuonObj ( const xAOD::Muon mu) const
protected

Definition at line 404 of file MuonCalibTool.cxx.

405  {
406 
407  // Get information about data
408  bool isData = false;
410  else
411  {
412  // Retrieve the event information:
414  isData = !evtInfo->eventType(xAOD::EventInfo::IS_SIMULATION);
415  }
416  ATH_MSG_VERBOSE("Checking Simulation flag: " << !isData);
417 
418  // Get information about which year it is here
420 
421 
422  double Primary_eta = mu.eta();
423  double Primary_phi = mu.phi();
424  int charge = mu.charge();
425  double mass = mu.m() * MeVtoGeV;
426 
427  if (m_validationMode)
428  {
429  static const SG::AuxElement::Accessor<float> cb_pt("expert_ptcb");
430  static const SG::AuxElement::Accessor<float> id_pt("expert_ptid");
431  static const SG::AuxElement::Accessor<float> ms_pt("expert_ptms");
432  static const SG::AuxElement::Accessor<AmgVector(5)> CBParam("CBParam");
433  static const SG::AuxElement::Accessor<AmgSymMatrix(5)> CBCov("CBCov");
434  static const SG::AuxElement::Accessor<AmgVector(5)> IDParam("IDParam");
435  static const SG::AuxElement::Accessor<AmgSymMatrix(5)> IDCov("IDCov");
436  static const SG::AuxElement::Accessor<AmgVector(5)> MEParam("MEParam");
437  static const SG::AuxElement::Accessor<AmgSymMatrix(5)> MECov("MECov");
438 
439  // Use the constructor where the eta/phi are overwritten to keep it inma line with current recommendations. To be changed in the future
440  auto CB = MCP::TrackCalibObj(MCP::TrackType::CB, charge, cb_pt(mu), Primary_eta, Primary_phi, mass, CBParam(mu), CBCov(mu), year, isData);
441  auto ID = MCP::TrackCalibObj(MCP::TrackType::ID, charge, id_pt(mu), Primary_eta, Primary_phi, mass, IDParam(mu), IDCov(mu), year, isData);
442  auto ME = MCP::TrackCalibObj(MCP::TrackType::ME, charge, ms_pt(mu), Primary_eta, Primary_phi, mass, MEParam(mu), MECov(mu), year, isData);
443 
444  MCP::MuonObj muonObj{CB,ID,ME};
445  initializeRandNumbers(muonObj);
446 
447  muonObj.expectedPercentResID = expectedResolution(MCP::DetectorType::ID, mu, false);
448  muonObj.expectedPercentResME = expectedResolution(MCP::DetectorType::MS, mu, false);
449  muonObj.expectedResID = expectedResolution(MCP::DetectorType::ID, mu, true) * muonObj.CB.calib_pt;
450  muonObj.expectedResME = expectedResolution(MCP::DetectorType::MS, mu, true) * muonObj.CB.calib_pt;
451 
452  return muonObj;
453  }
454 
455 
456  // Retrieve all the trans
457  const xAOD::TrackParticle *CB_track = mu.trackParticle(xAOD::Muon::CombinedTrackParticle);
458  const xAOD::TrackParticle *ID_track = mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
459  const xAOD::TrackParticle *ME_track = mu.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
460 
461  // For SI muons, overwrite the charge from the CB track
462  if (mu.muonType() == xAOD::Muon::SiliconAssociatedForwardMuon)
463  {
464  if (CB_track) charge = CB_track->charge();
465  }
466 
467  // Use the constructor where the eta/phi are overwritten to keep it inma line with current recommendations. To be changed in the future
468  auto CB = MCP::TrackCalibObj(CB_track, MCP::TrackType::CB, charge, Primary_eta, Primary_phi, year, isData);
469  auto ID = MCP::TrackCalibObj(ID_track, MCP::TrackType::ID, charge, Primary_eta, Primary_phi, year, isData);
470  auto ME = MCP::TrackCalibObj(ME_track, MCP::TrackType::ME, charge, Primary_eta, Primary_phi, year, isData);
471 
472  MCP::MuonObj muonObj{CB,ID,ME};
473  initializeRandNumbers(muonObj);
474  muonObj.expectedPercentResID = expectedResolution(MCP::DetectorType::ID, mu, false);
475  muonObj.expectedPercentResME = expectedResolution(MCP::DetectorType::MS, mu, false);
476 
477  muonObj.expectedResID = expectedResolution(MCP::DetectorType::ID, mu, true) * muonObj.CB.calib_pt;
478  muonObj.expectedResME = expectedResolution(MCP::DetectorType::MS, mu, true) * muonObj.CB.calib_pt;
479  return muonObj;
480  }

◆ convertToMuonObj() [2/2]

MCP::MuonObj CP::MuonCalibTool::convertToMuonObj ( const xAOD::TrackParticle inTrk,
const int  DetType 
) const
protected

Definition at line 481 of file MuonCalibTool.cxx.

482  {
483  // Get information about data
484  bool isData = false;
485 
486  // Retrieve the event information:
488  isData = !evtInfo->eventType(xAOD::EventInfo::IS_SIMULATION);
489 
490  ATH_MSG_VERBOSE("Checking Simulation flag: " << !isData);
491 
492  // Get information about which year it is here
494  int charge = inTrk.charge();
496  {
500 
501  MCP::MuonObj muonObj{CB,ID,ME};
502  return muonObj;
503  }
504 
508 
509  MCP::MuonObj muonObj{CB,ID,ME};
510  return muonObj;
511  }

◆ correctedCopy()

CorrectionCode CP::MuonCalibTool::correctedCopy ( const xAOD::Muon input,
xAOD::Muon *&  output 
) const
overrideprivatevirtual

Create a corrected copy from a constant muon.

Implements CP::IMuonCalibrationAndSmearingTool.

Definition at line 261 of file MuonCalibTool.cxx.

262  {
263  // A sanity check:
264  if (output)
266  "Non-null pointer received. "
267  "There's a possible memory leak!");
268 
269  // Create a new object:
270  ATH_MSG_VERBOSE("Going to create new xAOD::Muon...");
271  output = new xAOD::Muon();
272  ATH_MSG_VERBOSE("Calling makePrivateStore...");
273  output->makePrivateStore(input);
274 
275  // Use the other function to modify this object:
276  ATH_MSG_VERBOSE("Calling applyCorrection...");
277 
279 
280  return retCode;
281  }

◆ 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; }

◆ expectedResolution() [1/2]

double CP::MuonCalibTool::expectedResolution ( const int &  DetType,
const xAOD::Muon mu,
const bool  mc 
) const
overrideprivatevirtual

Get the expected pT resolution - int argument is more efficient.

Implements CP::IMuonCalibrationAndSmearingTool.

Definition at line 330 of file MuonCalibTool.cxx.

331  {
332  // Get information about data
333  bool isData = false;
335  else
336  {
337  // Retrieve the event information:
339  isData = !evtInfo->eventType(xAOD::EventInfo::IS_SIMULATION);
340  }
341 
342  // Get information about which year it is here
344 
345  // get the pt measurements from the xAOD::Muon object
346  double loc_ptid = 0;
347  double loc_ptms = 0;
348  double loc_ptcb = 0;
349 
350  double Primary_eta = mu.eta();
351  double Primary_phi = mu.phi();
352 
353  if (m_validationMode)
354  {
355  static const SG::AuxElement::Accessor<float> id_pt("expert_ptid");
356  static const SG::AuxElement::Accessor<float> ms_pt("expert_ptms");
357  static const SG::AuxElement::Accessor<float> cb_pt("expert_ptcb");
358 
359  loc_ptid = id_pt(mu) * MeVtoGeV;
360  loc_ptms = ms_pt(mu) * MeVtoGeV;
361  loc_ptcb = cb_pt(mu) * MeVtoGeV;
362 
363  } else {
364 
365  // Retrieve all the trans
366  const xAOD::TrackParticle* CB_track = mu.trackParticle(xAOD::Muon::CombinedTrackParticle);
367  const xAOD::TrackParticle* ID_track = mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
368  const xAOD::TrackParticle* ME_track = mu.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
369 
370  if(CB_track) loc_ptcb = CB_track->pt() * MeVtoGeV;
371  if(ID_track) loc_ptid = ID_track->pt() * MeVtoGeV;
372  if(ME_track) loc_ptms = ME_track->pt() * MeVtoGeV;
373  }
374 
376  {
377  return m_MuonIntScaleSmearTool->getExpectedResolution(DetType, loc_ptms, Primary_eta, Primary_phi, dataYear, addMCCorrectionSmearing);
378  }
379  else if (DetType == MCP::DetectorType::ID)
380  {
381  return m_MuonIntScaleSmearTool->getExpectedResolution(DetType, loc_ptid, Primary_eta, Primary_phi, dataYear, addMCCorrectionSmearing);
382  }
383  else if (DetType == MCP::DetectorType::CB)
384  {
385  // Due to complicated maths, the expected combined resolution
386  // is given by this equation (note: all sigmas are fractional uncertainties):
387  // sigma_CB = std::sqrt(2) * sigma_ID * sigma_MS * pTMS * pTID / {pTCB * std::sqrt({sigma_ID*pTID}^2 + {sigma_MS*pTMS}^2)}
388  // Do a little recursive calling to make things easier to read
389  // Turn these into *absolute* uncertainties to make life easier
390  double sigmaID = expectedResolution(MCP::DetectorType::ID, mu, addMCCorrectionSmearing) * loc_ptid;
391  double sigmaMS = expectedResolution(MCP::DetectorType::MS, mu, addMCCorrectionSmearing) * loc_ptms;
392  double denominator = (loc_ptcb)*std::sqrt(sigmaID * sigmaID + sigmaMS * sigmaMS);
393  return denominator ? sigmaID * sigmaMS / denominator : 0.;
394  }
395  else
396  {
397  ATH_MSG_ERROR("wrong DetType in input " << DetType);
398  }
399  return 0.;
400 
401  }

◆ expectedResolution() [2/2]

double CP::MuonCalibTool::expectedResolution ( const std::string &  DetType,
const xAOD::Muon mu,
const bool  mc 
) const
overrideprivatevirtual

Get the expected pT resolution.

Implements CP::IMuonCalibrationAndSmearingTool.

Definition at line 315 of file MuonCalibTool.cxx.

316  {
317  // Expected resolution in data (or unsmeared MC if second argument is true)
318  if (DetType == "MS") {
319  return expectedResolution(MCP::DetectorType::MS, mu, addMCCorrectionSmearing);
320  } else if (DetType == "ID") {
321  return expectedResolution(MCP::DetectorType::ID, mu, addMCCorrectionSmearing);
322  } else if (DetType == "CB") {
323  return expectedResolution(MCP::DetectorType::CB, mu, addMCCorrectionSmearing);
324  } else {
325  ATH_MSG_ERROR("The DetType that you entered is not allows - DetType = " << DetType);
326  return 0.;
327  }
328  }

◆ 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

◆ 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  }

◆ getPeriod()

MCP::DataYear CP::MuonCalibTool::getPeriod ( bool  isData) const
protected

Definition at line 537 of file MuonCalibTool.cxx.

538  {
539  static const SG::AuxElement::ConstAccessor<unsigned int> acc_rnd("RandomRunNumber");
540  // I've copied the run number ranges from SUSYTools
541  // https://gitlab.cern.ch/atlas/athena/blob/21.2/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYObjDef_xAOD.cxx#L2438
542  constexpr unsigned int last_run_16 = 320000;
543  constexpr unsigned int last_run_17 = 342000;
544  constexpr unsigned int last_run_18 = 370000;
545  constexpr unsigned int last_run_22 = 440614;
546  constexpr unsigned int last_run_23 = 999999;
547 
548  static const std::set<int> MCperiods1516{284500};
549  static const std::set<int> MCperiods17{300000, 304000, 305000};
550  static const std::set<int> MCperiods18{310000};
551  static const std::set<int> MCperiods22{330000, 410000};
552  static const std::set<int> MCperiods23{450000};
553 
554  static const std::set<int> MCperiodsRun4{350000, 350060, 350140, 350200};
555 
556 
558  unsigned int run = 0;
559  if(m_expertMode_RunNumber.value()!=0) run=m_expertMode_RunNumber.value();
560  else run = evtInfo->runNumber();
561  // retrieve the random run number
562  if (!isData && m_useRndRun) {
563  if (acc_rnd.isAvailable(*evtInfo))
564  run = acc_rnd(*evtInfo);
565  else {
567  "No random runnumber could be found although the tool is configured to assign the years based on it. Please make sure "
568  "to apply the prwTool before-hand or consider to set the property 'useRandomRunNumber' to false.");
569  return MCP::DataYear::Data16;
570  }
571  }
572  // Check the Monte carlo
573  if (!isData && (!m_useRndRun || !acc_rnd.isAvailable(*evtInfo))) {
574  if (MCperiods1516.count(run)) {
575  ATH_MSG_DEBUG("The current run " << run << " corresponds to data mc20a / data15-16");
576  return MCP::DataYear::Data16;
577  } else if (MCperiods17.count(run)) {
578  ATH_MSG_DEBUG("The current run " << run << " corresponds to data mc20d / data17");
579  return MCP::DataYear::Data17;
580  } else if (MCperiods18.count(run)) {
581  ATH_MSG_DEBUG("The current run " << run << " corresponds to data mc20e / data18");
582  return MCP::DataYear::Data18;
583  } else if (MCperiods22.count(run)) {
584  ATH_MSG_DEBUG("The current run " << run << " corresponds to data mc21a / data22");
585  return MCP::DataYear::Data22;
586  } else if (MCperiods23.count(run)) {
587  ATH_MSG_DEBUG("The current run " << run << " corresponds to data mc23c / data23");
588  return MCP::DataYear::Data23;
589  } else if (MCperiodsRun4.count(run)) {
590  ATH_MSG_DEBUG("The current run " << run << " corresponds to data Run4");
591  return MCP::DataYear::Data23;
592  }
593 
594  }
595  // Check data itself or the random run number is used
596  else if (isData || m_useRndRun) {
597  if (run < last_run_16) {
598  ATH_MSG_DEBUG("The current run " << run << " is taken in data 15-16");
599  return MCP::DataYear::Data16;
600  } else if (run <= last_run_17) {
601  ATH_MSG_DEBUG("The current run " << run << " is taken in data 17");
602  return MCP::DataYear::Data17;
603  } else if (run <= last_run_18) {
604  ATH_MSG_DEBUG("The current run " << run << " is taken in data 18");
605  return MCP::DataYear::Data18;
606  } else if (run <= last_run_22) {
607  ATH_MSG_DEBUG("The current run " << run << " is taken in data 22");
608  return MCP::DataYear::Data22;
609  } else if (run < last_run_23) {
610  ATH_MSG_DEBUG("The current run " << run << " is taken in data 23");
611  return MCP::DataYear::Data23;
612  }
613  }
614  ATH_MSG_FATAL("Could not assign run-number " << run << " to a specific year of data-taking");
615  return MCP::DataYear::Data16;
616  }

◆ getProperty()

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

Get one of the tool's properties.

◆ initialize()

StatusCode CP::MuonCalibTool::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...

Create the high pT tool

Reimplemented from asg::AsgTool.

Definition at line 27 of file MuonCalibTool.cxx.

28  {
29  // Greet the user:
30  ATH_MSG_INFO("Initialising...");
31 
32  // Get the m_eventinfo container
34 
35  // Set the options
36  if (m_calibMode == MuonCalibTool::correctData_CB) {
37  ATH_MSG_INFO("Data will be corrected for sagitta bias with CB calibration");
38  m_doDirectCBCalib = true;
40 
41  } else if (m_calibMode == MuonCalibTool::correctData_IDMS) {
42  ATH_MSG_INFO("Data will be corrected for sagitta bias with ID+MS calibration");
43  if (m_isRun3.value()) ATH_MSG_INFO("Please make sure you are using the correct muon calibration. Please refer to the twiki MCPAnalysisGuidelinesR22");
44  m_doDirectCBCalib = false;
46 
47  } else if (m_calibMode == MuonCalibTool::notCorrectData_IDMS) {
48  ATH_MSG_INFO("Data will be untouched. Instead an additional systematic will be added with ID+MS calibration");
49  if (m_isRun3.value()) ATH_MSG_INFO("Please make sure you are using the correct muon calibration. Please refer to the twiki MCPAnalysisGuidelinesR22");
50  m_doDirectCBCalib = false;
52  }
53  else if (m_calibMode == MuonCalibTool::notCorrectData_CB) {
54  ATH_MSG_INFO("Data will be untouched. Instead an additional systematic will be added with CB calibration");
55  m_doDirectCBCalib = true;
57  }
58  else if (m_calibMode == MuonCalibTool::userDefined) {
59  ATH_MSG_INFO("Using options as provided by the user");
60  }
61  else {
62  ATH_MSG_FATAL("Invalid calibration mode: " << m_calibMode << " Allowed modes are correctData_CB("
63  << MuonCalibTool::correctData_CB << ") correctData_IDMS ("
64  << MuonCalibTool::correctData_IDMS << ") or notCorrectData_IDMS ("
65  << MuonCalibTool::notCorrectData_IDMS << ") or notCorrectData_CB ("
66  << MuonCalibTool::notCorrectData_CB << ")");
67  return StatusCode::FAILURE;
68  }
69 
70  // Get the muon selection tool
71  if (m_MuonSelectionTool.empty()) {
72  m_MuonSelectionTool.setTypeAndName("CP::MuonSelectionTool/MCaST_Own_MST");
74  ATH_CHECK(m_MuonSelectionTool.setProperty("MuQuality", 1));
75  ATH_CHECK(m_MuonSelectionTool.setProperty("TurnOffMomCorr", true));
76  ATH_CHECK(m_MuonSelectionTool.setProperty("IsRun3Geo", m_isRun3.value()));
77  ATH_CHECK(m_MuonSelectionTool.setProperty("OutputLevel", msg().level()));
78  ATH_CHECK(m_MuonSelectionTool.setProperty("ExcludeNSWFromPrecisionLayers", m_excludeNSWFromPrecisionLayers.value()));
79  }
81 
82 
83  // Create the Sagitta tool
85  m_MuonIntSagittaTool.setTypeAndName("CP::MuonCalibIntSagittaTool/MCaST_Sagitta");
87  ATH_CHECK(m_MuonIntSagittaTool.setProperty("systematicScheme", m_sysScheme.value()));
88  ATH_CHECK(m_MuonIntSagittaTool.setProperty("applyCorrectionOnData", m_applyCorrectionOnData.value()));
89  ATH_CHECK(m_MuonIntSagittaTool.setProperty("doDirectCBCalib", m_doDirectCBCalib.value()));
90  ATH_CHECK(m_MuonIntSagittaTool.setProperty("doEtaSagittaSys", m_doEtaSagittaSys.value()));
91  ATH_CHECK(m_MuonIntSagittaTool.setProperty("OutputLevel", msg().level()));
92  }
94 
95  // Create the scale smear tool
97  m_MuonIntScaleSmearTool.setTypeAndName("CP::MuonCalibIntScaleSmearTool/MCaST_ScaleSmear");
99  ATH_CHECK(m_MuonIntScaleSmearTool.setProperty("systematicScheme", m_sysScheme.value()));
100  ATH_CHECK(m_MuonIntScaleSmearTool.setProperty("doDirectCBCalib", m_doDirectCBCalib.value()));
103  }
107  m_MuonIntHighTSmearTool.setTypeAndName("CP::MuonCalibIntHighpTSmearTool/MCaST_highPtScaleSmear");
110  }
113  }
114  if (!applySystematicVariation(SystematicSet()))
115  {
116  ATH_MSG_ERROR("Unable to run with no systematic");
117  return StatusCode::FAILURE;
118  }
119  SystematicRegistry &registry = SystematicRegistry::getInstance();
120  if (registry.registerSystematics(*this) != StatusCode::SUCCESS)
121  {
122  ATH_MSG_ERROR("Unkown systematic list");
123  return StatusCode::FAILURE;
124  }
125  // Return gracefully:
126  return StatusCode::SUCCESS;
127  }

◆ initializeRandNumbers()

void CP::MuonCalibTool::initializeRandNumbers ( MCP::MuonObj obj) const
protected

Decorate all information that's needed to ensure reproducibility of the smearing.

Definition at line 514 of file MuonCalibTool.cxx.

515  {
516  // Random number generation for smearing
517  TRandom3 loc_random3;
518  // Get Event Number, Retrieve the event information:
520  unsigned long long eventNumber = 0;
522  else eventNumber = evtInfo->eventNumber();
523  // Construct a seed for the random number generator:
524  const UInt_t seed = 1 + std::abs(muonObj.CB.phi) * 1E6 + std::abs(muonObj.CB.eta) * 1E3 + eventNumber;
525  loc_random3.SetSeed(seed);
526 
527  muonObj.rnd_g0 = loc_random3.Gaus(0, 1);
528  muonObj.rnd_g1 = loc_random3.Gaus(0, 1);
529  muonObj.rnd_g2 = loc_random3.Gaus(0, 1);
530  muonObj.rnd_g3 = loc_random3.Gaus(0, 1);
531  muonObj.rnd_g4 = loc_random3.Gaus(0, 1);
532  muonObj.rnd_g_highPt = loc_random3.Gaus(0, 1);
533 
534 
535  }

◆ 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::MuonCalibTool::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 283 of file MuonCalibTool.cxx.

284  {
285  SystematicSet sys = affectingSystematics();
286  return sys.find(systematic) != sys.end();
287  }

◆ 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::MuonCalibTool::recommendedSystematics ( ) const
overrideprivatevirtual

the list of all systematics this tool recommends to use

Implements CP::IReentrantSystematicsTool.

Definition at line 297 of file MuonCalibTool.cxx.

297 { 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_2stations_highpt_smearing

Gaudi::Property<bool> CP::MuonCalibTool::m_2stations_highpt_smearing {this, "do2StationsHighPt", false, "Extra smearing to be applied if high pT WP is used"}
protected

Definition at line 106 of file MuonCalibTool.h.

◆ m_applyCorrectionOnData

Gaudi::Property<bool> CP::MuonCalibTool::m_applyCorrectionOnData {this, "applyCorrectionOnData", true, "If to apply sagitta corrections on data, or take the full effect as systematic"}
protected

Definition at line 101 of file MuonCalibTool.h.

◆ m_calibMode

Gaudi::Property<int> CP::MuonCalibTool::m_calibMode {this, "calibMode", -1, "Calib mode"}
protected

Definition at line 88 of file MuonCalibTool.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::MuonCalibTool::m_doDirectCBCalib {this, "doDirectCBCalib", true, "Do direct calibration of CB tracks, otherwise, do ID+MS"}
protected

Definition at line 96 of file MuonCalibTool.h.

◆ m_doEtaSagittaSys

Gaudi::Property<bool> CP::MuonCalibTool::m_doEtaSagittaSys {this, "doEtaSagittaSys", false, "Do Eta dependant systematic system"}
protected

Definition at line 100 of file MuonCalibTool.h.

◆ m_eventInfo

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

Definition at line 73 of file MuonCalibTool.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_excludeNSWFromPrecisionLayers

Gaudi::Property<bool> CP::MuonCalibTool::m_excludeNSWFromPrecisionLayers {this, "ExcludeNSWFromPrecisionLayers", false, "Cut on the number of precision layers ignores the NSW"}
protected

Definition at line 92 of file MuonCalibTool.h.

◆ m_expertMode_EvtNumber

Gaudi::Property<unsigned long long> CP::MuonCalibTool::m_expertMode_EvtNumber {this, "expertMode_EvtNumber", 0, "Expert only option. Overwrites EventNumber"}
protected

Definition at line 85 of file MuonCalibTool.h.

◆ m_expertMode_isData

Gaudi::Property<bool> CP::MuonCalibTool::m_expertMode_isData {this, "expertMode_isData", false, "Expert only option. Overwrites the isData Flag"}
protected

Definition at line 83 of file MuonCalibTool.h.

◆ m_expertMode_RunNumber

Gaudi::Property<int> CP::MuonCalibTool::m_expertMode_RunNumber {this, "expertMode_RunNumber", 0, "Expert only option. Overwrites RunNumber"}
protected

Definition at line 84 of file MuonCalibTool.h.

◆ m_extra_highpt_smearing

Gaudi::Property<bool> CP::MuonCalibTool::m_extra_highpt_smearing {this, "doExtraSmearing", false, "Flag provided to test if analysis are sensitive to high pT calibration. NOT TO BE USED FOR RESULTS. Please see twiki"}
protected

Definition at line 108 of file MuonCalibTool.h.

◆ m_HighPtSystThreshold

Gaudi::Property<float> CP::MuonCalibTool::m_HighPtSystThreshold {this, "HighPtSystThr", 300.0, "Thershold for high pT smearing in GeV"}
protected

Definition at line 109 of file MuonCalibTool.h.

◆ m_isRun3

Gaudi::Property<bool> CP::MuonCalibTool::m_isRun3 {this, "IsRun3Geo", false, "Needed for MuonSelectionTool"}
protected

Definition at line 75 of file MuonCalibTool.h.

◆ m_MuonIntHighTSmearTool

asg::AnaToolHandle<CP::IMuonCalibIntTool> CP::MuonCalibTool::m_MuonIntHighTSmearTool {""}
protected

Definition at line 116 of file MuonCalibTool.h.

◆ m_MuonIntHighTSmearToolInitialized

bool CP::MuonCalibTool::m_MuonIntHighTSmearToolInitialized {false}
private

Definition at line 131 of file MuonCalibTool.h.

◆ m_MuonIntSagittaTool

asg::AnaToolHandle<CP::IMuonCalibIntTool> CP::MuonCalibTool::m_MuonIntSagittaTool {""}
protected

Definition at line 113 of file MuonCalibTool.h.

◆ m_MuonIntScaleSmearTool

asg::AnaToolHandle<CP::IMuonCalibIntScaleSmearTool> CP::MuonCalibTool::m_MuonIntScaleSmearTool {""}
protected

Definition at line 114 of file MuonCalibTool.h.

◆ m_MuonSelectionTool

asg::AnaToolHandle<CP::IMuonSelectionTool> CP::MuonCalibTool::m_MuonSelectionTool {""}
protected

Definition at line 111 of file MuonCalibTool.h.

◆ m_release

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

Definition at line 78 of file MuonCalibTool.h.

◆ m_sysScheme

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

Definition at line 80 of file MuonCalibTool.h.

◆ m_useRndRun

Gaudi::Property<bool> CP::MuonCalibTool::m_useRndRun {this, "useRandomRunNumber", false, "To use the random run number for deciding which calibration to apply"}
protected

Definition at line 86 of file MuonCalibTool.h.

◆ m_validationMode

Gaudi::Property<bool> CP::MuonCalibTool::m_validationMode {this, "expert_validationMode", false, "Expert only option. Puts the tool in the validation mode setup"}
protected

Definition at line 82 of file MuonCalibTool.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
MCP::MuonObj::ME
TrackCalibObj ME
Definition: MuonObj.h:130
CP::MuonCalibTool::affectingSystematics
virtual SystematicSet affectingSystematics() const override
the list of all systematics this tool can be affected by
Definition: MuonCalibTool.cxx:289
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
CP::IMuonSelectionTool::getResolutionCategory
virtual int getResolutionCategory(const xAOD::Muon &) const =0
Returns an integer corresponding to categorization of muons with different resolutions.
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
get_generator_info.result
result
Definition: get_generator_info.py:21
CP::IMuonSelectionTool::ResolutionCategory
ResolutionCategory
Declare the interface that the class provides.
Definition: IMuonSelectionTool.h:31
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
CP::MuonCalibTool::m_applyCorrectionOnData
Gaudi::Property< bool > m_applyCorrectionOnData
Definition: MuonCalibTool.h:101
MCP::DetectorType::ID
@ ID
Definition: EnumDef.h:37
CP::MuonCalibTool::m_MuonIntScaleSmearTool
asg::AnaToolHandle< CP::IMuonCalibIntScaleSmearTool > m_MuonIntScaleSmearTool
Definition: MuonCalibTool.h:114
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
MCP::DataYear::Data16
@ Data16
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
MCP::DataYear::Data23
@ Data23
CP::MuonCalibTool::m_2stations_highpt_smearing
Gaudi::Property< bool > m_2stations_highpt_smearing
Definition: MuonCalibTool.h:106
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
asg::AnaToolHandle::retrieve
StatusCode retrieve()
initialize the tool
CP::MuonCalibTool::convertToMuonObj
MCP::MuonObj convertToMuonObj(const xAOD::Muon &mu) const
Definition: MuonCalibTool.cxx:404
CP::MuonCalibTool::applyCorrection
virtual ASG_TOOL_CLASS3(MuonCalibTool, CP::IMuonCalibrationAndSmearingTool, CP::ISystematicsTool, CP::IReentrantSystematicsTool) public CorrectionCode applyCorrection(xAOD::Muon &mu) const override
Declare the interface that the class provides.
Definition: MuonCalibTool.cxx:129
CP::MuonCalibTool::m_expertMode_EvtNumber
Gaudi::Property< unsigned long long > m_expertMode_EvtNumber
Definition: MuonCalibTool.h:85
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition: TrackParticle_v1.cxx:150
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CP::MuonCalibTool::m_excludeNSWFromPrecisionLayers
Gaudi::Property< bool > m_excludeNSWFromPrecisionLayers
Definition: MuonCalibTool.h:92
CP::MuonCalibTool::initializeRandNumbers
void initializeRandNumbers(MCP::MuonObj &obj) const
Decorate all information that's needed to ensure reproducibility of the smearing.
Definition: MuonCalibTool.cxx:514
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
asg::AnaToolHandle::setTypeAndName
void setTypeAndName(const std::string &val_typeAndName)
set the value of type and name
CP::MuonCalibTool::m_extra_highpt_smearing
Gaudi::Property< bool > m_extra_highpt_smearing
Definition: MuonCalibTool.h:108
CP::MeVtoGeV
constexpr float MeVtoGeV
Definition: IsolationCloseByCorrectionTool.cxx:33
xAOD::TrackParticle_v1::z0
float z0() const
Returns the parameter.
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
CP::IMuonSelectionTool::CategoryThree
@ CategoryThree
Definition: IMuonSelectionTool.h:46
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::TrackParticle_v1::setDefiningParameters
void setDefiningParameters(float d0, float z0, float phi0, float theta, float qOverP)
Set the defining parameters.
Definition: TrackParticle_v1.cxx:177
MCP::DetectorType::CB
@ CB
Definition: EnumDef.h:37
CP::IMuonCalibIntTool::applyCorrection
virtual CorrectionCode applyCorrection(MCP::MuonObj &mu) const =0
Declare the interface that the class provides.
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:54
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
python.AtlRunQueryAMI.year
year
Definition: AtlRunQueryAMI.py:226
asg::AnaToolHandle::setProperty
StatusCode setProperty(const std::string &property, const T2 &value)
set the given property of the tool.
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition: EventInfo_v1.h:151
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:52
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
dqt_zlumi_pandas.mass
mass
Definition: dqt_zlumi_pandas.py:170
xAOD::TrackParticle_v1::d0
float d0() const
Returns the parameter.
asg::AnaToolHandle::declarePropertyFor
void declarePropertyFor(T2 *tool, const std::string &name, const std::string &description="")
declare as property on the given tool
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
CP::MuonCalibTool::m_isRun3
Gaudi::Property< bool > m_isRun3
Definition: MuonCalibTool.h:75
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
MCP::TrackCalibObj::calib_charge
int calib_charge
Value of the track-charge (after calibration)
Definition: MuonObj.h:112
CP::MuonCalibTool::m_expertMode_isData
Gaudi::Property< bool > m_expertMode_isData
Definition: MuonCalibTool.h:83
CP::MuonCalibTool::m_sysScheme
Gaudi::Property< std::string > m_sysScheme
Definition: MuonCalibTool.h:80
CP::MuonCalibTool::m_doDirectCBCalib
Gaudi::Property< bool > m_doDirectCBCalib
Definition: MuonCalibTool.h:96
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
CP::CorrectionCode::OutOfValidityRange
@ OutOfValidityRange
Input object is out of validity range.
Definition: CorrectionCode.h:37
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MCP::DataYear::Data18
@ Data18
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:58
CP::MuonCalibTool::m_MuonSelectionTool
asg::AnaToolHandle< CP::IMuonSelectionTool > m_MuonSelectionTool
Definition: MuonCalibTool.h:111
CP::MuonCalibTool::m_doEtaSagittaSys
Gaudi::Property< bool > m_doEtaSagittaSys
Definition: MuonCalibTool.h:100
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
CP::MuonCalibTool::m_expertMode_RunNumber
Gaudi::Property< int > m_expertMode_RunNumber
Definition: MuonCalibTool.h:84
AmgVector
AmgVector(4) T2BSTrackFilterTool
Definition: T2BSTrackFilterTool.cxx:114
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
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
run
Definition: run.py:1
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::eventNumber
eventNumber
Definition: EventInfo_v1.cxx:124
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
CP::MuonCalibTool::m_calibMode
Gaudi::Property< int > m_calibMode
Definition: MuonCalibTool.h:88
ReadTripsProbsFromCool.denominator
denominator
Definition: ReadTripsProbsFromCool.py:96
MCP::TrackCalibObj::eta
const double eta
Value of the track-eta.
Definition: MuonObj.h:104
CP::IReentrantSystematicsTool::affectingSystematics
virtual SystematicSet affectingSystematics() const =0
the list of all systematics this tool can be affected by
MCP::DataYear::Data17
@ Data17
Trk::Combined
@ Combined
Definition: TrackSummaryTool.h:32
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
merge.output
output
Definition: merge.py:17
CP::MuonCalibTool::m_release
Gaudi::Property< std::string > m_release
Definition: MuonCalibTool.h:78
xAOD::TrackParticle_v1::phi0
float phi0() const
Returns the parameter, which has range to .
Definition: TrackParticle_v1.cxx:158
GeVtoMeV
#define GeVtoMeV
Purpose: label jets with b or c quarks.
Definition: JetQuarkLabel.cxx:23
pmontree.code
code
Definition: pmontree.py:443
xAOD::Muon
Muon_v1 Muon
Reference the current persistent version:
Definition: Event/xAOD/xAODMuon/xAODMuon/Muon.h:13
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
MCP::TrackCalibObj::phi
const double phi
Value of the track-phi.
Definition: MuonObj.h:106
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
CP::MuonCalibTool::m_validationMode
Gaudi::Property< bool > m_validationMode
Definition: MuonCalibTool.h:82
charge
double charge(const T &p)
Definition: AtlasPID.h:494
MCP::DetectorType::MS
@ MS
Definition: EnumDef.h:37
MCP::TrackCalibObj::calib_pt
double calib_pt
Smeared track pt.
Definition: MuonObj.h:102
MCP::MuonObj::ID
TrackCalibObj ID
Definition: MuonObj.h:129
MCP::TrackType::CB
@ CB
CP::IMuonCalibIntScaleSmearTool::getExpectedResolution
virtual double getExpectedResolution(const int &DetType, double pT, double eta, double phi, MCP::DataYear year, bool addMCCorrectionSmearing) const =0
Declare the interface that the class provides.
CP::MuonCalibTool::m_MuonIntHighTSmearToolInitialized
bool m_MuonIntHighTSmearToolInitialized
Definition: MuonCalibTool.h:131
CP::MuonCalibTool::m_HighPtSystThreshold
Gaudi::Property< float > m_HighPtSystThreshold
Definition: MuonCalibTool.h:109
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MCP::MuonObj::CB
TrackCalibObj CB
Definition: MuonObj.h:131
CP::MuonCalibTool::applySystematicVariation
virtual StatusCode applySystematicVariation(const SystematicSet &systConfig) override
effects: configure this tool for the given list of systematic variations.
Definition: MuonCalibTool.cxx:299
CP::MuonCalibTool::m_eventInfo
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
Definition: MuonCalibTool.h:73
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
CP::MuonCalibTool::expectedResolution
virtual double expectedResolution(const std::string &DetType, const xAOD::Muon &mu, const bool addMCCorrectionSmearing) const override
Get the expected pT resolution.
Definition: MuonCalibTool.cxx:315
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
MCP::TrackCalibObj::isData
const bool isData
Definition: MuonObj.h:116
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
MCP::MuonObj::raw_mst_category
ResolutionCategory raw_mst_category
Definition: MuonObj.h:143
CP::MuonCalibTool::m_MuonIntSagittaTool
asg::AnaToolHandle< CP::IMuonCalibIntTool > m_MuonIntSagittaTool
Definition: MuonCalibTool.h:113
python.grid.isData
def isData(dataset)
Definition: grid.py:491
CP::IMuonSelectionTool::CategoryFour
@ CategoryFour
Definition: IMuonSelectionTool.h:47
MCP::DataYear
DataYear
Definition: EnumDef.h:28
MCP::MuonObj
Definition: MuonObj.h:126
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
CP::MuonCalibTool::m_useRndRun
Gaudi::Property< bool > m_useRndRun
Definition: MuonCalibTool.h:86
CP::MuonCalibTool::getPeriod
MCP::DataYear getPeriod(bool isData) const
Definition: MuonCalibTool.cxx:537
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
DetType
Definition: DetType.h:10
CP::MuonCalibTool::m_MuonIntHighTSmearTool
asg::AnaToolHandle< CP::IMuonCalibIntTool > m_MuonIntHighTSmearTool
Definition: MuonCalibTool.h:116
SG::DataProxy
Definition: DataProxy.h:44
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
CP::ISystematicsTool::applySystematicVariation
virtual StatusCode applySystematicVariation(const SystematicSet &systConfig)=0
effects: configure this tool for the given list of systematic variations.
MCP::TrackCalibObj
Basic object to cache all relevant information from the track.
Definition: MuonObj.h:21
xAOD::TrackParticle_v1::theta
float theta() const
Returns the parameter, which has range 0 to .
asg::AnaToolHandle::empty
bool empty() const
whether this ToolHandle is completely empty, i.e.
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::DataYear::Data22
@ Data22
MCP::TrackType::ME
@ ME
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