File indexing completed on 2025-08-05 08:17:45
0001
0002
0003 #ifndef G4DETECTORS_PHG4CYLINDERCELLV1_H
0004 #define G4DETECTORS_PHG4CYLINDERCELLV1_H
0005
0006 #include "PHG4CylinderCell.h"
0007
0008 #include "PHG4Cell.h" // for PHG4Cell::EdepMap, PHG4Cell::Showe...
0009 #include "PHG4CylinderCellDefs.h" // for keytype
0010
0011 #include <g4main/PHG4HitDefs.h>
0012
0013 #include <iostream> // for cout, ostream
0014 #include <map>
0015 #include <utility> // for make_pair
0016
0017 class PHG4CylinderCellv1 : public PHG4CylinderCell
0018 {
0019 public:
0020 PHG4CylinderCellv1();
0021 ~PHG4CylinderCellv1() override {}
0022
0023 void identify(std::ostream& os = std::cout) const override;
0024
0025 EdepConstRange get_g4hits() override
0026 {
0027 return std::make_pair(edeps.begin(), edeps.end());
0028 }
0029
0030 using PHG4Cell::add_edep;
0031 void add_edep(const PHG4HitDefs::keytype g4hitid, const float edep) override;
0032 void add_edep(const PHG4HitDefs::keytype g4hitid, const float edep, const float light_yield) override;
0033
0034 ShowerEdepConstRange get_g4showers() override
0035 {
0036 return std::make_pair(showeredeps.begin(), showeredeps.end());
0037 }
0038 void add_shower_edep(const int g4showerid, const float edep) override;
0039
0040 void set_cell_id(const PHG4CylinderCellDefs::keytype id) override { cellid = id; }
0041 void set_layer(const unsigned int i) override { layer = i; }
0042 double get_edep() const override;
0043 unsigned int get_layer() const override { return layer; }
0044 PHG4CylinderCellDefs::keytype get_cell_id() const override { return cellid; }
0045 int get_binz() const override { return binz; }
0046 int get_binphi() const override { return binphi; }
0047 int get_bineta() const override { return get_binz(); }
0048 float get_light_yield() const override { return light_yield; }
0049
0050 void set_zbin(const int i) override { binz = i; }
0051 void set_etabin(const int i) override { set_zbin(i); }
0052 void set_phibin(const int i) override { binphi = i; }
0053 void set_light_yield(const float lightYield) override { light_yield = lightYield; }
0054
0055 protected:
0056 unsigned int layer;
0057 PHG4CylinderCellDefs::keytype cellid;
0058 int binz;
0059 int binphi;
0060 EdepMap edeps;
0061 ShowerEdepMap showeredeps;
0062 float light_yield;
0063
0064 ClassDefOverride(PHG4CylinderCellv1, 2)
0065 };
0066
0067 #endif