Belle II Software development
HelixUtils Class Reference

utility for helix<->x,p conversions More...

#include <HelixUtils.h>

Public Types

enum  VertexCoor {
  iX = 0 ,
  iY ,
  iZ ,
  iPx ,
  iPy ,
  iPz
}
 Parameters of the vertex. More...
 
enum  HelixCoor {
  iD0 = 0 ,
  iPhi0 ,
  iOmega ,
  iZ0 ,
  iTanLambda ,
  iArcLength2D
}
 Parameters of the helix. More...
 

Static Public Member Functions

static void helixFromVertexNumerical (const Eigen::Matrix< double, 3, 1 > &position, const Eigen::Matrix< double, 3, 1 > &momentum, int charge, double Bz, Belle2::Helix &helix, double &flt, Eigen::Matrix< double, 5, 6 > &jacobian)
 get helix from a vertex
 
static void getJacobianToCartesianFrameworkHelix (Eigen::Matrix< double, 5, 6 > &jacobian, const double x, const double y, const double z, const double px, const double py, const double pz, const double bfield, const double charge)
 get the jacobian dh={helix pars}/dx={x,y,z,px,py,pz} for the implementation of the framework helix.
 
static void getHelixAndJacobianFromVertexNumerical (const Eigen::Matrix< double, 1, 6 > &positionAndMom, int charge, double Bz, Belle2::Helix &helix, Eigen::Matrix< double, 5, 6 > &jacobian)
 get helix and jacobian from a vertex
 
static void getJacobianFromVertexNumerical (const Eigen::Matrix< double, 1, 6 > &positionAndMom, int charge, double Bz, const Belle2::Helix &helix, Eigen::Matrix< double, 5, 6 > &jacobian, double delta=1e-5)
 get jacobian from a vertex
 
static void helixFromVertex (const Eigen::Matrix< double, 1, 6 > &positionAndMomentum, int charge, double Bz, Belle2::Helix &helix, double &L, Eigen::Matrix< double, 5, 6 > &jacobian)
 vertex --> helix
 
static void vertexFromHelix (const Belle2::Helix &helix, double L, double Bz, ROOT::Math::XYZVector &position, ROOT::Math::XYZVector &momentum, int &charge)
 helix --> vertex
 
static std::string helixParName (int i)
 map of the helix parameters by list index
 
static std::string vertexParName (int i)
 map of the vertex parameters by list index
 
static void printVertexPar (const ROOT::Math::XYZVector &position, const ROOT::Math::XYZVector &momentum, int charge)
 Print the vertex parameters.
 
static double helixPoca (const Belle2::Helix &helix1, const Belle2::Helix &helix2, double &flt1, double &flt2, Eigen::Vector3d &vertex, bool parallel=false)
 POCA between two tracks.
 
static double helixPoca (const Belle2::Helix &helix, const ROOT::Math::XYZVector &point, double &flt)
 POCA between a track and a point.
 
static double phidomain (const double phi)
 the domain of phi
 

Detailed Description

utility for helix<->x,p conversions

Definition at line 30 of file HelixUtils.h.

Member Enumeration Documentation

◆ HelixCoor

enum HelixCoor

Parameters of the helix.

Definition at line 38 of file HelixUtils.h.

38{iD0 = 0, iPhi0, iOmega, iZ0, iTanLambda, iArcLength2D} ;

◆ VertexCoor

enum VertexCoor

Parameters of the vertex.

Definition at line 35 of file HelixUtils.h.

35{iX = 0, iY, iZ, iPx, iPy, iPz} ;

Member Function Documentation

◆ getHelixAndJacobianFromVertexNumerical()

void getHelixAndJacobianFromVertexNumerical ( const Eigen::Matrix< double, 1, 6 > & positionAndMom,
int charge,
double Bz,
Belle2::Helix & helix,
Eigen::Matrix< double, 5, 6 > & jacobian )
static

get helix and jacobian from a vertex

Definition at line 133 of file HelixUtils.cc.

