LeptonTriggerSF Class Reference

Class providing trigger scale factors for analyses using electrons and muons. More...

#include <LeptonTriggerSF.h>

List of all members.

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

Detailed Description

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.

Revision
564936
Date
2013-10-10 19:46:00 +0200 (Thu, 10 Oct 2013)

Constructor & Destructor Documentation

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.

Parameters:
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

Parameters:
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

Parameters:
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


Member Function Documentation

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]

Parameters:
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

Parameters:
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
Returns:
pair->first : efficiency, pair->second : uncertainty
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

Parameters:
electron [in] TLorentzVector of electron
combinationSF [in] trigger/offline combination
combinationEfficiency [in] trigger/offline combination
year [in] year
configuration [in] configuration
Returns:
pair->first : efficiency, pair->second : uncertainty
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

Parameters:
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
Returns:
pair->first : efficiency, pair->second : uncertainty
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

Parameters:
electron [in] TLorentzVector of electron
combination [in] trigger/offline combination
year [in] year
configuration [in] configuration
Returns:
pair->first : efficiency or SF, pair->second : uncertainty
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

Parameters:
config [in] configuration
muons [in] array of TLorentzVector for electrons
muonsQuality [in] array of electron quality
chain [in] trigger chain name
Returns:
pair->first : dielectron trigger efficiency, pair->second : uncertainty on the trigger efficiency
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

Parameters:
config [in] configuration
muons [in] array of TLorentzVector for muons
muonsQuality [in] array of muon quality
chain [in] trigger chain name
Returns:
pair->first : dimuon trigger efficiency, pair->second : uncertainty on the trigger efficiency
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

Parameters:
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
Returns:
name
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

Parameters:
electron [in] TLorentzVector of electron
combination [in] trigger/offline combination
year [in] year
configuration [in] configuration
Returns:
pair->first : efficiency or SF, pair->second : uncertainty
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

Parameters:
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
Returns:
pair->first : muon trigger efficiency, pair->second : uncertainty on the trigger efficiency
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

Parameters:
period [in] data period
isData [in] set it to true if data, false for MC
muonQuality [in] muon quality
Returns:
pair->first : efficiency, pair->second : uncertainty on the efficiency
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

Parameters:
configuration [in] configuration
muon [in] TLorentzVector of muon
muonQuality [in] muon quality
trigger [in] trigger
Returns:
pair->first : efficiency, pair->second : uncertainty on the efficiency
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

Parameters:
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
Returns:
pair->first : scale factor, pair->second : uncertainty on the scale factor
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

Parameters:
config [in] configuration
electrons [in] array of TLorentzVector for electrons
electronsQuality [in] array of electron quality
chain [in] trigger chain name
Returns:
pair->first : single or dielectron trigger efficiency, pair->second : uncertainty on the trigger efficiency
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

Parameters:
config [in] configuration
muons [in] array of TLorentzVector for muons
muonsQuality [in] array of muon quality
chain [in] trigger chain name
Returns:
pair->first : single or dimuon trigger efficiency, pair->second : uncertainty on the trigger efficiency
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

Parameters:
configuration [in] configuration
electrons [in] TLorentzVector array of electrons
electronsQuality [in] array of electron qualities
trigger [in] trigger chain
Returns:
pair->first : scale factor, pair->second : uncertainty on the scale factor

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

Parameters:
configuration [in] configuration
muons [in] TLorentzVector array of muons
muonsQuality [in] array of muon qualities
trigger [in] trigger chain
Returns:
pair->first : scale factor, pair->second : uncertainty on the scale factor

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

Parameters:
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
Returns:
pair->first : scale factor, pair->second : uncertainty on the scale factor
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

Parameters:
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
Returns:
pair->first : scale factor, pair->second : uncertainty on the scale factor
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

Parameters:
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
Returns:
pair->first : scale factor, pair->second : uncertainty on the scale factor
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

Parameters:
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
Returns:
pair->first : scale factor, pair->second : uncertainty on the scale factor
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

Parameters:
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
Returns:
pair->first : scale factor, pair->second : uncertainty on the scale factor
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

Parameters:
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
Returns:
pair->first : scale factor, pair->second : uncertainty on the scale factor
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

Parameters:
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
Returns:
pair->first : scale factor, pair->second : uncertainty on the scale factor
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

Parameters:
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
Returns:
pair->first : scale factor, pair->second : uncertainty on the scale factor
void LeptonTriggerSF::setAFII ( const bool  flag = true  )  [inline]

flag for AtlFast II sample

Parameters:
flag [in] true for AtlFast II sample, false otherwise

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1