ATLAS Offline Software
Loading...
Searching...
No Matches
CP::MuonTriggerScaleFactors Class Reference

#include <MuonTriggerScaleFactors.h>

Inheritance diagram for CP::MuonTriggerScaleFactors:
Collaboration diagram for CP::MuonTriggerScaleFactors:

Public Member Functions

 MuonTriggerScaleFactors (const std::string &name)
virtual ~MuonTriggerScaleFactors ()
virtual StatusCode initialize (void)
virtual CorrectionCode getTriggerScaleFactor (const xAOD::MuonContainer &mucont, Double_t &triggersf, const std::string &trigger) const
virtual CorrectionCode getTriggerScaleFactor (const xAOD::Muon &muon, Double_t &triggersf, const std::string &trigger) const
virtual CorrectionCode getTriggerEfficiency (const xAOD::Muon &mu, Double_t &efficiency, const std::string &trigger, Bool_t dataType) const
virtual bool isAffectedBySystematic (const CP::SystematicVariation &systematic) const
 Declare the interface that this class provides.
virtual CP::SystematicSet affectingSystematics () const
 returns: the list of all systematics this tool can be affected by
virtual CP::SystematicSet recommendedSystematics () const
 returns: the list of all systematics this tool recommends to use
virtual StatusCode applySystematicVariation (const CP::SystematicSet &systConfig)
 effects: configure this tool for the given list of systematic variations.
virtual int getBinNumber (const xAOD::Muon &muon, const std::string &trigger) const
virtual int getReplica_index (const std::string &sysBaseName, const std::string &trigStr) const
virtual bool isTriggerSupported (const std::string &trigger) const
 Returns whether the trigger is supported by the tool or not. The decision depends on the present (random)RunNumber.
virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Member Functions

virtual std::shared_ptr< TH1 > getEfficiencyHistogram (unsigned int year, const std::string &period, const std::string &trigger, bool isData, const std::string &Systematic, bool isBarrel=true) const
virtual std::shared_ptr< TH1 > getEfficiencyHistogram (const std::string &trigger, bool isData, const std::string &Systematic, bool isBarrel=true) const
std::string getDataPeriod () const
unsigned int getRunNumber () const
unsigned int getYear (unsigned int run) const
std::string getDataPeriod (unsigned int run) const
std::string getDataPeriod (unsigned int runNumber, unsigned int year) const
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Private Types

typedef std::pair< unsigned int, std::string > YearPeriod
typedef std::pair< YearPeriod, unsigned intEffiHistoIdent
typedef std::map< EffiHistoIdent, TH1_PtrEfficiencyMap
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

virtual CorrectionCode getMuonEfficiency (Double_t &eff, const TrigMuonEff::Configuration &configuration, const xAOD::Muon &muon, const std::string &trigger, const std::string &systematic) const
virtual CorrectionCode GetTriggerSF_dimu (Double_t &TriggerSF, TrigMuonEff::Configuration &configuration, const xAOD::MuonContainer &mucont, const std::string &trigger) const
virtual CorrectionCode GetTriggerSF (Double_t &TriggerSF, TrigMuonEff::Configuration &configuration, const xAOD::MuonContainer &mucont, const std::string &trigger) const
virtual CorrectionCode GetTriggerSF (Double_t &TriggerSF, TrigMuonEff::Configuration &configuration, const xAOD::Muon &muon, const std::string &trigger) const
virtual CorrectionCode getDimuonEfficiency (Double_t &eff, const TrigMuonEff::Configuration &configuration, const xAOD::MuonContainer &mucont, const std::string &chain, const std::string &systematic) const
const CP::SystematicSetappliedSystematics () const
StatusCode registerSystematics ()
StatusCode LoadTriggerMap (unsigned int year)
unsigned int encodeHistoName (const std::string &period, const std::string &Trigger, bool isData, const std::string &Systematic, bool isBarrel=true) const
unsigned int encodeHistoName (const std::string &Trigger, const TrigMuonEff::Configuration &configuration, const std::string &Systematic, bool isBarrel=true) const
CorrectionCode getThreshold (Int_t &threshold, const std::string &trigger) const
std::string getTriggerCorrespondingToDimuonTrigger (const std::string &trigger) const
TDirectory * getTemporaryDirectory (void) const
std::vector< TH1_PtrgenerateReplicas (TH1_Ptr h, int nrep, int seed) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< xAOD::EventInfom_eventInfo {this, "EventInfoContName", "EventInfo", "event info key"}
std::unordered_map< CP::SystematicSet, CP::SystematicSetm_systFilter
CP::SystematicSetm_appliedSystematics {}
EfficiencyMap m_efficiencyMap
std::map< EffiHistoIdent, std::vector< TH1_Ptr > > m_efficiencyMapReplicaArray
Gaudi::Property< std::string > m_muonQuality {this, "MuonQuality", "Medium", "the muon quality to get the scale factors for"}
Gaudi::Property< std::string > m_campaign {this, "Campaign", "", "the MC campaign to get the scale factors for"}
Gaudi::Property< std::string > m_calibrationVersion {this, "CalibrationVersion", "250731_SummerUpdate", "the calibration version to use"}
Gaudi::Property< std::string > m_customInputFolder {this, "CustomInputFolder", "", "the custom input folder to use (debugging only)"}
Gaudi::Property< std::map< unsigned int, std::string > > m_customInputFilePerYear {this, "CustomInputFilePerYear", {}, "the custom input file to use per year (debugging only)"}
Gaudi::Property< std::string > m_binning {this, "Binning", "fine", "the binning to use"}
Gaudi::Property< boolm_allowZeroSF {this, "AllowZeroSF", false, "if a trigger is not available will return 0 instead of throwing an error. More difficult to spot configuration issues. Use at own risk"}
Gaudi::Property< boolm_experimental {this, "UseExperimental", false, "enable experimental features like single muon SF"}
Gaudi::Property< intm_forceYear {this, "ForceYear", -1, "Only for developers. Never use this in any analysis!!!!!!"}
Gaudi::Property< std::string > m_forcePeriod {this, "ForcePeriod", "", "Only for developers. Never use this in any analysis!!!!!!"}
Gaudi::Property< std::vector< std::string > > m_replicaTriggerList {this, "ReplicaTriggerList", {}, "List of triggers on which we want to generate stat. uncertainty toy replicas."}
std::set< std::string > m_replicaSet
Gaudi::Property< intm_nReplicas {this, "NReplicas", 100, "Number of generated toy replicas, if replicas are required."}
Gaudi::Property< intm_ReplicaRandomSeed {this, "ReplicaRandomSeed", 12345, "Random seed for toy replica generation."}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Static Private Attributes

static const std::map< unsigned int, intm_runNumber_year

Detailed Description

Definition at line 26 of file MuonTriggerScaleFactors.h.

Member Typedef Documentation

◆ EfficiencyMap

Definition at line 88 of file MuonTriggerScaleFactors.h.

◆ EffiHistoIdent

Definition at line 87 of file MuonTriggerScaleFactors.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

◆ YearPeriod

typedef std::pair<unsigned int, std::string> CP::MuonTriggerScaleFactors::YearPeriod
private

Definition at line 86 of file MuonTriggerScaleFactors.h.

Constructor & Destructor Documentation

◆ MuonTriggerScaleFactors()

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

Definition at line 40 of file MuonTriggerScaleFactors.cxx.

40 :
41 asg::AsgTool(name) {}

◆ ~MuonTriggerScaleFactors()

CP::MuonTriggerScaleFactors::~MuonTriggerScaleFactors ( )
virtual

Definition at line 43 of file MuonTriggerScaleFactors.cxx.

43{ }

Member Function Documentation

◆ affectingSystematics()

CP::SystematicSet CP::MuonTriggerScaleFactors::affectingSystematics ( ) const
virtual

returns: the list of all systematics this tool can be affected by

Implements CP::IReentrantSystematicsTool.

Definition at line 871 of file MuonTriggerScaleFactors.cxx.