137 {
138
139 helix = Belle2::Helix(ROOT::Math::XYZVector(positionAndMom(0), positionAndMom(1), positionAndMom(2)),
140 ROOT::Math::XYZVector(positionAndMom(3), positionAndMom(4), positionAndMom(5)),
141 charge, Bz);
142
143 // numeric calculation of the jacobian
144 Belle2::Helix helixPlusDelta;
145
146 double delta = 1e-5;// this is arbitrary, only needs to be small
147
148 ROOT::Math::XYZVector postmp;
149 ROOT::Math::XYZVector momtmp;
150
151 for (int jin = 0; jin < 6; ++jin) {
152 postmp.SetCoordinates(positionAndMom(0), positionAndMom(1), positionAndMom(2));
153 momtmp.SetCoordinates(positionAndMom(3), positionAndMom(4), positionAndMom(5));
154 if (jin == 0) postmp.SetX(postmp.X() + delta);
155 if (jin == 1) postmp.SetY(postmp.Y() + delta);
156 if (jin == 2) postmp.SetZ(postmp.Z() + delta);
157 if (jin == 3) momtmp.SetX(momtmp.X() + delta);
158 if (jin == 4) momtmp.SetY(momtmp.Y() + delta);
159 if (jin == 5) momtmp.SetZ(momtmp.Z() + delta);
160
161 helixPlusDelta = Belle2::Helix(postmp, momtmp, charge, Bz);
162 jacobian(iD0, jin) = (helixPlusDelta.getD0() - helix.getD0()) / delta ;
163 jacobian(iPhi0, jin) = (helixPlusDelta.getPhi0() - helix.getPhi0()) / delta ;
164 jacobian(iOmega, jin) = (helixPlusDelta.getOmega() - helix.getOmega()) / delta ;
165 jacobian(iZ0, jin) = (helixPlusDelta.getZ0() - helix.getZ0()) / delta ;
166 jacobian(iTanLambda, jin) = (helixPlusDelta.getTanLambda() - helix.getTanLambda()) / delta ;
167
168 // jacobian[iArcLength2D][jin] = (LPlusDelta - L) / delta ;
169 }
170 }

◆ getJacobianFromVertexNumerical()

void getJacobianFromVertexNumerical ( const Eigen::Matrix< double, 1, 6 > & positionAndMom,
int charge,
double Bz,
const Belle2::Helix & helix,
Eigen::Matrix< double, 5, 6 > & jacobian,
double delta = 1e-5 )
static

get jacobian from a vertex

Definition at line 172 of file HelixUtils.cc.

179 {
180 // numeric calculation of the jacobian
181 Belle2::Helix helixPlusDelta;
182
183 ROOT::Math::XYZVector postmp;
184 ROOT::Math::XYZVector momtmp;
185
186 for (int jin = 0; jin < 6; ++jin) {
187 postmp.SetCoordinates(positionAndMom(0), positionAndMom(1), positionAndMom(2));
188 momtmp.SetCoordinates(positionAndMom(3), positionAndMom(4), positionAndMom(5));
189 if (jin == 0) postmp.SetX(postmp.X() + delta);
190 if (jin == 1) postmp.SetY(postmp.Y() + delta);
191 if (jin == 2) postmp.SetZ(postmp.Z() + delta);
192 if (jin == 3) momtmp.SetX(momtmp.X() + delta);
193 if (jin == 4) momtmp.SetY(momtmp.Y() + delta);
194 if (jin == 5) momtmp.SetZ(momtmp.Z() + delta);
195
196 helixPlusDelta = Belle2::Helix(postmp, momtmp, charge, Bz);
197 jacobian(iD0, jin) = (helixPlusDelta.getD0() - helix.getD0()) / delta ;
198 jacobian(iPhi0, jin) = (helixPlusDelta.getPhi0() - helix.getPhi0()) / delta ;
199 jacobian(iOmega, jin) = (helixPlusDelta.getOmega() - helix.getOmega()) / delta ;
200 jacobian(iZ0, jin) = (helixPlusDelta.getZ0() - helix.getZ0()) / delta ;
201 jacobian(iTanLambda, jin) = (helixPlusDelta.getTanLambda() - helix.getTanLambda()) / delta ;
202 }
203
204 }

