~sophie-middleton08/maus/devel

« back to all changes in this revision

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

  • Committer: Chris Rogers
  • Date: 2012-11-06 12:04:39 UTC
  • mfrom: (659.1.45 release-candidate)
  • Revision ID: chris.rogers@stfc.ac.uk-20121106120439-e6znfg5kfg850l38
Tags: MAUS-v0.4.0
MAUS-v0.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of MAUS: http://micewww.pp.rl.ac.uk/projects/maus
 
2
 *
 
3
 * MAUS is free software: you can redistribute it and/or modify
 
4
 * it under the terms of the GNU General Public License as published by
 
5
 * the Free Software Foundation, either version 3 of the License, or
 
6
 * (at your option) any later version.
 
7
 *
 
8
 * MAUS is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with MAUS.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
#ifndef _SRC_COMMON_CPP_DATASTRUCTURE_SCIFIDIGIT_
 
18
#define _SRC_COMMON_CPP_DATASTRUCTURE_SCIFIDIGIT_
 
19
 
 
20
// C++ headers
 
21
#include <vector>
 
22
 
 
23
// ROOT headers
 
24
#include "Rtypes.h"
 
25
 
 
26
// MAUS Headers
 
27
#include "src/common_cpp/DataStructure/Hit.hh"
 
28
#include "src/common_cpp/DataStructure/ThreeVector.hh"
 
29
 
 
30
namespace MAUS {
 
31
 
 
32
/** @class SciFiDigit Represents a channel hit in a tracker station plane. */
 
33
 
 
34
class SciFiDigit {
 
35
  public:
 
36
    /** Default constructor - initialises to 0/NULL */
 
37
    SciFiDigit();
 
38
 
 
39
    /** Constructor - initialises member variables from arguments */
 
40
    SciFiDigit(int spill, int event, int tracker, int station,
 
41
               int plane, int channel, double npe, double time );
 
42
 
 
43
    /** Copy constructor - any pointers are deep copied */
 
44
    SciFiDigit(const SciFiDigit& _scifidigit);
 
45
 
 
46
    /** Assignment operator - any pointers are deep copied */
 
47
    SciFiDigit& operator=(const SciFiDigit& _scifidigit);
 
48
 
 
49
    /** Destructor - any member pointers are deleted */
 
50
    virtual ~SciFiDigit();
 
51
 
 
52
    // Getters and Setters
 
53
    void set_spill(int spill) { _spill = spill; }
 
54
 
 
55
    int get_spill()   const { return _spill; }
 
56
 
 
57
    void set_event(int event) { _event = event; }
 
58
 
 
59
    int get_event() const { return _event; }
 
60
 
 
61
    void set_tracker(int trackerNo) { _tracker = trackerNo; }
 
62
 
 
63
    int get_tracker() const { return _tracker; }
 
64
 
 
65
    void set_station(int stationNo) { _station = stationNo; }
 
66
 
 
67
    int get_station() const { return _station; }
 
68
 
 
69
    void set_plane(int planeNo) { _plane = planeNo; }
 
70
 
 
71
    int get_plane()   const { return _plane; }
 
72
 
 
73
    void set_channel(int channelNo) { _channel = channelNo; }
 
74
 
 
75
    int get_channel() const { return _channel; }
 
76
 
 
77
    void set_npe(double npe) { _npe = npe; }
 
78
 
 
79
    double get_npe()     const { return _npe;     }
 
80
 
 
81
    void set_time(double time) { _time = time; }
 
82
 
 
83
    double get_time()    const { return _time;    }
 
84
 
 
85
    void set_used(bool used)   { _used = used; }
 
86
 
 
87
    bool is_used()     const { return _used; }
 
88
 
 
89
    void set_true_momentum(ThreeVector p) { _p = p; }
 
90
 
 
91
    ThreeVector get_true_momentum() const { return _p; }
 
92
 
 
93
    void set_true_position(ThreeVector position) { _position = position; }
 
94
 
 
95
    ThreeVector get_true_position() const { return _position; }
 
96
 
 
97
  private:
 
98
    ThreeVector _position, _p;
 
99
 
 
100
    int _spill, _event;
 
101
 
 
102
    int _tracker, _station, _plane, _channel;
 
103
 
 
104
    double _npe, _time;
 
105
 
 
106
    bool _used;
 
107
 
 
108
    ClassDef(SciFiDigit, 1)
 
109
};
 
110
 
 
111
typedef std::vector<SciFiDigit*> SciFiDigitPArray;
 
112
 
 
113
} // ~namespace MAUS
 
114
 
 
115
#endif  // _SRC_COMMON_CPP_DATASTRUCTURE_SCIFIDIGIT_