Class Reference for E1039 Core & Analysis Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SQMCHit_v1.h
Go to the documentation of this file.
1 /*
2  * SQMCHit_v1.h
3  *
4  * Created on: Oct 29, 2017
5  * Author: yuhw@nmsu.edu
6  */
7 
8 #ifndef _H_SQMCHit_v1_H_
9 #define _H_SQMCHit_v1_H_
10 
11 
12 #include <phool/PHObject.h>
13 #include <iostream>
14 
15 #include "SQHit_v1.h"
16 
17 class SQMCHit_v1 : public SQHit_v1 {
18 
19 public:
20 
21  SQMCHit_v1();
22  virtual ~SQMCHit_v1() {}
23 
24  // PHObject virtual overloads
25 
26  void identify(std::ostream& os = std::cout) const;
27  void Reset() {*this = SQMCHit_v1();}
28  int isValid() const;
29  SQHit* Clone() const {return (new SQMCHit_v1(*this));}
30 
31  virtual int get_track_id() const {return _track_id;}
32  virtual void set_track_id(const int a) {_track_id = a;}
33 
34  virtual PHG4HitDefs::keytype get_g4hit_id() const {return _g4hit_id;}
35  virtual void set_g4hit_id(const PHG4HitDefs::keytype a) {_g4hit_id = a;}
36 
37  virtual float get_truth_x() const {return _truth_x;}
38  virtual void set_truth_x(const float a) {_truth_x = a;}
39 
40  virtual float get_truth_y() const {return _truth_y;}
41  virtual void set_truth_y(const float a) {_truth_y = a;}
42 
43  virtual float get_truth_z() const {return _truth_z;}
44  virtual void set_truth_z(const float a) {_truth_z = a;}
45 
46  virtual float get_truth_px() const {return _truth_px;}
47  virtual void set_truth_px(const float a) {_truth_px = a;}
48 
49  virtual float get_truth_py() const {return _truth_py;}
50  virtual void set_truth_py(const float a) {_truth_py = a;}
51 
52  virtual float get_truth_pz() const {return _truth_pz;}
53  virtual void set_truth_pz(const float a) {_truth_pz = a;}
54 
55 private:
56 
57  int _track_id;
58  PHG4HitDefs::keytype _g4hit_id;
59 
60  float _truth_x;
61  float _truth_y;
62  float _truth_z;
63 
64  float _truth_px;
65  float _truth_py;
66  float _truth_pz;
67 
68  ClassDef(SQMCHit_v1, 2);
69 };
70 
71 
72 #endif /* _H_SQMCHit_v1_H_ */
An SQ interface class to hold one detector hit.
Definition: SQHit.h:20
virtual ~SQMCHit_v1()
Definition: SQMCHit_v1.h:22
virtual float get_truth_px() const
Return the true x-momentum of this hit. Meaningful only if this hit is of MC.
Definition: SQMCHit_v1.h:46
virtual int get_track_id() const
Return the track ID associated with this hit. Probably the value is not properly set at present.
Definition: SQMCHit_v1.h:31
virtual float get_truth_z() const
Return the true z-position of this hit. Meaningful only if this hit is of MC.
Definition: SQMCHit_v1.h:43
virtual float get_truth_pz() const
Return the true z-momentum of this hit. Meaningful only if this hit is of MC.
Definition: SQMCHit_v1.h:52
virtual float get_truth_x() const
Return the true x-position of this hit. Meaningful only if this hit is of MC.
Definition: SQMCHit_v1.h:37
virtual void set_truth_py(const float a)
Definition: SQMCHit_v1.h:50
virtual void set_truth_x(const float a)
Definition: SQMCHit_v1.h:38
void Reset()
Clear Event.
Definition: SQMCHit_v1.h:27
int isValid() const
isValid returns non zero if object contains vailid data
Definition: SQMCHit_v1.cxx:33
virtual void set_g4hit_id(const PHG4HitDefs::keytype a)
Definition: SQMCHit_v1.h:35
virtual PHG4HitDefs::keytype get_g4hit_id() const
Return the Geant-hit ID associated with this hit.
Definition: SQMCHit_v1.h:34
virtual void set_track_id(const int a)
Definition: SQMCHit_v1.h:32
virtual float get_truth_y() const
Return the true y-position of this hit. Meaningful only if this hit is of MC.
Definition: SQMCHit_v1.h:40
virtual float get_truth_py() const
Return the true y-momentum of this hit. Meaningful only if this hit is of MC.
Definition: SQMCHit_v1.h:49
virtual void set_truth_y(const float a)
Definition: SQMCHit_v1.h:41
virtual void set_truth_pz(const float a)
Definition: SQMCHit_v1.h:53
virtual void set_truth_z(const float a)
Definition: SQMCHit_v1.h:44
virtual void set_truth_px(const float a)
Definition: SQMCHit_v1.h:47
void identify(std::ostream &os=std::cout) const
Definition: SQMCHit_v1.cxx:21
SQHit * Clone() const
Definition: SQMCHit_v1.h:29
unsigned int keytype
Definition: PHG4HitDefs.h:8