◆ getJacobianToCartesianFrameworkHelix()

void getJacobianToCartesianFrameworkHelix ( Eigen::Matrix< double, 5, 6 > & jacobian,
const double x,
const double y,
const double z,
const double px,
const double py,
const double pz,
const double bfield,
const double charge )
static

get the jacobian dh={helix pars}/dx={x,y,z,px,py,pz} for the implementation of the framework helix.

WARNING only valid right after initialisation!

Definition at line 410 of file HelixUtils.cc.

421 {
422 const double alpha = 1.0 / (bfield * Belle2::Const::speedOfLight) * 1E4;
423 const double aq = charge / alpha;
424
425 const double pt = std::hypot(px, py);
426 const double pt2 = pt * pt;
427 const double pt3 = pt2 * pt;
428 const double aq2 = aq * aq;
429
430 const double x2 = x * x;
431 const double y2 = y * y;
432 const double r = x2 + y2;
433
434 const double px2 = px * px;
435 const double py2 = py * py;
436
437 const double px0 = px - aq * y;
438 const double py0 = py + aq * x;
439
440 const double pt02 = px0 * px0 + py0 * py0;
441 const double pt0 = std::sqrt(pt02);
442 double sqrt13 = pt0 / pt;
443
444 // D d0 / Dx_i
445 jacobian(0, 0) = py0 / pt0;
446 jacobian(0, 1) = -px0 / pt0;
447 jacobian(0, 2) = 0;
448 jacobian(0, 3) = (-(y * (aq2 * r + 2 * aq * py * x + 2 * py2 * (1 + sqrt13))) - px * (2 * py * x * (1 + sqrt13) + aq * (y2 *
449 (-1 + sqrt13) + x2 * (1 + sqrt13)))) /
450 (pt2 * pt0 * (1 + sqrt13) * (1 + sqrt13));
451
452 jacobian(0, 4) = (2 * px2 * x * (1 + sqrt13) + 2 * px * y * (py - aq * x + py * sqrt13) + aq * (aq * r * x - py * (x2 *
453 (-1 + sqrt13) + y2 * (1 + sqrt13)))) /
454 (pt2 * pt0 * (1 + sqrt13) * (1 + sqrt13));
455 jacobian(0, 5) = 0;
456
457 // D phi0 / Dx_i0;
458 jacobian(1, 0) = aq * px0 / pt02;
459 jacobian(1, 1) = aq * py0 / pt02;
460 jacobian(1, 2) = 0;
461 jacobian(1, 3) = -py0 / pt02;
462 jacobian(1, 4) = px0 / pt02;
463 jacobian(1, 5) = 0;
464
465 // D omega / Dx_i
466 jacobian(2, 0) = 0;
467 jacobian(2, 1) = 0;
468 jacobian(2, 2) = 0;
469 jacobian(2, 3) = - aq * px / pt3;
470 jacobian(2, 4) = - aq * py / pt3;
471 jacobian(2, 5) = 0;
472
473 // D z0 / Dx_i
474 jacobian(3, 0) = -pz * px0 / pt02;
475 jacobian(3, 1) = -pz * py0 / pt02;
476 jacobian(3, 2) = 1;
477 jacobian(3, 3) = (pz * (px2 * x - py * (aq * r + py * x) + 2 * px * py * y)) / (pt2 * pt02);
478 jacobian(3, 4) = (pz * (px * (aq * r + 2 * py * x) - px2 * y + py2 * y)) / (pt2 * pt02);
479 jacobian(3, 5) = std::atan2(-(aq * (px * x + py * y)), (px2 + py * py0 - aq * px * y)) / aq; //pt on num. and denom cancels.
480
481 // D tan lambda / Dx_i
482 jacobian(4, 0) = 0;
483 jacobian(4, 1) = 0;
484 jacobian(4, 2) = 0;
485 jacobian(4, 3) = -pz * px / pt3;
486 jacobian(4, 4) = -pz * py / pt3;
487 jacobian(4, 5) = 1. / pt;
488 }
static const double speedOfLight
[cm/ns]
Definition Const.h:695
double charge(int pdgCode)
Returns electric charge of a particle with given pdg code.
Definition EvtPDLUtil.cc:44