871 {
872 CP::SystematicSet mySysSet;
873
874 mySysSet.insert(CP::SystematicVariation("MUON_EFF_TrigSystUncertainty", 1));
875 mySysSet.insert(CP::SystematicVariation("MUON_EFF_TrigSystUncertainty", -1));
876
877 //Consider full statUncertainty if TOY replicas are not used
878 if (m_replicaTriggerList.size() == 0) {
879 mySysSet.insert(CP::SystematicVariation("MUON_EFF_TrigStatUncertainty", 1));
880 mySysSet.insert(CP::SystematicVariation("MUON_EFF_TrigStatUncertainty", -1));
881 } else {
882 for (int i = 0; i < m_nReplicas; ++i) { //TOFIX Hack with just up variations! needs ASG reserved words for a clean handling//+++++++
883 mySysSet.insert(CP::SystematicVariation(Form("MUON_EFF_Trig_MCTOY%03d", i), 1));
884 }
885 }
886
887 return mySysSet;
888 }
Gaudi::Property< std::vector< std::string > > m_replicaTriggerList
void insert(const SystematicVariation &systematic)
description: insert a systematic into the set

◆ appliedSystematics()

const CP::SystematicSet & CP::MuonTriggerScaleFactors::appliedSystematics ( ) const
inlineprivate

Definition at line 70 of file MuonTriggerScaleFactors.h.

70 {
72 }

◆ applySystematicVariation()

StatusCode CP::MuonTriggerScaleFactors::applySystematicVariation ( const CP::SystematicSet & systConfig)
virtual

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 905 of file MuonTriggerScaleFactors.cxx.

905 {
906 // First, check if we already know this systematic configuration
907 auto itr = m_systFilter.find(systConfig);
908
909 // If it's a new input set, we need to filter it
910 if (itr == m_systFilter.end()) {
911
912 // New systematic. We need to parse it.
913 static const CP::SystematicSet affectingSys = affectingSystematics();
914 CP::SystematicSet filteredSys;
915 if (!CP::SystematicSet::filterForAffectingSystematics(systConfig, affectingSys, filteredSys)) {
916 ATH_MSG_ERROR("Unsupported combination of systematics passed to the tool!");
917 return StatusCode::FAILURE;
918 }
919
920 // Insert filtered set into the map
921 itr = m_systFilter.insert(std::make_pair(systConfig, filteredSys)).first;
922 }
923
924 CP::SystematicSet& mySysConf = itr->second;
925
926 // Check to see if the set of variations tries to add in the uncertainty up and down. Since the errors
927 // are symetric this would result in 0 and so should not be done.
928 static const CP::SystematicVariation stat_up("MUON_EFF_TrigStatUncertainty", 1);
929 static const CP::SystematicVariation stat_down("MUON_EFF_TrigStatUncertainty", -1);
930 static const CP::SystematicVariation syst_up("MUON_EFF_TrigSystUncertainty", 1);
931 static const CP::SystematicVariation syst_down("MUON_EFF_TrigSystUncertainty", -1);
932
933 if ((mySysConf.matchSystematic(stat_up) && mySysConf.matchSystematic(stat_down)) || (mySysConf.matchSystematic(syst_up) && mySysConf.matchSystematic(syst_down))) {
934 return StatusCode::FAILURE;
935 }
936
937 m_appliedSystematics = &mySysConf;
938 return StatusCode::SUCCESS;
939 }
#define ATH_MSG_ERROR(x)
std::unordered_map< CP::SystematicSet, CP::SystematicSet > m_systFilter
virtual CP::SystematicSet affectingSystematics() const
returns: the list of all systematics this tool can be affected by
bool matchSystematic(const SystematicVariation &systematic, MATCHTYPE type=FULL) const
static StatusCode filterForAffectingSystematics(const SystematicSet &systConfig, const SystematicSet &affectingSystematics, SystematicSet &filteredSystematics)
description: filter the systematics for the affected systematics returns: success guarantee: strong f...

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

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

◆ encodeHistoName() [1/2]

unsigned int CP::MuonTriggerScaleFactors::encodeHistoName ( const std::string & period,
const std::string & Trigger,
bool isData,
const std::string & Systematic,
bool isBarrel = true ) const
private

Definition at line 383 of file MuonTriggerScaleFactors.cxx.

383 {
384 //keep the string as short as possible
385 const std::string histName = period + "_" + Trigger + "_" + (isBarrel ? "b" : "e") + "_" + (isData ? "data" : "mc") + Systematic;
386 return std::hash<std::string>()(histName);
387 }

◆ encodeHistoName() [2/2]

unsigned int CP::MuonTriggerScaleFactors::encodeHistoName ( const std::string & Trigger,
const TrigMuonEff::Configuration & configuration,
const std::string & Systematic,
bool isBarrel = true ) const
private

Definition at line 389 of file MuonTriggerScaleFactors.cxx.

389 {
390 //keep the string as short as possible
391 return encodeHistoName(getDataPeriod(), Trigger, configuration.isData, Systematic, isBarrel);
392
393 }
unsigned int encodeHistoName(const std::string &period, const std::string &Trigger, bool isData, const std::string &Systematic, bool isBarrel=true) const

◆ evtStore()

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.

◆ 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

◆ generateReplicas()

std::vector< TH1_Ptr > CP::MuonTriggerScaleFactors::generateReplicas ( TH1_Ptr h,
int nrep,
int seed ) const
private

Definition at line 338 of file MuonTriggerScaleFactors.cxx.

338 {
339 TRandom3 Rndm(seed);
340 std::vector<TH1_Ptr> replica_v;
341 const int xbins = h->GetNbinsX(), ybins = h->GetNbinsY();
342
343 for (int t = 0; t < nrep; ++t) {
344 TH2* replica = dynamic_cast<TH2*>(h->Clone(Form("rep%d_%s", t, h->GetName())));
345
346 for (int x_i = 0; x_i <= xbins; ++x_i) {
347 for (int y_i = 0; y_i <= ybins; ++y_i) {
348 replica->SetBinContent(x_i, y_i, Rndm.Gaus(h->GetBinContent(x_i, y_i), h->GetBinError(x_i, y_i)));
349 }
350 }
351 replica_v.push_back(TH1_Ptr(replica));
352 }
353 return replica_v;
354 }
std::shared_ptr< TH1 > TH1_Ptr

◆ getBinNumber()

int CP::MuonTriggerScaleFactors::getBinNumber ( const xAOD::Muon & muon,
const std::string & trigger ) const
virtual

Implements CP::IMuonTriggerScaleFactors.

Definition at line 361 of file MuonTriggerScaleFactors.cxx.

361 {
362 if(!m_experimental){
363 ATH_MSG_ERROR("MuonTriggerScaleFactors::getTriggerScaleFactor This is an experimental function. If you really know what you are doing set UseExperimental property.");
365 }
366
367 const double mu_eta = muon.eta();
368 const double mu_phi = muon.phi();
369 bool isBarrel = std::abs(mu_eta) < muon_barrel_endcap_boundary;
370 TH1_Ptr cit = getEfficiencyHistogram(trigger, true, "nominal", isBarrel);
371 if(!cit.get()){
372 if(!m_allowZeroSF)
373 ATH_MSG_ERROR("Could not find efficiency map for muon with eta: " << mu_eta << " and phi: " << mu_phi << ". Something is inconsistent. Please check your settings for year, mc and trigger." );
374 return -1;
375 }
376 auto eff_h2 = cit;
377 double mu_phi_corr = mu_phi;
378 if (mu_phi_corr < eff_h2->GetYaxis()->GetXmin()) mu_phi_corr += 2.0 * M_PI;
379 if (mu_phi_corr > eff_h2->GetYaxis()->GetXmax()) mu_phi_corr -= 2.0 * M_PI;
380 return eff_h2->FindFixBin(mu_eta, mu_phi_corr);
381 }
#define M_PI
@ Error
Some error happened during the object correction.
virtual std::shared_ptr< TH1 > getEfficiencyHistogram(unsigned int year, const std::string &period, const std::string &trigger, bool isData, const std::string &Systematic, bool isBarrel=true) const
Gaudi::Property< bool > m_allowZeroSF
Gaudi::Property< bool > m_experimental
constexpr double muon_barrel_endcap_boundary

◆ getDataPeriod() [1/3]

