Class Reference for E1039 Core & Analysis Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SQHit_v1.h
Go to the documentation of this file.
1 /*
2  * SQHit_v1.h
3  *
4  * Created on: Oct 29, 2017
5  * Author: yuhw@nmsu.edu
6  */
7 
8 #ifndef _H_SQHit_v1_H_
9 #define _H_SQHit_v1_H_
10 
11 
12 #include <phool/PHObject.h>
13 #include <iostream>
14 
15 #include "SQHit.h"
16 
17 class SQHit_v1 : public SQHit {
18 
19 public:
20 
21  SQHit_v1();
22  virtual ~SQHit_v1() {}
23 
24  // PHObject virtual overloads
25 
26  void identify(std::ostream& os = std::cout) const;
27  void Reset() {*this = SQHit_v1();}
28  int isValid() const;
29  SQHit* Clone() const {return (new SQHit_v1(*this));}
30 
31  // digitized hit info
32 
33  virtual int get_hit_id() const {return _hit_id;}
34  virtual void set_hit_id(const int a) {_hit_id = a;}
35 
36  virtual short get_detector_id() const {return _detector_id;}
37  virtual void set_detector_id(const short a) {_detector_id = a;}
38 
39  virtual short get_element_id() const {return _element_id;}
40  virtual void set_element_id(const short id) {_element_id = id;}
41 
42  virtual short get_level() const {return _level;}
43  virtual void set_level(const short level) {_level = level;}
44 
45  virtual float get_tdc_time() const {return _tdc_time;}
46  virtual void set_tdc_time(const float a) {_tdc_time=a;}
47 
48  virtual float get_drift_distance() const {return _drift_distance;}
49  virtual void set_drift_distance(const float a) {_drift_distance=a;}
50 
51  virtual float get_pos() const {return _pos;}
52  virtual void set_pos(const float a) {_pos=a;}
53 
54  virtual bool is_in_time() const {return (_flag&(SQHit::InTime)) != 0;}
55  virtual void set_in_time(const bool a) {a? (_flag |= SQHit::InTime) : (_flag &= ~SQHit::InTime);}
56 
57  virtual bool is_hodo_mask() const {return (_flag&(SQHit::HodoMask)) != 0;}
58  virtual void set_hodo_mask(const bool a) {a? (_flag |= SQHit::HodoMask) : (_flag &= ~SQHit::HodoMask);}
59 
60  virtual bool is_trigger_mask() const {return (_flag&(SQHit::TriggerMask)) != 0;}
61  virtual void set_trigger_mask(const bool a) {a? (_flag |= SQHit::TriggerMask) : (_flag &= ~SQHit::TriggerMask);}
62 
63 private:
64 
65  int _hit_id;
66  short _detector_id;
67  short _element_id;
68  short _level;
69 
70  float _tdc_time;
71  float _drift_distance;
72  float _pos;
73 
74  unsigned short _flag;
75 
76  ClassDef(SQHit_v1, 1);
77 };
78 
79 
80 #endif /* _H_SQHit_v1_H_ */
void identify(std::ostream &os=std::cout) const
Definition: SQHit_v1.cxx:27
virtual void set_drift_distance(const float a)
Definition: SQHit_v1.h:49
virtual void set_pos(const float a)
Definition: SQHit_v1.h:52
SQHit * Clone() const
Definition: SQHit_v1.h:29
virtual void set_level(const short level)
Definition: SQHit_v1.h:43
virtual short get_level() const
Return the trigger level of this hit. Meaningful only if this hit is of V1495 TDC.
Definition: SQHit_v1.h:42
void Reset()
Clear Event.
Definition: SQHit_v1.h:27
virtual bool is_hodo_mask() const
Return 'true' if this hit is accepted (or masked out?) by the hodoscope masking. Meaningful only if t...
Definition: SQHit_v1.h:57
virtual float get_pos() const
Return the absolute position of this hit. Probably the value is not properly set at present.
Definition: SQHit_v1.h:51
virtual short get_detector_id() const
Return the detector ID of this hit.
Definition: SQHit_v1.h:36
virtual float get_tdc_time() const
Return the TDC time (nsec) of this hit.
Definition: SQHit_v1.h:45
SQHit_v1()
Definition: SQHit_v1.cxx:16
virtual void set_tdc_time(const float a)
Definition: SQHit_v1.h:46
virtual float get_drift_distance() const
Return the drift distance of this hit. Probably the value is not properly set at present....
Definition: SQHit_v1.h:48
virtual bool is_in_time() const
Return 'true' if this hit is in the time window.
Definition: SQHit_v1.h:54
virtual void set_hodo_mask(const bool a)
Definition: SQHit_v1.h:58
virtual void set_hit_id(const int a)
Definition: SQHit_v1.h:34
virtual void set_trigger_mask(const bool a)
Definition: SQHit_v1.h:61
virtual short get_element_id() const
Return the element ID of this hit.
Definition: SQHit_v1.h:39
virtual void set_element_id(const short id)
Definition: SQHit_v1.h:40
virtual void set_detector_id(const short a)
Definition: SQHit_v1.h:37
virtual int get_hit_id() const
Return the ID of this hit.
Definition: SQHit_v1.h:33
virtual bool is_trigger_mask() const
Return 'true' if this hit is accepted (or masked out?) by the trigger-road masking....
Definition: SQHit_v1.h:60
virtual void set_in_time(const bool a)
Definition: SQHit_v1.h:55
virtual ~SQHit_v1()
Definition: SQHit_v1.h:22
int isValid() const
isValid returns non zero if object contains vailid data
Definition: SQHit_v1.cxx:46
An SQ interface class to hold one detector hit.
Definition: SQHit.h:20
@ HodoMask
Definition: SQHit.h:107
@ InTime
Definition: SQHit.h:106
@ TriggerMask
Definition: SQHit.h:108