Belle II Software  release-05-01-25
EventShapeVariables.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Umberto Tamponi (tamponi@to.infn.it) *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <analysis/VariableManager/Manager.h>
12 #include <analysis/dataobjects/Particle.h>
13 #include <analysis/dataobjects/EventShapeContainer.h>
14 
15 #include <analysis/utility/ReferenceFrame.h>
16 
17 #include <framework/logging/Logger.h>
18 #include <framework/datastore/StoreObjPtr.h>
19 
20 #include <TLorentzVector.h>
21 #include <TVectorF.h>
22 #include <TVector3.h>
23 
24 #include <boost/algorithm/string.hpp>
25 
26 namespace Belle2 {
31  namespace Variable {
32 
33  Manager::FunctionPtr foxWolframR(const std::vector<std::string>& arguments)
34  {
35  if (arguments.size() < 1) {
36  B2ERROR("foxWolframR cannot be called without providing the moment order");
37  return nullptr;
38  }
39 
40  int order = std::stoi(arguments[0]);
41 
42  if (order < 0 || order > 8) {
43  B2ERROR("The Fox-Wolfram moment order must be within 0 and 8.");
44  return nullptr;
45  }
46 
47  auto func = [order](const Particle*) -> double{
48 
49  StoreObjPtr<EventShapeContainer> evtShapeCont;
50  if (!evtShapeCont)
51  {
52  B2ERROR("No EventShapeContainer object has been found in the datastore");
53  return std::numeric_limits<float>::quiet_NaN();
54  }
55  if (evtShapeCont->getFWMoment(0) == 0)
56  {
57  B2ERROR("The 0th-order FoxWolfram moment is zero");
58  return std::numeric_limits<float>::quiet_NaN();
59  }
60  return evtShapeCont->getFWMoment(order) / evtShapeCont->getFWMoment(0);
61  };
62  return func;
63  }
64 
65 
66 
67  Manager::FunctionPtr foxWolframH(const std::vector<std::string>& arguments)
68  {
69  if (arguments.size() < 1) {
70  B2ERROR("foxWolframH cannot be called without providing the moment order");
71  return nullptr;
72  }
73 
74  int order = std::stoi(arguments[0]);
75 
76  if (order < 0 || order > 8) {
77  B2ERROR("The Fox-Wolfram moment order must be within 0 and 8.");
78  return nullptr;
79  }
80 
81  auto func = [order](const Particle*) -> double{
82 
83  StoreObjPtr<EventShapeContainer> evtShapeCont;
84  if (!evtShapeCont)
85  {
86  B2ERROR("No EventShapeContainer object has been found in the datastore");
87  return std::numeric_limits<float>::quiet_NaN();
88  }
89  return evtShapeCont->getFWMoment(order);
90  };
91  return func;
92  }
93 
94 
95 
96  Manager::FunctionPtr harmonicMoment(const std::vector<std::string>& arguments)
97  {
98  if (arguments.size() < 2) {
99  B2ERROR("harmonicMoment requires two arguments: the harmonic order (0-8) and the reference axis name (thrust or collision)");
100  return nullptr;
101  }
102 
103  int order = std::stoi(arguments[0]);
104  std::string axisName = arguments[1];
105  boost::to_lower(axisName);
106 
107  if (order < 0 || order > 8) {
108  B2ERROR("The Fox-Wolfram moment order must be within 0 and 8.");
109  return nullptr;
110  }
111  if (axisName != "thrust" && axisName != "collision") {
112  B2ERROR("Invalid axis name " << arguments[1] << ". The valid options are thrust and collision");
113  return nullptr;
114  }
115 
116  auto func = [order, axisName](const Particle*) -> double{
117  StoreObjPtr<EventShapeContainer> evtShapeCont;
118  if (!evtShapeCont)
119  {
120  B2ERROR("No EventShapeContainer object has been found in the datastore");
121  return std::numeric_limits<float>::quiet_NaN();
122  }
123  if (axisName == "thrust")
124  return evtShapeCont->getHarmonicMomentThrust(order);
125  else
126  return evtShapeCont->getHarmonicMomentCollision(order);
127  };
128  return func;
129  }
130 
131 
132  Manager::FunctionPtr cleoCone(const std::vector<std::string>& arguments)
133  {
134  if (arguments.size() < 2) {
135  B2ERROR("cleoCone requires two arguments: the cone order (0-9) and the reference axis name (thrust or collision)");
136  return nullptr;
137  }
138 
139  int order = std::stoi(arguments[0]);
140  std::string axisName = arguments[1];
141  boost::to_lower(axisName);
142 
143  if (order < 0 || order > 8) {
144  B2ERROR("The CLEO cone order must be within 0 and 9.");
145  return nullptr;
146  }
147  if (axisName != "thrust" && axisName != "collision") {
148  B2ERROR("Invalid axis name " << arguments[1] << ". The valid options are thrust and collision");
149  return nullptr;
150  }
151 
152  auto func = [order, axisName](const Particle*) -> double{
153  StoreObjPtr<EventShapeContainer> evtShapeCont;
154  if (!evtShapeCont)
155  {
156  B2ERROR("No EventShapeContainer object has been found in the datastore");
157  return std::numeric_limits<float>::quiet_NaN();
158  }
159  if (axisName == "thrust")
160  return evtShapeCont->getCleoConeThrust(order);
161  else
162  return evtShapeCont->getCleoConeCollision(order);
163  };
164  return func;
165  }
166 
167 
168 
169  double foxWolframR1(const Particle*)
170  {
171  StoreObjPtr<EventShapeContainer> evtShapeCont;
172  if (!evtShapeCont) {
173  B2ERROR("No EventShapeContainer object has been found in the datastore");
174  return std::numeric_limits<float>::quiet_NaN();
175  }
176  if (evtShapeCont->getFWMoment(0) == 0) {
177  B2ERROR("The 0th-order FoxWolfram moment is zero");
178  return std::numeric_limits<float>::quiet_NaN();
179  }
180  return evtShapeCont->getFWMoment(1) / evtShapeCont->getFWMoment(0);
181  }
182 
183  double foxWolframR2(const Particle*)
184  {
185  StoreObjPtr<EventShapeContainer> evtShapeCont;
186  if (!evtShapeCont) {
187  B2ERROR("No EventShapeContainer object has been found in the datastore");
188  return std::numeric_limits<float>::quiet_NaN();
189  }
190  if (evtShapeCont->getFWMoment(0) == 0) {
191  B2ERROR("The 0th-order FoxWolfram moment is zero");
192  return std::numeric_limits<float>::quiet_NaN();
193  }
194  return evtShapeCont->getFWMoment(2) / evtShapeCont->getFWMoment(0);
195  }
196 
197  double foxWolframR3(const Particle*)
198  {
199  StoreObjPtr<EventShapeContainer> evtShapeCont;
200  if (!evtShapeCont) {
201  B2ERROR("No EventShapeContainer object has been found in the datastore");
202  return std::numeric_limits<float>::quiet_NaN();
203  }
204  if (evtShapeCont->getFWMoment(0) == 0) {
205  B2ERROR("The 0th-order FoxWolfram moment is zero");
206  return std::numeric_limits<float>::quiet_NaN();
207  }
208  return evtShapeCont->getFWMoment(3) / evtShapeCont->getFWMoment(0);
209  }
210 
211  double foxWolframR4(const Particle*)
212  {
213  StoreObjPtr<EventShapeContainer> evtShapeCont;
214  if (!evtShapeCont) {
215  B2ERROR("No EventShapeContainer object has been found in the datastore");
216  return std::numeric_limits<float>::quiet_NaN();
217  }
218  if (evtShapeCont->getFWMoment(0) == 0) {
219  B2ERROR("The 0th-order FoxWolfram moment is zero");
220  return std::numeric_limits<float>::quiet_NaN();
221  }
222  return evtShapeCont->getFWMoment(4) / evtShapeCont->getFWMoment(0);
223  }
224 
225 
226  double harmonicMomentThrust0(const Particle*)
227  {
228  StoreObjPtr<EventShapeContainer> evtShapeCont;
229  if (!evtShapeCont) {
230  B2ERROR("No EventShapeContainer object has been found in the datastore");
231  return std::numeric_limits<float>::quiet_NaN();
232  }
233  return evtShapeCont->getHarmonicMomentThrust(0);
234  }
235 
236  double harmonicMomentThrust1(const Particle*)
237  {
238  StoreObjPtr<EventShapeContainer> evtShapeCont;
239  if (!evtShapeCont) {
240  B2ERROR("No EventShapeContainer object has been found in the datastore");
241  return std::numeric_limits<float>::quiet_NaN();
242  }
243  return evtShapeCont->getHarmonicMomentThrust(1);
244  }
245 
246  double harmonicMomentThrust2(const Particle*)
247  {
248  StoreObjPtr<EventShapeContainer> evtShapeCont;
249  if (!evtShapeCont) {
250  B2ERROR("No EventShapeContainer object has been found in the datastore");
251  return std::numeric_limits<float>::quiet_NaN();
252  }
253  return evtShapeCont->getHarmonicMomentThrust(2);
254  }
255 
256  double harmonicMomentThrust3(const Particle*)
257  {
258  StoreObjPtr<EventShapeContainer> evtShapeCont;
259  if (!evtShapeCont) {
260  B2ERROR("No EventShapeContainer object has been found in the datastore");
261  return std::numeric_limits<float>::quiet_NaN();
262  }
263  return evtShapeCont->getHarmonicMomentThrust(3);
264  }
265 
266  double harmonicMomentThrust4(const Particle*)
267  {
268  StoreObjPtr<EventShapeContainer> evtShapeCont;
269  if (!evtShapeCont) {
270  B2ERROR("No EventShapeContainer object has been found in the datastore");
271  return std::numeric_limits<float>::quiet_NaN();
272  }
273  return evtShapeCont->getHarmonicMomentThrust(4);
274  }
275 
276 
277  double cleoConeThrust0(const Particle*)
278  {
279  StoreObjPtr<EventShapeContainer> evtShapeCont;
280  if (!evtShapeCont) {
281  B2ERROR("No EventShapeContainer object has been found in the datastore");
282  return std::numeric_limits<float>::quiet_NaN();
283  }
284  return evtShapeCont->getCleoConeThrust(0);
285  }
286 
287  double cleoConeThrust1(const Particle*)
288  {
289  StoreObjPtr<EventShapeContainer> evtShapeCont;
290  if (!evtShapeCont) {
291  B2ERROR("No EventShapeContainer object has been found in the datastore");
292  return std::numeric_limits<float>::quiet_NaN();
293  }
294  return evtShapeCont->getCleoConeThrust(1);
295  }
296 
297  double cleoConeThrust2(const Particle*)
298  {
299  StoreObjPtr<EventShapeContainer> evtShapeCont;
300  if (!evtShapeCont) {
301  B2ERROR("No EventShapeContainer object has been found in the datastore");
302  return std::numeric_limits<float>::quiet_NaN();
303  }
304  return evtShapeCont->getCleoConeThrust(2);
305  }
306 
307  double cleoConeThrust3(const Particle*)
308  {
309  StoreObjPtr<EventShapeContainer> evtShapeCont;
310  if (!evtShapeCont) {
311  B2ERROR("No EventShapeContainer object has been found in the datastore");
312  return std::numeric_limits<float>::quiet_NaN();
313  }
314  return evtShapeCont->getCleoConeThrust(3);
315  }
316 
317  double cleoConeThrust4(const Particle*)
318  {
319  StoreObjPtr<EventShapeContainer> evtShapeCont;
320  if (!evtShapeCont) {
321  B2ERROR("No EventShapeContainer object has been found in the datastore");
322  return std::numeric_limits<float>::quiet_NaN();
323  }
324  return evtShapeCont->getCleoConeThrust(4);
325  }
326 
327  double cleoConeThrust5(const Particle*)
328  {
329  StoreObjPtr<EventShapeContainer> evtShapeCont;
330  if (!evtShapeCont) {
331  B2ERROR("No EventShapeContainer object has been found in the datastore");
332  return std::numeric_limits<float>::quiet_NaN();
333  }
334  return evtShapeCont->getCleoConeThrust(5);
335  }
336 
337  double cleoConeThrust6(const Particle*)
338  {
339  StoreObjPtr<EventShapeContainer> evtShapeCont;
340  if (!evtShapeCont) {
341  B2ERROR("No EventShapeContainer object has been found in the datastore");
342  return std::numeric_limits<float>::quiet_NaN();
343  }
344  return evtShapeCont->getCleoConeThrust(6);
345  }
346 
347  double cleoConeThrust7(const Particle*)
348  {
349  StoreObjPtr<EventShapeContainer> evtShapeCont;
350  if (!evtShapeCont) {
351  B2ERROR("No EventShapeContainer object has been found in the datastore");
352  return std::numeric_limits<float>::quiet_NaN();
353  }
354  return evtShapeCont->getCleoConeThrust(7);
355  }
356 
357  double cleoConeThrust8(const Particle*)
358  {
359  StoreObjPtr<EventShapeContainer> evtShapeCont;
360  if (!evtShapeCont) {
361  B2ERROR("No EventShapeContainer object has been found in the datastore");
362  return std::numeric_limits<float>::quiet_NaN();
363  }
364  return evtShapeCont->getCleoConeThrust(8);
365  }
366 
367 
368  double sphericity(const Particle*)
369  {
370  StoreObjPtr<EventShapeContainer> evtShapeCont;
371  if (!evtShapeCont) {
372  B2ERROR("No EventShapeContainer object has been found in the datastore");
373  return std::numeric_limits<float>::quiet_NaN();
374  }
375  // (3/2)(lamda_2 + lambda_3)
376  return 1.5 * (evtShapeCont->getSphericityEigenvalue(1) + evtShapeCont->getSphericityEigenvalue(2)) ;
377  }
378 
379  double aplanarity(const Particle*)
380  {
381  StoreObjPtr<EventShapeContainer> evtShapeCont;
382  if (!evtShapeCont) {
383  B2ERROR("No EventShapeContainer object has been found in the datastore");
384  return std::numeric_limits<float>::quiet_NaN();
385  }
386  // (3/2)(lambda_3)
387  return 1.5 * evtShapeCont->getSphericityEigenvalue(2);
388  }
389 
390  double forwardHemisphereMass(const Particle*)
391  {
392  StoreObjPtr<EventShapeContainer> evtShapeCont;
393  if (!evtShapeCont) {
394  B2ERROR("No EventShapeContainer object has been found in the datastore");
395  return std::numeric_limits<float>::quiet_NaN();
396  }
397  return evtShapeCont->getForwardHemisphere4Momentum().Mag();
398  }
399 
400  double forwardHemisphereX(const Particle*)
401  {
402  StoreObjPtr<EventShapeContainer> evtShapeCont;
403  if (!evtShapeCont) {
404  B2ERROR("No EventShapeContainer object has been found in the datastore");
405  return std::numeric_limits<float>::quiet_NaN();
406  }
407  return evtShapeCont->getForwardHemisphere4Momentum().Vect().X();
408  }
409 
410  double forwardHemisphereY(const Particle*)
411  {
412  StoreObjPtr<EventShapeContainer> evtShapeCont;
413  if (!evtShapeCont) {
414  B2ERROR("No EventShapeContainer object has been found in the datastore");
415  return std::numeric_limits<float>::quiet_NaN();
416  }
417  return evtShapeCont->getForwardHemisphere4Momentum().Vect().Y();
418  }
419 
420  double forwardHemisphereZ(const Particle*)
421  {
422  StoreObjPtr<EventShapeContainer> evtShapeCont;
423  if (!evtShapeCont) {
424  B2ERROR("No EventShapeContainer object has been found in the datastore");
425  return std::numeric_limits<float>::quiet_NaN();
426  }
427  return evtShapeCont->getForwardHemisphere4Momentum().Vect().Z();
428  }
429 
430  double forwardHemisphereMomentum(const Particle*)
431  {
432  StoreObjPtr<EventShapeContainer> evtShapeCont;
433  if (!evtShapeCont) {
434  B2ERROR("No EventShapeContainer object has been found in the datastore");
435  return std::numeric_limits<float>::quiet_NaN();
436  }
437  return evtShapeCont->getForwardHemisphere4Momentum().Vect().Mag();
438  }
439 
440  double forwardHemisphereEnergy(const Particle*)
441  {
442  StoreObjPtr<EventShapeContainer> evtShapeCont;
443  if (!evtShapeCont) {
444  B2ERROR("No EventShapeContainer object has been found in the datastore");
445  return std::numeric_limits<float>::quiet_NaN();
446  }
447  return evtShapeCont->getForwardHemisphere4Momentum().E();
448  }
449 
450 
451 
452 
453  double backwardHemisphereMass(const Particle*)
454  {
455  StoreObjPtr<EventShapeContainer> evtShapeCont;
456  if (!evtShapeCont) {
457  B2ERROR("No EventShapeContainer object has been found in the datastore");
458  return std::numeric_limits<float>::quiet_NaN();
459  }
460  return evtShapeCont->getBackwardHemisphere4Momentum().Mag();
461  }
462 
463 
464  double backwardHemisphereX(const Particle*)
465  {
466  StoreObjPtr<EventShapeContainer> evtShapeCont;
467  if (!evtShapeCont) {
468  B2ERROR("No EventShapeContainer object has been found in the datastore");
469  return std::numeric_limits<float>::quiet_NaN();
470  }
471  return evtShapeCont->getBackwardHemisphere4Momentum().Vect().X();
472  }
473 
474  double backwardHemisphereY(const Particle*)
475  {
476  StoreObjPtr<EventShapeContainer> evtShapeCont;
477  if (!evtShapeCont) {
478  B2ERROR("No EventShapeContainer object has been found in the datastore");
479  return std::numeric_limits<float>::quiet_NaN();
480  }
481  return evtShapeCont->getBackwardHemisphere4Momentum().Vect().Y();
482  }
483 
484  double backwardHemisphereZ(const Particle*)
485  {
486  StoreObjPtr<EventShapeContainer> evtShapeCont;
487  if (!evtShapeCont) {
488  B2ERROR("No EventShapeContainer object has been found in the datastore");
489  return std::numeric_limits<float>::quiet_NaN();
490  }
491  return evtShapeCont->getBackwardHemisphere4Momentum().Vect().Z();
492  }
493 
494  double backwardHemisphereMomentum(const Particle*)
495  {
496  StoreObjPtr<EventShapeContainer> evtShapeCont;
497  if (!evtShapeCont) {
498  B2ERROR("No EventShapeContainer object has been found in the datastore");
499  return std::numeric_limits<float>::quiet_NaN();
500  }
501  return evtShapeCont->getBackwardHemisphere4Momentum().Vect().Mag();
502  }
503 
504  double backwardHemisphereEnergy(const Particle*)
505  {
506  StoreObjPtr<EventShapeContainer> evtShapeCont;
507  if (!evtShapeCont) {
508  B2ERROR("No EventShapeContainer object has been found in the datastore");
509  return std::numeric_limits<float>::quiet_NaN();
510  }
511  return evtShapeCont->getBackwardHemisphere4Momentum().E();
512  }
513 
514 
515 
516 
517 
518  double thrust(const Particle*)
519  {
520  StoreObjPtr<EventShapeContainer> evtShapeCont;
521  if (!evtShapeCont) {
522  B2ERROR("No EventShapeContainer object has been found in the datastore");
523  return std::numeric_limits<float>::quiet_NaN();
524  }
525  return evtShapeCont->getThrust();
526  }
527 
528 
529  double thrustAxisX(const Particle*)
530  {
531  StoreObjPtr<EventShapeContainer> evtShapeCont;
532  if (!evtShapeCont) {
533  B2ERROR("No EventShapeContainer object has been found in the datastore");
534  return std::numeric_limits<float>::quiet_NaN();
535  }
536  return evtShapeCont->getThrustAxis().X();
537  }
538 
539  double thrustAxisY(const Particle*)
540  {
541  StoreObjPtr<EventShapeContainer> evtShapeCont;
542  if (!evtShapeCont) {
543  B2ERROR("No EventShapeContainer object has been found in the datastore");
544  return std::numeric_limits<float>::quiet_NaN();
545  }
546  return evtShapeCont->getThrustAxis().Y();
547  }
548 
549  double thrustAxisZ(const Particle*)
550  {
551  StoreObjPtr<EventShapeContainer> evtShapeCont;
552  if (!evtShapeCont) {
553  B2ERROR("No EventShapeContainer object has been found in the datastore");
554  return std::numeric_limits<float>::quiet_NaN();
555  }
556  return evtShapeCont->getThrustAxis().Z();
557  }
558 
559 
560  double thrustAxisCosTheta(const Particle*)
561  {
562  StoreObjPtr<EventShapeContainer> evtShapeCont;
563  if (!evtShapeCont) {
564  B2ERROR("No EventShapeContainer object has been found in the datastore");
565  return std::numeric_limits<float>::quiet_NaN();
566  }
567  return evtShapeCont->getThrustAxis().CosTheta();
568  }
569 
570 
571  Manager::FunctionPtr useThrustFrame(const std::vector<std::string>& arguments)
572  {
573  if (arguments.size() == 1) {
574  auto variableName = arguments[0];
575 
576  const Variable::Manager::Var* var = Manager::Instance().getVariable(variableName);
577 
578  auto func = [var](const Particle * particle) -> double {
579  StoreObjPtr<EventShapeContainer> evtShapeCont;
580  if (!evtShapeCont)
581  {
582  B2ERROR("No EventShapeContainer object has been found in the datastore");
583  return std::numeric_limits<float>::quiet_NaN();
584  }
585 
586  TVector3 newZ = evtShapeCont->getThrustAxis();
587  TVector3 newY(0, 0, 0);
588  if (newZ(2) == 0 and newZ(1) == 0)
589  newY(0) = 1;
590  else{
591  newY(1) = newZ(2);
592  newY(2) = -newZ(1);
593  }
594  TVector3 newX = newY.Cross(newZ);
595 
596  UseReferenceFrame<CMSRotationFrame> signalframe(newX, newY, newZ);
597 
598  return var->function(particle);
599  };
600  return func;
601  } else {
602  B2FATAL("Wrong number of arguments for meta function useThrustFrame. It only takes one argument, the variable name.");
603  }
604  }
605 
606 
607  VARIABLE_GROUP("EventShape");
608 
609  REGISTER_VARIABLE("foxWolframR(i)", foxWolframR,
610  "[Eventbased] ratio of the i-th to the 0-th order Fox Wolfram moments. The order can go up to 8th.");
611  REGISTER_VARIABLE("foxWolframH(i)", foxWolframH, "[Eventbased] i-th order Fox Wolfram moment. The order can go up to 8th.");
612  REGISTER_VARIABLE("harmonicMoment(i, axisName)", harmonicMoment,
613  "[Eventbased] i-th order harmonic moment, calculated respect to the axis axisName. The order can go up to 8th., the axisName can be either 'thrust' or 'collision'");
614  REGISTER_VARIABLE("cleoCone(i, axisName)", cleoCone,
615  "[Eventbased] i-th order cleoCone, calculated respect to the axis axisName. The order can go up to 9th., the axisName can be either 'thrust' or 'collision'");
616  REGISTER_VARIABLE("useThrustFrame(variable)", useThrustFrame, "Evaluates a variable value in the thrust reference frame.");
617 
618 
619  REGISTER_VARIABLE("foxWolframR1", foxWolframR1,
620  "[Eventbased] ratio of the 1-st to the 0-th order Fox Wolfram moments. This is just an alias of foxWolframR(1) defined for the user's covenience.");
621  REGISTER_VARIABLE("foxWolframR2", foxWolframR2,
622  "[Eventbased] ratio of the 2-nd to the 0-th order Fox Wolfram moments. This is just an alias of foxWolframR(2) defined for the user's covenience.");
623  REGISTER_VARIABLE("foxWolframR3", foxWolframR3,
624  "[Eventbased] ratio of the 3-rd to the 0-th order Fox Wolfram moments. This is just an alias of foxWolframR(3) defined for the user's covenience.");
625  REGISTER_VARIABLE("foxWolframR4", foxWolframR4,
626  "[Eventbased] ratio of the 4-th to the 0-th order Fox Wolfram moments. This is just an alias of foxWolframR(4) defined for the user's covenience.");
627 
628  REGISTER_VARIABLE("harmonicMomentThrust0", harmonicMomentThrust0,
629  "[Eventbased] Harmonic moment of the 0th order calculated respect to the thrust axis.");
630  REGISTER_VARIABLE("harmonicMomentThrust1", harmonicMomentThrust1,
631  "[Eventbased] Harmonic moment of the 1st order calculated respect to the thrust axis.");
632  REGISTER_VARIABLE("harmonicMomentThrust2", harmonicMomentThrust2,
633  "[Eventbased] Harmonic moment of the 2nd order calculated respect to the thrust axis.");
634  REGISTER_VARIABLE("harmonicMomentThrust3", harmonicMomentThrust3,
635  "[Eventbased] Harmonic moment of the 3rd order calculated respect to the thrust axis.");
636  REGISTER_VARIABLE("harmonicMomentThrust4", harmonicMomentThrust4,
637  "[Eventbased] Harmonic moment of the 4th order calculated respect to the thrust axis.");
638 
639  REGISTER_VARIABLE("cleoConeThrust0", cleoConeThrust0,
640  "[Eventbased] 0th Cleo cone calculated respect to the thrust axis.");
641  REGISTER_VARIABLE("cleoConeThrust1", cleoConeThrust1,
642  "[Eventbased] 1st Cleo cone calculated respect to the thrust axis.");
643  REGISTER_VARIABLE("cleoConeThrust2", cleoConeThrust2,
644  "[Eventbased] 2nd Cleo cone calculated respect to the thrust axis.");
645  REGISTER_VARIABLE("cleoConeThrust3", cleoConeThrust3,
646  "[Eventbased] 3rd Cleo cone calculated respect to the thrust axis.");
647  REGISTER_VARIABLE("cleoConeThrust4", cleoConeThrust4,
648  "[Eventbased] 4th Cleo cone calculated respect to the thrust axis.");
649  REGISTER_VARIABLE("cleoConeThrust5", cleoConeThrust5,
650  "[Eventbased] 5th Cleo cone calculated respect to the thrust axis.");
651  REGISTER_VARIABLE("cleoConeThrust6", cleoConeThrust6,
652  "[Eventbased] 6th Cleo cone calculated respect to the thrust axis.");
653  REGISTER_VARIABLE("cleoConeThrust7", cleoConeThrust7,
654  "[Eventbased] 7th Cleo cone calculated respect to the thrust axis.");
655  REGISTER_VARIABLE("cleoConeThrust8", cleoConeThrust8,
656  "[Eventbased] 8th Cleo cone calculated respect to the thrust axis.");
657 
658 
659  REGISTER_VARIABLE("sphericity", sphericity,
660  "[Eventbased] Event sphericity, defined as the linear combination of the sphericity eigenvlaues S = (3/2)(lambda2+lambda3)");
661  REGISTER_VARIABLE("aplanarity", aplanarity,
662  "[Eventbased] Event aplanarity, defined as the 3/2 of the third sphericity eigenvalue.");
663 
664  REGISTER_VARIABLE("thrust", thrust, "[Eventbased] Event thrust.");
665  REGISTER_VARIABLE("thrustAxisX", thrustAxisX, "[Eventbased] X component of the thrust axis.");
666  REGISTER_VARIABLE("thrustAxisY", thrustAxisY, "[Eventbased] Y component of the thrust axis.");
667  REGISTER_VARIABLE("thrustAxisZ", thrustAxisZ, "[Eventbased] Z component of the thrust axis.");
668  REGISTER_VARIABLE("thrustAxisCosTheta", thrustAxisCosTheta, "[Eventbased] Cosine of the polar angle component of the thrust axis.");
669 
670  REGISTER_VARIABLE("forwardHemisphereMass", forwardHemisphereMass,
671  "[Eventbased] Invariant mass of the particles flying in the same direction of the thrust axis.");
672  REGISTER_VARIABLE("forwardHemisphereX", forwardHemisphereX,
673  "[Eventbased] X component of the total momentum of the particles flying in the same direction of the thrust axis");
674  REGISTER_VARIABLE("forwardHemisphereY", forwardHemisphereY,
675  "[Eventbased] Y component of the total momentum of the particles flying in the same direction of the thrust axis");
676  REGISTER_VARIABLE("forwardHemisphereZ", forwardHemisphereZ,
677  "[Eventbased] Z component of the total momentum of the particles flying in the same direction of the thrust axis");
678  REGISTER_VARIABLE("forwardHemisphereMomentum", forwardHemisphereMomentum,
679  "[Eventbased] Total momentum the particles flying in the same direction of the thrust axis.");
680  REGISTER_VARIABLE("forwardHemisphereEnergy", forwardHemisphereEnergy,
681  "[Eventbased] Total energy the particles flying in the same direction of the thrust axis.");
682 
683  REGISTER_VARIABLE("backwardHemisphereMass", backwardHemisphereMass,
684  "[Eventbased] Invariant mass of the particles flying in the direction opposite to the thrust axis.");
685  REGISTER_VARIABLE("backwardHemisphereX", backwardHemisphereX,
686  "[Eventbased] X component of the total momentum of the particles flying in the direciton opposite to the thrust axis");
687  REGISTER_VARIABLE("backwardHemisphereY", backwardHemisphereY,
688  "[Eventbased] Y component of the total momentum of the particles flying in the direction opposite to the thrust axis");
689  REGISTER_VARIABLE("backwardHemisphereZ", backwardHemisphereZ,
690  "[Eventbased] Z component of the total momentum of the particles flying in the direction opposite to the thrust axis");
691  REGISTER_VARIABLE("backwardHemisphereMomentum", backwardHemisphereMomentum,
692  "[Eventbased] Total momentum the particles flying in the direction opposite to the thrust axis.");
693  REGISTER_VARIABLE("backwardHemisphereEnergy", backwardHemisphereEnergy,
694  "[Eventbased] Total energy the particles flying in the direction opposite to the thrust axis.");
695  }
697 }
Belle2::Variable::Manager::getVariable
const Var * getVariable(std::string name)
Get the variable belonging to the given key.
Definition: Manager.cc:33
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::Variable::Manager::FunctionPtr
std::function< double(const Particle *)> FunctionPtr
NOTE: the python interface is documented manually in analysis/doc/Variables.rst (because we use ROOT ...
Definition: Manager.h:118
Belle2::Variable::Manager::Instance
static Manager & Instance()
get singleton instance.
Definition: Manager.cc:27