◆ helixFromVertex()

void helixFromVertex ( const Eigen::Matrix< double, 1, 6 > & positionAndMomentum,
int charge,
double Bz,
Belle2::Helix & helix,
double & L,
Eigen::Matrix< double, 5, 6 > & jacobian )
static

vertex --> helix

Definition at line 34 of file HelixUtils.cc.

39 {
40
41 helix = Belle2::Helix(ROOT::Math::XYZVector(positionAndMomentum(0), positionAndMomentum(1), positionAndMomentum(2)),
42 ROOT::Math::XYZVector(positionAndMomentum(3), positionAndMomentum(4), positionAndMomentum(5)),
43 charge, Bz);
44
45 L = helix.getArcLength2DAtXY(positionAndMomentum(0),
46 positionAndMomentum(1));
47
48 const double alpha = helix.getAlpha(Bz);
49
50 //Copied from Belle2::UncertainHelix
51 // COMPLETELY WRONG SINCE IT ASSUMES IT'S IN THE.operator() PERIGEE,
52 // ONLY A PLACEHOLDER FOR NOW
53 // 1. Rotate to a system where phi0 = 0
54 Eigen::Matrix<double, 6, 6> jacobianRot = Eigen::Matrix<double, 6, 6>::Zero(6, 6);
55
56 const double px = positionAndMomentum(3);
57 const double py = positionAndMomentum(4);
58 const double pt = hypot(px, py);
59 const double cosPhi0 = px / pt;
60 const double sinPhi0 = py / pt;
61
62 // Passive rotation matrix by phi0:
63 jacobianRot(iX, iX) = cosPhi0;
64 jacobianRot(iX, iY) = sinPhi0;
65 jacobianRot(iY, iX) = -sinPhi0;
66 jacobianRot(iY, iY) = cosPhi0;
67 jacobianRot(iZ, iZ) = 1.0;
68
69 jacobianRot(iPx, iPx) = cosPhi0;
70 jacobianRot(iPx, iPy) = sinPhi0;
71 jacobianRot(iPy, iPx) = -sinPhi0;
72 jacobianRot(iPy, iPy) = cosPhi0;
73 jacobianRot(iPz, iPz) = 1.0;
74
75 // 2. Translate to perigee parameters on the position
76 const double pz = positionAndMomentum(5);
77 const double invPt = 1 / pt;
78 const double invPtSquared = invPt * invPt;
79 Eigen::Matrix<double, 5, 6> jacobianToHelixParameters = Eigen::Matrix<double, 5, 6>::Zero(5, 6);
80 jacobianToHelixParameters(iD0, iY) = -1;
81 jacobianToHelixParameters(iPhi0, iX) = charge * invPt / alpha;
82 jacobianToHelixParameters(iPhi0, iPy) = invPt;
83 jacobianToHelixParameters(iOmega, iPx) = -charge * invPtSquared / alpha;
84 jacobianToHelixParameters(iTanLambda, iPx) = - pz * invPtSquared;
85 jacobianToHelixParameters(iTanLambda, iPz) = invPt;
86 jacobianToHelixParameters(iZ0, iX) = - pz * invPt;
87 jacobianToHelixParameters(iZ0, iZ) = 1;
88 //
89 jacobian = jacobianToHelixParameters * jacobianRot;
90
91 }

◆ helixParName()

std::string helixParName ( int i)
static

