DAS  3.0
Das Analysis System
Photon.h
Go to the documentation of this file.
1 #pragma once
2 
3 // STD
4 #include <cstdint>
5 #include <ios>
6 
7 // Darwin
8 #include <GenericObject.h>
9 
10 // ROOT
11 #include <TString.h>
12 
13 namespace Darwin::Physics {
14 
17 class GenPhoton : public GenericObject {
18 
19  std::string_view scale_group () const override { return ScaleVar; }
20  std::string_view weight_group () const override { return WeightVar; }
21 
22 public:
23  static inline const char * const ScaleVar = "GenPhotonScales",
24  * const WeightVar = "GenPhotonWgts";
25 
26  bool zAncestor = false,
27  prompt = false;
28 
29  GenPhoton () = default;
30  virtual ~GenPhoton() = default;
31 };
32 
35 class RecPhoton : public GenPhoton {
36 
37  std::string_view scale_group () const override { return ScaleVar; }
38  std::string_view weight_group () const override { return WeightVar; }
39 
40 public:
41  static inline const char * const ScaleVar = "RecPhotonScales",
42  * const WeightVar = "RecPhotonWgts";
43 
44  std::uint32_t selectors = 0;
45 
46  RecPhoton () = default;
47  virtual ~RecPhoton() = default;
48 };
49 
50 } // end of Darwin::Physics namespace
51 
52 inline std::ostream& operator<< (std::ostream& s, const Darwin::Physics::GenPhoton& photon)
53 {
54  return s << photon.CorrP4() << ' ' << photon.zAncestor << ' ' << photon.prompt;
55 }
56 
57 inline std::ostream& operator<< (std::ostream& s, const Darwin::Physics::RecPhoton& photon)
58 {
59  return s << photon.CorrP4() << " 0x" << std::hex << photon.selectors << std::dec;
60 }
Darwin::Physics::GenPhoton::weight_group
std::string_view weight_group() const override
Definition: Photon.h:20
Darwin::Physics::GenPhoton::GenPhoton
GenPhoton()=default
Darwin::Physics::RecPhoton::scale_group
std::string_view scale_group() const override
Definition: Photon.h:37
Darwin::Physics::GenPhoton::zAncestor
bool zAncestor
Z boson among the particle mothers.
Definition: Photon.h:26
Darwin::Physics::RecPhoton::weight_group
std::string_view weight_group() const override
Definition: Photon.h:38
Darwin::Physics::GenPhoton::~GenPhoton
virtual ~GenPhoton()=default
Darwin::Physics::RecPhoton
Generic detector-level photon.
Definition: Photon.h:35
operator<<
std::ostream & operator<<(std::ostream &s, const DAS::GenPhoton &photon)
Definition: Photon.h:93
Darwin::Physics::GenPhoton::WeightVar
static const char *const *const WeightVar
Definition: Photon.h:24
Darwin::Physics::GenPhoton
Generic generator-level photon.
Definition: Photon.h:17
Darwin::Physics::RecPhoton::RecPhoton
RecPhoton()=default
Darwin::Physics::RecPhoton::selectors
std::uint32_t selectors
Identification cuts.
Definition: Photon.h:44
Darwin::Physics::GenPhoton::scale_group
std::string_view scale_group() const override
Definition: Photon.h:19
Darwin::Physics::RecPhoton::~RecPhoton
virtual ~RecPhoton()=default
Darwin::Physics::RecPhoton::WeightVar
static const char *const *const WeightVar
Definition: Photon.h:42
Darwin::Physics::GenericObject::CorrP4
FourVector CorrP4(size_t i=0) const
corrected 4-vector
Definition: GenericObject.h:57
GenericObject.h
Darwin::Physics
Everything what concerns physics analysis directly.
Definition: darwin.h:24
Darwin::Physics::GenPhoton::prompt
bool prompt
Originates directly from the matrix element.
Definition: Photon.h:27
Darwin::Physics::GenPhoton::ScaleVar
static const char *const ScaleVar
Definition: Photon.h:23
Darwin::Physics::RecPhoton::ScaleVar
static const char *const ScaleVar
Definition: Photon.h:41