DAS  3.0
Das Analysis System
TriggerApplier

Description

Modifies the weights of the reconstructed muons to apply the efficiency correction.

Note: tuned for Run 2 UL

+ Inheritance diagram for TriggerApplier:
+ Collaboration diagram for TriggerApplier:

Public Member Functions

 TriggerApplier (const fs::path &filePath, string &histname, int year, bool correction, bool uncertainties)
 
bool passes (const RecEvent &, const Trigger &trigger, const vector< RecMuon > &muons) const override
 
int binIndex (const RecEvent &, const Trigger &, const vector< RecMuon > &muons, const unique_ptr< TH1 > &hist) const override
 
- Public Member Functions inherited from GenericSFApplier< RecEvent, Trigger, vector< RecMuon > >
 GenericSFApplier (const std::filesystem::path &filePath, bool correction, bool uncertainties)
 
virtual ~GenericSFApplier () noexcept=default
 
void operator() (RecEvent &object, const Context &... ctx) const
 
void operator() (std::vector< RecEvent > &objects, const Context &... ctx) const
 
std::vector< std::string > weightNames () const
 

Private Attributes

int m_year
 

Additional Inherited Members

- Protected Types inherited from GenericSFApplier< RecEvent, Trigger, vector< RecMuon > >
enum  Interpretation
 
- Protected Member Functions inherited from GenericSFApplier< RecEvent, Trigger, vector< RecMuon > >
void loadNominal (const std::string &histPath)
 
void loadBinWiseUnc (const std::string &name, const std::string &histPath, Interpretation intp=UseBinContent)
 
void loadGlobalUnc (const std::string &name, const std::string &histPath, Interpretation intp=UseBinContent)
 
virtual bool passes (const RecEvent &obj, const Context &... ctx) const=0
 
virtual int binIndex (const RecEvent &obj, const Context &... ctx, const std::unique_ptr< TH1 > &hist) const=0
 

Constructor & Destructor Documentation

◆ TriggerApplier()

TriggerApplier ( const fs::path &  filePath,
string &  histname,
int  year,
bool  correction,
bool  uncertainties 
)
inline
72  : GenericSFApplier(filePath, correction, uncertainties)
73  , m_year(year)
74  {
75  loadNominal(histname);
76  loadBinWiseUnc(histname + "_stat", histname + "_stat");
77  loadGlobalUnc(histname + "_syst", histname + "_syst");
78  loadGlobalUnc(histname + "_alt", histname + "_alt");
79  loadGlobalUnc(histname + "_massBin", histname + "_massBin");
80  loadGlobalUnc(histname + "_massRange", histname + "_massRange");
81  }

Member Function Documentation

◆ binIndex()

int binIndex ( const RecEvent ,
const Trigger ,
const vector< RecMuon > &  muons,
const unique_ptr< TH1 > &  hist 
) const
inlineoverride
94  {
95  // We know that we have at least two muons because passes() requires this.
96  return hist->FindBin(std::abs(muons.at(0).p4.Eta()),
97  std::abs(muons.at(1).p4.Eta()));
98  }

◆ passes()

bool passes ( const RecEvent ,
const Trigger trigger,
const vector< RecMuon > &  muons 
) const
inlineoverride
86  {
87  return PassTriggerSelection(trigger, muons, m_year);
88  }

Member Data Documentation

◆ m_year

int m_year
private

The documentation for this class was generated from the following file:
DAS::GenericSFApplier< RecEvent, Trigger, vector< RecMuon > >::GenericSFApplier
GenericSFApplier(const std::filesystem::path &filePath, bool correction, bool uncertainties)
Constructor.
Definition: GenericSFApplier.h:153
DAS::GenericSFApplier< RecEvent, Trigger, vector< RecMuon > >::loadNominal
void loadNominal(const std::string &histPath)
Loads the histogram with the nominal scale factor. Has no effect when not applying the correction.
Definition: GenericSFApplier.h:259
Ntupliser_cfg.year
int year
Definition: Ntupliser_cfg.py:63
Ntupliser_cfg.muons
string muons
Definition: Ntupliser_cfg.py:43
DAS::GenericSFApplier< RecEvent, Trigger, vector< RecMuon > >::loadBinWiseUnc
void loadBinWiseUnc(const std::string &name, const std::string &histPath, Interpretation intp=UseBinContent)
Loads a systematic with bin-by-bin correlations.
Definition: GenericSFApplier.h:275
DAS::Muon::TriggerApplier::m_year
int m_year
Definition: applyDimuonTriggerStrategy.cc:67
DAS::Muon::PassTriggerSelection
bool PassTriggerSelection(const Trigger &trg, const vector< RecMuon > &recMuons, int year)
Definition: applyDimuonTriggerStrategy.cc:36
DAS::GenericSFApplier< RecEvent, Trigger, vector< RecMuon > >::loadGlobalUnc
void loadGlobalUnc(const std::string &name, const std::string &histPath, Interpretation intp=UseBinContent)
Loads a fully correlated systematic.
Definition: GenericSFApplier.h:295