map of the helix parameters by list index

Definition at line 93 of file HelixUtils.cc.

94 {
95 std::string rc ;
96 switch (i) {
97 case 1 : rc = "d0 : " ; break ;
98 case 2 : rc = "phi0 : " ; break ;
99 case 3 : rc = "omega : " ; break ;
100 case 4 : rc = "z0 : " ; break ;
101 case 5 : rc = "tandip: " ; break ;
102 case 6 : rc = "L : " ; break ;
103 }
104 return rc ;
105 }

◆ helixPoca() [1/2]

double helixPoca ( const Belle2::Helix & helix,
const ROOT::Math::XYZVector & point,
double & flt )
static

POCA between a track and a point.

Definition at line 368 of file HelixUtils.cc.

371 {
372 const double d0 = helix.getD0();
373 const double phi0 = helix.getPhi0();
374 const double omega = helix.getOmega();
375 const double z0 = helix.getZ0();
376 const double tandip = helix.getTanLambda();
377 const double cosdip = cos(atan(tandip)) ; // can do that faster
378
379 const double r = 1 / omega ;
380
381 const double x0 = - (r + d0) * sin(phi0) ;
382 const double y0 = (r + d0) * cos(phi0) ;
383
384 const double deltax = x0 - point.X() ;
385 const double deltay = y0 - point.Y() ;
386
387 const double pi = TMath::Pi();
388 double phi = - atan2(deltax, deltay) ;
389 if (r < 0) phi = phi > 0 ? phi - pi : phi + pi ;
390
391 // find the best solution for z by running multiples of 2_pi
392 const double x = r * sin(phi) + x0 ;
393 const double y = -r * cos(phi) + y0 ;
394 double z(0) ;
395 bool first(true) ;
396 const int ncirc(2) ;
397 const double dphi = phidomain(phi - phi0) ;
398 for (int n = 1 - ncirc; n <= 1 + ncirc ; ++n) {
399 const double l = (dphi + n * TMath::TwoPi()) / omega ;
400 const double tmpz = (z0 + l * tandip) ;
401 if (first || fabs(tmpz - point.Z()) < fabs(z - point.Z())) {
402 first = false ;
403 z = tmpz ;
404 flt = l / cosdip ;
405 }
406 }
407 return sqrt(sqr(x - point.X()) + sqr(y - point.Y()) + sqr(z - point.Z())) ;
408 }
double sqrt(double a)
sqrt for double
Definition beamHelpers.h:28

◆ helixPoca() [2/2]

double helixPoca ( const Belle2::Helix & helix1,
const Belle2::Helix & helix2,
double & flt1,
double & flt2,
Eigen::Vector3d & vertex,
bool parallel = false )
static

POCA between two tracks.

Definition at line 217 of file HelixUtils.cc.

