Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4CylinderCellv1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4CylinderCellv1.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4CYLINDERCELLV1_H
4 #define G4DETECTORS_PHG4CYLINDERCELLV1_H
5 
6 #include "PHG4CylinderCell.h"
7 
8 #include "PHG4Cell.h" // for PHG4Cell::EdepMap, PHG4Cell::Showe...
9 #include "PHG4CylinderCellDefs.h" // for keytype
10 
11 #include <g4main/PHG4HitDefs.h>
12 
13 #include <iostream> // for cout, ostream
14 #include <map>
15 #include <utility> // for make_pair
16 
18 {
19  public:
21  ~PHG4CylinderCellv1() override {}
22 
23  void identify(std::ostream& os = std::cout) const override;
24 
26  {
27  return std::make_pair(edeps.begin(), edeps.end());
28  }
29 
30  using PHG4Cell::add_edep; // avoid warning for not including all overrides of add_edep
31  void add_edep(const PHG4HitDefs::keytype g4hitid, const float edep) override;
32  void add_edep(const PHG4HitDefs::keytype g4hitid, const float edep, const float light_yield) override;
33 
35  {
36  return std::make_pair(showeredeps.begin(), showeredeps.end());
37  }
38  void add_shower_edep(const int g4showerid, const float edep) override;
39 
40  void set_cell_id(const PHG4CylinderCellDefs::keytype id) override { cellid = id; }
41  void set_layer(const unsigned int i) override { layer = i; }
42  double get_edep() const override;
43  unsigned int get_layer() const override { return layer; }
44  PHG4CylinderCellDefs::keytype get_cell_id() const override { return cellid; }
45  int get_binz() const override { return binz; }
46  int get_binphi() const override { return binphi; }
47  int get_bineta() const override { return get_binz(); }
48  float get_light_yield() const override { return light_yield; }
49 
50  void set_zbin(const int i) override { binz = i; }
51  void set_etabin(const int i) override { set_zbin(i); }
52  void set_phibin(const int i) override { binphi = i; }
53  void set_light_yield(const float lightYield) override { light_yield = lightYield; }
54 
55  protected:
56  unsigned int layer;
58  int binz;
59  int binphi;
62  float light_yield;
63 
64  ClassDefOverride(PHG4CylinderCellv1, 2)
65 };
66 
67 #endif