DAS  3.0
Das Analysis System
ConversionVetoApplier

Description

Applies the Conversion Safe Electron Veto and corrections.

Modifies the weights of the reconstructed photons to apply the efficiency correction. Scale factors are taken from a ROOT file in the format provided by Egamma for UL scale factors.

+ Inheritance diagram for ConversionVetoApplier:
+ Collaboration diagram for ConversionVetoApplier:

Public Member Functions

 ConversionVetoApplier (const fs::path &filePath, const string &ID, bool correction, bool uncertainties, const string &type)
 
- Public Member Functions inherited from GenericSFApplier< DAS::RecPhoton >
 GenericSFApplier (const std::filesystem::path &filePath, bool correction, bool uncertainties)
 
virtual ~GenericSFApplier () noexcept=default
 
void operator() (DAS::RecPhoton &object, const Context &... ctx) const
 
void operator() (std::vector< DAS::RecPhoton > &objects, const Context &... ctx) const
 
std::vector< std::string > weightNames () const
 

Protected Member Functions

bool passes (const RecPhoton &photon) const override
 
int binIndex (const RecPhoton &photon, const std::unique_ptr< TH1 > &hist) const override
 
- Protected Member Functions inherited from GenericSFApplier< DAS::RecPhoton >
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 DAS::RecPhoton &obj, const Context &... ctx) const=0
 
virtual int binIndex (const DAS::RecPhoton &obj, const Context &... ctx, const std::unique_ptr< TH1 > &hist) const=0
 

Private Attributes

RecPhoton::Identification selector
 

Additional Inherited Members

- Protected Types inherited from GenericSFApplier< DAS::RecPhoton >
enum  Interpretation
 

Constructor & Destructor Documentation

◆ ConversionVetoApplier()

ConversionVetoApplier ( const fs::path &  filePath,
const string &  ID,
bool  correction,
bool  uncertainties,
const string &  type 
)
inline
39  : GenericSFApplier(filePath, correction, uncertainties)
40  {
41  /*
42  * Meta info: Loose | Medium | Tight | MVA80 | MVA90
43  * Egamma conveners believe that the 'MVA' working point in the files
44  * corresponds to MVA90. Reference:
45  * https://mattermost.web.cern.ch/cmseg/pl/yewftned9b8bxg4m3y7gdck4ze
46  */
47  string IDName = ID + "ID";
48  if (ID == "MVA80")
49  BOOST_THROW_EXCEPTION(std::invalid_argument(
50  "There are no CSEV scale factors for the MVA80 ID."));
51  else if (ID == "MVA90")
52  IDName = "MVAID";
53 
54  /*
55  * root [1] .ls
56  * TFile** /nfs/dust/cms/user/mourelou/darwin/Darwin/tables/Egamma/Photon_CSEV_UL18.root
57  * TFile* /nfs/dust/cms/user/mourelou/darwin/Darwin/tables/Egamma/Photon_CSEV_UL18.root
58  * KEY: TDirectoryFile LooseID;1 LooseID
59  * KEY: TDirectoryFile MediumID;1 MediumID
60  * KEY: TDirectoryFile TightID;1 TightID
61  * KEY: TDirectoryFile MVAID;1 MVAID
62  * root [2] LooseID->ls()
63  * TDirectoryFile* LooseID LooseID
64  * KEY: TH1F SF_CSEV_LooseID;1
65  * KEY: TH1F Staunc_CSEV_LooseID;1
66  * KEY: TH1F PUunc_CSEV_LooseID;1
67  * KEY: TH1F Modelunc_CSEV_LooseID;1
68  */
69 
70  loadNominal(IDName + "/SF_" + type + "_" + IDName);
71  loadBinWiseUnc(type + "_stat", IDName + "/Staunc_" + type + "_" + IDName);
72  loadGlobalUnc(type + "_PU", IDName + "/PUunc_" + type + "_" + IDName);
73  loadGlobalUnc(type + "_model", IDName + "/Modelunc_" + type + "_" + IDName);
74 
75  if (type == "CSEV")
77  else if (type == "HasPix")
79  else
80  BOOST_THROW_EXCEPTION(invalid_argument("Type `"
81  + type + "`is unknown"));
82  cout << "Initialisation of " << __func__ << " done" << endl;
83  }

Member Function Documentation

◆ binIndex()

int binIndex ( const RecPhoton photon,
const std::unique_ptr< TH1 > &  hist 
) const
inlineoverrideprotected
93  {
94  /*
95  * The axis is categorical:
96  * 0 = EB inclusive
97  * 1 = EB high R9
98  * 2 = EB low R9
99  * 3 = EE inclusive
100  * 4 = EE high R9
101  * 5 = EE low R9
102  * The threshold for high R9 is 0.96 (using the "shifted" value).
103  * Since we don't have R9 in the ntuples we use the inclusive.
104  */
105  return hist->FindBin(abs(photon.scEta) < 1.5 ? 0 : 3);
106  }

◆ passes()

bool passes ( const RecPhoton photon) const
inlineoverrideprotected
87  {
88  return selector & photon.selectors;
89  }

Member Data Documentation

◆ selector

RecPhoton::Identification selector
private

expecting PSV or CSEV


The documentation for this class was generated from the following file:
DAS::RecPhoton::PixelSeedVeto
@ PixelSeedVeto
Pixel seed veto.
Definition: Photon.h:59
DAS::GenericSFApplier< DAS::RecPhoton >::GenericSFApplier
GenericSFApplier(const std::filesystem::path &filePath, bool correction, bool uncertainties)
Constructor.
Definition: GenericSFApplier.h:153
DAS::GenericSFApplier< DAS::RecPhoton >::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
DAS::GenericSFApplier< DAS::RecPhoton >::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::Photon::ConversionVetoApplier::selector
RecPhoton::Identification selector
expecting PSV or CSEV
Definition: applyPhotonConversionVeto.cc:35
DAS::GenericSFApplier< DAS::RecPhoton >::loadGlobalUnc
void loadGlobalUnc(const std::string &name, const std::string &histPath, Interpretation intp=UseBinContent)
Loads a fully correlated systematic.
Definition: GenericSFApplier.h:295
DAS::RecPhoton::ConversionSafeElectronVeto
@ ConversionSafeElectronVeto
Electron veto.
Definition: Photon.h:58