Belle II Software  release-05-02-19
BeamBackHit.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Petric and Luka Santelj *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef BEAMBACKHIT_H
12 #define BEAMBACKHIT_H
13 
14 #include <TObject.h>
15 #include <TVector3.h>
16 #include <TString.h>
17 
18 namespace Belle2 {
25 
31  class BeamBackHit : public TObject {
32  public:
33 
36  m_position(0., 0., 0.), m_momentum(0., 0., 0.), m_t(0.), m_E_start(0.),
38  {}
39 
54  BeamBackHit(int subDet, int iden, int PDG, int trackID, TVector3 position,
55  TVector3 momentum, double t, double E_start, double E_end,
56  double eDep, double trackLength, double nWeight):
57  m_subDet(subDet), m_identifier(iden), m_PDG(PDG), m_trackID(trackID),
58  m_position(position), m_momentum(momentum), m_t(t), m_E_start(E_start),
59  m_E_end(E_end), m_energyDeposit(eDep), m_trackLength(trackLength),
60  m_neutronWeight(nWeight)
61  {}
62 
64  TString getSubDetName() const
65  {
66  switch (m_subDet) {
67  case 0: return "IR";
68  case 1: return "PDX";
69  case 2: return "SVD";
70  case 3: return "CDC";
71  case 4: return "ARICH";
72  case 5: return "TOP";
73  case 6: return "ECL";
74  case 7: return "EKLM";
75  case 8: return "BKLM";
76  }
77  return "";
78  }
79 
81  int getIdentifier() const { return m_identifier; }
82 
84  int getSubDet() const {return m_subDet; }
85 
87  int getPDG() const { return m_PDG; }
88 
90  int getTrackID() const { return m_trackID;}
91 
93  const TVector3& getPosition() const { return m_position; }
94 
96  const TVector3& getMomentum() const { return m_momentum; }
97 
99  double getTime() const { return m_t; }
100 
102  double getEnergy() const { return m_E_start; }
103 
105  double getEnergyAtExit() const { return m_E_end; }
106 
108  double getEnergyDeposit() const { return m_energyDeposit; }
109 
111  double getTrackLength() const { return m_trackLength; }
112 
114  double getNeutronWeight() const {return m_neutronWeight;}
115 
117  void setSubDet(int subDet) { m_subDet = subDet; }
118 
120  void setIdentifier(int iden) { m_identifier = iden; }
121 
123  void setPDG(int PDG) { m_PDG = PDG; }
124 
126  void setTrackID(int trackID) {m_trackID = trackID;}
127 
129  void setPosition(TVector3 position) { m_position = position; }
130 
132  void setMomentum(TVector3 momentum) { m_momentum = momentum; }
133 
135  void setTime(double t) { m_t = t; }
136 
138  void setEnergy(double E) { m_E_start = E; }
139 
141  void setEnergyAtExit(double E) {m_E_end = E;}
142 
144  void setEnergyDeposit(double eDep) { m_energyDeposit = eDep; }
145 
147  void setTrackLength(double l) {m_trackLength = l;}
148 
150  void setNeutronWeight(double w) {m_neutronWeight = w;}
151 
153  void shiftInTime(double time) { m_t += time; }
154 
155  private:
156  int m_subDet;
157  int m_identifier;
158  int m_PDG;
159  int m_trackID;
160  TVector3 m_position;
161  TVector3 m_momentum;
162  double m_t;
163  double m_E_start;
164  double m_E_end;
166  double m_trackLength;
171  };
172 
174 } // end namespace Belle2
175 
176 #endif
Belle2::BeamBackHit::setMomentum
void setMomentum(TVector3 momentum)
Set momentum of the particle hit.
Definition: BeamBackHit.h:140
Belle2::BeamBackHit::setEnergy
void setEnergy(double E)
Set energy of the particle.
Definition: BeamBackHit.h:146
Belle2::BeamBackHit::setTrackLength
void setTrackLength(double l)
set the length of the track in the volume
Definition: BeamBackHit.h:155
Belle2::BeamBackHit::setEnergyAtExit
void setEnergyAtExit(double E)
Set energy of track at exit point of volume.
Definition: BeamBackHit.h:149
Belle2::BeamBackHit::m_E_start
double m_E_start
energy of particle at entrance into the volume
Definition: BeamBackHit.h:171
Belle2::BeamBackHit::setSubDet
void setSubDet(int subDet)
Set the subdetector group in which the hit occured.
Definition: BeamBackHit.h:125
Belle2::BeamBackHit::getEnergyDeposit
double getEnergyDeposit() const
Get particle energy deposit in sensitive volume.
Definition: BeamBackHit.h:116
Belle2::BeamBackHit::getMomentum
const TVector3 & getMomentum() const
Get momentum of the particle hit.
Definition: BeamBackHit.h:104
Belle2::BeamBackHit::m_trackID
int m_trackID
the trackID of the hit
Definition: BeamBackHit.h:167
Belle2::BeamBackHit::getEnergy
double getEnergy() const
Get energy of the particle.
Definition: BeamBackHit.h:110
Belle2::BeamBackHit::setPDG
void setPDG(int PDG)
Set the lund code of the particle that hit the sensitive area.
Definition: BeamBackHit.h:131
Belle2::BeamBackHit::getPDG
int getPDG() const
Get the lund code of the particle that hit the sensitive area.
Definition: BeamBackHit.h:95
Belle2::BeamBackHit::m_energyDeposit
double m_energyDeposit
energy deposited in sensitive volume
Definition: BeamBackHit.h:173
Belle2::BeamBackHit::BeamBackHit
BeamBackHit()
Default constructor.
Definition: BeamBackHit.h:43
Belle2::BeamBackHit::m_trackLength
double m_trackLength
length of the track in the volume
Definition: BeamBackHit.h:174
Belle2::BeamBackHit::getEnergyAtExit
double getEnergyAtExit() const
Get energy of the particle.
Definition: BeamBackHit.h:113
Belle2::BeamBackHit::getSubDetName
TString getSubDetName() const
Get the subdetector name in which the hit occured.
Definition: BeamBackHit.h:72
Belle2::BeamBackHit::setEnergyDeposit
void setEnergyDeposit(double eDep)
Set particle energy deposit in volume.
Definition: BeamBackHit.h:152
Belle2::BeamBackHit::setIdentifier
void setIdentifier(int iden)
Set the subdetector component identifier.
Definition: BeamBackHit.h:128
Belle2::BeamBackHit::getTrackID
int getTrackID() const
the traci ID of the particle
Definition: BeamBackHit.h:98
Belle2::BeamBackHit::getTrackLength
double getTrackLength() const
the length of the track in the volume
Definition: BeamBackHit.h:119
Belle2::BeamBackHit::getPosition
const TVector3 & getPosition() const
Get global position of the particle hit.
Definition: BeamBackHit.h:101
Belle2::BeamBackHit::shiftInTime
void shiftInTime(double time)
shift in time for beambkgmixer
Definition: BeamBackHit.h:161
Belle2::BeamBackHit::setNeutronWeight
void setNeutronWeight(double w)
set the neutron weight
Definition: BeamBackHit.h:158
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::BeamBackHit::setTrackID
void setTrackID(int trackID)
set the trackID of the track
Definition: BeamBackHit.h:134
Belle2::BeamBackHit::m_E_end
double m_E_end
energy of the particle when leaving the volume
Definition: BeamBackHit.h:172
Belle2::BeamBackHit::getTime
double getTime() const
Get the time at which the hit occured.
Definition: BeamBackHit.h:107
Belle2::BeamBackHit::setTime
void setTime(double t)
Set the time at which the hit occured.
Definition: BeamBackHit.h:143
Belle2::BeamBackHit::m_subDet
int m_subDet
The name of the subdetector.
Definition: BeamBackHit.h:164
Belle2::BeamBackHit::m_neutronWeight
double m_neutronWeight
the effective neutron weight
Definition: BeamBackHit.h:175
Belle2::BeamBackHit::m_PDG
int m_PDG
The PDG code of the particle that hit the sensitive area.
Definition: BeamBackHit.h:166
Belle2::BeamBackHit::getNeutronWeight
double getNeutronWeight() const
get the effective neutron weigth
Definition: BeamBackHit.h:122
Belle2::BeamBackHit::getIdentifier
int getIdentifier() const
Get the identifier of subdetector component in which hit occured.
Definition: BeamBackHit.h:89
Belle2::BeamBackHit::m_momentum
TVector3 m_momentum
momentum of the hit
Definition: BeamBackHit.h:169
Belle2::BeamBackHit::getSubDet
int getSubDet() const
Det the index of subdetector in which hit occured.
Definition: BeamBackHit.h:92
Belle2::BeamBackHit::setPosition
void setPosition(TVector3 position)
Set global position of the particle hit.
Definition: BeamBackHit.h:137
Belle2::BeamBackHit
Class BeamBackHit - Stores hits from beam backgound simulation.
Definition: BeamBackHit.h:39
Belle2::BeamBackHit::m_position
TVector3 m_position
global position of the hit
Definition: BeamBackHit.h:168
Belle2::BeamBackHit::m_identifier
int m_identifier
The identifier of subdetector component.
Definition: BeamBackHit.h:165
Belle2::BeamBackHit::ClassDef
ClassDef(BeamBackHit, 1)
the class title
Belle2::BeamBackHit::m_t
double m_t
time at which the hit occured
Definition: BeamBackHit.h:170