std::string CP::MuonTriggerScaleFactors::getDataPeriod ( ) const
protected

Definition at line 728 of file MuonTriggerScaleFactors.cxx.

728 {
729 return getDataPeriod(getRunNumber());
730 }

◆ getDataPeriod() [2/3]

std::string CP::MuonTriggerScaleFactors::getDataPeriod ( unsigned int run) const
protected

Definition at line 732 of file MuonTriggerScaleFactors.cxx.

732 {
733 return getDataPeriod(run, getYear(run));
734 }
unsigned int getYear(unsigned int run) const
int run(int argc, char *argv[])

◆ getDataPeriod() [3/3]

std::string CP::MuonTriggerScaleFactors::getDataPeriod ( unsigned int runNumber,
unsigned int year ) const
protected

◆ getDimuonEfficiency()

CorrectionCode CP::MuonTriggerScaleFactors::getDimuonEfficiency ( Double_t & eff,
const TrigMuonEff::Configuration & configuration,
const xAOD::MuonContainer & mucont,
const std::string & chain,
const std::string & systematic ) const
privatevirtual

Definition at line 669 of file MuonTriggerScaleFactors.cxx.

669 {
670
671 std::string trigger = getTriggerCorrespondingToDimuonTrigger(chain);
672 Int_t threshold;
673 CorrectionCode result = getThreshold(threshold, trigger);
674 if (result != CorrectionCode::Ok) return result;
675
678
679 Double_t eff1 = 0;
680 if ((**mu1).pt() > threshold) {
681 CorrectionCode result1 = getMuonEfficiency(eff1, configuration, (**mu1), trigger, systematic);
682 if (result1 != CorrectionCode::Ok) return result1;
683 }
684 Double_t eff2 = 0;
685 if ((**mu2).pt() > threshold) {
686 CorrectionCode result2 = getMuonEfficiency(eff2, configuration, (**mu2), trigger, systematic);
687 if (result2 != CorrectionCode::Ok) return result2;
688 }
689
690 eff = eff1 * eff2;
691 return CorrectionCode::Ok;
692 }
@ Ok
The correction was done successfully.
virtual CorrectionCode getMuonEfficiency(Double_t &eff, const TrigMuonEff::Configuration &configuration, const xAOD::Muon &muon, const std::string &trigger, const std::string &systematic) const
std::string getTriggerCorrespondingToDimuonTrigger(const std::string &trigger) const
CorrectionCode getThreshold(Int_t &threshold, const std::string &trigger) const
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.

◆ getEfficiencyHistogram() [1/2]

TH1_Ptr CP::MuonTriggerScaleFactors::getEfficiencyHistogram ( const std::string & trigger,
bool isData,
const std::string & Systematic,
bool isBarrel = true ) const
protectedvirtual

Definition at line 403 of file MuonTriggerScaleFactors.cxx.

403 {
404 unsigned int run = getRunNumber();
405 return getEfficiencyHistogram(getYear(run), getDataPeriod(run), trigger, isData, Systematic, isBarrel);
406 }

◆ getEfficiencyHistogram() [2/2]

TH1_Ptr CP::MuonTriggerScaleFactors::getEfficiencyHistogram ( unsigned int year,
const std::string & period,
const std::string & trigger,
bool isData,
const std::string & Systematic,
bool isBarrel = true ) const
protectedvirtual

Definition at line 394 of file MuonTriggerScaleFactors.cxx.

394 {
395 EffiHistoIdent Ident = EffiHistoIdent(YearPeriod(year, period), encodeHistoName(period, trigger, isData, Systematic, isBarrel));
396 EfficiencyMap::const_iterator Itr = m_efficiencyMap.find(Ident);
397
398 if (Itr == m_efficiencyMap.end()) {
399 return TH1_Ptr();
400 }
401 return Itr->second;
402 }
std::pair< YearPeriod, unsigned int > EffiHistoIdent
std::pair< unsigned int, std::string > YearPeriod

◆ 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 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ getMuonEfficiency()

CorrectionCode CP::MuonTriggerScaleFactors::getMuonEfficiency ( Double_t & eff,
const TrigMuonEff::Configuration & configuration,
const xAOD::Muon & muon,
const std::string & trigger,
const std::string & systematic ) const
privatevirtual

Definition at line 408 of file MuonTriggerScaleFactors.cxx.

408 {
409 const double mu_eta = muon.eta();
410 const double mu_phi = muon.phi();
411 bool isBarrel = std::abs(mu_eta) < muon_barrel_endcap_boundary;
412
413 TH1_Ptr eff_h2 = nullptr;
414 if (configuration.replicaIndex >= 0) { //Only look into the replicas if asking for them
415
416 unsigned int run = getRunNumber();
417 EffiHistoIdent Ident = EffiHistoIdent(YearPeriod(getYear(run), getDataPeriod(run)), encodeHistoName(getDataPeriod(run), trigger, configuration.isData, "repl", isBarrel));
418 std::map<EffiHistoIdent, std::vector<TH1_Ptr> >::const_iterator cit = m_efficiencyMapReplicaArray.find(Ident);
419 if (cit == m_efficiencyMapReplicaArray.end()) {
420 if (m_allowZeroSF) {
421 ATH_MSG_WARNING("Could not find what you are looking for in the efficiency map. The trigger you are looking for, year and mc are not consistent, or the trigger is unavailable in this data period. Returning efficiency = 0.");
422 eff = 0.;
423 return CorrectionCode::Ok;
424 }
425
426 else {
427 ATH_MSG_ERROR("Could not find what you are looking for in the efficiency map. The trigger you are looking for, year and mc are not consistent, or the trigger is unavailable in this data period. Please check how you set up the tool.");
429 }
430 }
431
432 if (configuration.replicaIndex >= (int) cit->second.size()) {
433 ATH_MSG_ERROR("MuonTriggerScaleFactors::getMuonEfficiency ; index for replicated histograms is out of range.");
435 }
436
437 eff_h2 = cit->second[configuration.replicaIndex];
438 } else { //Standard case, look into the usual eff map
439 TH1_Ptr cit = getEfficiencyHistogram(trigger, configuration.isData, systematic, isBarrel);
440 if (cit.get() == nullptr) {
441 if (m_allowZeroSF) {
442 ATH_MSG_WARNING("Could not find what you are looking for in the efficiency map. The trigger you are looking for, year and mc are not consistent, or the trigger is unavailable in this data period. Returning efficiency = 0.");
443 eff = 0.;
444 return CorrectionCode::Ok;
445 } else {
446 ATH_MSG_ERROR("Could not find what you are looking for in the efficiency map. The trigger you are looking for, year and mc are not consistent, or the trigger is unavailable in this data period. Please check how you set up the tool.");
448 }
449 }
450 eff_h2 = cit;
451 }
452
453 double mu_phi_corr = mu_phi;
454 if (mu_phi_corr < eff_h2->GetYaxis()->GetXmin()) mu_phi_corr += 2.0 * M_PI;
455 if (mu_phi_corr > eff_h2->GetYaxis()->GetXmax()) mu_phi_corr -= 2.0 * M_PI;
456
457 const int bin = eff_h2->FindFixBin(mu_eta, mu_phi_corr);
458 const double efficiency = eff_h2->GetBinContent(bin);
459
460 eff = efficiency;
461
462 ATH_MSG_DEBUG("getMuonEfficiency [eta,phi,phi_corr]=[" << mu_eta << "," << mu_phi << "," << mu_phi_corr << "], ibin=" << bin << " eff=" << eff);
463
464 return CorrectionCode::Ok;
465
466 }
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
@ OutOfValidityRange
Input object is out of validity range.
std::map< EffiHistoIdent, std::vector< TH1_Ptr > > m_efficiencyMapReplicaArray
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
int replicaIndex
index of replicated histograms to access

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

◆ getReplica_index()

int CP::MuonTriggerScaleFactors::getReplica_index ( const std::string & sysBaseName,
const std::string & trigStr ) const
virtual

Definition at line 274 of file MuonTriggerScaleFactors.cxx.

