Class Reference for E1039 Core & Analysis Software
SQCalHit_v1.h
Go to the documentation of this file.
1 #ifndef _H_SQCalHit_v1_H_
2 #define _H_SQCalHit_v1_H_
3 
4 
5 #include <phool/PHObject.h>
6 #include <iostream>
7 #include <map>
8 
9 #include "SQHit.h"
10 
11 class SQCalHit_v1 : public SQHit {
12 
13 public:
14 
15  SQCalHit_v1();
16  virtual ~SQCalHit_v1() {}
17 
18  // PHObject virtual overloads
19  void identify(std::ostream& os = std::cout) const;
20  void Reset() {*this = SQCalHit_v1();}
21  int isValid() const;
22  SQHit* Clone() const {return (new SQCalHit_v1(*this));}
23 
24  // digitized hit info
25  virtual int get_hit_id() const {return _hit_id;}
26  virtual void set_hit_id(const int a) {_hit_id = a;}
27 
28  virtual short get_detector_id() const {return _detector_id;}
29  virtual void set_detector_id(const short a) {_detector_id = a;}
30 
31  virtual short get_element_id() const {return _element_id;}
32  virtual void set_element_id(const short id) {_element_id = id;}
33 
34  virtual short get_tower_id() const {return _element_id;}
35  virtual void set_tower_id(const short id) {_element_id = id;}
36 
37  virtual float get_edep() const {return _edep;}
38  virtual void set_edep(const float a) {_edep = a;}
39 
40  virtual unsigned int get_n_cells() const {return _cells.size();}
41  virtual CellMap get_cells() const {return _cells;}
42  virtual float get_cell(short i) const;
43  virtual void add_cell(short i, float edep);
44 
45 private:
46 
47  int _hit_id;
48  short _detector_id;
49  short _element_id;
50 
51  float _edep;
52 
53  CellMap _cells;
54 
55  ClassDef(SQCalHit_v1, 1);
56 };
57 
58 
59 #endif /* _H_SQCalHit_v1_H_ */
virtual CellMap get_cells() const
Return the list of all cells included in this hit.
Definition: SQCalHit_v1.h:41
int isValid() const
isValid returns non zero if object contains vailid data
Definition: SQCalHit_v1.cxx:33
virtual float get_cell(short i) const
Definition: SQCalHit_v1.cxx:38
SQHit * Clone() const
Definition: SQCalHit_v1.h:22
virtual short get_detector_id() const
Return the detector ID of this hit.
Definition: SQCalHit_v1.h:28
virtual void set_edep(const float a)
Definition: SQCalHit_v1.h:38
virtual short get_tower_id() const
Not valid in E1039. To be deleted.
Definition: SQCalHit_v1.h:34
virtual void add_cell(short i, float edep)
Definition: SQCalHit_v1.cxx:45
virtual void set_hit_id(const int a)
Definition: SQCalHit_v1.h:26
virtual short get_element_id() const
Return the element ID of this hit.
Definition: SQCalHit_v1.h:31
virtual unsigned int get_n_cells() const
Return the number of cells included in this hit.
Definition: SQCalHit_v1.h:40
virtual void set_element_id(const short id)
Definition: SQCalHit_v1.h:32
void identify(std::ostream &os=std::cout) const
Definition: SQCalHit_v1.cxx:24
virtual void set_tower_id(const short id)
Definition: SQCalHit_v1.h:35
virtual int get_hit_id() const
Return the ID of this hit.
Definition: SQCalHit_v1.h:25
virtual ~SQCalHit_v1()
Definition: SQCalHit_v1.h:16
virtual float get_edep() const
Not valid in E1039. To be deleted.
Definition: SQCalHit_v1.h:37
virtual void set_detector_id(const short a)
Definition: SQCalHit_v1.h:29
void Reset()
Clear Event.
Definition: SQCalHit_v1.h:20
An SQ interface class to hold one detector hit.
Definition: SQHit.h:20
std::map< short, float > CellMap
key -> plateID, float -> edep
Definition: SQHit.h:23