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_HIT_HH_
18
#define _SRC_COMMON_CPP_DATASTRUCTURE_HIT_HH_
22
#include "Rtypes.h" // ROOT
24
#include "src/common_cpp/DataStructure/ThreeVector.hh"
28
/** @class ChannelId contains information about the detector channel hit
32
virtual ChannelId* Clone() { return new ChannelId(); }
33
virtual ~ChannelId() {}
36
/** @class Hit contains Monte Carlo sensitive detector hit data
38
* This is really a placeholder - needs a bit more work on individual
39
* detectors. Probably it needs to be a template class in the end.
41
* Hit holds information pertaining to a particle step in a sensitive detector
42
* Stores information on the Track number, particle type, energy of the
43
* particle, charge, time, energy deposited by this step, position, momentum
44
* and channel hit (channel id)
48
/** Initialises everything to 0
52
/** Copy constructor; deep copies channel ID
56
/** Equality operator; deep copies channel ID
58
Hit& operator=(const Hit& md);
60
/** Destructor - cleans memory associated with channel ID
64
/** Returns the track number of the track that made the hit
66
int GetTrackId() const;
68
/** Sets the track number of the track that made the hit
70
void SetTrackId(int id);
72
/** Returns the PDG particle type of the track that made the hit
74
int GetParticleId() const;
76
/** Sets the PDG particle type of the track that made the hit
78
void SetParticleId(int pid);
80
/** Returns the total energy of the track that made the hit
82
double GetEnergy() const;
84
/** Sets the total energy of the track that made the hit
86
void SetEnergy(double energy);
88
/** Returns the charge of the track that made the hit
90
double GetCharge() const;
92
/** Sets the charge of the track that made the hit
94
void SetCharge(double charge);
96
/** Returns the time of the track when it made the hit
98
double GetTime() const;
100
/** Sets the time of the track when it made the hit
102
void SetTime(double time);
104
/** Returns the energy deposited by the track when it made the hit
106
double GetEnergyDeposited() const;
108
/** Sets the energy deposited by the track when it made the hit
110
void SetEnergyDeposited(double edep);
112
/** Returns the position of the track when it made the hit
114
ThreeVector GetPosition() const;
116
/** Sets the position of the track when it made the hit
118
void SetPosition(ThreeVector pos);
120
/** Returns the momentum of the track when it made the hit
122
ThreeVector GetMomentum() const;
124
/** Sets the momentum of the track when it made the hit
126
void SetMomentum(ThreeVector mom);
128
/** Returns the channel id that was hit by the track
130
ChannelId* GetChannelId() const;
132
/** Sets the channel id that was hit by the track
134
void SetChannelId(ChannelId* id);
142
double _energy_deposited;
143
ThreeVector _position;
144
ThreeVector _momentum;
146
ChannelId* _channel_id;