274 {
275 if (m_replicaSet.find(trigStr) == m_replicaSet.end()) return -1; //No toys for this trigger
276 std::size_t pos = sysBaseName.find("MCTOY");
277 if (pos == std::string::npos) return -1; //sys variation not affected by TOYS
278 return atoi(sysBaseName.substr(pos + 5, pos + 8).c_str()); //toys for this trigger are around get the 3-digit number
279 }
std::set< std::string > m_replicaSet
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...

◆ getRunNumber()

unsigned int CP::MuonTriggerScaleFactors::getRunNumber ( ) const
protected

Definition at line 816 of file MuonTriggerScaleFactors.cxx.

816 {
817 static const SG::AuxElement::ConstAccessor<unsigned int> acc_rnd("RandomRunNumber");
818 SG::ReadHandle<xAOD::EventInfo> info(m_eventInfo);
819 if (info.operator->()==nullptr) {
820 ATH_MSG_FATAL("Could not retrieve the xAOD::EventInfo with name: " << m_eventInfo.key() << ". Exiting the code.");
821 throw std::invalid_argument{""};
822 }
823 if (!info->eventType(xAOD::EventInfo::IS_SIMULATION)) {
824 ATH_MSG_DEBUG("The current event is a data event. Return runNumber instead.");
825 return info->runNumber();
826 }
827 if (!acc_rnd.isAvailable(*info)) {
828 if(m_forceYear == -1 && m_forcePeriod == "")
829 ATH_MSG_FATAL("Failed to find the RandomRunNumber decoration. Please call the apply() method from the PileupReweightingTool beforehand in order to get period dependent SFs");
830 throw std::invalid_argument{""};
831 } else if (acc_rnd(*info) == 0) {
832 ATH_MSG_FATAL("Pile up tool has given runNumber 0. Exiting the code.");
833 throw std::invalid_argument{""};
834 }
835
836 // standard behaviour for MC, get the random RunNumber
837 return acc_rnd(*info);
838 }
#define ATH_MSG_FATAL(x)
Gaudi::Property< std::string > m_forcePeriod
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
@ IS_SIMULATION
true: simulation, false: data

◆ getTemporaryDirectory()

TDirectory * CP::MuonTriggerScaleFactors::getTemporaryDirectory ( void ) const
private

Definition at line 840 of file MuonTriggerScaleFactors.cxx.

840 {
841 gROOT->cd();
842 TDirectory* tempDir = 0;
843 int counter = 0;
844 while (not tempDir) {
845 std::stringstream dirname;
846 dirname << "MuonTriggerScaleFactorsTempDir_%i" << counter;
847 if (gROOT->GetDirectory((dirname.str()).c_str())) {
848 ++counter;
849 continue;
850 }
851 tempDir = gROOT->mkdir((dirname.str()).c_str());
852 if (not tempDir) {
853 ATH_MSG_ERROR("getTemporaryDirectory::Temporary directory could not be created");
854 }
855 }
856 return tempDir;
857 }
std::string dirname(std::string name)
Definition utils.cxx:200

◆ getThreshold()

CorrectionCode CP::MuonTriggerScaleFactors::getThreshold ( Int_t & threshold,
const std::string & trigger ) const
private

Definition at line 700 of file MuonTriggerScaleFactors.cxx.

700 {
701 std::size_t index = trigger.find("HLT_mu");
702 if (index != std::string::npos) {
703 std::string rawNumber = trigger.substr(index + 6);
704 if (!rawNumber.empty() && isdigit(rawNumber[0])) {
705 std::stringstream(rawNumber) >> threshold;
706 if (threshold < 10) threshold = 10000;
707 else threshold = (threshold + 1) * 1000;
708 return CorrectionCode::Ok;
709 }
710 }
711 ATH_MSG_ERROR("MuonTriggerScaleFactors::getThreshold Could not extract threshold for trigger " << trigger);
713 }
str index
Definition DeMoScan.py:362

◆ getTriggerCorrespondingToDimuonTrigger()

std::string CP::MuonTriggerScaleFactors::getTriggerCorrespondingToDimuonTrigger ( const std::string & trigger) const
private

Definition at line 694 of file MuonTriggerScaleFactors.cxx.

694 {
695 if (trigger.find("2mu10") != std::string::npos) return "HLT_mu10";
696 if (trigger.find("2mu14") != std::string::npos) return "HLT_mu14";
697 throw std::runtime_error("Unknown dimuon trigger");
698 }

◆ getTriggerEfficiency()

CorrectionCode CP::MuonTriggerScaleFactors::getTriggerEfficiency ( const xAOD::Muon & mu,
Double_t & efficiency,
const std::string & trigger,
Bool_t dataType ) const
virtual

Implements CP::IMuonTriggerScaleFactors.

Definition at line 281 of file MuonTriggerScaleFactors.cxx.

281 {
282 if (trigger.empty()) {
283 ATH_MSG_ERROR("MuonTriggerScaleFactors::getTriggerEfficiency Trigger must have value.");
285 }
286 TrigMuonEff::Configuration configuration;
287 configuration.isData = dataType;
288 configuration.replicaIndex = -1;
289 Int_t threshold;
290 CorrectionCode result = getThreshold(threshold, trigger);
291 if (result != CorrectionCode::Ok) return result;
292 if (mu.pt() < threshold) {
293 efficiency = 0;
294 return CorrectionCode::Ok;
295 }
296
297 // Pre-define uncertainty variations
298 static const CP::SystematicVariation stat_up("MUON_EFF_TrigStatUncertainty", 1);
299 static const CP::SystematicVariation stat_down("MUON_EFF_TrigStatUncertainty", -1);
300 static const CP::SystematicVariation syst_up("MUON_EFF_TrigSystUncertainty", 1);
301 static const CP::SystematicVariation syst_down("MUON_EFF_TrigSystUncertainty", -1);
302
303 std::string systype = "";
304 if (appliedSystematics().matchSystematic(syst_down) && !dataType) {
305 systype = "syst_down";
306 } else if (appliedSystematics().matchSystematic(syst_up) && !dataType) {
307 systype = "syst_up";
308 } else if (appliedSystematics().matchSystematic(stat_down)) {
309 systype = "stat_down";
310 } else if (appliedSystematics().matchSystematic(stat_up)) {
311 systype = "stat_up";
312 } else {
313 systype = "nominal";
314 }
315
316 // Toys, if found, will overwrite the data hists stat with the generated toy
317 //+++++++++++++
318 // The best way is the use of filterByName with the 000MCTOY at the end. See:
319 // if( !(appliedSystematics().filterByBaseName("MUON_EFF_Trig_MCTOY000")).empty()){//The following is a hack!!!
320 //++++++++++THE FOLLOWING IS A PARTIAL HACK!!!
321 if (!appliedSystematics().empty() && configuration.isData == true) {
322 configuration.replicaIndex = getReplica_index(appliedSystematics().begin()->basename(), trigger);
323 if (configuration.replicaIndex != -1) systype = "replicas";
324 }
325 CorrectionCode cc = getMuonEfficiency(efficiency, configuration, mu, trigger, systype);
326 return cc;
327 }
static const Attributes_t empty
virtual int getReplica_index(const std::string &sysBaseName, const std::string &trigStr) const
const CP::SystematicSet & appliedSystematics() const
std::string basename(std::string name)
Definition utils.cxx:207

◆ getTriggerScaleFactor() [1/2]

CorrectionCode CP::MuonTriggerScaleFactors::getTriggerScaleFactor ( const xAOD::Muon & muon,
Double_t & triggersf,
const std::string & trigger ) const
virtual

Implements CP::IMuonTriggerScaleFactors.

Definition at line 226 of file MuonTriggerScaleFactors.cxx.