221 {
222
223 const double d0_1 = helix1.getD0();
224 const double phi0_1 = helix1.getPhi0();
225 const double omega_1 = helix1.getOmega();
226
227 const double d0_2 = helix2.getD0();
228 const double phi0_2 = helix2.getPhi0();
229 const double omega_2 = helix2.getOmega();
230
231 // These radii have a sign, like omega (negative for negative charge)
232 const double r_1 = 1 / omega_1 ;
233 const double r_2 = 1 / omega_2 ;
234
235 // 1) First look at the transverse plane, where the helix projection is a circle
236 // Coordinates of the centers of the circles
237 const double x0_1 = (r_1 + d0_1) * sin(phi0_1) ;
238 const double y0_1 = -(r_1 + d0_1) * cos(phi0_1) ;
239
240 const double x0_2 = (r_2 + d0_2) * sin(phi0_2) ;
241 const double y0_2 = -(r_2 + d0_2) * cos(phi0_2) ;
242
243 // Vector that goes from center1 to center2
244 const double deltax = x0_2 - x0_1 ;
245 const double deltay = y0_2 - y0_1 ;
246
247 // Intersections of the circles, can be at most two
248 double phi1[2] ;
249 double phi2[2] ;
250 int nsolutions = 1;
251
252 // The phi of the delta vector.
253 const double phi = - atan2(deltax, deltay) ;
254 const double phinot = phi > 0 ? phi - TMath::Pi() : phi + TMath::Pi() ;
255 phi1[0] = r_1 < 0 ? phi : phinot ;
256 phi2[0] = r_2 > 0 ? phi : phinot ;
257
258 // These radii do NOT have a sign instead
259 const double R1 = fabs(r_1) ;
260 const double R2 = fabs(r_2) ;
261 const double Rmin = R1 < R2 ? R1 : R2 ;
262 const double Rmax = R1 > R2 ? R1 : R2 ;
263 const double dX = hypot(deltax, deltay) ;
264
265 if (!parallel && dX + Rmin > Rmax && dX < R1 + R2) {
266 // Circles intersect in two points
267 nsolutions = 2 ;
268
269 // This is just the law of cosines
270 const double ddphi1 = acos((dX * dX - R2 * R2 + R1 * R1) / (2.*dX * R1)) ;
271 phi1[1] = phidomain(phi1[0] + ddphi1) ;
272 phi1[0] = phidomain(phi1[0] - ddphi1) ;
273
274 const double ddphi2 = acos((dX * dX - R1 * R1 + R2 * R2) / (2.*dX * R2)) ;
275 phi2[1] = phidomain(phi2[0] - ddphi2) ;
276 phi2[0] = phidomain(phi2[0] + ddphi2) ;
277
278 } else if (dX < Rmax) {
279 // Tangent or non-intersecting circles, one inside the other (only one POCA)
280 if (R1 > R2) phi2[0] = r_2 < 0 ? phi : phinot ;
281 else phi1[0] = r_1 < 0 ? phi : phinot ;
282 }
283 // else: tangent or non-intersecting circles, outside of each other (only one POCA)
284 // what we saved in phi1 and phi2 gives already the correct solution
285
286 // Intersections of the circles (cartesian)
287 double x1[2], y1[2], x2[2], y2[2];
288 for (int i = 0; i < nsolutions; i++) {
289 x1[i] = r_1 * sin(phi1[i]) + x0_1 ;
290 y1[i] = -r_1 * cos(phi1[i]) + y0_1 ;
291 x2[i] = r_2 * sin(phi2[i]) + x0_2 ;
292 y2[i] = -r_2 * cos(phi2[i]) + y0_2 ;
293 }
294
295 // 2) Find the best solution for z by running multiples of 2pi from the xy intersection(s)
296 double z1(0), z2(0);
297 bool first = true;
298 int ibest = 0;
299 const int nturnsmax = 10; // Max number of turns we try backwards and forwards
300
301 // Loop on all xy-plane solutions
302 for (int i = 0; i < nsolutions; ++i) {
303 const double l1 = helix1.getArcLength2DAtXY(x1[i], y1[i]);
304 const double l2 = helix2.getArcLength2DAtXY(x2[i], y2[i]);
305
306 // Loop on helix1 turns, save corresponding z positions
307 std::vector<double> z1s;
308 for (int n1 = 0; n1 <= nturnsmax; ++n1) {
309 bool added = false;
310 // Try forwards and backwards
311 for (int sn1 : {n1, -n1}) {
312 const double tmpz1 = helix1.getPositionAtArcLength2D(l1 + sn1 * TMath::TwoPi() / omega_1).Z();
313 if (sn1 == 0 || (-82 <= tmpz1 && tmpz1 <= 158)) {
314 // Only keep the 0th turn and those inside CDC volume
315 z1s.push_back(tmpz1);
316 added = true;
317 }
318 if (sn1 == 0)
319 break; // Do not store 0th turn twice
320 }
321 // If we did not add any point we are already outside CDC volume both backwards and forwards
322 if (!added)
323 break;
324 }
325
326 // Loop on helix2 turns, find closest approach to one of helix1 points
327 for (int n2 = 0; n2 <= nturnsmax; ++n2) {
328 bool tried = false;
329 // Try forwards and backwards
330 for (int sn2 : {n2, -n2}) {
331 const double tmpz2 = helix2.getPositionAtArcLength2D(l2 + sn2 * TMath::TwoPi() / omega_2).Z();
332 if (sn2 == 0 || (-82 <= tmpz2 && tmpz2 <= 158)) {
333 // Only keep the 0th turn and those inside CDC volume
334 tried = true;
335 // Find the tmpz1 closest to tmpz2
336 const auto i1best = std::min_element(
337 z1s.cbegin(), z1s.cend(), [&tmpz2](const double & z1a, const double & z1b) {
338 return fabs(z1a - tmpz2) < fabs(z1b - tmpz2);
339 });
340 const double tmpz1 = *i1best;
341 // Keep the solution where the z distance of closest approach is minimum
342 if (first || fabs(tmpz1 - tmpz2) < fabs(z1 - z2)) {
343 ibest = i;
344 first = false;
345 z1 = tmpz1;
346 z2 = tmpz2;
347 flt1 = l1;
348 flt2 = l2;
349 }
350 }
351 if (n2 == 0)
352 break; // Do not try 0th turn twice
353 }
354 // If we did not try any point we are already outside CDC volume both backwards and forwards
355 if (!tried)
356 break;
357 }
358 }
359
360 vertex.x() = 0.5 * (x1[ibest] + x2[ibest]);
361 vertex.y() = 0.5 * (y1[ibest] + y2[ibest]);
362 vertex.z() = 0.5 * (z1 + z2);
363
364 return std::hypot(x2[ibest] - x1[ibest], y2[ibest] - y1[ibest], z2 - z1);
365 }

