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 <array>
8 #include <cstdint>
9 
10 namespace DAS {
11 
14 struct GenPhoton : public PhysicsObject {
15  static inline const char * ScaleVar = "GenPhotonScales", //< Name of photon rec scales in variations
16  * WeightVar = "GenPhotonWgts"; //< Name of photon rec weights in variations
17 
18  bool zAncestor = false,
19  prompt = false;
20 
21  GenPhoton() = default;
22 
23 private:
24  std::string_view scale_group () const final { return ScaleVar; }
25  std::string_view weight_group () const final { return WeightVar; }
26 };
27 
30 struct RecPhoton {
31  static inline const char * ScaleVar = "RecPhotonScales", //< Name of photon rec scales in variations
32  * WeightVar = "RecPhotonWgts"; //< Name of photon rec weights in variations
33 
38  Nominal = 0,
46  };
47  static inline const std::vector<TString> uncs {"Scale", "SigmaPhi", "SigmaRho"};
48 
53  CutBasedLoose = 0b0000001,
54  CutBasedMedium = 0b0000010,
55  CutBasedTight = 0b0000100,
56  MVAWorkingPoint80 = 0b0001000,
57  MVAWorkingPoint90 = 0b0010000,
59  PixelSeedVeto = 0b1000000,
60  };
61 
63  Weights weights = {{1.,0}};
64 
65  float scEta,
72 
75  std::array<float, VariationsCount> scales;
76  float ecalEnergyErrPostCorr = -1;
77 
78  std::uint32_t selectors = 0;
79 
80  RecPhoton () = default;
81  ~RecPhoton () = default;
82 
83  inline float Rapidity () const { return p4.Rapidity() ; };
84  inline float AbsRap () const { return std::abs(Rapidity()); };
85 
88  inline FourVector CorrP4 (EnergyVariation var = Nominal) const { return p4 * scales[var]; }
89 };
90 
91 } // end of DAS namespace
92 
93 inline std::ostream& operator<< (std::ostream& s, const DAS::GenPhoton& photon)
94 {
95  return s << photon.p4 << ' ' << photon.zAncestor << ' ' << photon.prompt;
96 }
97 
98 inline std::ostream& operator<< (std::ostream& s, const DAS::RecPhoton& photon)
99 {
100  return s << photon.p4 << ' ' << photon.scales.size() << ' ' << photon.weights.size();
101 }
102 
103 #if defined(__ROOTCLING__)
104 #pragma link C++ class DAS::GenPhoton +;
105 #pragma link C++ class std::vector<DAS::GenPhoton> +;
106 
107 #pragma link C++ class DAS::RecPhoton +;
108 #pragma link C++ class std::vector<DAS::RecPhoton> +;
109 #endif
DAS::RecPhoton::SigmaRhoUp
@ SigmaRhoUp
energy with the ecal energy smearing value shifted 1 sigma(rho) up
Definition: Photon.h:43
DAS::Weights
std::vector< Weight > Weights
Definition: Weight.h:41
DAS::RecPhoton::uncs
static const std::vector< TString > uncs
Definition: Photon.h:47
DAS::RecPhoton::p4
FourVector p4
four-momentum
Definition: Photon.h:62
DAS
Definition: applyBTagSF.cc:31
DAS::RecPhoton::PixelSeedVeto
@ PixelSeedVeto
Pixel seed veto.
Definition: Photon.h:59
DAS::RecPhoton::scales
std::array< float, VariationsCount > scales
Energy scale and smearing variations, indexed with the EnergyVariation enum.
Definition: Photon.h:75
DAS::GenPhoton::weight_group
std::string_view weight_group() const final
Definition: Photon.h:25
DAS::GenPhoton::GenPhoton
GenPhoton()=default
Constructor (trivial)
DAS::RecPhoton::ScaleUp
@ ScaleUp
energy with the ecal energy scale shifted 1 sigma(stat) up
Definition: Photon.h:39
DAS::RecPhoton::CutBasedMedium
@ CutBasedMedium
Medium cut-based ID.
Definition: Photon.h:54
DAS::RecPhoton::scEta
float scEta
Super cluster eta, used to veto the barrel/endcap transition region.
Definition: Photon.h:65
DAS::PhysicsObject::p4
FourVector p4
raw four-momentum directly after reconstruction
Definition: PhysicsObject.h:47
DAS::RecPhoton::sigmaIEtaIEta
float sigmaIEtaIEta
Width of the ECAL deposit along the eta axis.
Definition: Photon.h:66
DAS::RecPhoton::Nominal
@ Nominal
ecalEnergy of photon after scale & smearing corrections
Definition: Photon.h:38
DAS::RecPhoton::photonIsolation
float photonIsolation
Recomputed isolation from other photons.
Definition: Photon.h:70
DAS::RecPhoton::CutBasedLoose
@ CutBasedLoose
Loose cut-based ID.
Definition: Photon.h:53
DAS::RecPhoton::EnergyVariation
EnergyVariation
Definition: Photon.h:37
DAS::RecPhoton::MVAWorkingPoint80
@ MVAWorkingPoint80
80% efficiency working point of the MVA ID
Definition: Photon.h:56
DAS::PhysicsObject
Definition: PhysicsObject.h:38
DAS::RecPhoton::selectors
std::uint32_t selectors
Identification cuts satisfied by the photon.
Definition: Photon.h:78
DAS::RecPhoton::~RecPhoton
~RecPhoton()=default
Destructor (trivial)
DAS::GenPhoton
class GenPhoton
Definition: Photon.h:14
DAS::GenPhoton::WeightVar
static const char * WeightVar
Definition: Photon.h:16
PhysicsObject.h
operator<<
std::ostream & operator<<(std::ostream &s, const DAS::GenPhoton &photon)
Definition: Photon.h:93
DAS::RecPhoton::weights
Weights weights
object weights
Definition: Photon.h:63
DAS::GenPhoton::prompt
bool prompt
Originates directly from the matrix element.
Definition: Photon.h:19
DAS::GenPhoton::scale_group
std::string_view scale_group() const final
Definition: Photon.h:24
DAS::RecPhoton::Rapidity
float Rapidity() const
Definition: Photon.h:83
DAS::RecPhoton::worstChargedIsolation
float worstChargedIsolation
Recomputed charged isolation with the vertex chosen to maximize this value used for the ID.
Definition: Photon.h:71
DAS::RecPhoton::AbsRap
float AbsRap() const
Definition: Photon.h:84
DAS::RecPhoton::SigmaRhoDown
@ SigmaRhoDown
energy with the ecal energy smearing value shifted 1 sigma(rho) down
Definition: Photon.h:44
DAS::RecPhoton::RecPhoton
RecPhoton()=default
Constructor (trivial)
DAS::RecPhoton::hOverE
float hOverE
Ratio of HCAL to ECAL energy.
Definition: Photon.h:67
DAS::RecPhoton::SigmaPhiUp
@ SigmaPhiUp
energy with the ecal energy smearing value shifted 1 sigma(phi) up
Definition: Photon.h:41
DAS::RecPhoton::ecalEnergyErrPostCorr
float ecalEnergyErrPostCorr
resolution estimate on the ecalEnergy after scale & smearing corrections
Definition: Photon.h:76
DAS::RecPhoton::ScaleDown
@ ScaleDown
energy with the ecal energy scale shifted 1 sigma(stat) down
Definition: Photon.h:40
DAS::RecPhoton::CutBasedTight
@ CutBasedTight
Tight cut-based ID.
Definition: Photon.h:55
DAS::RecPhoton::VariationsCount
@ VariationsCount
Number of available variations.
Definition: Photon.h:45
DAS::RecPhoton::SigmaPhiDown
@ SigmaPhiDown
energy with the ecal energy smearing value shifted 1 sigma(phi) down
Definition: Photon.h:42
DAS::GenPhoton::zAncestor
bool zAncestor
Z boson among the particle mothers.
Definition: Photon.h:18
DAS::RecPhoton::WeightVar
static const char * WeightVar
Definition: Photon.h:32
DAS::FourVector
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< float > > FourVector
Definition: PhysicsObject.h:15
DAS::RecPhoton::neutralHadronIsolation
float neutralHadronIsolation
Recomputed isolation from neutral hadrons.
Definition: Photon.h:69
DAS::RecPhoton::ScaleVar
static const char * ScaleVar
Definition: Photon.h:31
DAS::GenPhoton::ScaleVar
static const char * ScaleVar
Definition: Photon.h:15
DAS::RecPhoton::Identification
Identification
Definition: Photon.h:52
DAS::RecPhoton::MVAWorkingPoint90
@ MVAWorkingPoint90
90% efficiency working point of the MVA ID
Definition: Photon.h:57
DAS::RecPhoton::chargedIsolation
float chargedIsolation
Recomputed isolation from charged particles.
Definition: Photon.h:68
DAS::RecPhoton
class RecPhoton
Definition: Photon.h:30
DAS::RecPhoton::ConversionSafeElectronVeto
@ ConversionSafeElectronVeto
Electron veto.
Definition: Photon.h:58
DAS::RecPhoton::CorrP4
FourVector CorrP4(EnergyVariation var=Nominal) const
Definition: Photon.h:88