226 {
227 if(!m_experimental){
228 ATH_MSG_ERROR("MuonTriggerScaleFactors::getTriggerScaleFactor This is an experimental function. If you really know what you are doing set UseExperimental property.");
230 }
231
232 if (trigger.empty()) {
233 ATH_MSG_ERROR("MuonTriggerScaleFactors::getTriggerScaleFactor Trigger must have value.");
235 }
236
237 TrigMuonEff::Configuration configuration;
238
239 if (trigger == "HLT_mu8noL1")
240 ATH_MSG_WARNING("What you are trying to do is not correct. For di-muon triggers you should get the efficiency with getTriggerEfficiency and compute the SF by yourself.");
241 else if (trigger.find("HLT_2mu10") != std::string::npos || trigger.find("HLT_2mu14") != std::string::npos)
242 ATH_MSG_WARNING("Di-muon trigger scale factors for single reco muons are not supported!");
243 else
244 return GetTriggerSF(triggersf, configuration, muon, trigger);
245 return CorrectionCode::Ok;
246 }
virtual CorrectionCode GetTriggerSF(Double_t &TriggerSF, TrigMuonEff::Configuration &configuration, const xAOD::MuonContainer &mucont, const std::string &trigger) const

◆ getTriggerScaleFactor() [2/2]

CorrectionCode CP::MuonTriggerScaleFactors::getTriggerScaleFactor ( const xAOD::MuonContainer & mucont,
Double_t & triggersf,
const std::string & trigger ) const
virtual

Implements CP::IMuonTriggerScaleFactors.

Definition at line 248 of file MuonTriggerScaleFactors.cxx.

248 {
249 if (trigger.empty()) {
250 ATH_MSG_ERROR("MuonTriggerScaleFactors::getTriggerScaleFactor Trigger must have value.");
252 }
253
254 TrigMuonEff::Configuration configuration;
255
256 if (trigger == "HLT_mu8noL1") {
257 ATH_MSG_WARNING("What you are trying to do is not correct. For di-muon triggers you should get the efficiency with getTriggerEfficiency and compute the SF by yourself.");
258 } else if (trigger.find("HLT_2mu10") != std::string::npos || trigger.find("HLT_2mu14") != std::string::npos) {
259 CorrectionCode cc = GetTriggerSF_dimu(triggersf, configuration, mucont, trigger);
260 return cc;
261 } else {
262 CorrectionCode cc = GetTriggerSF(triggersf, configuration, mucont, trigger);
263 return cc;
264 }
265 return CorrectionCode::Ok;
266 }
virtual CorrectionCode GetTriggerSF_dimu(Double_t &TriggerSF, TrigMuonEff::Configuration &configuration, const xAOD::MuonContainer &mucont, const std::string &trigger) const

◆ GetTriggerSF() [1/2]

CorrectionCode CP::MuonTriggerScaleFactors::GetTriggerSF ( Double_t & TriggerSF,
TrigMuonEff::Configuration & configuration,
const xAOD::Muon & muon,
const std::string & trigger ) const
privatevirtual

Definition at line 606 of file MuonTriggerScaleFactors.cxx.

606 {
607 Int_t threshold;
608 CorrectionCode result = getThreshold(threshold, trigger);
609 if (result != CorrectionCode::Ok)
610 return result;
611
612 double eff_data = 0., eff_mc = 0.;
613
614 if (mu.pt() < threshold) {
615 eff_data = 0.;
616 eff_mc = 0.;
617 TriggerSF = 1.;
618 return CorrectionCode::Ok;
619 }
620
621 std::string muon_trigger_name = trigger;
622 std::string data_err = "";
623 std::string mc_err = "";
624
625 // Pre-define uncertainty variations
626 static const CP::SystematicVariation stat_up("MUON_EFF_TrigStatUncertainty", 1);
627 static const CP::SystematicVariation stat_down("MUON_EFF_TrigStatUncertainty", -1);
628 static const CP::SystematicVariation syst_up("MUON_EFF_TrigSystUncertainty", 1);
629 static const CP::SystematicVariation syst_down("MUON_EFF_TrigSystUncertainty", -1);
630
631 if (appliedSystematics().matchSystematic(syst_down)) {
632 data_err = "nominal";
633 mc_err = "syst_up";
634 } else if (appliedSystematics().matchSystematic(syst_up)) {
635 data_err = "nominal";
636 mc_err = "syst_down";
637 } else if (appliedSystematics().matchSystematic(stat_down)) {
638 data_err = "stat_down";
639 mc_err = "nominal";
640 } else if (appliedSystematics().matchSystematic(stat_up)) {
641 data_err = "stat_up";
642 mc_err = "nominal";
643 } else {
644 data_err = "nominal";
645 mc_err = "nominal";
646 }
647
648 if (!appliedSystematics().empty()) {
649 configuration.replicaIndex = getReplica_index(appliedSystematics().begin()->basename(), trigger);
650 if (configuration.replicaIndex != -1) data_err = "replicas";
651 }
652
653 configuration.isData = true;
654 CorrectionCode result_data = getMuonEfficiency(eff_data, configuration, mu, muon_trigger_name, data_err);
655 if (result_data != CorrectionCode::Ok)
656 return result_data;
657 configuration.isData = false;
658 configuration.replicaIndex = -1;
659 CorrectionCode result_mc = getMuonEfficiency(eff_mc, configuration, mu, muon_trigger_name, mc_err);
660 if (result_mc != CorrectionCode::Ok)
661 return result_mc;
662 if (eff_data == 0)
663 TriggerSF = 0;
664 if (std::abs(eff_mc) > 0.0001)
665 TriggerSF = eff_data / eff_mc;
666 return CorrectionCode::Ok;
667 }

◆ GetTriggerSF() [2/2]

CorrectionCode CP::MuonTriggerScaleFactors::GetTriggerSF ( Double_t & TriggerSF,
TrigMuonEff::Configuration & configuration,
const xAOD::MuonContainer & mucont,
const std::string & trigger ) const
privatevirtual

Definition at line 527 of file MuonTriggerScaleFactors.cxx.

527 {
528 Int_t threshold;
529 CorrectionCode result = getThreshold(threshold, trigger);
530 if (result != CorrectionCode::Ok) return result;
531
532 double rate_not_fired_data = 1.;
533 double rate_not_fired_mc = 1.;
534
535 for (const auto mu : mucont) {
536
537 double eff_data = 0., eff_mc = 0.;
538
539 if (mu->pt() < threshold) {
540
541 eff_data = 0.;
542 eff_mc = 0.;
543
544 } else {
545
546 std::string muon_trigger_name = trigger;
547 std::string data_err = "";
548 std::string mc_err = "";
549
550 // Pre-define uncertainty variations
551 static const CP::SystematicVariation stat_up("MUON_EFF_TrigStatUncertainty", 1);
552 static const CP::SystematicVariation stat_down("MUON_EFF_TrigStatUncertainty", -1);
553 static const CP::SystematicVariation syst_up("MUON_EFF_TrigSystUncertainty", 1);
554 static const CP::SystematicVariation syst_down("MUON_EFF_TrigSystUncertainty", -1);
555
556 if (appliedSystematics().matchSystematic(syst_down)) {
557 data_err = "nominal";
558 mc_err = "syst_up";
559 } else if (appliedSystematics().matchSystematic(syst_up)) {
560 data_err = "nominal";
561 mc_err = "syst_down";
562 } else if (appliedSystematics().matchSystematic(stat_down)) {
563 data_err = "stat_down";
564 mc_err = "nominal";
565 } else if (appliedSystematics().matchSystematic(stat_up)) {
566 data_err = "stat_up";
567 mc_err = "nominal";
568 } else {
569 data_err = "nominal";
570 mc_err = "nominal";
571 }
572
573 //Toys, if found, will overwrite the data hists, on which toys for stat uncertainty have been generated
574 //+++++++++++++
575 //The best way is the use of filterByName with the 000MCTOY at the end. See:
576 // if( !(appliedSystematics().filterByBaseName("MUON_EFF_Trig_MCTOY000")).empty()){//The following is a hack!!!
577 //++++++++++The following is a hack!!!
578 if (!appliedSystematics().empty()) {
579 configuration.replicaIndex = getReplica_index(appliedSystematics().begin()->basename(), trigger);
580 if (configuration.replicaIndex != -1) data_err = "replicas";
581 }
582
583 configuration.isData = true;
584 CorrectionCode result_data = getMuonEfficiency(eff_data, configuration, *mu, muon_trigger_name, data_err);
585 if (result_data != CorrectionCode::Ok) return result_data;
586 configuration.isData = false;
587 configuration.replicaIndex = -1;
588 CorrectionCode result_mc = getMuonEfficiency(eff_mc, configuration, *mu, muon_trigger_name, mc_err);
589 if (result_mc != CorrectionCode::Ok) return result_mc;
590 }
591 rate_not_fired_data *= (1. - eff_data);
592 rate_not_fired_mc *= (1. - eff_mc);
593 }
594
595 double event_SF = 1.;
596 if (1 - rate_not_fired_data == 0) event_SF = 0;
597 if ((mucont.size()) and (std::abs(1. - rate_not_fired_mc) > 0.0001)) {
598
599 event_SF = (1. - rate_not_fired_data) / (1. - rate_not_fired_mc);
600 }
601 TriggerSF = event_SF;
602
603 return CorrectionCode::Ok;
604 }