◆ phidomain()

double phidomain ( const double phi)
static

the domain of phi

Definition at line 208 of file HelixUtils.cc.

209 {
210 double rc = phi ;
211 if (phi < -TMath::Pi()) rc += TMath::TwoPi();
212 else if (phi > TMath::Pi()) rc -= TMath::TwoPi();
213 return rc ;
214 }

◆ printVertexPar()

void printVertexPar ( const ROOT::Math::XYZVector & position,
const ROOT::Math::XYZVector & momentum,
int charge )
static

Print the vertex parameters.

Definition at line 121 of file HelixUtils.cc.

122 {
123 B2INFO(vertexParName(1).c_str() << position.X());
124 B2INFO(vertexParName(2).c_str() << position.Y());
125 B2INFO(vertexParName(3).c_str() << position.Z());
126 B2INFO(vertexParName(4).c_str() << momentum.X());
127 B2INFO(vertexParName(5).c_str() << momentum.Y());
128 B2INFO(vertexParName(6).c_str() << momentum.Z());
129 B2INFO("charge: " << charge);
130
131 }

◆ vertexFromHelix()

void vertexFromHelix ( const Belle2::Helix & helix,
double L,
double Bz,
ROOT::Math::XYZVector & position,
ROOT::Math::XYZVector & momentum,
int & charge )
static

helix --> vertex

Definition at line 24 of file HelixUtils.cc.

28 {
29 position = helix.getPositionAtArcLength2D(L);
30 momentum = helix.getMomentumAtArcLength2D(L, Bz);
31 charge = helix.getChargeSign();
32 }

◆ vertexParName()

std::string vertexParName ( int i)
static

map of the vertex parameters by list index

Definition at line 107 of file HelixUtils.cc.

108 {
109 std::string rc ;
110 switch (i) {
111 case 1 : rc = "x : " ; break ;
112 case 2 : rc = "y : " ; break ;
113 case 3 : rc = "z : " ; break ;
114 case 4 : rc = "px : " ; break ;
115 case 5 : rc = "py : " ; break ;
116 case 6 : rc = "pz : " ; break ;
117 }
118 return rc ;
119 }

The documentation for this class was generated from the following files: