forked from sPHENIX-Collaboration/coresoftware
/
Jet.h
153 lines (121 loc) · 4.43 KB
/
Jet.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#ifndef G4JET_JET_H
#define G4JET_JET_H
#include <phool/PHObject.h>
#include <cmath>
#include <cstddef> // for size_t
#include <iostream>
#include <map>
class Jet : public PHObject
{
public:
// enums can be extended with new values, but values not altered
enum ALGO
{
NONE = 0,
ANTIKT = 1,
KT = 2,
CAMBRIDGE = 3
};
enum SRC
{
VOID = 0,
PARTICLE = 1,
TRACK = 2,
CEMC_TOWER = 3,
CEMC_CLUSTER = 4,
HCALIN_TOWER = 5,
HCALIN_CLUSTER = 6,
HCALOUT_TOWER = 7,
HCALOUT_CLUSTER = 8,
FEMC_TOWER = 9,
FEMC_CLUSTER = 10,
FHCAL_TOWER = 11,
FHCAL_CLUSTER = 12,
CEMC_TOWER_RETOWER = 13, /* needed for HI jet reco */
CEMC_TOWER_SUB1 = 14,
HCALIN_TOWER_SUB1 = 15,
HCALOUT_TOWER_SUB1 = 16, /* needed for HI jet reco */
CEMC_TOWER_SUB1CS = 17,
HCALIN_TOWER_SUB1CS = 18,
HCALOUT_TOWER_SUB1CS = 19, /* needed for CS subtraction w/ HI jet reco */
HEPMC_IMPORT = 20, /*Direct import HEPMC containers, such as sHijing HIJFRG truth jets loaded by JetHepMCLoader*/
HCAL_TOPO_CLUSTER = 21, /* I+HOCal 3-D topoCluster input */
ECAL_TOPO_CLUSTER = 22, /* EMCal 3-D topoCluster input */
EEMC_TOWER = 23,
EEMC_CLUSTER = 24,
};
enum PROPERTY
{
//! jet charge
prop_JetCharge = 1,
//! b-jet fraction
prop_BFrac = 2,
//! discriminator D = max tower E / average E , used to identify
//! seeds in 1st iteration of UE determination
prop_SeedD = 3,
//! used to tag as seed jet in 1st or 2nd iteration of UE
//! determination
prop_SeedItr = 4,
//! SoftDrop quantities
prop_zg = 5,
prop_Rg = 6,
prop_mu = 7,
};
Jet() {}
~Jet() override {}
void identify(std::ostream& os = std::cout) const override;
int isValid() const override { return 0; }
PHObject* CloneMe() const override { return nullptr; }
// jet info ------------------------------------------------------------------
virtual unsigned int get_id() const { return 0xFFFFFFFF; }
virtual void set_id(unsigned int) { return; }
virtual float get_px() const { return NAN; }
virtual void set_px(float) { return; }
virtual float get_py() const { return NAN; }
virtual void set_py(float) { return; }
virtual float get_pz() const { return NAN; }
virtual void set_pz(float) { return; }
virtual float get_e() const { return NAN; }
virtual void set_e(float) { return; }
virtual float get_p() const { return NAN; }
virtual float get_pt() const { return NAN; }
virtual float get_et() const { return NAN; }
virtual float get_eta() const { return NAN; }
virtual float get_phi() const { return NAN; }
virtual float get_mass() const { return NAN; }
virtual float get_mass2() const { return NAN; }
// extended jet info ---------------------------------------------------------
virtual bool has_property(Jet::PROPERTY /*prop_id*/) const { return false; }
virtual float get_property(Jet::PROPERTY /*prop_id*/) const { return NAN; }
virtual void set_property(Jet::PROPERTY /*prop_id*/, float /*value*/) { return; }
virtual void print_property(std::ostream& /*os*/) const { return; }
// component id storage ------------------------------------------------------
/*! \addtogroup clustered component
* clustered component methods (multimap interface based)
* source type id --> unique id within that storage
* @{
*/
typedef std::multimap<Jet::SRC, unsigned int> typ_comp_ids;
typedef typ_comp_ids::const_iterator ConstIter;
typedef typ_comp_ids::iterator Iter;
virtual bool empty_comp() const { return true; }
virtual size_t size_comp() const { return 0; }
virtual size_t count_comp(Jet::SRC /*source*/) const { return 0; }
virtual void clear_comp() { return; }
virtual void insert_comp(Jet::SRC /*source*/, unsigned int /*compid*/) { return; }
virtual size_t erase_comp(Jet::SRC /*source*/) { return 0; }
virtual void erase_comp(Iter /*iter*/) { return; }
virtual void erase_comp(Iter /*first*/, Iter /*last*/) { return; }
virtual ConstIter begin_comp() const;
virtual ConstIter lower_bound_comp(Jet::SRC source) const;
virtual ConstIter upper_bound_comp(Jet::SRC source) const;
virtual ConstIter find(Jet::SRC source) const;
virtual ConstIter end_comp() const;
virtual Iter begin_comp();
virtual Iter lower_bound_comp(Jet::SRC source);
virtual Iter upper_bound_comp(Jet::SRC source);
virtual Iter find(Jet::SRC source);
virtual Iter end_comp();
ClassDefOverride(Jet, 1);
};
#endif