~chris-rogers/maus/emr_mc_digitization

« back to all changes in this revision

Viewing changes to src/common_cpp/DataStructure/EMRPlaneHit.hh

  • Committer: Chris Rogers
  • Date: 2014-05-14 08:51:20 UTC
  • Revision ID: chris.rogers@stfc.ac.uk-20140514085120-13ull310rnc5489z
Hacks to integrate with EMR code#

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include <vector>
21
21
 
22
 
#include "Utils/VersionNumber.hh"
23
 
#include "DataStructure/EMRBar.hh"
 
22
#include "src/common_cpp/Utils/VersionNumber.hh"
 
23
#include "src/common_cpp/DataStructure/EMRBar.hh"
24
24
 
25
25
namespace MAUS {
26
26
 
27
 
typedef std::vector<EMRBar *> EMRBarArray;
28
 
 
29
 
/** @class EMRPlaneHit comment
30
 
 *
31
 
 *  @var plane        <-- plane id / DBB id / fADC id -->
32
 
 *  @var orientation  <-- plane orientation, can be 0 or 1 -->
33
 
 *  @var emrbararray  <-- array of bars in the plane / 59 elements -->
34
 
 *  @var charge       <-- fADC charge -->
35
 
 *  @var time         <-- trigger time w.r.t. start of the spill recorded by DBB -->
36
 
 *  @var spill        <-- spill count recorded by DBB-->
37
 
 *  @var trigger      <-- trigger count recorded by DBB-->
38
 
 *  @var deltat       <-- time of a hit in fADC minus trigger hit time measured by fADC -->
39
 
 */
40
 
 
41
 
class EMRPlaneHit {
 
27
  typedef std::vector<EMRBar *> EMRBarArray;
 
28
 
 
29
  /** @class EMRPlaneHit comment
 
30
   *
 
31
   *  @var plane  <-- plane id / DBB id / fADC id -->
 
32
   *  @var emrbararray  <-- array of bars in the plane / 59 elements -->
 
33
   *  @var charge  <-- fADC charge -->
 
34
   *  @var time  <-- trigger time w.r.t. start of the spill recorded by DBB -->
 
35
   *  @var spill  <-- spill count recorded by DBB-->
 
36
   *  @var trigger  <-- trigger count recorded by DBB-->
 
37
   *  @var deltat  <-- time of a hit in fADC minus trigger hit time measured by fADC -->
 
38
   */
 
39
 
 
40
  class EMRPlaneHit {
42
41
  public:
43
42
    /** Default constructor - initialises to 0/NULL */
44
43
    EMRPlaneHit();
52
51
    /** Destructor - any member pointers are deleted */
53
52
    virtual ~EMRPlaneHit();
54
53
 
55
 
    /** Returns  */
56
54
    int GetPlane() const;
 
55
    EMRBarArray GetEMRBarArray() const;
 
56
    EMRBarArray GetEMRBarArrayPrimary() const;
 
57
    EMRBarArray GetEMRBarArraySecondary() const;
 
58
    double GetCharge() const;
 
59
    int GetTime() const;
 
60
    int GetSpill() const;
 
61
    int GetTrigger() const;
 
62
    int GetRun() const;
 
63
    int GetDeltaT() const;
 
64
    int GetOrientation() const;
 
65
    std::vector<int> GetSamples() const;
 
66
    double GetPedestalArea() const;
57
67
 
58
 
    /** Sets  */
59
68
    void SetPlane(int plane);
60
 
 
61
 
    /** Returns  */
62
 
    EMRBarArray GetEMRBarArray() const;
63
 
 
64
 
    /** Sets  */
65
69
    void SetEMRBarArray(EMRBarArray emrbararray);
66
 
 
67
 
    /** Returns  */
68
 
    int GetCharge() const;
69
 
 
70
 
    /** Sets  */
71
 
    void SetCharge(int charge);
72
 
 
73
 
    /** Returns  */
74
 
    int GetTime() const;
75
 
 
76
 
    /** Sets  */
 
70
    void SetEMRBarArrayPrimary(EMRBarArray emrbararray_primary);
 
71
    void SetEMRBarArraySecondary(EMRBarArray emrbararray_secondary);
 
72
    void SetCharge(double charge);
77
73
    void SetTime(int time);
78
 
 
79
 
    /** Returns  */
80
 
    int GetSpill() const;
81
 
 
82
 
    /** Sets  */
83
74
    void SetSpill(int spill);
84
 
 
85
 
    /** Returns  */
86
 
    int GetTrigger() const;
87
 
 
88
 
    /** Sets  */
89
75
    void SetTrigger(int trigger);
90
 
 
91
 
    /** Returns  */
92
 
    int GetDeltaT() const;
93
 
 
94
 
    /** Sets  */
 
76
    void SetRun(int trigger);
95
77
    void SetDeltaT(int deltat);
96
 
 
97
 
    /** Returns  */
98
 
    int GetOrientation() const;
99
 
 
100
 
    /** Sets  */
101
78
    void SetOrientation(int orient);
 
79
    void SetSamples(std::vector<int> samples);
 
80
    void SetPedestalArea(double pedestal_area);
 
81
 
 
82
    void Set_g4_edep_mev(double g4_edep_mev) {_g4_edep_mev = g4_edep_mev;}
 
83
    double Get_g4_edep_mev(){return _g4_edep_mev;}
 
84
 
 
85
    void Set_charge_corrected(double charge_corrected) {_charge_corrected = charge_corrected;}
 
86
    double Get_charge_corrected(){return _charge_corrected;}
102
87
 
103
88
  private:
104
89
    int _plane;
105
90
    int _orientation;
106
91
    EMRBarArray _emrbararray;
107
 
    int _charge;
 
92
    EMRBarArray _emrbararray_primary;
 
93
    EMRBarArray _emrbararray_secondary;
 
94
    double _charge;
 
95
    double _charge_corrected;
 
96
    double _pedestal_area;
108
97
    int _time;
109
98
    int _spill;
110
99
    int _trigger;
 
100
    int _run;
111
101
    int _deltat;
112
 
 
 
102
    std::vector<int> _samples;
 
103
    double _g4_edep_mev;
 
104
 
113
105
    MAUS_VERSIONED_CLASS_DEF(EMRPlaneHit)
114
 
};
 
106
  };
115
107
}
116
108
 
117
109
#endif  // _SRC_COMMON_CPP_DATASTRUCTURE_EMRPLANEHIT_