1
/* This file is part of MAUS: http://micewww.pp.rl.ac.uk/projects/maus
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.
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.
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/>.
17
#ifndef _SRC_COMMON_CPP_DATASTRUCTURE_SCIFIDIGIT_
18
#define _SRC_COMMON_CPP_DATASTRUCTURE_SCIFIDIGIT_
27
#include "src/common_cpp/DataStructure/Hit.hh"
28
#include "src/common_cpp/DataStructure/ThreeVector.hh"
32
/** @class SciFiDigit Represents a channel hit in a tracker station plane. */
36
/** Default constructor - initialises to 0/NULL */
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 );
43
/** Copy constructor - any pointers are deep copied */
44
SciFiDigit(const SciFiDigit& _scifidigit);
46
/** Assignment operator - any pointers are deep copied */
47
SciFiDigit& operator=(const SciFiDigit& _scifidigit);
49
/** Destructor - any member pointers are deleted */
50
virtual ~SciFiDigit();
52
// Getters and Setters
53
void set_spill(int spill) { _spill = spill; }
55
int get_spill() const { return _spill; }
57
void set_event(int event) { _event = event; }
59
int get_event() const { return _event; }
61
void set_tracker(int trackerNo) { _tracker = trackerNo; }
63
int get_tracker() const { return _tracker; }
65
void set_station(int stationNo) { _station = stationNo; }
67
int get_station() const { return _station; }
69
void set_plane(int planeNo) { _plane = planeNo; }
71
int get_plane() const { return _plane; }
73
void set_channel(int channelNo) { _channel = channelNo; }
75
int get_channel() const { return _channel; }
77
void set_npe(double npe) { _npe = npe; }
79
double get_npe() const { return _npe; }
81
void set_time(double time) { _time = time; }
83
double get_time() const { return _time; }
85
void set_used(bool used) { _used = used; }
87
bool is_used() const { return _used; }
89
void set_true_momentum(ThreeVector p) { _p = p; }
91
ThreeVector get_true_momentum() const { return _p; }
93
void set_true_position(ThreeVector position) { _position = position; }
95
ThreeVector get_true_position() const { return _position; }
98
ThreeVector _position, _p;
102
int _tracker, _station, _plane, _channel;
108
ClassDef(SciFiDigit, 1)
111
typedef std::vector<SciFiDigit*> SciFiDigitPArray;
115
#endif // _SRC_COMMON_CPP_DATASTRUCTURE_SCIFIDIGIT_