DAS  3.0
Das Analysis System
Photon.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <TString.h>
6 
7 #include <cstdint>
8 
9 namespace DAS {
10 
13 struct GenPhoton : public PhysicsObject {
14  static inline const char * const ScaleVar = "GenPhotonScales", //< Name of photon rec scales in variations
15  * const WeightVar = "GenPhotonWgts"; //< Name of photon rec weights in variations
16 
17  bool zAncestor = false,
18  prompt = false;
19 
20 private:
21  std::string_view scale_group () const override { return ScaleVar; }
22  std::string_view weight_group () const override { return WeightVar; }
23 };
24 
27 struct RecPhoton : public GenPhoton {
28  static inline const char * const ScaleVar = "RecPhotonScales", //< Name of photon rec scales in variations
29  * const WeightVar = "RecPhotonWgts"; //< Name of photon rec weights in variations
30 
35  Nominal = 0,
42  };
43  static inline const std::vector<TString> uncs {"Scale", "SigmaPhi", "SigmaRho"};
44 
49  CutBasedLoose = 0b0000001,
50  CutBasedMedium = 0b0000010,
51  CutBasedTight = 0b0000100,
52  MVAWorkingPoint80 = 0b0001000,
53  MVAWorkingPoint90 = 0b0010000,
55  PixelSeedVeto = 0b1000000,
56  };
57 
58  float scEta,
65 
68  float ecalEnergyErrPostCorr = -1;
69 
70  std::uint32_t selectors = 0;
71 
72 private:
73  std::string_view scale_group () const final { return ScaleVar; }
74  std::string_view weight_group () const final { return WeightVar; }
75 };
76 
77 } // end of DAS namespace
78 
79 inline std::ostream& operator<< (std::ostream& s, const DAS::GenPhoton& photon)
80 {
81  return s << photon.p4 << ' ' << photon.zAncestor << ' ' << photon.prompt;
82 }
83 
84 inline std::ostream& operator<< (std::ostream& s, const DAS::RecPhoton& photon)
85 {
86  return s << photon.p4 << ' ' << photon.scales.size() << ' ' << photon.weights.size();
87 }
88 
89 #if defined(__ROOTCLING__)
90 #pragma link C++ class DAS::GenPhoton +;
91 #pragma link C++ class std::vector<DAS::GenPhoton> +;
92 
93 #pragma link C++ class DAS::RecPhoton +;
94 #pragma link C++ class std::vector<DAS::RecPhoton> +;
95 #endif
DAS::RecPhoton::SigmaRhoUp
@ SigmaRhoUp
energy with the ecal energy smearing value shifted 1 sigma(rho) up
Definition: Photon.h:40
DAS::RecPhoton::uncs
static const std::vector< TString > uncs
Definition: Photon.h:43
DAS
Definition: applyBTagSF.cc:31
DAS::RecPhoton::PixelSeedVeto
@ PixelSeedVeto
Pixel seed veto.
Definition: Photon.h:55
DAS::RecPhoton::weight_group
std::string_view weight_group() const final
Definition: Photon.h:74
DAS::RecPhoton::ScaleUp
@ ScaleUp
energy with the ecal energy scale shifted 1 sigma(stat) up
Definition: Photon.h:36
DAS::RecPhoton::CutBasedMedium
@ CutBasedMedium
Medium cut-based ID.
Definition: Photon.h:50
DAS::RecPhoton::scEta
float scEta
Super cluster eta, used to veto the barrel/endcap transition region.
Definition: Photon.h:58
DAS::PhysicsObject::p4
FourVector p4
raw four-momentum directly after reconstruction
Definition: PhysicsObject.h:50
DAS::GenPhoton::scale_group
std::string_view scale_group() const override
Definition: Photon.h:21
DAS::RecPhoton::sigmaIEtaIEta
float sigmaIEtaIEta
Width of the ECAL deposit along the eta axis.
Definition: Photon.h:59
DAS::RecPhoton::Nominal
@ Nominal
ecalEnergy of photon after scale & smearing corrections
Definition: Photon.h:35
DAS::RecPhoton::photonIsolation
float photonIsolation
Recomputed isolation from other photons.
Definition: Photon.h:63
DAS::RecPhoton::CutBasedLoose
@ CutBasedLoose
Loose cut-based ID.
Definition: Photon.h:49
DAS::RecPhoton::EnergyVariation
EnergyVariation
Definition: Photon.h:34
DAS::RecPhoton::MVAWorkingPoint80
@ MVAWorkingPoint80
80% efficiency working point of the MVA ID
Definition: Photon.h:52
DAS::PhysicsObject
Definition: PhysicsObject.h:41
DAS::PhysicsObject::scales
std::vector< float > scales
energy scale corrections and variations
Definition: PhysicsObject.h:51
DAS::RecPhoton::selectors
std::uint32_t selectors
Identification cuts satisfied by the photon.
Definition: Photon.h:70
operator<<
std::ostream & operator<<(std::ostream &s, const DAS::GenPhoton &photon)
Definition: Photon.h:79
DAS::GenPhoton
class GenPhoton
Definition: Photon.h:13
PhysicsObject.h
DAS::GenPhoton::prompt
bool prompt
Originates directly from the matrix element.
Definition: Photon.h:18
DAS::RecPhoton::WeightVar
static const char *const *const WeightVar
Definition: Photon.h:29
DAS::GenPhoton::ScaleVar
static const char *const ScaleVar
Definition: Photon.h:14
DAS::GenPhoton::WeightVar
static const char *const *const WeightVar
Definition: Photon.h:15
DAS::RecPhoton::worstChargedIsolation
float worstChargedIsolation
Recomputed charged isolation with the vertex chosen to maximize this value used for the ID.
Definition: Photon.h:64
DAS::RecPhoton::SigmaRhoDown
@ SigmaRhoDown
energy with the ecal energy smearing value shifted 1 sigma(rho) down
Definition: Photon.h:41
DAS::RecPhoton::hOverE
float hOverE
Ratio of HCAL to ECAL energy.
Definition: Photon.h:60
DAS::RecPhoton::SigmaPhiUp
@ SigmaPhiUp
energy with the ecal energy smearing value shifted 1 sigma(phi) up
Definition: Photon.h:38
DAS::RecPhoton::ecalEnergyErrPostCorr
float ecalEnergyErrPostCorr
Energy scale and smearing variations, indexed with the EnergyVariation enum.
Definition: Photon.h:68
DAS::RecPhoton::ScaleDown
@ ScaleDown
energy with the ecal energy scale shifted 1 sigma(stat) down
Definition: Photon.h:37
DAS::RecPhoton::CutBasedTight
@ CutBasedTight
Tight cut-based ID.
Definition: Photon.h:51
DAS::RecPhoton::SigmaPhiDown
@ SigmaPhiDown
energy with the ecal energy smearing value shifted 1 sigma(phi) down
Definition: Photon.h:39
DAS::GenPhoton::weight_group
std::string_view weight_group() const override
Definition: Photon.h:22
DAS::PhysicsObject::weights
Weights weights
object weights
Definition: PhysicsObject.h:52
DAS::GenPhoton::zAncestor
bool zAncestor
Z boson among the particle mothers.
Definition: Photon.h:17
DAS::RecPhoton::ScaleVar
static const char *const ScaleVar
Definition: Photon.h:28
DAS::RecPhoton::scale_group
std::string_view scale_group() const final
Definition: Photon.h:73
DAS::RecPhoton::neutralHadronIsolation
float neutralHadronIsolation
Recomputed isolation from neutral hadrons.
Definition: Photon.h:62
DAS::RecPhoton::Identification
Identification
Definition: Photon.h:48
DAS::RecPhoton::MVAWorkingPoint90
@ MVAWorkingPoint90
90% efficiency working point of the MVA ID
Definition: Photon.h:53
DAS::RecPhoton::chargedIsolation
float chargedIsolation
Recomputed isolation from charged particles.
Definition: Photon.h:61
DAS::RecPhoton
class RecPhoton
Definition: Photon.h:27
DAS::RecPhoton::ConversionSafeElectronVeto
@ ConversionSafeElectronVeto
Electron veto.
Definition: Photon.h:54