Class Reference for E1039 Core & Analysis Software
PHG4CylinderCell.h
Go to the documentation of this file.
1 #ifndef PHG4CYLINDERCELL_H
2 #define PHG4CYLINDERCELL_H
3 
4 #include "PHG4CylinderCellDefs.h"
5 #include "PHG4Cell.h"
6 #include <g4main/PHG4HitDefs.h>
7 #include <phool/PHObject.h>
8 #include <cmath>
9 #include <map>
10 
11 class PHG4CylinderCell : public PHG4Cell
12 {
13  public:
14  typedef std::map<PHG4HitDefs::keytype, float> EdepMap;
15  typedef EdepMap::iterator EdepIterator;
16  typedef EdepMap::const_iterator EdepConstIterator;
17  typedef std::pair<EdepIterator, EdepIterator> EdepRange;
18  typedef std::pair<EdepConstIterator, EdepConstIterator> EdepConstRange;
19 
20  typedef std::map<int, float> ShowerEdepMap;
21  typedef ShowerEdepMap::iterator ShowerEdepIterator;
22  typedef ShowerEdepMap::const_iterator ShowerEdepConstIterator;
23  typedef std::pair<ShowerEdepIterator, ShowerEdepIterator> ShowerEdepRange;
24  typedef std::pair<ShowerEdepConstIterator, ShowerEdepConstIterator> ShowerEdepConstRange;
25 
26  virtual ~PHG4CylinderCell(){}
27 
28  virtual void identify(std::ostream& os = std::cout) const {
29  os << "PHG4CylinderCell base class" << std::endl;
30  }
31 
33  std::map <PHG4HitDefs::keytype, float> dummy;
34  return std::make_pair(dummy.begin(), dummy.end());
35  }
36 
37  virtual void add_edep(const PHG4HitDefs::keytype g4hitid, const float edep) {return;}
38  virtual void add_edep(const PHG4HitDefs::keytype g4hitid, const float edep, const float light_yield) {return;}
39 
41  std::map <int, float> dummy;
42  return std::make_pair(dummy.begin(), dummy.end());
43  }
44 
45  virtual void add_shower_edep(const int g4showerid, const float edep) {return;}
46 
47  virtual void set_cell_id(const PHG4CylinderCellDefs::keytype id) {return;}
48  virtual void set_layer(const unsigned int i) {return;}
49 
50  virtual double get_edep() const {return NAN;}
51  virtual unsigned int get_layer() const {return 0xFFFFFFFF;}
52  virtual PHG4CylinderCellDefs::keytype get_cell_id() const {return 0xFFFFFFFF;}
53  virtual int get_binz() const {return -1;}
54  virtual int get_binphi() const {return -1;}
55  virtual int get_bineta() const {return -1;}
56  virtual float get_light_yield() const { return NAN; }
57  virtual int get_fiber_ID() const {return -1;}
58 
59  virtual void set_phibin(const int i) {return;}
60  virtual void set_zbin(const int i) {return;}
61  virtual void set_etabin(const int i) {return;}
62  virtual void set_light_yield(float lightYield) { return; }
63  virtual void set_fiber_ID(int fiberId) { return; }
64 
65  virtual void set_sensor_index(const std::string &si) {return;}
66  virtual std::string get_sensor_index() const {return "";}
67  virtual void set_ladder_phi_index(const int i) {return;}
68  virtual int get_ladder_phi_index() const {return -9999;}
69  virtual void set_ladder_z_index(const int i) {return;}
70  virtual int get_ladder_z_index() const {return -9999;}
71 
72  virtual int get_j_index() const {return -9999;}
73  virtual void set_j_index(const int i) {return;}
74  virtual int get_k_index() const {return -9999;}
75  virtual void set_k_index(const int i) {return;}
76  virtual int get_l_index() const {return -9999;}
77  virtual void set_l_index(const int i) {return;}
78 
79  virtual int get_pixel_index() const {return -9999;}
80  virtual int get_chip_index() const {return -9999;}
81  virtual int get_module_index() const {return -9999;}
82  virtual int get_half_stave_index() const {return -9999;}
83  virtual int get_stave_index() const {return -9999;}
84 
85  virtual void set_stave_index(const int si) {return;}
86  virtual void set_half_stave_index(const int i) {return;}
87  virtual void set_module_index(const int i) {return;}
88  virtual void set_chip_index(const int i) {return;}
89  virtual void set_pixel_index(const int i) {return;}
90 
91  protected:
92 
94  ClassDef(PHG4CylinderCell,2)
95 };
96 
97 #endif
std::pair< ShowerEdepConstIterator, ShowerEdepConstIterator > ShowerEdepConstRange
Definition: PHG4Cell.h:25
std::pair< EdepConstIterator, EdepConstIterator > EdepConstRange
Definition: PHG4Cell.h:19
virtual void add_edep(const PHG4HitDefs::keytype g4hitid, const float edep)
virtual int get_stave_index() const
virtual void identify(std::ostream &os=std::cout) const
std::pair< EdepIterator, EdepIterator > EdepRange
virtual void set_light_yield(float lightYield)
virtual PHG4CylinderCellDefs::keytype get_cell_id() const
ShowerEdepMap::const_iterator ShowerEdepConstIterator
virtual void set_l_index(const int i)
virtual void set_j_index(const int i)
virtual int get_k_index() const
std::pair< ShowerEdepConstIterator, ShowerEdepConstIterator > ShowerEdepConstRange
virtual void set_fiber_ID(int fiberId)
virtual void set_ladder_phi_index(const int i)
virtual int get_ladder_phi_index() const
EdepMap::iterator EdepIterator
virtual double get_edep() const
virtual int get_pixel_index() const
virtual void add_shower_edep(const int g4showerid, const float edep)
std::pair< EdepConstIterator, EdepConstIterator > EdepConstRange
virtual int get_binphi() const
virtual void set_zbin(const int i)
virtual ShowerEdepConstRange get_g4showers()
virtual void set_cell_id(const PHG4CylinderCellDefs::keytype id)
virtual void set_stave_index(const int si)
virtual int get_j_index() const
virtual void set_sensor_index(const std::string &si)
virtual void set_ladder_z_index(const int i)
virtual float get_light_yield() const
virtual unsigned int get_layer() const
virtual int get_binz() const
std::map< PHG4HitDefs::keytype, float > EdepMap
EdepMap::const_iterator EdepConstIterator
virtual void set_chip_index(const int i)
virtual void set_pixel_index(const int i)
virtual void set_layer(const unsigned int i)
virtual int get_chip_index() const
virtual std::string get_sensor_index() const
virtual int get_l_index() const
virtual int get_bineta() const
virtual int get_half_stave_index() const
virtual int get_module_index() const
virtual ~PHG4CylinderCell()
virtual void set_k_index(const int i)
virtual int get_fiber_ID() const
virtual void set_half_stave_index(const int i)
virtual int get_ladder_z_index() const
std::map< int, float > ShowerEdepMap
virtual void set_phibin(const int i)
virtual void set_module_index(const int i)
std::pair< ShowerEdepIterator, ShowerEdepIterator > ShowerEdepRange
virtual EdepConstRange get_g4hits()
virtual void set_etabin(const int i)
ShowerEdepMap::iterator ShowerEdepIterator
virtual void add_edep(const PHG4HitDefs::keytype g4hitid, const float edep, const float light_yield)
unsigned int keytype
Definition: PHG4HitDefs.h:8