ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Jetv1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Jetv1.h
1 
9 #ifndef G4JET_JETV1_H
10 #define G4JET_JETV1_H
11 
12 #include "Jet.h"
13 
14 #include <cstddef> // for size_t
15 #include <iostream>
16 #include <map>
17 #include <utility> // for pair, make_pair
18 
19 class PHObject;
20 
24 class Jetv1 : public Jet
25 {
26  public:
27  Jetv1();
28  ~Jetv1() override {}
29 
30  // PHObject virtual overloads
31 
32  void identify(std::ostream& os = std::cout) const override;
33  void Reset() override;
34  int isValid() const override;
35  PHObject* CloneMe() const override;
36 
37  // jet info
38 
39  unsigned int get_id() const override { return _id; }
40  void set_id(unsigned int id) override { _id = id; }
41 
42  float get_px() const override { return _mom[0]; }
43  void set_px(float px) override { _mom[0] = px; }
44 
45  float get_py() const override { return _mom[1]; }
46  void set_py(float py) override { _mom[1] = py; }
47 
48  float get_pz() const override { return _mom[2]; }
49  void set_pz(float pz) override { _mom[2] = pz; }
50 
51  float get_e() const override { return _e; }
52  void set_e(float e) override { _e = e; }
53 
54  float get_p() const override;
55  float get_pt() const override;
56  float get_et() const override;
57  float get_eta() const override;
58  float get_phi() const override;
59  float get_mass() const override;
60  float get_mass2() const override;
61 
62  // extended jet info
63 
64  bool has_property(Jet::PROPERTY prop_id) const override;
65  float get_property(Jet::PROPERTY prop_id) const override;
66  void set_property(Jet::PROPERTY prop_id, float value) override;
67  void print_property(std::ostream& os) const override;
68 
69  //
70  // clustered component methods (multimap interface based)
71  // source type id --> unique id within that storage
72  //
73  bool empty_comp() const override { return _comp_ids.empty(); }
74  size_t size_comp() const override { return _comp_ids.size(); }
75  size_t count_comp(SRC source) const override { return _comp_ids.count(source); }
76 
77  void clear_comp() override { _comp_ids.clear(); }
78  void insert_comp(SRC source, unsigned int compid) override { _comp_ids.insert(std::make_pair(source, compid)); }
79  size_t erase_comp(SRC source) override { return _comp_ids.erase(source); }
80  void erase_comp(Iter iter) override
81  {
82  _comp_ids.erase(iter);
83  return;
84  }
85  void erase_comp(Iter first, Iter last) override
86  {
87  _comp_ids.erase(first, last);
88  return;
89  }
90 
91  ConstIter begin_comp() const override { return _comp_ids.begin(); }
92  ConstIter lower_bound_comp(SRC source) const override { return _comp_ids.lower_bound(source); }
93  ConstIter upper_bound_comp(SRC source) const override { return _comp_ids.upper_bound(source); }
94  ConstIter find(SRC source) const override { return _comp_ids.find(source); }
95  ConstIter end_comp() const override { return _comp_ids.end(); }
96 
97  Iter begin_comp() override { return _comp_ids.begin(); }
98  Iter lower_bound_comp(SRC source) override { return _comp_ids.lower_bound(source); }
99  Iter upper_bound_comp(SRC source) override { return _comp_ids.upper_bound(source); }
100  Iter find(SRC source) override { return _comp_ids.find(source); }
101  Iter end_comp() override { return _comp_ids.end(); }
102 
103  private:
105  unsigned int _id;
106 
108  float _mom[3];
109 
111  float _e;
112 
115 
116  typedef std::map<Jet::PROPERTY, float> typ_property_map;
119 
121 };
122 
123 #endif // G4JET_JETV1_H