Belle II Software development
hitXP.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <TObject.h>
12#include <Math/Vector3D.h>
13
14namespace Belle2 {
32 class hitXP: public TObject {
33
34 public:
35 ROOT::Math::XYZVector m_positionMid;
36 ROOT::Math::XYZVector m_positionEntry;
37 ROOT::Math::XYZVector m_positionExit;
38 ROOT::Math::XYZVector m_momentumMid;
39 ROOT::Math::XYZVector m_momentumEntry;
40 ROOT::Math::XYZVector m_momentumExit;
41 ROOT::Math::XYZVector m_positionLocalMid;
42 ROOT::Math::XYZVector m_positionLocalEntry;
43 ROOT::Math::XYZVector m_positionLocalExit;
44 ROOT::Math::XYZVector m_momentumLocalMid;
45 ROOT::Math::XYZVector m_momentumLocalEntry;
46 ROOT::Math::XYZVector m_momentumLocalExit;
47 int m_PDGID = 0;
48 ROOT::Math::XYZVector m_position0;
49 ROOT::Math::XYZVector m_momentum0;
50 double m_time = 0;
52 int m_sensorLayer = 0;
54 double m_info_d0 = 0;
55 double m_info_z0 = 0;
56 double m_info_phi0 = 0;
57 double m_info_tanlambda = 0;
58 double m_info_omega = 0;
59 int m_clusterU = 0;
60 int m_clusterV = 0;
61 bool m_reconstructed = 0;
62 double m_charge = 0;
65 hitXP() {}
66
68 ROOT::Math::XYZVector getPositionMid() const { return m_positionMid; }
69
71 ROOT::Math::XYZVector getPositionEntry() const { return m_positionEntry; }
72
74 ROOT::Math::XYZVector getPositionExit() const { return m_positionExit; }
75
77 ROOT::Math::XYZVector getMomentumMid() const { return m_momentumMid; }
78
80 ROOT::Math::XYZVector getMomentumEntry() const { return m_momentumEntry; }
81
83 ROOT::Math::XYZVector getMomentumExit() const { return m_momentumExit; }
84
86 ROOT::Math::XYZVector getPositionLocalMid() const { return m_positionLocalMid; }
87
89 ROOT::Math::XYZVector getPositionLocalEntry() const { return m_positionLocalEntry; }
90
92 ROOT::Math::XYZVector getPositionLocalExit() const { return m_positionLocalExit; }
93
95 ROOT::Math::XYZVector getMomentumLocalMid() const { return m_momentumLocalMid; }
96
98 ROOT::Math::XYZVector getMomentumLocalEntry() const { return m_momentumLocalEntry; }
99
101 ROOT::Math::XYZVector getMomentumLocalExit() const { return m_momentumLocalExit; }
102
104 int getPDGID() const { return m_PDGID; }
105
107 ROOT::Math::XYZVector getPosition0() const { return m_position0; }
108
110 ROOT::Math::XYZVector getMomentum0() const { return m_momentum0; }
111
113 double getTime() const { return m_time; }
114
116 int getSensorSensor() const { return m_sensorSensor; }
117
119 int getSensorLadder() const { return m_sensorLadder; }
120
122 int getSensorLayer() const { return m_sensorLayer; }
123
125 int getClusterU() const { return m_clusterU; }
126
128 int getClusterV() const { return m_clusterV; }
129
131 bool isReconstructed() const { return m_reconstructed; }
132
134 double getCharge() const { return m_charge; }
135
137 void setPositionMid(ROOT::Math::XYZVector position)
138 {
139 m_positionMid.SetX(position.X());
140 m_positionMid.SetY(position.Y());
141 m_positionMid.SetZ(position.Z());
142 }
143
145 void setPositionEntry(ROOT::Math::XYZVector position)
146 {
147 m_positionEntry.SetX(position.X());
148 m_positionEntry.SetY(position.Y());
149 m_positionEntry.SetZ(position.Z());
150 }
151
153 void setPositionExit(ROOT::Math::XYZVector position)
154 {
155 m_positionExit.SetX(position.X());
156 m_positionExit.SetY(position.Y());
157 m_positionExit.SetZ(position.Z());
158 }
159
161 void setMomentumMid(ROOT::Math::XYZVector momentum)
162 {
163 m_momentumMid.SetX(momentum.X());
164 m_momentumMid.SetY(momentum.Y());
165 m_momentumMid.SetZ(momentum.Z());
166 }
167
169 void setMomentumEntry(ROOT::Math::XYZVector momentum)
170 {
171 m_momentumEntry.SetX(momentum.X());
172 m_momentumEntry.SetY(momentum.Y());
173 m_momentumEntry.SetZ(momentum.Z());
174 }
175
177 void setMomentumExit(ROOT::Math::XYZVector momentum)
178 {
179 m_momentumExit.SetX(momentum.X());
180 m_momentumExit.SetY(momentum.Y());
181 m_momentumExit.SetZ(momentum.Z());
182 }
183
185 void setPositionLocalMid(ROOT::Math::XYZVector position)
186 {
187 m_positionLocalMid.SetX(position.X());
188 m_positionLocalMid.SetY(position.Y());
189 m_positionLocalMid.SetZ(position.Z());
190 }
191
193 void setPositionLocalEntry(ROOT::Math::XYZVector position)
194 {
195 m_positionLocalEntry.SetX(position.X());
196 m_positionLocalEntry.SetY(position.Y());
197 m_positionLocalEntry.SetZ(position.Z());
198 }
199
201 void setPositionLocalExit(ROOT::Math::XYZVector position)
202 {
203 m_positionLocalExit.SetX(position.X());
204 m_positionLocalExit.SetY(position.Y());
205 m_positionLocalExit.SetZ(position.Z());
206 }
207
209 void setMomentumLocalMid(ROOT::Math::XYZVector momentum)
210 {
211 m_momentumLocalMid.SetX(momentum.X());
212 m_momentumLocalMid.SetY(momentum.Y());
213 m_momentumLocalMid.SetZ(momentum.Z());
214 }
215
217 void setMomentumLocalEntry(ROOT::Math::XYZVector momentum)
218 {
219 m_momentumLocalEntry.SetX(momentum.X());
220 m_momentumLocalEntry.SetY(momentum.Y());
221 m_momentumLocalEntry.SetZ(momentum.Z());
222 }
223
225 void setMomentumLocalExit(ROOT::Math::XYZVector momentum)
226 {
227 m_momentumLocalExit.SetX(momentum.X());
228 m_momentumLocalExit.SetY(momentum.Y());
229 m_momentumLocalExit.SetZ(momentum.Z());
230 }
231
233 void setPDGID(int pdgid) { m_PDGID = pdgid; }
234
236 void setPosition0(ROOT::Math::XYZVector position)
237 {
238 m_position0.SetX(position.X());
239 m_position0.SetY(position.Y());
240 m_position0.SetZ(position.Z());
241 }
242
244 void setMomentum0(ROOT::Math::XYZVector momentum)
245 {
246 m_momentum0.SetX(momentum.X());
247 m_momentum0.SetY(momentum.Y());
248 m_momentum0.SetZ(momentum.Z());
249 }
250
252 void setTime(double Time) { m_time = Time; }
253
255 void setSensorSensor(int sensor) { m_sensorSensor = sensor; }
256
258 void setSensorLayer(int layer) { m_sensorLayer = layer; }
259
261 void setSensorLadder(int ladder) { m_sensorLadder = ladder; }
262
264 void setClusterU(int cluster)
265 {
266 m_clusterU = cluster;
267 }
268
270 void setClusterV(int cluster)
271 {
272 m_clusterV = cluster;
273 }
274
277
279 void setCharge(double charge) { m_charge = charge; }
280
286 double omega(ROOT::Math::XYZVector xx, ROOT::Math::XYZVector p, double charge) const;
287
288
294 double tanLambda(ROOT::Math::XYZVector xx, ROOT::Math::XYZVector p) const;
295
296
302 double d0(ROOT::Math::XYZVector xx, ROOT::Math::XYZVector p, double charge) const;
303
304
310 double phi0(const ROOT::Math::XYZVector& xx, ROOT::Math::XYZVector p, double charge) const;
311
312
318 double z0(ROOT::Math::XYZVector xx, ROOT::Math::XYZVector p, double charge) const;
319
320
323
326
329
331 double getOmega0() const { return omega(m_position0, m_momentum0, m_charge); }
332
335
338
341
343 double getTanLambda0() const { return tanLambda(m_position0, m_momentum0); }
344
346 double getD0Mid() const { return d0(m_positionMid, m_momentumMid, m_charge); }
347
350
352 double getD0Exit() const { return d0(m_positionExit, m_momentumExit, m_charge); }
353
355 double getD00() const { return d0(m_position0, m_momentum0, m_charge); }
356
358 double getPhi0Mid() const { return phi0(m_positionMid, m_momentumMid, m_charge); }
359
362
365
367 double getPhi00() const { return phi0(m_position0, m_momentum0, m_charge); }
368
370 double getZ0Mid() const { return z0(m_positionMid, m_momentumMid, m_charge); }
371
374
376 double getZ0Exit() const { return z0(m_positionExit, m_momentumExit, m_charge); }
377
379 double getZ00() const { return z0(m_position0, m_momentum0, m_charge); }
380
381
386 struct timeCompare {
388 bool operator()(hitXP v, hitXP u) const
389 {return v.m_time < u.m_time;}
390 };
391
394 };
396}
This class collects some information of a TrueHit, using SVDCLuster and MCParticle information too.
Definition: hitXP.h:32
int getClusterV() const
get the relative memeber
Definition: hitXP.h:128
ROOT::Math::XYZVector m_momentumEntry
momentum of hit at entry of layer
Definition: hitXP.h:39
ROOT::Math::XYZVector getMomentum0() const
get the relative memeber
Definition: hitXP.h:110
void setPositionExit(ROOT::Math::XYZVector position)
get the relative memeber
Definition: hitXP.h:153
void setMomentumExit(ROOT::Math::XYZVector momentum)
get the relative memeber
Definition: hitXP.h:177
double getOmegaEntry() const
evaluate relative parameter using entrypoint position and momentum
Definition: hitXP.h:325
double getTanLambdaExit() const
evaluate relative parameter using exitpoint position and momentum
Definition: hitXP.h:340
double getPhi00() const
evaluate relative parameter using IP position and momentum
Definition: hitXP.h:367
double m_info_phi0
phi0 from MCParticle info evaluation.
Definition: hitXP.h:56
double getTanLambdaMid() const
evaluate relative parameter using midpoint position and momentum
Definition: hitXP.h:334
ROOT::Math::XYZVector getPosition0() const
get the relative memeber
Definition: hitXP.h:107
void setSensorLadder(int ladder)
get the relative memeber
Definition: hitXP.h:261
void setPosition0(ROOT::Math::XYZVector position)
get the relative memeber
Definition: hitXP.h:236
ROOT::Math::XYZVector m_momentumMid
momentum of hit at midpoint of layer
Definition: hitXP.h:38
void setPositionMid(ROOT::Math::XYZVector position)
get the relative memeber
Definition: hitXP.h:137
double getZ0Entry() const
evaluate relative parameter using entrypoint position and momentum
Definition: hitXP.h:373
void setClusterU(int cluster)
get the relative memeber
Definition: hitXP.h:264
int m_sensorLadder
ladder of the hit
Definition: hitXP.h:53
ROOT::Math::XYZVector getPositionLocalEntry() const
get the relative memeber
Definition: hitXP.h:89
void setPositionLocalEntry(ROOT::Math::XYZVector position)
get the relative memeber
Definition: hitXP.h:193
double phi0(const ROOT::Math::XYZVector &xx, ROOT::Math::XYZVector p, double charge) const
evaluates the parameter phi0 (angle between pT and x) of a helicoidal track starting from position an...
Definition: hitXP.cc:46
void setMomentumLocalEntry(ROOT::Math::XYZVector momentum)
get the relative memeber
Definition: hitXP.h:217
double getOmega0() const
evaluate relative parameter using IP position and momentum
Definition: hitXP.h:331
double m_time
time of the hit
Definition: hitXP.h:50
double m_info_d0
d0 from MCParticle info evaluation.
Definition: hitXP.h:54
int getClusterU() const
get the relative memeber
Definition: hitXP.h:125
ROOT::Math::XYZVector m_momentumExit
momentum of hit at exit of layer
Definition: hitXP.h:40
ROOT::Math::XYZVector getMomentumMid() const
get the relative memeber
Definition: hitXP.h:77
void setMomentumLocalExit(ROOT::Math::XYZVector momentum)
get the relative memeber
Definition: hitXP.h:225
ROOT::Math::XYZVector m_positionEntry
poition of hit at entrypoint of layer
Definition: hitXP.h:36
double z0(ROOT::Math::XYZVector xx, ROOT::Math::XYZVector p, double charge) const
evaluates the parameter z0 (distance transverse plane-POCA) of a helicoidal track starting from posit...
Definition: hitXP.cc:62
int m_clusterV
flag for v cluster
Definition: hitXP.h:60
void setPositionLocalMid(ROOT::Math::XYZVector position)
get the relative memeber
Definition: hitXP.h:185
double getZ0Exit() const
evaluate relative parameter using exitpoint position and momentum
Definition: hitXP.h:376
double m_info_tanlambda
tanlambda from MCParticle info evaluation.
Definition: hitXP.h:57
double getCharge() const
get the relative memeber
Definition: hitXP.h:134
ROOT::Math::XYZVector getMomentumLocalEntry() const
get the relative memeber
Definition: hitXP.h:98
int m_sensorLayer
layer of the hit
Definition: hitXP.h:52
bool isReconstructed() const
get the relative memeber
Definition: hitXP.h:131
int getSensorSensor() const
get the relative memeber
Definition: hitXP.h:116
ROOT::Math::XYZVector m_positionMid
poition of hit at midpoint of layer
Definition: hitXP.h:35
void setMomentumLocalMid(ROOT::Math::XYZVector momentum)
get the relative memeber
Definition: hitXP.h:209
double getD00() const
evaluate relative parameter using IP position and momentum
Definition: hitXP.h:355
ROOT::Math::XYZVector getPositionLocalMid() const
get the relative memeber
Definition: hitXP.h:86
double getPhi0Mid() const
evaluate relative parameter using midpoint position and momentum
Definition: hitXP.h:358
ROOT::Math::XYZVector getPositionLocalExit() const
get the relative memeber
Definition: hitXP.h:92
void setMomentum0(ROOT::Math::XYZVector momentum)
get the relative memeber
Definition: hitXP.h:244
int getPDGID() const
get the relative memeber
Definition: hitXP.h:104
ROOT::Math::XYZVector m_positionLocalExit
poition of hit at exitpoint of layer, local coordinate
Definition: hitXP.h:43
int getSensorLadder() const
get the relative memeber
Definition: hitXP.h:119
ROOT::Math::XYZVector m_momentumLocalMid
momentum of hit at midpoint of layer, local coordinate
Definition: hitXP.h:44
ROOT::Math::XYZVector getPositionMid() const
get the relative memeber
Definition: hitXP.h:68
double tanLambda(ROOT::Math::XYZVector xx, ROOT::Math::XYZVector p) const
evaluates the parameter tanLambda (pz/pt) of a helicoidal track starting from position and momentum o...
Definition: hitXP.cc:24
void setReconstructed(bool isReconstructed)
get the relative memeber
Definition: hitXP.h:276
ROOT::Math::XYZVector m_positionExit
poition of hit at exitpoint of layer
Definition: hitXP.h:37
double getOmegaExit() const
evaluate relative parameter using exitpoint position and momentum
Definition: hitXP.h:328
double getOmegaMid() const
evaluate relative parameter using midpoint position and momentum
Definition: hitXP.h:322
ROOT::Math::XYZVector getMomentumEntry() const
get the relative memeber
Definition: hitXP.h:80
bool m_reconstructed
flag for reconstructed track
Definition: hitXP.h:61
ROOT::Math::XYZVector m_positionLocalEntry
poition of hit at entrypoint of layer, local coordinate
Definition: hitXP.h:42
int m_clusterU
flag for u cluster
Definition: hitXP.h:59
double getZ0Mid() const
evaluate relative parameter using midpoint position and momentum
Definition: hitXP.h:370
double d0(ROOT::Math::XYZVector xx, ROOT::Math::XYZVector p, double charge) const
evaluates the parameter d0 (impact parameter) of a helicoidal track starting from position and moment...
Definition: hitXP.cc:32
void setPositionLocalExit(ROOT::Math::XYZVector position)
get the relative memeber
Definition: hitXP.h:201
hitXP()
empty constructor of the class
Definition: hitXP.h:65
void setClusterV(int cluster)
get the relative memeber
Definition: hitXP.h:270
double m_info_z0
z0 from MCParticle info evaluation.
Definition: hitXP.h:55
double getPhi0Entry() const
evaluate relative parameter using entrypoint position and momentum
Definition: hitXP.h:361
ROOT::Math::XYZVector m_positionLocalMid
poition of hit at midpoint of layer, local coordinate
Definition: hitXP.h:41
void setMomentumMid(ROOT::Math::XYZVector momentum)
get the relative memeber
Definition: hitXP.h:161
void setPDGID(int pdgid)
get the relative memeber
Definition: hitXP.h:233
ROOT::Math::XYZVector m_momentumLocalEntry
momentum of hit at entrypoint of layer, local coordinate
Definition: hitXP.h:45
double getPhi0Exit() const
evaluate relative parameter using exitpoint position and momentum
Definition: hitXP.h:364
void setPositionEntry(ROOT::Math::XYZVector position)
get the relative memeber
Definition: hitXP.h:145
double m_charge
charge of the track
Definition: hitXP.h:62
ROOT::Math::XYZVector getMomentumExit() const
get the relative memeber
Definition: hitXP.h:83
double getZ00() const
evaluate relative parameter using IP position and momentum
Definition: hitXP.h:379
ROOT::Math::XYZVector getMomentumLocalMid() const
get the relative memeber
Definition: hitXP.h:95
ClassDef(hitXP, 2)
needed by root
double getTanLambda0() const
evaluate relative parameter using IP position and momentum
Definition: hitXP.h:343
ROOT::Math::XYZVector getPositionEntry() const
get the relative memeber
Definition: hitXP.h:71
ROOT::Math::XYZVector m_momentumLocalExit
momentum of hit at exitpoint of layer, local coordinate
Definition: hitXP.h:46
int getSensorLayer() const
get the relative memeber
Definition: hitXP.h:122
ROOT::Math::XYZVector getMomentumLocalExit() const
get the relative memeber
Definition: hitXP.h:101
double getD0Exit() const
evaluate relative parameter using exitpoint position and momentum
Definition: hitXP.h:352
ROOT::Math::XYZVector getPositionExit() const
get the relative memeber
Definition: hitXP.h:74
double getD0Entry() const
evaluate relative parameter using entrypoint position and momentum
Definition: hitXP.h:349
double omega(ROOT::Math::XYZVector xx, ROOT::Math::XYZVector p, double charge) const
evaluates the parameter omega (1/curvature radius) of a helicoidal track starting from position and m...
Definition: hitXP.cc:13
double getTanLambdaEntry() const
evaluate relative parameter using entrypoint position and momentum
Definition: hitXP.h:337
ROOT::Math::XYZVector m_momentum0
momentum at IP
Definition: hitXP.h:49
double m_info_omega
omega from MCParticle info evaluation.
Definition: hitXP.h:58
void setCharge(double charge)
get the relative memeber
Definition: hitXP.h:279
ROOT::Math::XYZVector m_position0
position at IP
Definition: hitXP.h:48
int m_PDGID
PDGID.
Definition: hitXP.h:47
void setSensorLayer(int layer)
get the relative memeber
Definition: hitXP.h:258
void setTime(double Time)
get the relative memeber
Definition: hitXP.h:252
double getD0Mid() const
evaluate relative parameter using midpoint position and momentum
Definition: hitXP.h:346
void setMomentumEntry(ROOT::Math::XYZVector momentum)
get the relative memeber
Definition: hitXP.h:169
void setSensorSensor(int sensor)
get the relative memeber
Definition: hitXP.h:255
int m_sensorSensor
sensor of the hit
Definition: hitXP.h:51
double getTime() const
get the relative memeber
Definition: hitXP.h:113
Abstract base class for different kinds of events.
This structure allows to compare times of 2 hitXP point input (first hit, second hit) output (boolean...
Definition: hitXP.h:386
bool operator()(hitXP v, hitXP u) const
Compare operator for time of two hits.
Definition: hitXP.h:388