◆ GetTriggerSF_dimu()

CorrectionCode CP::MuonTriggerScaleFactors::GetTriggerSF_dimu ( Double_t & TriggerSF,
TrigMuonEff::Configuration & configuration,
const xAOD::MuonContainer & mucont,
const std::string & trigger ) const
privatevirtual

Definition at line 468 of file MuonTriggerScaleFactors.cxx.

468 {
469
470 if (mucont.size() != 2) {
471 ATH_MSG_FATAL("MuonTriggerScaleFactors::GetTriggerSF;Currently dimuon trigger chains only implemented for events with exactly 2 muons.");
472 }
473 ATH_MSG_DEBUG("The trigger that you choose : " << trigger);
474
475 Double_t eff_data = 0;
476 Double_t eff_mc = 0;
477
478 std::string data_err = "";
479 std::string mc_err = "";
480
481 if (appliedSystematics().matchSystematic(CP::SystematicVariation("MUON_EFF_TrigSystUncertainty", -1))) {
482 data_err = "nominal";
483 mc_err = "syst_up";
484 } else if (appliedSystematics().matchSystematic(CP::SystematicVariation("MUON_EFF_TrigSystUncertainty", 1))) {
485 data_err = "nominal";
486 mc_err = "syst_down";
487 } else if (appliedSystematics().matchSystematic(CP::SystematicVariation("MUON_EFF_TrigStatUncertainty", -1))) {
488 data_err = "stat_down";
489 mc_err = "nominal";
490 } else if (appliedSystematics().matchSystematic(CP::SystematicVariation("MUON_EFF_TrigStatUncertainty", 1))) {
491 data_err = "stat_up";
492 mc_err = "nominal";
493 } else {
494 data_err = "nominal";
495 mc_err = "nominal";
496 }
497
498 //Toys, if found, will overwrite the data hists with the sys generated with one toy
499 //+++++++++++++
500 //The best way is the use of filterByName with the 000MCTOY at the end. See:
501 // if( !(appliedSystematics().filterByBaseName("MUON_EFF_Trig_MCTOY000")).empty()){//The following is a hack!!!
502 //++++++++++THE FOLLOWING IS A PARTIAL HACK!!!
503 if (!appliedSystematics().empty()) {
504 configuration.replicaIndex = getReplica_index(appliedSystematics().begin()->basename(), trigger);
505 if (configuration.replicaIndex != -1) data_err = "replicas";
506 }
507
508 configuration.isData = true;
509 CorrectionCode result = getDimuonEfficiency(eff_data, configuration, mucont, trigger, data_err);
510 if (result != CorrectionCode::Ok) return result;
511
512 configuration.isData = false;
513 configuration.replicaIndex = -1;
514 result = getDimuonEfficiency(eff_mc, configuration, mucont, trigger, mc_err);
515 if (result != CorrectionCode::Ok) return result;
516
517 double event_SF = 1.;
518
519 if (std::abs(1. - eff_mc) > 0.0001) {
520 event_SF = eff_data / eff_mc;
521 }
522
523 TriggerSF = event_SF;
524 return CorrectionCode::Ok;
525 }
virtual CorrectionCode getDimuonEfficiency(Double_t &eff, const TrigMuonEff::Configuration &configuration, const xAOD::MuonContainer &mucont, const std::string &chain, const std::string &systematic) const
size_type size() const noexcept
Returns the number of elements in the collection.

◆ getYear()

unsigned int CP::MuonTriggerScaleFactors::getYear ( unsigned int run) const
protected

Definition at line 715 of file MuonTriggerScaleFactors.cxx.

715 {
716 if(m_forceYear != -1){
717 return m_forceYear;
718 }
719
720 int year=2050;
721 auto lower = m_runNumber_year.lower_bound(run);
722 if (lower != m_runNumber_year.end()){
723 year=lower->second;
724 }
725 return year;
726 }
static const std::map< unsigned int, int > m_runNumber_year

◆ initialize()

StatusCode CP::MuonTriggerScaleFactors::initialize ( void )
virtual

Implements CP::IMuonTriggerScaleFactors.

Definition at line 177 of file MuonTriggerScaleFactors.cxx.

177 {
178
179 ATH_MSG_INFO("MuonQuality = '" << m_muonQuality.value() << "'");
180 ATH_MSG_INFO("Binning = '" << m_binning << "'");
181 ATH_MSG_INFO("Campaign = '" << m_campaign << "'");
182 ATH_MSG_INFO("CalibrationRelease = '" << m_calibrationVersion.value() << "'");
183 ATH_MSG_INFO("CustomInputFolder = '" << m_customInputFolder.value() << "'");
184 ATH_MSG_INFO("AllowZeroSF = " << m_allowZeroSF);
185 ATH_MSG_INFO("experimental = " << m_experimental);
186
187 ATH_CHECK(m_eventInfo.initialize());
188
189 if (registerSystematics() != StatusCode::SUCCESS) {
190 return StatusCode::FAILURE;
191 }
192
193 if (applySystematicVariation(CP::SystematicSet()) != StatusCode::SUCCESS) {
194 ATH_MSG_ERROR("Could not configure for nominal settings");
195 return StatusCode::FAILURE;
196 }
197 // Initialize indexes of replicas for trigges which are asked
198 for (auto trigToy : m_replicaTriggerList)
199 m_replicaSet.insert(trigToy);
200
201
202 if (m_campaign.empty()) {
203 constexpr auto years_to_run = std::to_array<int>({2015, 2016, 2017, 2018, 2022, 2023, 2024});
204 for (const int &year: years_to_run) {
206 }
207 } else if (m_campaign.value() == "mc20a") {
210 } else if (m_campaign.value() == "mc20d") {
212 } else if (m_campaign.value() == "mc20e") {
214 } else if (m_campaign.value() == "mc23a") {
216 } else if (m_campaign.value() == "mc23d") {
218 } else if (m_campaign.value() == "mc23e") {
220 } else {
221 ATH_MSG_ERROR("Campaign " << m_campaign.value() << " is not supported. Please choose a valid campaign or leave empty to load all years.");
222 }
223 return StatusCode::SUCCESS;
224 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
StatusCode LoadTriggerMap(unsigned int year)
Gaudi::Property< std::string > m_campaign
Gaudi::Property< std::string > m_calibrationVersion
Gaudi::Property< std::string > m_binning
virtual StatusCode applySystematicVariation(const CP::SystematicSet &systConfig)
effects: configure this tool for the given list of systematic variations.
Gaudi::Property< std::string > m_customInputFolder
Gaudi::Property< std::string > m_muonQuality

◆ 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::MuonTriggerScaleFactors::isAffectedBySystematic ( const CP::SystematicVariation & systematic) const
virtual

Declare the interface that this class provides.

returns: whether this tool is affected by the given systematics

Implements CP::ISystematicsTool.

Definition at line 862 of file MuonTriggerScaleFactors.cxx.

862 {
863 if (!systematic.empty()) {
864 CP::SystematicSet sys = affectingSystematics();
865 return sys.find(systematic) != sys.end();
866 }
867 return true;
868 }
bool empty() const
returns: whether this is an empty systematic, i.e.

◆ isTriggerSupported()

bool CP::MuonTriggerScaleFactors::isTriggerSupported ( const std::string & trigger) const
virtual

Returns whether the trigger is supported by the tool or not. The decision depends on the present (random)RunNumber.

Implements CP::IMuonTriggerScaleFactors.

Definition at line 356 of file MuonTriggerScaleFactors.cxx.

356 {
357 TH1_Ptr H1 = getEfficiencyHistogram(trigger, true, "nominal");
358 return H1.get() != nullptr;
359 }

◆ LoadTriggerMap()

StatusCode CP::MuonTriggerScaleFactors::LoadTriggerMap ( unsigned int year)
private

Definition at line 45 of file MuonTriggerScaleFactors.cxx.

45 {
46 std::string fileName;
47 if (m_customInputFilePerYear.value().contains(year)) {
48 fileName = m_customInputFilePerYear.value().at(year);
49 if (fileName.empty()) {
50 ANA_MSG_INFO("Skipping loading trigger SF for year " << year << " since the provided file name is empty");
51 return StatusCode::SUCCESS;
52 } else {
53 ATH_MSG_INFO("Loading trigger SF from user specified file " << fileName << " for year " << year);
54 }
55 }
56
57 if (fileName.empty()) {
58 if (year == 2015) fileName = "muontrigger_sf_2015_mc20a_v3.root";
59 else if (year == 2016) fileName = "muontrigger_sf_2016_mc20a_v3.root";
60 else if (year == 2017) fileName = "muontrigger_sf_2017_mc20d_v3.root";
61 else if (year == 2018) fileName = "muontrigger_sf_2018_mc20e_v3.root";
62 else if (year == 2022) fileName = "muontrigger_sf_2022_mc23a_v3.root";
63 else if (year == 2023) fileName = "muontrigger_sf_2023_mc23d_v3.root";
64 else if (year == 2024) fileName = "muontrigger_sf_2024_mc23e_v1.root";
65 else {
66 ATH_MSG_WARNING("There is no SF file for year " << year << " yet");
67 return StatusCode::SUCCESS;
68 }
69 }
70
71 TDirectory* origDir = gDirectory;
72
73 std::string filePath;
74
75 if (m_customInputFolder.empty()) {
76 filePath = PathResolverFindCalibFile(Form("MuonEfficiencyCorrections/%s/%s", m_calibrationVersion.value().c_str(), fileName.c_str()));
77 if (filePath.empty()) {
78 ATH_MSG_ERROR("Unable to resolve the input file " << fileName << " via PathResolver.");
79 }
80 }
81 else {
82 ATH_MSG_INFO("Note: setting up with user specified input file location " << m_customInputFolder.value() << " - this is not encouraged!");
83 filePath = PathResolverFindCalibFile(Form("%s/%s", m_customInputFolder.value().c_str(), fileName.c_str()));
84 }
85
86 TFile* file = TFile::Open(filePath.c_str());
87
88 if (file == nullptr || !file->IsOpen()) {
89 ATH_MSG_FATAL("MuonTriggerScaleFactors::initialize Couldn't open file " << filePath);
90 return StatusCode::FAILURE;
91 }
92 TDirectory* tempDir = getTemporaryDirectory();
93 tempDir->cd();
94
95 static const std::vector<std::string> type { "data", "mc" };
96 static const std::vector<std::string> region { "barrel", "endcap" };
97 static const std::vector<std::string> systematic { "nominal", "stat_up", "stat_down", "syst_up", "syst_down" };
98 if (m_muonQuality.value().compare("LowPt") == 0) {
99 m_muonQuality = "Medium";
100 }
101 TDirectory* qualityDirectory = file->GetDirectory(m_muonQuality.value().c_str());
102 if (qualityDirectory == nullptr) {
103 ATH_MSG_FATAL("MuonTriggerScaleFactors::initialize cannot find directory with selected quality");
104 return StatusCode::FAILURE;
105 }
106 TKey* periodKey;
107 TIter nextPeriod(qualityDirectory->GetListOfKeys());
108 while ((periodKey = (TKey*) nextPeriod())) {
109 if (not periodKey->IsFolder()) continue;
110 TDirectory* periodDirectory = qualityDirectory->GetDirectory(periodKey->GetName());
111 std::string periodName = std::string(periodKey->GetName());
112 std::string periodName_InMap = periodName.substr(std::string("Period").size(), periodName.size());
113 YearPeriod period = YearPeriod(year, periodName_InMap);
114 TKey* triggerKey;
115 TIter nextTrigger(periodDirectory->GetListOfKeys());
116 while ((triggerKey = (TKey*) nextTrigger())) {
117 if (not triggerKey->IsFolder()) continue;
118 TDirectory* triggerDirectory = periodDirectory->GetDirectory(triggerKey->GetName());
119 std::string triggerName = std::string(triggerKey->GetName());
120 if(!std::set<std::string>{"HLT_mu26_ivarmedium", "HLT_mu50", "HLT_mu26_ivarmedium_OR_HLT_mu50"}.count(triggerName) && m_binning == "coarse"){
121 ATH_MSG_DEBUG("Coarse binning not supported for di-muon trigger legs at the moment");
122 continue;
123 }
124 for (const auto& iregion : region) {
125 bool isBarrel = iregion.find("barrel") != std::string::npos;
126 for (const auto& itype : type) {
127 bool isData = itype.find("data") != std::string::npos;
128 std::string histname = ("_MuonTrigEff_" + periodName + "_" + triggerName + "_" + m_muonQuality.value() + "_" + "_EtaPhi_" + m_binning + "_" + iregion + "_" + itype);
129 for (const auto& isys : systematic) {
130 if (itype.find("data") != std::string::npos && isys.find("syst") != std::string::npos) continue;
131 std::string path = "eff_etaphi_" + m_binning + "_" + iregion + "_" + itype + "_" + isys;
132 TH2* hist = dynamic_cast<TH2*>(triggerDirectory->Get(path.c_str()));
133 if (not hist) {
134
135 ATH_MSG_FATAL("MuonTriggerScaleFactors::initialize " << path << " not found under trigger " << triggerName << " and period " << periodName << " for year: " << year);
136 continue;
137 }
138 hist->SetDirectory(0);
139
140 EffiHistoIdent HistoId = EffiHistoIdent(period, encodeHistoName(periodName_InMap, triggerName, isData, isys, isBarrel));
141 if (m_efficiencyMap.find(HistoId) != m_efficiencyMap.end()) {
142 ATH_MSG_FATAL("MuonTriggerScaleFactors::initialize(): histogram " << path << " is duplicated for year" << year << " in period " << periodName);
143 return StatusCode::FAILURE;
144 }
145 m_efficiencyMap.insert(std::pair<EffiHistoIdent, TH1_Ptr>(HistoId, std::shared_ptr < TH1 > (hist)));
146
147 }
148 //If the trigger is chosen for toy evaluation, generate all the replicas from
149 // NOMINAL with STAT variations stored in the data hist, load them in corresponding vector
150 if (m_replicaSet.find(triggerName) != m_replicaSet.end() && itype.find("data") != std::string::npos) {
151
152 TH1_Ptr Nominal_H = getEfficiencyHistogram(year, periodName, triggerName, isData, "nominal", isBarrel);
153 TH1_Ptr StatUp_H = getEfficiencyHistogram(year, periodName, triggerName, isData, "stat_up", isBarrel);
154
155 TH1_Ptr tmp_h2 = TH1_Ptr(dynamic_cast<TH2F*>(Nominal_H->Clone(Form("tmp_h2_%s", Nominal_H->GetName()))));
156 const int xbins = tmp_h2->GetNbinsX(), ybins = tmp_h2->GetNbinsY();
157 for (int x_i = 0; x_i <= xbins; ++x_i) {
158 for (int y_i = 0; y_i <= ybins; ++y_i) {
159 double statErr = std::abs(tmp_h2->GetBinContent(x_i, y_i) - StatUp_H->GetBinContent(x_i, y_i));
160 tmp_h2->SetBinError(x_i, y_i, statErr);
161 }
162 }
163 m_efficiencyMapReplicaArray[EffiHistoIdent(period, encodeHistoName(periodName, triggerName, isData, "repl", isBarrel))] = generateReplicas(tmp_h2, m_nReplicas, m_ReplicaRandomSeed);
164 }
165 }
166 }
167 }
168 }
169 file->Close();
170 delete file;
171 origDir->cd();
172 return StatusCode::SUCCESS;
173 }
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Gaudi::Property< int > m_ReplicaRandomSeed
TDirectory * getTemporaryDirectory(void) const
std::vector< TH1_Ptr > generateReplicas(TH1_Ptr h, int nrep, int seed) const
Gaudi::Property< std::map< unsigned int, std::string > > m_customInputFilePerYear
path
python interpreter configuration --------------------------------------—
Definition athena.py:126
str filePath
Definition hancool.py:27
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
TFile * file

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ 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 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ 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()

◆ recommendedSystematics()

CP::SystematicSet CP::MuonTriggerScaleFactors::recommendedSystematics ( ) const
virtual

returns: the list of all systematics this tool recommends to use

Implements CP::IReentrantSystematicsTool.

Definition at line 901 of file MuonTriggerScaleFactors.cxx.

901 {
902 return affectingSystematics();
903 }

◆ registerSystematics()

StatusCode CP::MuonTriggerScaleFactors::registerSystematics ( )
private

Definition at line 891 of file MuonTriggerScaleFactors.cxx.

891 {
892 CP::SystematicRegistry& registry = CP::SystematicRegistry::getInstance();
893 if (registry.registerSystematics(*this) != StatusCode::SUCCESS) {
894 ATH_MSG_ERROR("Failed to add systematic to list of recommended systematics.");
895 return StatusCode::FAILURE;
896 }
897 return StatusCode::SUCCESS;
898 }
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.
StatusCode registerSystematics(const IReentrantSystematicsTool &tool)
effects: register all the systematics from the tool

◆ 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();
384 }
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)

◆ 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 {
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 asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ 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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_allowZeroSF

Gaudi::Property<bool> CP::MuonTriggerScaleFactors::m_allowZeroSF {this, "AllowZeroSF", false, "if a trigger is not available will return 0 instead of throwing an error. More difficult to spot configuration issues. Use at own risk"}
private

Definition at line 124 of file MuonTriggerScaleFactors.h.

124{this, "AllowZeroSF", false, "if a trigger is not available will return 0 instead of throwing an error. More difficult to spot configuration issues. Use at own risk"};

◆ m_appliedSystematics

CP::SystematicSet* CP::MuonTriggerScaleFactors::m_appliedSystematics {}
private

Definition at line 111 of file MuonTriggerScaleFactors.h.

111{};

◆ m_binning

Gaudi::Property<std::string> CP::MuonTriggerScaleFactors::m_binning {this, "Binning", "fine", "the binning to use"}
private

Definition at line 122 of file MuonTriggerScaleFactors.h.

122{this, "Binning", "fine", "the binning to use"};

◆ m_calibrationVersion

Gaudi::Property<std::string> CP::MuonTriggerScaleFactors::m_calibrationVersion {this, "CalibrationVersion", "250731_SummerUpdate", "the calibration version to use"}
private

Definition at line 119 of file MuonTriggerScaleFactors.h.

119{this, "CalibrationVersion", "250731_SummerUpdate", "the calibration version to use"};

◆ m_campaign

Gaudi::Property<std::string> CP::MuonTriggerScaleFactors::m_campaign {this, "Campaign", "", "the MC campaign to get the scale factors for"}
private

Definition at line 116 of file MuonTriggerScaleFactors.h.

116{this, "Campaign", "", "the MC campaign to get the scale factors for"};

◆ m_customInputFilePerYear

Gaudi::Property<std::map<unsigned int, std::string> > CP::MuonTriggerScaleFactors::m_customInputFilePerYear {this, "CustomInputFilePerYear", {}, "the custom input file to use per year (debugging only)"}
private

Definition at line 121 of file MuonTriggerScaleFactors.h.

121{this, "CustomInputFilePerYear", {}, "the custom input file to use per year (debugging only)"};

◆ m_customInputFolder

Gaudi::Property<std::string> CP::MuonTriggerScaleFactors::m_customInputFolder {this, "CustomInputFolder", "", "the custom input folder to use (debugging only)"}
private

Definition at line 120 of file MuonTriggerScaleFactors.h.

120{this, "CustomInputFolder", "", "the custom input folder to use (debugging only)"};

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

EfficiencyMap CP::MuonTriggerScaleFactors::m_efficiencyMap
private

Definition at line 112 of file MuonTriggerScaleFactors.h.

◆ m_efficiencyMapReplicaArray

std::map<EffiHistoIdent, std::vector<TH1_Ptr> > CP::MuonTriggerScaleFactors::m_efficiencyMapReplicaArray
private

Definition at line 113 of file MuonTriggerScaleFactors.h.

◆ m_eventInfo

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

Definition at line 101 of file MuonTriggerScaleFactors.h.

101{this, "EventInfoContName", "EventInfo", "event info key"};

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

Gaudi::Property<bool> CP::MuonTriggerScaleFactors::m_experimental {this, "UseExperimental", false, "enable experimental features like single muon SF"}
private

Definition at line 125 of file MuonTriggerScaleFactors.h.

125{this, "UseExperimental", false, "enable experimental features like single muon SF"};

◆ m_forcePeriod

Gaudi::Property<std::string> CP::MuonTriggerScaleFactors::m_forcePeriod {this, "ForcePeriod", "", "Only for developers. Never use this in any analysis!!!!!!"}
private

Definition at line 127 of file MuonTriggerScaleFactors.h.

127{this, "ForcePeriod", "", "Only for developers. Never use this in any analysis!!!!!!"};

◆ m_forceYear

Gaudi::Property<int> CP::MuonTriggerScaleFactors::m_forceYear {this, "ForceYear", -1, "Only for developers. Never use this in any analysis!!!!!!"}
private

Definition at line 126 of file MuonTriggerScaleFactors.h.

126{this, "ForceYear", -1, "Only for developers. Never use this in any analysis!!!!!!"};

◆ m_muonQuality

Gaudi::Property<std::string> CP::MuonTriggerScaleFactors::m_muonQuality {this, "MuonQuality", "Medium", "the muon quality to get the scale factors for"}
private

Definition at line 115 of file MuonTriggerScaleFactors.h.

115{this, "MuonQuality", "Medium", "the muon quality to get the scale factors for"};

◆ m_nReplicas

Gaudi::Property<int> CP::MuonTriggerScaleFactors::m_nReplicas {this, "NReplicas", 100, "Number of generated toy replicas, if replicas are required."}
private

Definition at line 132 of file MuonTriggerScaleFactors.h.

132{this, "NReplicas", 100, "Number of generated toy replicas, if replicas are required."};

◆ m_ReplicaRandomSeed

Gaudi::Property<int> CP::MuonTriggerScaleFactors::m_ReplicaRandomSeed {this, "ReplicaRandomSeed", 12345, "Random seed for toy replica generation."}
private

Definition at line 133 of file MuonTriggerScaleFactors.h.

133{this, "ReplicaRandomSeed", 12345, "Random seed for toy replica generation."};

◆ m_replicaSet

std::set<std::string> CP::MuonTriggerScaleFactors::m_replicaSet
private

Definition at line 131 of file MuonTriggerScaleFactors.h.

◆ m_replicaTriggerList

Gaudi::Property<std::vector<std::string> > CP::MuonTriggerScaleFactors::m_replicaTriggerList {this, "ReplicaTriggerList", {}, "List of triggers on which we want to generate stat. uncertainty toy replicas."}
private

Definition at line 130 of file MuonTriggerScaleFactors.h.

130{this, "ReplicaTriggerList", {}, "List of triggers on which we want to generate stat. uncertainty toy replicas."};

◆ m_runNumber_year

const std::map< unsigned int, int > CP::MuonTriggerScaleFactors::m_runNumber_year
staticprivate
Initial value:
= {
{284484,2015},
{311481,2016},
{340453,2017},
{364292,2018},
{440613,2022},
{456749,2023},
{486706,2024}
}

Definition at line 136 of file MuonTriggerScaleFactors.h.

◆ m_systFilter

std::unordered_map<CP::SystematicSet, CP::SystematicSet> CP::MuonTriggerScaleFactors::m_systFilter
private

Definition at line 109 of file MuonTriggerScaleFactors.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: