Class providing trigger scale factors for analyses using electrons and muons. More...
#include <LeptonTriggerSF.h>
Classes | |
struct | DileptonThresholds |
struct | DileptonTrigger |
struct | Storage |
Public Member Functions | |
LeptonTriggerSF (const std::string &directory="", const std::string &directoryElectron="", const std::string &electronFileVersion="rel17p2.v02") | |
LeptonTriggerSF (const int year, const std::string &directory="", const std::string &fileName="", const std::string &directoryElectron="", const std::string &electronFileVersion="rel17p2.v02") | |
LeptonTriggerSF (const int year, const std::vector< std::string > &qualities, const std::string &directory="", const std::string &fileName="", const std::string &directoryElectron="", const std::string &electronFileVersion="rel17p2.v02") | |
~LeptonTriggerSF () | |
std::pair< double, double > | GetTriggerSF (const int runNumber, const bool useGeV, const std::vector< TLorentzVector > &muons, const MuonQuality muonQuality, const int systematicVariation=0, TrigMuonEff::Configuration *configuration=0) const |
std::pair< double, double > | GetTriggerSF (const int runNumber, const bool useGeV, const std::vector< TLorentzVector > &muons, const std::vector< MuonQuality > &muonsQuality, const int systematicVariation=0, TrigMuonEff::Configuration *configuration=0) const |
std::pair< double, double > | GetTriggerSF (const int runNumber, const bool useGeV, const std::vector< TLorentzVector > &muons, const std::vector< MuonQuality > &muonsQuality, const std::string &trigger, const int systematicVariation=0, TrigMuonEff::Configuration *configuration=0) const |
std::pair< double, double > | GetTriggerSF (const int runNumber, const bool useGeV, const std::vector< TLorentzVector > &electrons, const std::vector< ElectronQuality > &electronsQuality, const std::string &trigger, const int systematicVariation=0, TrigMuonEff::Configuration *configuration=0) const |
std::pair< double, double > | GetTriggerSF (const int runNumber, const bool useGeV, const std::vector< TLorentzVector > &muons, const MuonQuality muonQuality, const std::vector< TLorentzVector > &electrons, const ElectronQuality electronQuality, const int systematicVariation=0, TrigMuonEff::Configuration *configuration=0) const |
std::pair< double, double > | GetTriggerSF (const int runNumber, const bool useGeV, const std::vector< TLorentzVector > &muons, const std::vector< MuonQuality > &muonsQuality, const std::vector< TLorentzVector > &electrons, const std::vector< ElectronQuality > &electronsQuality, const int systematicVariation=0, TrigMuonEff::Configuration *configuration=0) const |
std::pair< double, double > | GetTriggerSF (const int runNumber, const bool useGeV, const std::vector< TLorentzVector > &muons, const std::vector< MuonQuality > &muonsQuality, const std::vector< TLorentzVector > &electrons, const std::vector< ElectronQuality > &electronsQuality, const std::string &trigger, const int systematicVariation=0, TrigMuonEff::Configuration *configuration=0) const |
std::pair< double, double > | GetTriggerSF (const TrigMuonEff::Configuration &configuration, const std::vector< TLorentzVector > &muons, const std::vector< MuonQuality > &muonsQuality, const std::vector< TLorentzVector > &electrons, const std::vector< ElectronQuality > &electronsQuality) const |
std::pair< double, double > | GetTriggerSF (const TrigMuonEff::Configuration &configuration, const std::vector< TLorentzVector > &muons, const std::vector< MuonQuality > &muonsQuality, const std::string &trigger) const |
std::pair< double, double > | GetTriggerSF (const TrigMuonEff::Configuration &configuration, const std::vector< TLorentzVector > &electrons, const std::vector< ElectronQuality > &electronsQuality, const std::string &trigger) const |
std::pair< double, double > | getMuonEfficiency (const TrigMuonEff::Configuration &configuration, const TLorentzVector &muon, const MuonQuality muonQuality, const std::string &trigger="") const |
std::pair< double, double > | MuEff (const TrigMuonEff::Configuration &configuration, const TLorentzVector &muon, const MuonQuality muonQuality, const std::string &trigger="") const |
std::pair< double, double > | getMuonEfficiency (const TrigMuonEff::DataPeriod period, const bool isData, const TLorentzVector &muon, const MuonQuality muonQuality) const |
std::pair< double, double > | MuEff (const TrigMuonEff::DataPeriod period, const bool isData, const TLorentzVector &muon, const MuonQuality muonQuality) const |
std::pair< double, double > | getMuonEfficiency (const int runNumber, const bool isData, const bool useGeV, const TLorentzVector &muon, const MuonQuality muonQuality, const int uncertainty=0, TrigMuonEff::Configuration *configuration=0) const |
std::pair< double, double > | getDimuonEfficiency (const TrigMuonEff::Configuration &config, const std::vector< TLorentzVector > &muons, const std::vector< MuonQuality > &muonsQuality, const std::string &chain) const |
std::pair< double, double > | getDielectronEfficiency (const TrigMuonEff::Configuration &config, const std::vector< TLorentzVector > &electrons, const std::vector< ElectronQuality > &electronsQuality, const std::string &chain) const |
std::pair< double, double > | getSingleOrDimuonEfficiency (const TrigMuonEff::Configuration &config, const std::vector< TLorentzVector > &muons, const std::vector< MuonQuality > &muonsQuality, const std::string &chain) const |
std::pair< double, double > | getSingleOrDielectronEfficiency (const TrigMuonEff::Configuration &config, const std::vector< TLorentzVector > &electrons, const std::vector< ElectronQuality > &electronsQuality, const std::string &chain) const |
std::pair< double, double > | getElectronSF (const TLorentzVector &electron, const int combination, const int year, const TrigMuonEff::Configuration &configuration) const |
std::pair< double, double > | ElEff_MC (const TLorentzVector &electron, const int combination, const int year, const TrigMuonEff::Configuration &configuration) const |
std::pair< double, double > | ElEff_MC (const TLorentzVector &electron, const int combination, const bool useGeV=false, const int year=2011, const int runNumber=200804) const |
std::pair< double, double > | ElEff_Data (const TLorentzVector &electron, const int combinationSF, const int combinationEfficiency, const int year, const TrigMuonEff::Configuration &config) const |
std::pair< double, double > | ElEff_Data (const TLorentzVector &electron, const int combinationSF, const int combinationEfficiency, const bool useGeV=false, const int year=2011, const int runNumber=200804) const |
void | setAFII (const bool flag=true) |
void | setMaxPeriod (const TrigMuonEff::DataPeriod x) |
void | createMcReplicaMuon (const int n, const std::string &trigger=std::string()) |
std::pair< double, double > | getSfReplicaMuon (const int runNumber, const bool useGeV, const std::vector< TLorentzVector > &muons, const std::vector< MuonQuality > &muonsQuality, const int index=0, TrigMuonEff::Configuration *configuration=0) const |
int | getElectronQuality (const int runNumber, const ElectronQuality quality, const bool isSF, const bool isditrig, const DileptonTriggerName dilepName=kNoTrig) const |
Class providing trigger scale factors for analyses using electrons and muons.
This tool can be used to get the scale factors and their uncertainties in events with multiple electrons/muons.
LeptonTriggerSF::LeptonTriggerSF | ( | const std::string & | directory = "" , |
|
const std::string & | directoryElectron = "" , |
|||
const std::string & | electronFileVersion = "rel17p2.v02" | |||
) |
constructor The constructor expects the directory name under which the efficiency file(s) can be found, when running in stand-alone ROOT mode. When running in an Athena job it can try to guess the correct location, but it may need some help even in that case.
The directory can be any directory that ROOT understands, so you can point the tool to a DCAP, XRootD or even a web server if you want to.
directory | [in] path to the directory that contains efficiency file(s) | |
directoryElectron | [in] path to the directory that contains efficiency files for ElectronEfficiencyCorrection | |
electronFileVersion | [in] version string of the efficiency files for ElectronEfficiencyCorrection |
LeptonTriggerSF::LeptonTriggerSF | ( | const int | year, | |
const std::string & | directory = "" , |
|||
const std::string & | fileName = "" , |
|||
const std::string & | directoryElectron = "" , |
|||
const std::string & | electronFileVersion = "rel17p2.v02" | |||
) |
constructor
year | [in] year in 4 digits | |
directory | [in] path to the directory that contains efficiency file(s) | |
fileName | [in] name of the ROOT file | |
directoryElectron | [in] path to the directory that contains efficiency files for ElectronEfficiencyCorrection | |
electronFileVersion | [in] version string of the efficiency files for ElectronEfficiencyCorrection |
LeptonTriggerSF::LeptonTriggerSF | ( | const int | year, | |
const std::vector< std::string > & | qualities, | |||
const std::string & | directory = "" , |
|||
const std::string & | fileName = "" , |
|||
const std::string & | directoryElectron = "" , |
|||
const std::string & | electronFileVersion = "rel17p2.v02" | |||
) |
constructor
year | [in] year in 4 digits | |
quality | [in] year in 4 digits | |
directory | [in] path to the directory that contains efficiency file(s) | |
fileName | [in] name of the ROOT file | |
directoryElectron | [in] path to the directory that contains efficiency files for ElectronEfficiencyCorrection | |
electronFileVersion | [in] version string of the efficiency files for ElectronEfficiencyCorrection |
LeptonTriggerSF::~LeptonTriggerSF | ( | ) |
Destructor
void LeptonTriggerSF::createMcReplicaMuon | ( | const int | n, | |
const std::string & | trigger = std::string() | |||
) |
Creates MC replica of efficiency maps
n Efficiency maps are created. MC replica has eff_ij[n] where eff_ij[n] is generated with Gaussian using parameters, mu = efficiency at bin [ij] with sigma = statistical error of the bin [ij]
n | [in] number of replica to be created | |
trigger | [in] trigger to be replicated |
std::pair<double, double> LeptonTriggerSF::ElEff_Data | ( | const TLorentzVector & | electron, | |
const int | combinationSF, | |||
const int | combinationEfficiency, | |||
const bool | useGeV = false , |
|||
const int | year = 2011 , |
|||
const int | runNumber = 200804 | |||
) | const [inline] |
get electron trigger efficiency for data
electron | [in] TLorentzVector of electron | |
combinationSF | [in] trigger/offline combination | |
combinationEfficiency | [in] trigger/offline combination | |
useGeV | [in] true for GeV, false for MeV | |
year | [in] year | |
runNumber | [in] Run number |
std::pair< double, double > LeptonTriggerSF::ElEff_Data | ( | const TLorentzVector & | electron, | |
const int | combinationSF, | |||
const int | combinationEfficiency, | |||
const int | year, | |||
const TrigMuonEff::Configuration & | config | |||
) | const |
get electron trigger efficiency for data
electron | [in] TLorentzVector of electron | |
combinationSF | [in] trigger/offline combination | |
combinationEfficiency | [in] trigger/offline combination | |
year | [in] year | |
configuration | [in] configuration |
std::pair<double, double> LeptonTriggerSF::ElEff_MC | ( | const TLorentzVector & | electron, | |
const int | combination, | |||
const bool | useGeV = false , |
|||
const int | year = 2011 , |
|||
const int | runNumber = 200804 | |||
) | const [inline] |
get electron trigger efficiency for MC
electron | [in] TLorentzVector of electron | |
combination | [in] trigger/offline combination | |
useGeV | [in] true for GeV, false for MeV | |
year | [in] year | |
runNumber | [in] Run number |
std::pair<double, double> LeptonTriggerSF::ElEff_MC | ( | const TLorentzVector & | electron, | |
const int | combination, | |||
const int | year, | |||
const TrigMuonEff::Configuration & | configuration | |||
) | const [inline] |
get electron efficiency for MC
electron | [in] TLorentzVector of electron | |
combination | [in] trigger/offline combination | |
year | [in] year | |
configuration | [in] configuration |
std::pair< double, double > LeptonTriggerSF::getDielectronEfficiency | ( | const TrigMuonEff::Configuration & | config, | |
const std::vector< TLorentzVector > & | electrons, | |||
const std::vector< ElectronQuality > & | electronsQuality, | |||
const std::string & | chain | |||
) | const |
get the di-electron trigger efficiency
config | [in] configuration | |
muons | [in] array of TLorentzVector for electrons | |
muonsQuality | [in] array of electron quality | |
chain | [in] trigger chain name |
std::pair< double, double > LeptonTriggerSF::getDimuonEfficiency | ( | const TrigMuonEff::Configuration & | config, | |
const std::vector< TLorentzVector > & | muons, | |||
const std::vector< MuonQuality > & | muonsQuality, | |||
const std::string & | chain | |||
) | const |
get the di-muon trigger efficiency
config | [in] configuration | |
muons | [in] array of TLorentzVector for muons | |
muonsQuality | [in] array of muon quality | |
chain | [in] trigger chain name |
int LeptonTriggerSF::getElectronQuality | ( | const int | runNumber, | |
const ElectronQuality | quality, | |||
const bool | isSF, | |||
const bool | isditrig, | |||
const DileptonTriggerName | dilepName = kNoTrig | |||
) | const |
Translate the electron quality enumeration into a value used internally by the tool
runNumber | [in] run number | |
quality | [in] electron quality | |
isSF | [in] true for SF, false for efficiency | |
isditrig | [in] true if not just default single electron triggers are used |
std::pair< double, double > LeptonTriggerSF::getElectronSF | ( | const TLorentzVector & | electron, | |
const int | combination, | |||
const int | year, | |||
const TrigMuonEff::Configuration & | configuration | |||
) | const |
get electron trigger SF or efficiency
electron | [in] TLorentzVector of electron | |
combination | [in] trigger/offline combination | |
year | [in] year | |
configuration | [in] configuration |
std::pair<double, double> LeptonTriggerSF::getMuonEfficiency | ( | const int | runNumber, | |
const bool | isData, | |||
const bool | useGeV, | |||
const TLorentzVector & | muon, | |||
const MuonQuality | muonQuality, | |||
const int | uncertainty = 0 , |
|||
TrigMuonEff::Configuration * | configuration = 0 | |||
) | const [inline] |
get the trigger efficiency for a single muon
runNumber | [in] run number | |
isData | [in] true for data, false for MC | |
useGeV | [in] use GeV if true, otherwise use MeV | |
muon | [in] TLorentzVector of muon | |
muonQuality | [in] muon quality | |
uncertainty | [in] optional: statisticalOnlyMuon or systematicOnlyMuon | |
configuration | [in] configuration |
std::pair<double, double> LeptonTriggerSF::getMuonEfficiency | ( | const TrigMuonEff::DataPeriod | period, | |
const bool | isData, | |||
const TLorentzVector & | muon, | |||
const MuonQuality | muonQuality | |||
) | const [inline] |
get the trigger efficiency for a single muon
period | [in] data period | |
isData | [in] set it to true if data, false for MC | |
muonQuality | [in] muon quality |
std::pair< double, double > LeptonTriggerSF::getMuonEfficiency | ( | const TrigMuonEff::Configuration & | configuration, | |
const TLorentzVector & | muon, | |||
const MuonQuality | muonQuality, | |||
const std::string & | trigger = "" | |||
) | const |
get the trigger efficiency for a single muon
configuration | [in] configuration | |
muon | [in] TLorentzVector of muon | |
muonQuality | [in] muon quality | |
trigger | [in] trigger |
std::pair< double, double > LeptonTriggerSF::getSfReplicaMuon | ( | const int | runNumber, | |
const bool | useGeV, | |||
const std::vector< TLorentzVector > & | muons, | |||
const std::vector< MuonQuality > & | muonsQuality, | |||
const int | index = 0 , |
|||
TrigMuonEff::Configuration * | configuration = 0 | |||
) | const |
get the trigger scale factor for muons with non-uniform quality
runNumber | [in] run number | |
useGeV | [in] use GeV if true, otherwise use MeV | |
muons | [in] TLorentzVector array of muons | |
muonsQuality | [in] array of muon qualities | |
index | [in] index of replicated histograms to access | |
configuration | [in] configuration |
std::pair< double, double > LeptonTriggerSF::getSingleOrDielectronEfficiency | ( | const TrigMuonEff::Configuration & | config, | |
const std::vector< TLorentzVector > & | electrons, | |||
const std::vector< ElectronQuality > & | electronsQuality, | |||
const std::string & | chain | |||
) | const |
get the OR'ed efficiency of single and dielectron triggers
config | [in] configuration | |
electrons | [in] array of TLorentzVector for electrons | |
electronsQuality | [in] array of electron quality | |
chain | [in] trigger chain name |
std::pair< double, double > LeptonTriggerSF::getSingleOrDimuonEfficiency | ( | const TrigMuonEff::Configuration & | config, | |
const std::vector< TLorentzVector > & | muons, | |||
const std::vector< MuonQuality > & | muonsQuality, | |||
const std::string & | chain | |||
) | const |
get the OR'ed efficiency of single and dimuon triggers
config | [in] configuration | |
muons | [in] array of TLorentzVector for muons | |
muonsQuality | [in] array of muon quality | |
chain | [in] trigger chain name |
std::pair< double, double > LeptonTriggerSF::GetTriggerSF | ( | const TrigMuonEff::Configuration & | configuration, | |
const std::vector< TLorentzVector > & | electrons, | |||
const std::vector< ElectronQuality > & | electronsQuality, | |||
const std::string & | trigger | |||
) | const |
get the di-electron trigger scale factor for di-electrons with non-uniform quality
configuration | [in] configuration | |
electrons | [in] TLorentzVector array of electrons | |
electronsQuality | [in] array of electron qualities | |
trigger | [in] trigger chain |
get efficiency from MC
std::pair< double, double > LeptonTriggerSF::GetTriggerSF | ( | const TrigMuonEff::Configuration & | configuration, | |
const std::vector< TLorentzVector > & | muons, | |||
const std::vector< MuonQuality > & | muonsQuality, | |||
const std::string & | trigger | |||
) | const |
get the di-muon trigger scale factor for di-muons with non-uniform quality
configuration | [in] configuration | |
muons | [in] TLorentzVector array of muons | |
muonsQuality | [in] array of muon qualities | |
trigger | [in] trigger chain |
get efficiency from MC
std::pair< double, double > LeptonTriggerSF::GetTriggerSF | ( | const TrigMuonEff::Configuration & | configuration, | |
const std::vector< TLorentzVector > & | muons, | |||
const std::vector< MuonQuality > & | muonsQuality, | |||
const std::vector< TLorentzVector > & | electrons, | |||
const std::vector< ElectronQuality > & | electronsQuality | |||
) | const |
get the trigger scale factor for leptons with non-uniform quality
configuration | [in] configuration | |
muons | [in] TLorentzVector array of muons | |
muonsQuality | [in] array of muon qualities | |
electrons | [in] TLorentzVector array of electron | |
electronsQuality | [in] array of electron qualities |
std::pair< double, double > LeptonTriggerSF::GetTriggerSF | ( | const int | runNumber, | |
const bool | useGeV, | |||
const std::vector< TLorentzVector > & | muons, | |||
const std::vector< MuonQuality > & | muonsQuality, | |||
const std::vector< TLorentzVector > & | electrons, | |||
const std::vector< ElectronQuality > & | electronsQuality, | |||
const std::string & | trigger, | |||
const int | systematicVariation = 0 , |
|||
TrigMuonEff::Configuration * | configuration = 0 | |||
) | const |
get the trigger scale factor for leptons with non-uniform quality
runNumber | [in] run number | |
useGeV | [in] use GeV if true, otherwise use MeV | |
muons | [in] TLorentzVector array of muons | |
muonsQuality | [in] array of muon qualities | |
electrons | [in] TLorentzVector array of electron | |
electronsQuality | [in] array of electron qualities | |
trigger | [in] trigger chain | |
systematicVariation | [in] systematic variation | |
configuration | [in] configuration |
std::pair< double, double > LeptonTriggerSF::GetTriggerSF | ( | const int | runNumber, | |
const bool | useGeV, | |||
const std::vector< TLorentzVector > & | muons, | |||
const std::vector< MuonQuality > & | muonsQuality, | |||
const std::vector< TLorentzVector > & | electrons, | |||
const std::vector< ElectronQuality > & | electronsQuality, | |||
const int | systematicVariation = 0 , |
|||
TrigMuonEff::Configuration * | configuration = 0 | |||
) | const |
get the trigger scale factor for leptons with non-uniform quality
runNumber | [in] run number | |
useGeV | [in] use GeV if true, otherwise use MeV | |
muons | [in] TLorentzVector array of muons | |
muonsQuality | [in] array of muon qualities | |
electrons | [in] TLorentzVector array of electron | |
electronsQuality | [in] array of electron qualities | |
systematicVariation | [in] systematic variation | |
configuration | [in] configuration |
std::pair< double, double > LeptonTriggerSF::GetTriggerSF | ( | const int | runNumber, | |
const bool | useGeV, | |||
const std::vector< TLorentzVector > & | muons, | |||
const MuonQuality | muonQuality, | |||
const std::vector< TLorentzVector > & | electrons, | |||
const ElectronQuality | electronQuality, | |||
const int | systematicVariation = 0 , |
|||
TrigMuonEff::Configuration * | configuration = 0 | |||
) | const |
get the trigger scale factor for leptons of uniform quality
runNumber | [in] run number | |
useGeV | [in] use GeV if true, otherwise use MeV | |
muons | [in] TLorentzVector array of muons | |
muonQuality | [in] muon quality | |
electrons | [in] TLorentzVector array of electrons | |
electronQuality | [in] electron quality | |
systematicVariation | [in] systematic variation | |
configuration | [in] configuration |
std::pair< double, double > LeptonTriggerSF::GetTriggerSF | ( | const int | runNumber, | |
const bool | useGeV, | |||
const std::vector< TLorentzVector > & | electrons, | |||
const std::vector< ElectronQuality > & | electronsQuality, | |||
const std::string & | trigger, | |||
const int | systematicVariation = 0 , |
|||
TrigMuonEff::Configuration * | configuration = 0 | |||
) | const |
get the trigger scale factor for electrons with non-uniform quality for given trigger
runNumber | [in] run number | |
useGeV | [in] use GeV if true, otherwise use MeV | |
electrons | [in] TLorentzVector array of electrons | |
electronsQuality | [in] array of electron qualities | |
trigger | [in] trigger chain | |
systematicVariation | [in] systematic variation | |
configuration | [in] configuration |
std::pair< double, double > LeptonTriggerSF::GetTriggerSF | ( | const int | runNumber, | |
const bool | useGeV, | |||
const std::vector< TLorentzVector > & | muons, | |||
const std::vector< MuonQuality > & | muonsQuality, | |||
const std::string & | trigger, | |||
const int | systematicVariation = 0 , |
|||
TrigMuonEff::Configuration * | configuration = 0 | |||
) | const |
get the trigger scale factor for muons with non-uniform quality for given trigger
runNumber | [in] run number | |
useGeV | [in] use GeV if true, otherwise use MeV | |
muons | [in] TLorentzVector array of muons | |
muonsQuality | [in] array of muon qualities | |
trigger | [in] trigger chain | |
systematicVariation | [in] systematic variation | |
configuration | [in] configuration |
std::pair< double, double > LeptonTriggerSF::GetTriggerSF | ( | const int | runNumber, | |
const bool | useGeV, | |||
const std::vector< TLorentzVector > & | muons, | |||
const std::vector< MuonQuality > & | muonsQuality, | |||
const int | systematicVariation = 0 , |
|||
TrigMuonEff::Configuration * | configuration = 0 | |||
) | const |
get the trigger scale factor for muons with non-uniform quality
runNumber | [in] run number | |
useGeV | [in] use GeV if true, otherwise use MeV | |
muons | [in] TLorentzVector array of muons | |
muonsQuality | [in] array of muon qualities | |
systematicVariation | [in] systematic variation | |
configuration | [in] configuration |
std::pair< double, double > LeptonTriggerSF::GetTriggerSF | ( | const int | runNumber, | |
const bool | useGeV, | |||
const std::vector< TLorentzVector > & | muons, | |||
const MuonQuality | muonQuality, | |||
const int | systematicVariation = 0 , |
|||
TrigMuonEff::Configuration * | configuration = 0 | |||
) | const |
get the trigger scale factor for muons of uniform quality
runNumber | [in] run number | |
useGeV | [in] use GeV if true, otherwise use MeV | |
muons | [in] TLorentzVector array of muons | |
muonQuality | [in] muon quality | |
systematicVariation | [in] systematic variation | |
configuration | [in] configuration |
void LeptonTriggerSF::setAFII | ( | const bool | flag = true |
) | [inline] |
flag for AtlFast II sample
flag | [in] true for AtlFast II sample, false otherwise |