Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ParticleFlowElementv1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ParticleFlowElementv1.h
1 #ifndef PARTICLEFLOW_PARTICLEFLOWELEMENTV1_H
2 #define PARTICLEFLOW_PARTICLEFLOWELEMENTV1_H
3 
4 //===========================================================
8 //===========================================================
9 
10 #include "ParticleFlowElement.h"
11 
12 #include <iostream>
13 #include <utility> // for pair, make_pair
14 
15 class SvtxTrack;
16 class RawCluster;
17 
19 {
20  public:
22  ~ParticleFlowElementv1() override {}
23 
24  // PHObject virtual overloads
25 
26  void identify(std::ostream& os = std::cout) const override;
27  void Reset() override;
28  int isValid() const override;
29 
30  // pflow element info
31 
32  ParticleFlowElement::PFLOWTYPE get_type() const override {return _type; }
34 
35  unsigned int get_id() const override { return _id; }
36  void set_id(unsigned int id) override { _id = id; }
37 
38  float get_px() const override { return _mom[0]; }
39  void set_px(float px) override { _mom[0] = px; }
40 
41  float get_py() const override { return _mom[1]; }
42  void set_py(float py) override { _mom[1] = py; }
43 
44  float get_pz() const override { return _mom[2]; }
45  void set_pz(float pz) override { _mom[2] = pz; }
46 
47  float get_e() const override { return _e; }
48  void set_e(float e) override { _e = e; }
49 
50  SvtxTrack* get_track() const override { return _track; }
51  void set_track(SvtxTrack* track) override { _track = track; }
52 
53  std::vector<RawCluster*> get_eclusters() const override { return _ecluster; }
54  void set_eclusters(const std::vector<RawCluster*>& ecluster) override { _ecluster = ecluster; }
55 
56  RawCluster* get_hcluster() const override { return _hcluster; }
57  void set_hcluster(RawCluster* hcluster) override { _hcluster = hcluster; }
58 
59  float get_p() const override;
60  float get_pt() const override;
61  float get_et() const override;
62  float get_eta() const override;
63  float get_phi() const override;
64  float get_mass() const override;
65 
66  private:
68  unsigned int _id;
69 
70  // particle flow type
72 
74  float _mom[3];
75 
77  float _e;
78 
79  SvtxTrack* _track = nullptr;
80  std::vector<RawCluster*> _ecluster;
81  RawCluster* _hcluster = nullptr;
83 };
84 
85 #endif