Belle II Software  release-06-01-15
V0DaughterTrackVariables.cc
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 // Own includes
10 #include <analysis/variables/V0DaughterTrackVariables.h>
11 #include <analysis/VariableManager/Manager.h>
12 
13 #include <analysis/variables/TrackVariables.h>
14 
15 // framework - DataStore
16 #include <framework/dataobjects/Helix.h>
17 
18 // dataobjects from the MDST
19 #include <mdst/dataobjects/MCParticle.h>
20 #include <mdst/dataobjects/TrackFitResult.h>
21 #include <mdst/dataobjects/HitPatternVXD.h>
22 
23 // framework aux
24 #include <framework/logging/Logger.h>
25 
26 #include <algorithm>
27 #include <TVector2.h>
28 #include <cmath>
29 
30 using namespace std;
31 
32 namespace Belle2 {
37  namespace Variable {
38 
39  // helper function to get the helix parameters of the V0 daughter tracks
40  // Not registered in variable manager
41  double getV0DaughterTrackDetNHits(const Particle* particle, const double daughterID, const Const::EDetector& det)
42  {
43  auto daughter = particle->getDaughter(daughterID);
44  return trackNHits(daughter, det);
45  }
46 
47  double v0DaughterTrackNCDCHits(const Particle* part, const std::vector<double>& daughterID)
48  {
49  return getV0DaughterTrackDetNHits(part, daughterID[0], Const::EDetector::CDC);
50  }
51 
52  double v0DaughterTrackNSVDHits(const Particle* part, const std::vector<double>& daughterID)
53  {
54  return getV0DaughterTrackDetNHits(part, daughterID[0], Const::EDetector::SVD);
55  }
56 
57  double v0DaughterTrackNPXDHits(const Particle* part, const std::vector<double>& daughterID)
58  {
59  return getV0DaughterTrackDetNHits(part, daughterID[0], Const::EDetector::PXD);
60  }
61 
62  double v0DaughterTrackNVXDHits(const Particle* part, const std::vector<double>& daughterID)
63  {
64  return v0DaughterTrackNPXDHits(part, daughterID) + v0DaughterTrackNSVDHits(part, daughterID);
65  }
66 
67  double v0DaughterTrackFirstSVDLayer(const Particle* part, const std::vector<double>& daughterID)
68  {
69  auto daughter = part->getDaughter(daughterID[0]);
70  return trackFirstSVDLayer(daughter);
71  }
72 
73  double v0DaughterTrackFirstPXDLayer(const Particle* part, const std::vector<double>& daughterID)
74  {
75  auto daughter = part->getDaughter(daughterID[0]);
76  return trackFirstPXDLayer(daughter);
77  }
78 
79  double v0DaughterTrackFirstCDCLayer(const Particle* part, const std::vector<double>& daughterID)
80  {
81  auto daughter = part->getDaughter(daughterID[0]);
82  return trackFirstCDCLayer(daughter);
83  }
84 
85  double v0DaughterTrackLastCDCLayer(const Particle* part, const std::vector<double>& daughterID)
86  {
87  auto daughter = part->getDaughter(daughterID[0]);
88  return trackLastCDCLayer(daughter);
89  }
90 
91  double v0DaughterTrackPValue(const Particle* part, const std::vector<double>& daughterID)
92  {
93  auto daughter = part->getDaughter(daughterID[0]);
94  return trackPValue(daughter);
95  }
96 
97  double v0DaughterTrackD0(const Particle* part, const std::vector<double>& daughterID)
98  {
99  auto daughter = part->getDaughter(daughterID[0]);
100  return trackD0(daughter);
101  }
102 
103  double v0DaughterTrackPhi0(const Particle* part, const std::vector<double>& daughterID)
104  {
105  auto daughter = part->getDaughter(daughterID[0]);
106  return trackPhi0(daughter);
107  }
108 
109  double v0DaughterTrackOmega(const Particle* part, const std::vector<double>& daughterID)
110  {
111  auto daughter = part->getDaughter(daughterID[0]);
112  return trackOmega(daughter);
113  }
114 
115  double v0DaughterTrackZ0(const Particle* part, const std::vector<double>& daughterID)
116  {
117  auto daughter = part->getDaughter(daughterID[0]);
118  return trackZ0(daughter);
119  }
120 
121  double v0DaughterTrackTanLambda(const Particle* part, const std::vector<double>& daughterID)
122  {
123  auto daughter = part->getDaughter(daughterID[0]);
124  return trackTanLambda(daughter);
125  }
126 
127  double v0DaughterTrackD0Error(const Particle* part, const std::vector<double>& daughterID)
128  {
129  auto daughter = part->getDaughter(daughterID[0]);
130  return trackD0Error(daughter);
131  }
132 
133  double v0DaughterTrackPhi0Error(const Particle* part, const std::vector<double>& daughterID)
134  {
135  auto daughter = part->getDaughter(daughterID[0]);
136  return trackPhi0Error(daughter);
137  }
138 
139  double v0DaughterTrackOmegaError(const Particle* part, const std::vector<double>& daughterID)
140  {
141  auto daughter = part->getDaughter(daughterID[0]);
142  return trackOmegaError(daughter);
143  }
144 
145  double v0DaughterTrackZ0Error(const Particle* part, const std::vector<double>& daughterID)
146  {
147  auto daughter = part->getDaughter(daughterID[0]);
148  return trackZ0Error(daughter);
149  }
150 
151  double v0DaughterTrackTanLambdaError(const Particle* part, const std::vector<double>& daughterID)
152  {
153  auto daughter = part->getDaughter(daughterID[0]);
154  return trackTanLambdaError(daughter);
155  }
156 
157  double v0DaughterD0(const Particle* particle, const std::vector<double>& daughterID)
158  {
159  if (!particle)
160  return std::numeric_limits<float>::quiet_NaN();
161 
162  TVector3 v0Vertex = particle->getVertex();
163 
164  const Particle* daug = particle->getDaughter(daughterID[0]);
165 
166  const TrackFitResult* trackFit = daug->getTrackFitResult();
167  if (!trackFit) return std::numeric_limits<float>::quiet_NaN();
168 
169  UncertainHelix helix = trackFit->getUncertainHelix();
170  helix.passiveMoveBy(v0Vertex);
171 
172  return helix.getD0();
173  }
174 
175  double v0DaughterD0Diff(const Particle* particle)
176  {
177  return v0DaughterD0(particle, {0}) - v0DaughterD0(particle, {1});
178  }
179 
180  double v0DaughterZ0(const Particle* particle, const std::vector<double>& daughterID)
181  {
182  if (!particle)
183  return std::numeric_limits<float>::quiet_NaN();
184 
185  TVector3 v0Vertex = particle->getVertex();
186 
187  const Particle* daug = particle->getDaughter(daughterID[0]);
188 
189  const TrackFitResult* trackFit = daug->getTrackFitResult();
190  if (!trackFit) return std::numeric_limits<float>::quiet_NaN();
191 
192  UncertainHelix helix = trackFit->getUncertainHelix();
193  helix.passiveMoveBy(v0Vertex);
194 
195  return helix.getZ0();
196  }
197 
198  double v0DaughterZ0Diff(const Particle* particle)
199  {
200  return v0DaughterZ0(particle, {0}) - v0DaughterZ0(particle, {1});
201  }
202 
203  // helper function to get pull of the helix parameters of the V0 daughter tracks with the true vertex as the pivot.
204  // Not registered in variable manager
205  double getHelixParameterPullOfV0DaughterWithTrueVertexAsPivotAtIndex(const Particle* particle, const double daughterID,
206  const int tauIndex)
207  {
208  if (!particle) { return std::numeric_limits<double>::quiet_NaN(); }
209 
210  const int dID = int(std::lround(daughterID));
211  if (not(dID == 0 || dID == 1)) { return std::numeric_limits<double>::quiet_NaN(); }
212 
213  const MCParticle* mcparticle_v0 = particle->getMCParticle();
214  if (!mcparticle_v0) { return std::numeric_limits<double>::quiet_NaN(); }
215 
216  if (!(particle->getDaughter(dID))) { return std::numeric_limits<double>::quiet_NaN(); }
217 
218  const MCParticle* mcparticle = particle->getDaughter(dID)->getMCParticle();
219  if (!mcparticle) { return std::numeric_limits<double>::quiet_NaN(); }
220 
221  const TrackFitResult* trackFit = particle->getDaughter(dID)->getTrackFitResult();
222  if (!trackFit) { return std::numeric_limits<double>::quiet_NaN(); }
223 
224  // MC information
225  const TVector3 mcProdVertex = mcparticle->getVertex();
226  const TVector3 mcMomentum = mcparticle->getMomentum();
227  const double mcParticleCharge = mcparticle->getCharge();
228  const double BzAtProdVertex = BFieldManager::getFieldInTesla(mcProdVertex).Z();
229  Helix mcHelix = Helix(mcProdVertex, mcMomentum, mcParticleCharge, BzAtProdVertex);
230  mcHelix.passiveMoveBy(mcProdVertex);
231  const std::vector<double> mcHelixPars = { mcHelix.getD0(), mcHelix.getPhi0(), mcHelix.getOmega(),
232  mcHelix.getZ0(), mcHelix.getTanLambda()
233  };
234 
235  // measured information (from the reconstructed particle)
236  UncertainHelix measHelix = trackFit->getUncertainHelix();
237  measHelix.passiveMoveBy(mcProdVertex);
238  const TMatrixDSym measCovariance = measHelix.getCovariance();
239  const std::vector<double> measHelixPars = {measHelix.getD0(), measHelix.getPhi0(), measHelix.getOmega(),
240  measHelix.getZ0(), measHelix.getTanLambda()
241  };
242  const std::vector<double> measErrSquare = {measCovariance[0][0], measCovariance[1][1], measCovariance[2][2],
243  measCovariance[3][3], measCovariance[4][4]
244  };
245 
246  if (measErrSquare.at(tauIndex) > 0)
247  return (mcHelixPars.at(tauIndex) - measHelixPars.at(tauIndex)) / std::sqrt(measErrSquare.at(tauIndex));
248  else
249  return std::numeric_limits<double>::quiet_NaN();
250  }
251 
252  double v0DaughterHelixWithTrueVertexAsPivotD0Pull(const Particle* part, const std::vector<double>& daughterID)
253  {
254  return getHelixParameterPullOfV0DaughterWithTrueVertexAsPivotAtIndex(part, daughterID[0], 0);
255  }
256 
257  double v0DaughterHelixWithTrueVertexAsPivotPhi0Pull(const Particle* part, const std::vector<double>& daughterID)
258  {
259  return getHelixParameterPullOfV0DaughterWithTrueVertexAsPivotAtIndex(part, daughterID[0], 1);
260  }
261 
262  double v0DaughterHelixWithTrueVertexAsPivotOmegaPull(const Particle* part, const std::vector<double>& daughterID)
263  {
264  return getHelixParameterPullOfV0DaughterWithTrueVertexAsPivotAtIndex(part, daughterID[0], 2);
265  }
266 
267  double v0DaughterHelixWithTrueVertexAsPivotZ0Pull(const Particle* part, const std::vector<double>& daughterID)
268  {
269  return getHelixParameterPullOfV0DaughterWithTrueVertexAsPivotAtIndex(part, daughterID[0], 3);
270  }
271 
272  double v0DaughterHelixWithTrueVertexAsPivotTanLambdaPull(const Particle* part, const std::vector<double>& daughterID)
273  {
274  return getHelixParameterPullOfV0DaughterWithTrueVertexAsPivotAtIndex(part, daughterID[0], 4);
275  }
276 
277  double v0DaughterHelixWithOriginAsPivotD0Pull(const Particle* part, const std::vector<double>& daughterID)
278  {
279  auto daughter = part->getDaughter(daughterID[0]);
280  return getHelixD0Pull(daughter);
281  }
282 
283  double v0DaughterHelixWithOriginAsPivotPhi0Pull(const Particle* part, const std::vector<double>& daughterID)
284  {
285  auto daughter = part->getDaughter(daughterID[0]);
286  return getHelixPhi0Pull(daughter);
287  }
288 
289  double v0DaughterHelixWithOriginAsPivotOmegaPull(const Particle* part, const std::vector<double>& daughterID)
290  {
291  auto daughter = part->getDaughter(daughterID[0]);
292  return getHelixOmegaPull(daughter);
293  }
294 
295  double v0DaughterHelixWithOriginAsPivotZ0Pull(const Particle* part, const std::vector<double>& daughterID)
296  {
297  auto daughter = part->getDaughter(daughterID[0]);
298  return getHelixZ0Pull(daughter);
299  }
300 
301  double v0DaughterHelixWithOriginAsPivotTanLambdaPull(const Particle* part, const std::vector<double>& daughterID)
302  {
303  auto daughter = part->getDaughter(daughterID[0]);
304  return getHelixTanLambdaPull(daughter);
305  }
306 
307  double v0DaughterTrackParam5AtIPPerigee(const Particle* part, const std::vector<double>& params)
308  {
309  auto daughter = part->getDaughter(params[0]);
310  if (!daughter) {
311  return std::numeric_limits<double>::quiet_NaN();
312  }
313  auto trackFit = daughter->getTrackFitResult();
314  if (!trackFit) {
315  return std::numeric_limits<double>::quiet_NaN();
316  }
317 
318  const int paramID = int(std::lround(params[1]));
319  if (not(0 <= paramID && paramID < 5))
320  return std::numeric_limits<double>::quiet_NaN();
321 
322  std::vector<float> tau = trackFit->getTau();
323  return tau[paramID];
324  }
325 
326  double v0DaughterTrackParamCov5x5AtIPPerigee(const Particle* part, const std::vector<double>& params)
327  {
328  auto daughter = part->getDaughter(params[0]);
329  if (!daughter) {
330  return std::numeric_limits<double>::quiet_NaN();
331  }
332  auto trackFit = daughter->getTrackFitResult();
333  if (!trackFit) {
334  return std::numeric_limits<double>::quiet_NaN();
335  }
336 
337  const int paramID = int(std::lround(params[1]));
338  if (not(0 <= paramID && paramID < 15))
339  return std::numeric_limits<double>::quiet_NaN();
340 
341  std::vector<float> cov = trackFit->getCov();
342  return cov[paramID];
343  }
344 
345  int convertedPhotonErrorChecks(const Particle* gamma, const std::vector<double>& daughterIndices)
346  {
347  //Check that exactly two daughter indices are provided
348  if (daughterIndices.size() != 2) {
349  B2ERROR("Invalid number of daughter indices. Please specify exactly two valid daughter indices.");
350  return -1;
351  }
352 
353  //Check that there are at least (r+1) daughters where r is the bigger of the two indices provided
354  int daughterIndex1 = int(daughterIndices[0]);
355  int daughterIndex2 = int(daughterIndices[1]);
356  if (int(gamma->getNDaughters()) <= std::max(daughterIndex1, daughterIndex2)) {
357  B2ERROR("Invalid daughter indices provided. Particle does not have that many daughters.");
358  return -1;
359  }
360 
361  //Check that there exists tracks associated with the daughter indices provided
362  if (!gamma->getDaughter(daughterIndex1)->getTrack()) {
363  B2ERROR("There is no track associated with daughter index " << daughterIndex1);
364  return -1;
365  }
366  if (!gamma->getDaughter(daughterIndex2)->getTrack()) {
367  B2ERROR("There is no track associated with daughter index " << daughterIndex2);
368  return -1;
369  }
370 
371  //Check whether tracks used to calculate variable has been reconstructed as electrons/positrons or not (INCONSEQUENTIAL)
372  if (fabs(gamma->getDaughter(daughterIndex1)->getPDGCode()) != 11) {
373  B2INFO("The first track provided has not been reconstructed as an electron/positron. It has PDG code " << gamma->getDaughter(
374  daughterIndex1)->getPDGCode() << ". However, this is still fully admissible.");
375  }
376  if (fabs(gamma->getDaughter(daughterIndex2)->getPDGCode()) != 11) {
377  B2INFO("The second track provided has not been reconstructed as an electron/positron. It has PDG code " << gamma->getDaughter(
378  daughterIndex1)->getPDGCode() << ".However, this is still fully admissible.");
379  }
380 
381  return 0;
382  }
383 
384 
385  int convertedPhotonLoadHelixParams(const Particle* gamma, int daughterIndex1, int daughterIndex2, double& Phi01, double& D01,
386  double& Omega1, double& Z01, double& TanLambda1, double& Phi02, double& D02, double& Omega2, double& Z02,
387  double& TanLambda2)
388  {
389  //Get helix parameters
390  //Electron/track 1
391  Helix e1Helix = gamma->getDaughter(daughterIndex1)->getTrackFitResult()->getHelix();
392 
393  Phi01 = e1Helix.getPhi0();
394  D01 = e1Helix.getD0() ;
395  Omega1 = e1Helix.getOmega();
396  Z01 = e1Helix.getZ0();
397  TanLambda1 = e1Helix.getTanLambda();
398 
399  //Electron/track 2
400  Helix e2Helix = gamma->getDaughter(daughterIndex2)->getTrackFitResult()->getHelix();
401 
402  Phi02 = e2Helix.getPhi0();
403  D02 = e2Helix.getD0() ;
404  Omega2 = e2Helix.getOmega();
405  Z02 = e2Helix.getZ0();
406  TanLambda2 = e2Helix.getTanLambda();
407 
408  //Check if either track has zero curvature
409  if (Omega1 == 0) {return -1;}
410  else if (Omega2 == 0) {return -2;}
411  else {return 0;}
412 
413  }
414 
415  double convertedPhotonInvariantMass(const Particle* gamma, const std::vector<double>& daughterIndices)
416  {
417  //Do basic checks
418  int errFlag = convertedPhotonErrorChecks(gamma, daughterIndices);
419  if (errFlag == -1) {return std::numeric_limits<double>::quiet_NaN();}
420 
421  //Load helix parameters
422  double Phi01, D01, Omega1, Z01, TanLambda1, Phi02, D02, Omega2, Z02, TanLambda2;
423  int daughterIndex1 = int(daughterIndices[0]);
424  int daughterIndex2 = int(daughterIndices[1]);
425  convertedPhotonLoadHelixParams(gamma, daughterIndex1, daughterIndex2, Phi01, D01, Omega1, Z01, TanLambda1, Phi02, D02,
426  Omega2, Z02, TanLambda2);
427 
428 
429  //Calculating invariant mass
430  //Sine and cosine Lambda
431  double sinlam1 = TanLambda1 / sqrt(1 + (TanLambda1 * TanLambda1));
432  double coslam1 = 1 / sqrt(1 + (TanLambda1 * TanLambda1));
433  double sinlam2 = TanLambda2 / sqrt(1 + (TanLambda2 * TanLambda2));
434  double coslam2 = 1 / sqrt(1 + (TanLambda2 * TanLambda2));
435 
436  //Transverse and longitudinal momentum components; energy with electron mass hypothesis
437  //electron 1
438  double p1 = gamma->getDaughter(daughterIndex1)->getMomentumMagnitude();
439  double pt1 = p1 * coslam1, pz1 = p1 * sinlam1;
440  double e1 = sqrt((p1 * p1) + (Const::electronMass * Const::electronMass));
441  //electron 2
442  double p2 = gamma->getDaughter(daughterIndex2)->getMomentumMagnitude();
443  double pt2 = p2 * coslam2, pz2 = p2 * sinlam2;
444  double e2 = sqrt((p2 * p2) + (Const::electronMass * Const::electronMass));
445 
446  //Invariant mass of the two track system
447  double vtxMass = sqrt(pow(e1 + e2, 2.0) - pow(pt1 + pt2, 2.0) - pow(pz1 + pz2, 2.0));
448  return vtxMass;
449  }
450 
451  double convertedPhotonDelTanLambda(const Particle* gamma, const std::vector<double>& daughterIndices)
452  {
453  //Do basic checks
454  int errFlag = convertedPhotonErrorChecks(gamma, daughterIndices);
455  if (errFlag == -1) {return std::numeric_limits<double>::quiet_NaN();}
456 
457  //Load helix parameters
458  double Phi01, D01, Omega1, Z01, TanLambda1, Phi02, D02, Omega2, Z02, TanLambda2;
459  int daughterIndex1 = int(daughterIndices[0]);
460  int daughterIndex2 = int(daughterIndices[1]);
461  convertedPhotonLoadHelixParams(gamma, daughterIndex1, daughterIndex2, Phi01, D01, Omega1, Z01, TanLambda1, Phi02, D02,
462  Omega2, Z02, TanLambda2);
463 
464 
465 
466  //Delta-TanLambda
467  return (TanLambda2 - TanLambda1);
468  }
469 
470  double convertedPhotonDelR(const Particle* gamma, const std::vector<double>& daughterIndices)
471  {
472  //Do basic checks
473  int errFlag = convertedPhotonErrorChecks(gamma, daughterIndices);
474  if (errFlag == -1) {return std::numeric_limits<double>::quiet_NaN();}
475 
476  //Load helix parameters
477  double Phi01, D01, Omega1, Z01, TanLambda1, Phi02, D02, Omega2, Z02, TanLambda2;
478  int daughterIndex1 = int(daughterIndices[0]);
479  int daughterIndex2 = int(daughterIndices[1]);
480  errFlag = convertedPhotonLoadHelixParams(gamma, daughterIndex1, daughterIndex2, Phi01, D01, Omega1, Z01, TanLambda1, Phi02, D02,
481  Omega2, Z02, TanLambda2);
482  if (errFlag == -1) {
483  B2ERROR("First track provided has curvature zero. Calculation of convertedPhotonDelR failed.");
484  return std::numeric_limits<double>::quiet_NaN();
485  }
486  if (errFlag == -2) {
487  B2ERROR("Second track provided has curvature zero. Calculation of convertedPhotonDelR failed.");
488  return std::numeric_limits<double>::quiet_NaN();
489  }
490 
491  //Delta-R
492  double radius1 = 1 / Omega1;
493  double radius2 = 1 / Omega2;
494 
495  TVector2 center1((radius1 + D01) * sin(Phi01) , -1 * (radius1 + D01) * cos(Phi01));
496  TVector2 center2((radius2 + D02) * sin(Phi02) , -1 * (radius2 + D02) * cos(Phi02));
497  TVector2 cenDiff = center1 - center2;
498 
499  double delR = fabs(radius1) + fabs(radius2) - cenDiff.Mod();
500  return delR;
501  }
502 
503  std::pair<double, double> convertedPhotonZ1Z2(const Particle* gamma, const std::vector<double>& daughterIndices)
504  {
505  //Do basic checks
506  int errFlag = convertedPhotonErrorChecks(gamma, daughterIndices);
507  if (errFlag == -1) {return std::pair<double, double>(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN());}
508 
509  //Load helix parameters
510  double Phi01, D01, Omega1, Z01, TanLambda1, Phi02, D02, Omega2, Z02, TanLambda2;
511  int daughterIndex1 = int(daughterIndices[0]);
512  int daughterIndex2 = int(daughterIndices[1]);
513  errFlag = convertedPhotonLoadHelixParams(gamma, daughterIndex1, daughterIndex2, Phi01, D01, Omega1, Z01, TanLambda1, Phi02, D02,
514  Omega2, Z02, TanLambda2);
515  if (errFlag == -1) {
516  B2ERROR("First track provided has curvature zero. Calculation of convertedPhotonZ1Z2 failed.");
517  return std::pair<double, double>(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN());
518  }
519  if (errFlag == -2) {
520  B2ERROR("Second track provided has curvature zero. Calculation of convertedPhotonZ1Z2 failed.");
521  return std::pair<double, double>(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN());
522  }
523 
524  //Delta-Z
525  //Radial unit vectors
526  double radius1 = 1 / Omega1;
527  double radius2 = 1 / Omega2;
528 
529  TVector2 center1((radius1 + D01) * sin(Phi01) , -1 * (radius1 + D01) * cos(Phi01));
530  TVector2 center2((radius2 + D02) * sin(Phi02) , -1 * (radius2 + D02) * cos(Phi02));
531 
532  TVector2 n1 = center1 - center2; n1 = n1.Unit();
533  TVector2 n2 = -1 * n1;
534  n1 = copysign(1.0, Omega1) * n1;
535  n2 = copysign(1.0, Omega2) * n2;
536 
537  //Getting running parameter phi at nominal vertex
538  double phiN1 = atan2(n1.X(), -n1.Y());
539  double phiN2 = atan2(n2.X(), -n2.Y());
540  double Phi01Intersect = phiN1 - Phi01;
541  double Phi02Intersect = phiN2 - Phi02;
542 
543  double z1 = Z01 - (radius1 * TanLambda1 * Phi01Intersect);
544  double z2 = Z02 - (radius2 * TanLambda2 * Phi02Intersect);
545  std::pair<double, double> z1z2(z1, z2);
546  return z1z2;
547  }
548 
549  double convertedPhotonDelZ(const Particle* gamma, const std::vector<double>& daughterIndices)
550  {
551  std::pair<double, double> z1z2 = convertedPhotonZ1Z2(gamma, daughterIndices);
552  double z1 = z1z2.first; double z2 = z1z2.second;
553  return (z1 - z2);
554  }
555 
556  double convertedPhotonZ(const Particle* gamma, const std::vector<double>& daughterIndices)
557  {
558  std::pair<double, double> z1z2 = convertedPhotonZ1Z2(gamma, daughterIndices);
559  double z1 = z1z2.first; double z2 = z1z2.second;
560  return (z1 + z2) * 0.5;
561  }
562 
563  TVector2 convertedPhotonXY(const Particle* gamma, const std::vector<double>& daughterIndices)
564  {
565  //Do basic checks
566  int errFlag = convertedPhotonErrorChecks(gamma, daughterIndices);
567  if (errFlag == -1) {return TVector2(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN());}
568 
569  //Load helix parameters
570  double Phi01, D01, Omega1, Z01, TanLambda1, Phi02, D02, Omega2, Z02, TanLambda2;
571  int daughterIndex1 = int(daughterIndices[0]);
572  int daughterIndex2 = int(daughterIndices[1]);
573  errFlag = convertedPhotonLoadHelixParams(gamma, daughterIndex1, daughterIndex2, Phi01, D01, Omega1, Z01, TanLambda1, Phi02, D02,
574  Omega2, Z02, TanLambda2);
575  if (errFlag == -1) {
576  B2ERROR("First track provided has curvature zero. Calculation of convertedPhotonXY failed.");
577  return TVector2(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN());
578  }
579  if (errFlag == -2) {
580  B2ERROR("Second track provided has curvature zero. Calculation of convertedPhotonXY failed.");
581  return TVector2(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN());
582  }
583 
584  //Radial unit vectors
585  double radius1 = 1 / Omega1;
586  double radius2 = 1 / Omega2;
587 
588  TVector2 center1((radius1 + D01) * sin(Phi01) , -1 * (radius1 + D01) * cos(Phi01));
589  TVector2 center2((radius2 + D02) * sin(Phi02) , -1 * (radius2 + D02) * cos(Phi02));
590  TVector2 cenDiff = center2 - center1;
591  double delR = fabs(radius1) + fabs(radius2) - cenDiff.Mod();
592 
593  //Calculate transverse vertex
594  TVector2 n1 = cenDiff.Unit();
595  TVector2 vtxXY = center1 + ((fabs(radius1) - (delR / 2)) * n1);
596  return vtxXY;
597  }
598 
599  double convertedPhotonX(const Particle* gamma, const std::vector<double>& daughterIndices)
600  {
601  auto vtxXY = convertedPhotonXY(gamma, daughterIndices);
602  return vtxXY.X();
603  }
604 
605  double convertedPhotonY(const Particle* gamma, const std::vector<double>& daughterIndices)
606  {
607  auto vtxXY = convertedPhotonXY(gamma, daughterIndices);
608  return vtxXY.Y();
609  }
610 
611  double convertedPhotonRho(const Particle* gamma, const std::vector<double>& daughterIndices)
612  {
613  auto vtxXY = convertedPhotonXY(gamma, daughterIndices);
614  return vtxXY.Mod();
615  }
616 
617  TVector3 convertedPhoton3Momentum(const Particle* gamma, const std::vector<double>& daughterIndices)
618  {
619  //Do basic checks
620  int errFlag = convertedPhotonErrorChecks(gamma, daughterIndices);
621  if (errFlag == -1) {return TVector3(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN());}
622 
623  //Load helix parameters
624  double Phi01, D01, Omega1, Z01, TanLambda1, Phi02, D02, Omega2, Z02, TanLambda2;
625  int daughterIndex1 = int(daughterIndices[0]);
626  int daughterIndex2 = int(daughterIndices[1]);
627  errFlag = convertedPhotonLoadHelixParams(gamma, daughterIndex1, daughterIndex2, Phi01, D01, Omega1, Z01, TanLambda1, Phi02, D02,
628  Omega2, Z02,
629  TanLambda2);
630  if (errFlag == -1) {
631  B2ERROR("First track provided has curvature zero. Calculation of convertedPhoton3Momentum failed.");
632  return TVector3(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(),
633  std::numeric_limits<double>::quiet_NaN());
634  }
635  if (errFlag == -2) {
636  B2ERROR("Second track provided has curvature zero. Calculation of convertedPhoton3Momentum failed.");
637  return TVector3(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(),
638  std::numeric_limits<double>::quiet_NaN());
639  }
640 
641  //Delta-Z
642  //Radial unit vectors
643  double radius1 = 1 / Omega1;
644  double radius2 = 1 / Omega2;
645 
646  TVector2 center1((radius1 + D01) * sin(Phi01) , -1 * (radius1 + D01) * cos(Phi01));
647  TVector2 center2((radius2 + D02) * sin(Phi02) , -1 * (radius2 + D02) * cos(Phi02));
648  TVector2 n1 = center1 - center2; n1 = n1.Unit();
649  TVector2 n2 = -1 * n1;
650  n1 = copysign(1.0, Omega1) * n1;
651  n2 = copysign(1.0, Omega2) * n2;
652 
653  //Getting running parameter phi at nominal vertex
654  double phiN1 = atan2(n1.X(), -n1.Y());
655  double phiN2 = atan2(n2.X(), -n2.Y());
656 
657  //Sine and cosine Lambda
658  double sinlam1 = TanLambda1 / sqrt(1 + (TanLambda1 * TanLambda1));
659  double coslam1 = 1 / sqrt(1 + (TanLambda1 * TanLambda1));
660  double sinlam2 = TanLambda2 / sqrt(1 + (TanLambda2 * TanLambda2));
661  double coslam2 = 1 / sqrt(1 + (TanLambda2 * TanLambda2));
662 
663  //Photon 3-momentum
664  double p1 = gamma->getDaughter(daughterIndex1)->getMomentumMagnitude();
665  TVector3 e1Momentum(coslam1 * cos(phiN1), coslam1 * sin(phiN1), sinlam1);
666  double p2 = gamma->getDaughter(daughterIndex2)->getMomentumMagnitude();
667  TVector3 e2Momentum(coslam2 * cos(phiN2), coslam2 * sin(phiN2), sinlam2);
668  TVector3 gammaMomentum = (e1Momentum * p1) + (e2Momentum * p2);
669 
670  return gammaMomentum;
671  }
672 
673  double convertedPhotonPx(const Particle* gamma, const std::vector<double>& daughterIndices)
674  {
675  auto gammaMomentum = convertedPhoton3Momentum(gamma, daughterIndices);
676  return gammaMomentum.Px();
677  }
678 
679  double convertedPhotonPy(const Particle* gamma, const std::vector<double>& daughterIndices)
680  {
681  auto gammaMomentum = convertedPhoton3Momentum(gamma, daughterIndices);
682  return gammaMomentum.Py();
683  }
684 
685  double convertedPhotonPz(const Particle* gamma, const std::vector<double>& daughterIndices)
686  {
687  auto gammaMomentum = convertedPhoton3Momentum(gamma, daughterIndices);
688  return gammaMomentum.Pz();
689  }
690 
691  int v0DaughtersShareInnermostHit(const Particle* part)
692  {
693  if (!part)
694  return std::numeric_limits<int>::quiet_NaN();
695  auto daughterPlus = part->getDaughter(0);
696  auto daughterMinus = part->getDaughter(1);
697  if (!daughterPlus || !daughterMinus)
698  return std::numeric_limits<int>::quiet_NaN();
699  auto trackFitPlus = daughterPlus->getTrackFitResult();
700  auto trackFitMinus = daughterMinus->getTrackFitResult();
701  if (!trackFitPlus || !trackFitMinus)
702  return std::numeric_limits<int>::quiet_NaN();
703  int flagPlus = trackFitPlus->getHitPatternVXD().getInnermostHitShareStatus();
704  int flagMinus = trackFitMinus->getHitPatternVXD().getInnermostHitShareStatus();
705  if (flagPlus != flagMinus)
706  return std::numeric_limits<int>::quiet_NaN();
707  return flagPlus;
708  }
709 
710  bool v0DaughtersShareInnermostUHit(const Particle* part)
711  {
712  return ((v0DaughtersShareInnermostHit(part) / 2) == 1);
713  }
714 
715  bool v0DaughtersShareInnermostVHit(const Particle* part)
716  {
717  return ((v0DaughtersShareInnermostHit(part) % 2) == 1);
718  }
719 
720  VARIABLE_GROUP("V0Daughter");
721 
722  REGISTER_VARIABLE("v0DaughterNCDCHits(i)", v0DaughterTrackNCDCHits, "Number of CDC hits associated to the i-th daughter track");
723  MAKE_DEPRECATED("v0DaughterNCDCHits(i)", false, "light-2104-poseidon", R"DOC(
724  The same value can be calculated with the more generic variable `nCDCHits`,
725  so replace the current call with ``daughter(i, nCDCHits)``.)DOC");
726  REGISTER_VARIABLE("v0DaughterNSVDHits(i)", v0DaughterTrackNSVDHits, "Number of SVD hits associated to the i-th daughter track");
727  MAKE_DEPRECATED("v0DaughterNSVDHits(i)", false, "light-2104-poseidon", R"DOC(
728  The same value can be calculated with the more generic variable `nSVDHits`,
729  so replace the current call with ``daughter(i, nSVDHits)``.)DOC");
730  REGISTER_VARIABLE("v0DaughterNPXDHits(i)", v0DaughterTrackNPXDHits, "Number of PXD hits associated to the i-th daughter track");
731  MAKE_DEPRECATED("v0DaughterNPXDHits(i)", false, "light-2104-poseidon", R"DOC(
732  The same value can be calculated with the more generic variable `nPXDHits`,
733  so replace the current call with ``daughter(i, nPXDHits)``.)DOC");
734  REGISTER_VARIABLE("v0DaughterNVXDHits(i)", v0DaughterTrackNVXDHits, "Number of PXD+SVD hits associated to the i-th daughter track");
735  MAKE_DEPRECATED("v0DaughterNVXDHits(i)", false, "light-2104-poseidon", R"DOC(
736  The same value can be calculated with the more generic variable `nVXDHits`,
737  so replace the current call with ``daughter(i, nVXDHits)``.)DOC");
738  REGISTER_VARIABLE("v0DaughterFirstSVDLayer(i)", v0DaughterTrackFirstSVDLayer,
739  "First activated SVD layer associated to the i-th daughter track");
740  MAKE_DEPRECATED("v0DaughterFirstSVDLayer(i)", false, "light-2104-poseidon", R"DOC(
741  The same value can be calculated with the more generic variable `firstSVDLayer`,
742  so replace the current call with ``daughter(i, firstSVDLayer)``.)DOC");
743  REGISTER_VARIABLE("v0DaughterFirstPXDLayer(i)", v0DaughterTrackFirstPXDLayer,
744  "First activated PXD layer associated to the i-th daughter track");
745  MAKE_DEPRECATED("v0DaughterFirstPXDLayer(i)", false, "light-2104-poseidon", R"DOC(
746  The same value can be calculated with the more generic variable `firstPXDLayer`,
747  so replace the current call with ``daughter(i, firstPXDLayer)``.)DOC");
748  REGISTER_VARIABLE("v0DaughterFirstCDCLayer(i)", v0DaughterTrackFirstCDCLayer,
749  "First activated CDC layer associated to the i-th daughter track");
750  MAKE_DEPRECATED("v0DaughterFirstCDCLayer(i)", false, "light-2104-poseidon", R"DOC(
751  The same value can be calculated with the more generic variable `firstCDCLayer`,
752  so replace the current call with ``daughter(i, firstCDCLayer)``.)DOC");
753  REGISTER_VARIABLE("v0DaughterLastCDCLayer(i)", v0DaughterTrackLastCDCLayer,
754  "Last CDC layer associated to the i-th daughter track");
755  MAKE_DEPRECATED("v0DaughterLastCDCLayer(i)", false, "light-2104-poseidon", R"DOC(
756  The same value can be calculated with the more generic variable `lastCDCLayer`,
757  so replace the current call with ``daughter(i, lastCDCLayer)``.)DOC");
758  REGISTER_VARIABLE("v0DaughterPValue(i)", v0DaughterTrackPValue,
759  "chi2 probalility of the i-th daughter track fit");
760  MAKE_DEPRECATED("v0DaughterPValue(i)", false, "light-2104-poseidon", R"DOC(
761  The same value can be calculated with the more generic variable `pValue`,
762  so replace the current call with ``daughter(i, pValue)``.)DOC");
764  REGISTER_VARIABLE("v0DaughterD0(i)", v0DaughterTrackD0, "d0 of the i-th daughter track fit");
765  MAKE_DEPRECATED("v0DaughterD0(i)", false, "light-2104-poseidon", R"DOC(
766  The same value can be calculated with the more generic variable `d0`,
767  so replace the current call with ``daughter(i, d0)``.)DOC");
768  REGISTER_VARIABLE("v0DaughterPhi0(i)", v0DaughterTrackPhi0, "phi0 of the i-th daughter track fit");
769  MAKE_DEPRECATED("v0DaughterPhi0(i)", false, "light-2104-poseidon", R"DOC(
770  The same value can be calculated with the more generic variable `phi0`,
771  so replace the current call with ``daughter(i, phi0)``.)DOC");
772  REGISTER_VARIABLE("v0DaughterOmega(i)", v0DaughterTrackOmega, "omega of the i-th daughter track fit");
773  MAKE_DEPRECATED("v0DaughterOmega(i)", false, "light-2104-poseidon", R"DOC(
774  The same value can be calculated with the more generic variable `omega`,
775  so replace the current call with ``daughter(i, omega)``.)DOC");
776  REGISTER_VARIABLE("v0DaughterZ0(i)", v0DaughterTrackZ0, "z0 of the i-th daughter track fit");
777  MAKE_DEPRECATED("v0DaughterZ0(i)", false, "light-2104-poseidon", R"DOC(
778  The same value can be calculated with the more generic variable `z0`,
779  so replace the current call with ``daughter(i, z0)``.)DOC");
780  REGISTER_VARIABLE("v0DaughterTanLambda(i)", v0DaughterTrackTanLambda, "tan(lambda) of the i-th daughter track fit");
781  MAKE_DEPRECATED("v0DaughterTanLambda(i)", false, "light-2104-poseidon", R"DOC(
782  The same value can be calculated with the more generic variable `tanLambda`,
783  so replace the current call with ``daughter(i, tanLambda)``.)DOC");
785  REGISTER_VARIABLE("v0DaughterD0Error(i)", v0DaughterTrackD0Error, "d0 error of the i-th daughter track fit");
786  MAKE_DEPRECATED("v0DaughterD0Error(i)", false, "light-2104-poseidon", R"DOC(
787  The same value can be calculated with the more generic variable `d0Err`,
788  so replace the current call with ``daughter(i, d0Err)``.)DOC");
789  REGISTER_VARIABLE("v0DaughterPhi0Error(i)", v0DaughterTrackPhi0Error, "phi0 error of the i-th daughter track fit");
790  MAKE_DEPRECATED("v0DaughterPhi0Error(i)", false, "light-2104-poseidon", R"DOC(
791  The same value can be calculated with the more generic variable `phi0Err`,
792  so replace the current call with ``daughter(i, phi0Err)``.)DOC");
793  REGISTER_VARIABLE("v0DaughterOmegaError(i)", v0DaughterTrackOmegaError, "omega error of the i-th daughter track fit");
794  MAKE_DEPRECATED("v0DaughterOmegaError(i)", false, "light-2104-poseidon", R"DOC(
795  The same value can be calculated with the more generic variable `omegaErr`,
796  so replace the current call with ``daughter(i, omegaErr)``.)DOC");
797  REGISTER_VARIABLE("v0DaughterZ0Error(i)", v0DaughterTrackZ0Error, "z0 error of the i-th daughter track fit");
798  MAKE_DEPRECATED("v0DaughterZ0Error(i)", false, "light-2104-poseidon", R"DOC(
799  The same value can be calculated with the more generic variable `z0Err`,
800  so replace the current call with ``daughter(i, z0Err)``.)DOC");
801  REGISTER_VARIABLE("v0DaughterTanLambdaError(i)", v0DaughterTrackTanLambdaError, "tan(lambda) error of the i-th daughter track fit");
802  MAKE_DEPRECATED("v0DaughterTanLambdaError(i)", false, "light-2104-poseidon", R"DOC(
803  The same value can be calculated with the more generic variable `tanLambdaErr`,
804  so replace the current call with ``daughter(i, tanLambdaErr)``.)DOC");
805 
807  REGISTER_VARIABLE("V0d0(id)", v0DaughterD0,
808  "Return the d0 impact parameter of a V0's daughter with daughterID index with the V0 vertex point as a pivot for the track.");
809  REGISTER_VARIABLE("V0Deltad0", v0DaughterD0Diff,
810  "Return the difference between d0 impact parameters of V0's daughters with the V0 vertex point as a pivot for the track.");
811  REGISTER_VARIABLE("V0z0(id)", v0DaughterZ0,
812  "Return the z0 impact parameter of a V0's daughter with daughterID index with the V0 vertex point as a pivot for the track.");
813  REGISTER_VARIABLE("V0Deltaz0", v0DaughterZ0Diff,
814  "Return the difference between z0 impact parameters of V0's daughters with the V0 vertex point as a pivot for the track.");
815 
817  REGISTER_VARIABLE("v0DaughterD0PullWithTrueVertexAsPivot(i)", v0DaughterHelixWithTrueVertexAsPivotD0Pull,
818  "d0 pull of the i-th daughter track with the true V0 vertex as the track pivot");
819  REGISTER_VARIABLE("v0DaughterPhi0PullWithTrueVertexAsPivot(i)", v0DaughterHelixWithTrueVertexAsPivotPhi0Pull,
820  "phi0 pull of the i-th daughter track with the true V0 vertex as the track pivot");
821  REGISTER_VARIABLE("v0DaughterOmegaPullWithTrueVertexAsPivot(i)", v0DaughterHelixWithTrueVertexAsPivotOmegaPull,
822  "omega pull of the i-th daughter track with the true V0 vertex as the track pivot");
823  REGISTER_VARIABLE("v0DaughterZ0PullWithTrueVertexAsPivot(i)", v0DaughterHelixWithTrueVertexAsPivotZ0Pull,
824  "z0 pull of the i-th daughter track with the true V0 vertex as the track pivot");
825  REGISTER_VARIABLE("v0DaughterTanLambdaPullWithTrueVertexAsPivot(i)", v0DaughterHelixWithTrueVertexAsPivotTanLambdaPull,
826  "tan(lambda) pull of the i-th daughter track with the true V0 vertex as the track pivot");
828  REGISTER_VARIABLE("v0DaughterD0PullWithOriginAsPivot(i)", v0DaughterHelixWithOriginAsPivotD0Pull,
829  "d0 pull of the i-th daughter track with the origin as the track pivot");
830  MAKE_DEPRECATED("v0DaughterD0PullWithOriginAsPivot(i)", false, "light-2104-poseidon", R"DOC(
831  The same value can be calculated with the more generic variable `d0Pull`,
832  so replace the current call with ``daughter(i, d0Pull)``.)DOC");
833  REGISTER_VARIABLE("v0DaughterPhi0PullWithOriginAsPivot(i)", v0DaughterHelixWithOriginAsPivotPhi0Pull,
834  "phi0 pull of the i-th daughter track with the origin as the track pivot");
835  MAKE_DEPRECATED("v0DaughterPhi0PullWithOriginAsPivot(i)", false, "light-2104-poseidon", R"DOC(
836  The same value can be calculated with the more generic variable `phi0Pull`,
837  so replace the current call with ``daughter(i, phi0Pull)``.)DOC");
838  REGISTER_VARIABLE("v0DaughterOmegaPullWithOriginAsPivot(i)", v0DaughterHelixWithOriginAsPivotOmegaPull,
839  "omega pull of the i-th daughter track with the origin as the track pivot");
840  MAKE_DEPRECATED("v0DaughterOmegaPullWithOriginAsPivot(i)", false, "light-2104-poseidon", R"DOC(
841  The same value can be calculated with the more generic variable `omegaPull`,
842  so replace the current call with ``daughter(i, omegaPull)``.)DOC");
843  REGISTER_VARIABLE("v0DaughterZ0PullWithOriginAsPivot(i)", v0DaughterHelixWithOriginAsPivotZ0Pull,
844  "z0 pull of the i-th daughter track with the origin as the track pivot");
845  MAKE_DEPRECATED("v0DaughterZ0PullWithOriginAsPivot(i)", false, "light-2104-poseidon", R"DOC(
846  The same value can be calculated with the more generic variable `z0Pull`,
847  so replace the current call with ``daughter(i, z0Pull)``.)DOC");
848  REGISTER_VARIABLE("v0DaughterTanLambdaPullWithOriginAsPivot(i)", v0DaughterHelixWithOriginAsPivotTanLambdaPull,
849  "tan(lambda) pull of the i-th daughter track with the origin as the track pivot");
850  MAKE_DEPRECATED("v0DaughterTanLambdaPullWithOriginAsPivot(i)", false, "light-2104-poseidon", R"DOC(
851  The same value can be calculated with the more generic variable `tanLambdaPull`,
852  so replace the current call with ``daughter(i, tanLambdaPull)``.)DOC");
854  REGISTER_VARIABLE("v0DaughterTau(i,j)", v0DaughterTrackParam5AtIPPerigee,
855  "j-th track parameter (at IP perigee) of the i-th daughter track. "
856  "j: 0:d0, 1:phi0, 2:omega, 3:z0, 4:tanLambda");
857  REGISTER_VARIABLE("v0DaughterCov(i,j)", v0DaughterTrackParamCov5x5AtIPPerigee,
858  "j-th element of the 15 covariance matrix elements (at IP perigee) of the i-th daughter track. "
859  "(0,0), (0,1) ... (1,1), (1,2) ... (2,2) ...");
861  REGISTER_VARIABLE("convertedPhotonInvariantMass(i,j)", convertedPhotonInvariantMass,
862  "Invariant mass of the i-j daughter system as defined in https://indico.belle2.org/event/3644/contributions/18622/attachments/9401/14443/Photon_vertexin_B2GM.pdf, assuming it's a converted photon");
863  REGISTER_VARIABLE("convertedPhotonDelTanLambda(i,j)", convertedPhotonDelTanLambda,
864  "Discriminating variable Delta-TanLambda calculated for daughters (i,j) as defined in https://indico.belle2.org/event/3644/contributions/18622/attachments/9401/14443/Photon_vertexin_B2GM.pdf, assuming it's a converted photon");
865  REGISTER_VARIABLE("convertedPhotonDelR(i,j)", convertedPhotonDelR,
866  "Discriminating variable Delta-R calculated for daughters (i,j) as defined in https://indico.belle2.org/event/3644/contributions/18622/attachments/9401/14443/Photon_vertexin_B2GM.pdf, assuming it's a converted photon");
867  REGISTER_VARIABLE("convertedPhotonDelZ(i,j)", convertedPhotonDelZ,
868  "Discriminating variable Delta-Z calculated for daughters (i,j) as defined in https://indico.belle2.org/event/3644/contributions/18622/attachments/9401/14443/Photon_vertexin_B2GM.pdf, assuming it's a converted photon");
869  REGISTER_VARIABLE("convertedPhotonX(i,j)", convertedPhotonX,
870  "Estimate of vertex X coordinate calculated for daughters (i,j) as defined in https://indico.belle2.org/event/3644/contributions/18622/attachments/9401/14443/Photon_vertexin_B2GM.pdf, assuming it's a converted photon");
871  REGISTER_VARIABLE("convertedPhotonY(i,j)", convertedPhotonY,
872  "Estimate of vertex Y coordinate calculated for daughters (i,j) as defined in https://indico.belle2.org/event/3644/contributions/18622/attachments/9401/14443/Photon_vertexin_B2GM.pdf, assuming it's a converted photon");
873  REGISTER_VARIABLE("convertedPhotonZ(i,j)", convertedPhotonZ,
874  "Estimate of vertex Z coordinate calculated for daughters (i,j) as defined in https://indico.belle2.org/event/3644/contributions/18622/attachments/9401/14443/Photon_vertexin_B2GM.pdf, assuming it's a converted photon");
875  REGISTER_VARIABLE("convertedPhotonRho(i,j)", convertedPhotonRho,
876  "Estimate of vertex Rho calculated for daughters (i,j) as defined in https://indico.belle2.org/event/3644/contributions/18622/attachments/9401/14443/Photon_vertexin_B2GM.pdf, assuming it's a converted photon");
877  REGISTER_VARIABLE("convertedPhotonPx(i,j)", convertedPhotonPx,
878  "Estimate of x-component of photon momentum calculated for daughters (i,j) as defined in https://indico.belle2.org/event/3644/contributions/18622/attachments/9401/14443/Photon_vertexin_B2GM.pdf, assuming it's a converted photon");
879  REGISTER_VARIABLE("convertedPhotonPy(i,j)", convertedPhotonPy,
880  "Estimate of y-component of photon momentum calculated for daughters (i,j) as defined in https://indico.belle2.org/event/3644/contributions/18622/attachments/9401/14443/Photon_vertexin_B2GM.pdf, assuming it's a converted photon");
881  REGISTER_VARIABLE("convertedPhotonPz(i,j)", convertedPhotonPz,
882  "Estimate of z-component of photon momentum calculated for daughters (i,j) as defined in https://indico.belle2.org/event/3644/contributions/18622/attachments/9401/14443/Photon_vertexin_B2GM.pdf, assuming it's a converted photon");
884  REGISTER_VARIABLE("v0DaughtersShare1stHit", v0DaughtersShareInnermostHit,
885  "flag for V0 daughters sharing the first(innermost) VXD hit. 0x1(0x2) bit represents V/z(U/r-phi)-hit share.");
886  REGISTER_VARIABLE("v0DaughtersShare1stUHit", v0DaughtersShareInnermostHit,
887  "flag for V0 daughters sharing the first(innermost) VXD U-side hit.");
888  REGISTER_VARIABLE("v0DaughtersShare1stVHit", v0DaughtersShareInnermostHit,
889  "flag for V0 daughters sharing the first(innermost) VXD V-side hit.");
890  }
892 }
#define MAKE_DEPRECATED(name, make_fatal, version, description)
Registers a variable as deprecated.
Definition: Manager.h:345
Abstract base class for different kinds of events.