Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:57

0001 #ifndef PARTICLEFLOW_PARTICLEFLOWELEMENTV1_H
0002 #define PARTICLEFLOW_PARTICLEFLOWELEMENTV1_H
0003 
0004 //===========================================================
0005 /// \file ParticleFlowElementv1.h
0006 /// \brief v1 Implementation of ParticleFlowElement base class
0007 /// \author Dennis V. Perepelitsa
0008 //===========================================================
0009 
0010 #include "ParticleFlowElement.h"
0011 
0012 #include <iostream>
0013 #include <utility>  // for pair, make_pair
0014 
0015 class SvtxTrack;
0016 class RawCluster;
0017 
0018 class ParticleFlowElementv1 : public ParticleFlowElement
0019 {
0020  public:
0021   ParticleFlowElementv1();
0022   ~ParticleFlowElementv1() override {}
0023 
0024   // PHObject virtual overloads
0025 
0026   void identify(std::ostream& os = std::cout) const override;
0027   void Reset() override;
0028   int isValid() const override;
0029 
0030   // pflow element info
0031 
0032   ParticleFlowElement::PFLOWTYPE get_type() const override { return _type; }
0033   void set_type(ParticleFlowElement::PFLOWTYPE type) override { _type = type; }
0034 
0035   unsigned int get_id() const override { return _id; }
0036   void set_id(unsigned int id) override { _id = id; }
0037 
0038   float get_px() const override { return _mom[0]; }
0039   void set_px(float px) override { _mom[0] = px; }
0040 
0041   float get_py() const override { return _mom[1]; }
0042   void set_py(float py) override { _mom[1] = py; }
0043 
0044   float get_pz() const override { return _mom[2]; }
0045   void set_pz(float pz) override { _mom[2] = pz; }
0046 
0047   float get_e() const override { return _e; }
0048   void set_e(float e) override { _e = e; }
0049 
0050   SvtxTrack* get_track() const override { return _track; }
0051   void set_track(SvtxTrack* track) override { _track = track; }
0052 
0053   std::vector<RawCluster*> get_eclusters() const override { return _ecluster; }
0054   void set_eclusters(const std::vector<RawCluster*>& ecluster) override { _ecluster = ecluster; }
0055 
0056   RawCluster* get_hcluster() const override { return _hcluster; }
0057   void set_hcluster(RawCluster* hcluster) override { _hcluster = hcluster; }
0058 
0059   float get_p() const override;
0060   float get_pt() const override;
0061   float get_et() const override;
0062   float get_eta() const override;
0063   float get_phi() const override;
0064   float get_mass() const override;
0065 
0066  private:
0067   /// unique identifier within container
0068   unsigned int _id;
0069 
0070   // particle flow type
0071   ParticleFlowElement::PFLOWTYPE _type;
0072 
0073   /// pflow momentum vector (px,py,pz)
0074   float _mom[3];
0075 
0076   /// pflow energy
0077   float _e;
0078 
0079   SvtxTrack* _track = nullptr;
0080   std::vector<RawCluster*> _ecluster;
0081   RawCluster* _hcluster = nullptr;
0082   ClassDefOverride(ParticleFlowElementv1, 1);
0083 };
0084 
0085 #endif