Belle II Software  release-06-01-15
EventShapeVariables.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 #include <analysis/VariableManager/Manager.h>
10 #include <analysis/dataobjects/Particle.h>
11 #include <analysis/dataobjects/EventShapeContainer.h>
12 
13 #include <analysis/utility/ReferenceFrame.h>
14 
15 #include <framework/logging/Logger.h>
16 #include <framework/datastore/StoreObjPtr.h>
17 #include <framework/utilities/Conversion.h>
18 
19 #include <TLorentzVector.h>
20 #include <TVectorF.h>
21 #include <TVector3.h>
22 
23 #include <boost/algorithm/string.hpp>
24 
25 namespace Belle2 {
30  namespace Variable {
31 
32  Manager::FunctionPtr foxWolframR(const std::vector<std::string>& arguments)
33  {
34  if (arguments.size() != 1) {
35  B2ERROR("foxWolframR cannot be called without providing the moment order");
36  return nullptr;
37  }
38 
39  int order = -1;
40  try {
41  order = Belle2::convertString<int>(arguments[0]);
42  } catch (std::invalid_argument&) {
43  B2ERROR("Argument of foxWolframR must be an integer");
44  return nullptr;
45  }
46 
47  if (order < 0 || order > 8) {
48  B2ERROR("The Fox-Wolfram moment order must be within 0 and 8.");
49  return nullptr;
50  }
51 
52  auto func = [order](const Particle*) -> double{
53 
54  StoreObjPtr<EventShapeContainer> evtShapeCont;
55  if (!evtShapeCont)
56  {
57  B2ERROR("No EventShapeContainer object has been found in the datastore");
58  return std::numeric_limits<float>::quiet_NaN();
59  }
60  if (evtShapeCont->getFWMoment(0) == 0)
61  {
62  B2INFO("The 0th-order FoxWolfram moment is zero");
63  return std::numeric_limits<float>::quiet_NaN();
64  }
65  return evtShapeCont->getFWMoment(order) / evtShapeCont->getFWMoment(0);
66  };
67  return func;
68  }
69 
70 
71 
72  Manager::FunctionPtr foxWolframH(const std::vector<std::string>& arguments)
73  {
74  if (arguments.size() != 1) {
75  B2ERROR("foxWolframH cannot be called without providing the moment order");
76  return nullptr;
77  }
78 
79  int order = -1;
80  try {
81  order = Belle2::convertString<int>(arguments[0]);
82  } catch (std::invalid_argument&) {
83  B2ERROR("Argument of foxWolframH must be an integer");
84  return nullptr;
85  }
86 
87  if (order < 0 || order > 8) {
88  B2ERROR("The Fox-Wolfram moment order must be within 0 and 8.");
89  return nullptr;
90  }
91 
92  auto func = [order](const Particle*) -> double{
93 
94  StoreObjPtr<EventShapeContainer> evtShapeCont;
95  if (!evtShapeCont)
96  {
97  B2ERROR("No EventShapeContainer object has been found in the datastore");
98  return std::numeric_limits<float>::quiet_NaN();
99  }
100  return evtShapeCont->getFWMoment(order);
101  };
102  return func;
103  }
104 
105 
106 
107  Manager::FunctionPtr harmonicMoment(const std::vector<std::string>& arguments)
108  {
109  if (arguments.size() != 2) {
110  B2ERROR("harmonicMoment requires two arguments: the harmonic order (0-8) and the reference axis name (thrust or collision)");
111  return nullptr;
112  }
113 
114  int order = -1;
115  try {
116  order = Belle2::convertString<int>(arguments[0]);
117  } catch (std::invalid_argument&) {
118  B2ERROR("First argument of harmonicMoment must be an integer");
119  return nullptr;
120  }
121  std::string axisName = arguments[1];
122  boost::to_lower(axisName);
123 
124  if (order < 0 || order > 8) {
125  B2ERROR("The Fox-Wolfram moment order must be within 0 and 8.");
126  return nullptr;
127  }
128  if (axisName != "thrust" && axisName != "collision") {
129  B2ERROR("Invalid axis name " << arguments[1] << ". The valid options are thrust and collision");
130  return nullptr;
131  }
132 
133  auto func = [order, axisName](const Particle*) -> double{
134  StoreObjPtr<EventShapeContainer> evtShapeCont;
135  if (!evtShapeCont)
136  {
137  B2ERROR("No EventShapeContainer object has been found in the datastore");
138  return std::numeric_limits<float>::quiet_NaN();
139  }
140  if (axisName == "thrust")
141  return evtShapeCont->getHarmonicMomentThrust(order);
142  else
143  return evtShapeCont->getHarmonicMomentCollision(order);
144  };
145  return func;
146  }
147 
148 
149  Manager::FunctionPtr cleoCone(const std::vector<std::string>& arguments)
150  {
151  if (arguments.size() != 2) {
152  B2ERROR("cleoCone requires two arguments: the cone order (0-9) and the reference axis name (thrust or collision)");
153  return nullptr;
154  }
155 
156  int order = -1;
157  try {
158  order = Belle2::convertString<int>(arguments[0]);
159  } catch (std::invalid_argument&) {
160  B2ERROR("Argument of cleoCone must be an integer");
161  return nullptr;
162  }
163  std::string axisName = arguments[1];
164  boost::to_lower(axisName);
165 
166  if (order < 0 || order > 8) {
167  B2ERROR("The CLEO cone order must be within 0 and 8.");
168  return nullptr;
169  }
170  if (axisName != "thrust" && axisName != "collision") {
171  B2ERROR("Invalid axis name " << arguments[1] << ". The valid options are thrust and collision");
172  return nullptr;
173  }
174 
175  auto func = [order, axisName](const Particle*) -> double{
176  StoreObjPtr<EventShapeContainer> evtShapeCont;
177  if (!evtShapeCont)
178  {
179  B2ERROR("No EventShapeContainer object has been found in the datastore");
180  return std::numeric_limits<float>::quiet_NaN();
181  }
182  if (axisName == "thrust")
183  return evtShapeCont->getCleoConeThrust(order);
184  else
185  return evtShapeCont->getCleoConeCollision(order);
186  };
187  return func;
188  }
189 
190 
191 
192  double foxWolframR1(const Particle*)
193  {
194  StoreObjPtr<EventShapeContainer> evtShapeCont;
195  if (!evtShapeCont) {
196  B2ERROR("No EventShapeContainer object has been found in the datastore");
197  return std::numeric_limits<float>::quiet_NaN();
198  }
199  if (evtShapeCont->getFWMoment(0) == 0) {
200  B2ERROR("The 0th-order FoxWolfram moment is zero");
201  return std::numeric_limits<float>::quiet_NaN();
202  }
203  return evtShapeCont->getFWMoment(1) / evtShapeCont->getFWMoment(0);
204  }
205 
206  double foxWolframR2(const Particle*)
207  {
208  StoreObjPtr<EventShapeContainer> evtShapeCont;
209  if (!evtShapeCont) {
210  B2ERROR("No EventShapeContainer object has been found in the datastore");
211  return std::numeric_limits<float>::quiet_NaN();
212  }
213  if (evtShapeCont->getFWMoment(0) == 0) {
214  B2ERROR("The 0th-order FoxWolfram moment is zero");
215  return std::numeric_limits<float>::quiet_NaN();
216  }
217  return evtShapeCont->getFWMoment(2) / evtShapeCont->getFWMoment(0);
218  }
219 
220  double foxWolframR3(const Particle*)
221  {
222  StoreObjPtr<EventShapeContainer> evtShapeCont;
223  if (!evtShapeCont) {
224  B2ERROR("No EventShapeContainer object has been found in the datastore");
225  return std::numeric_limits<float>::quiet_NaN();
226  }
227  if (evtShapeCont->getFWMoment(0) == 0) {
228  B2ERROR("The 0th-order FoxWolfram moment is zero");
229  return std::numeric_limits<float>::quiet_NaN();
230  }
231  return evtShapeCont->getFWMoment(3) / evtShapeCont->getFWMoment(0);
232  }
233 
234  double foxWolframR4(const Particle*)
235  {
236  StoreObjPtr<EventShapeContainer> evtShapeCont;
237  if (!evtShapeCont) {
238  B2ERROR("No EventShapeContainer object has been found in the datastore");
239  return std::numeric_limits<float>::quiet_NaN();
240  }
241  if (evtShapeCont->getFWMoment(0) == 0) {
242  B2ERROR("The 0th-order FoxWolfram moment is zero");
243  return std::numeric_limits<float>::quiet_NaN();
244  }
245  return evtShapeCont->getFWMoment(4) / evtShapeCont->getFWMoment(0);
246  }
247 
248 
249  double harmonicMomentThrust0(const Particle*)
250  {
251  StoreObjPtr<EventShapeContainer> evtShapeCont;
252  if (!evtShapeCont) {
253  B2ERROR("No EventShapeContainer object has been found in the datastore");
254  return std::numeric_limits<float>::quiet_NaN();
255  }
256  return evtShapeCont->getHarmonicMomentThrust(0);
257  }
258 
259  double harmonicMomentThrust1(const Particle*)
260  {
261  StoreObjPtr<EventShapeContainer> evtShapeCont;
262  if (!evtShapeCont) {
263  B2ERROR("No EventShapeContainer object has been found in the datastore");
264  return std::numeric_limits<float>::quiet_NaN();
265  }
266  return evtShapeCont->getHarmonicMomentThrust(1);
267  }
268 
269  double harmonicMomentThrust2(const Particle*)
270  {
271  StoreObjPtr<EventShapeContainer> evtShapeCont;
272  if (!evtShapeCont) {
273  B2ERROR("No EventShapeContainer object has been found in the datastore");
274  return std::numeric_limits<float>::quiet_NaN();
275  }
276  return evtShapeCont->getHarmonicMomentThrust(2);
277  }
278 
279  double harmonicMomentThrust3(const Particle*)
280  {
281  StoreObjPtr<EventShapeContainer> evtShapeCont;
282  if (!evtShapeCont) {
283  B2ERROR("No EventShapeContainer object has been found in the datastore");
284  return std::numeric_limits<float>::quiet_NaN();
285  }
286  return evtShapeCont->getHarmonicMomentThrust(3);
287  }
288 
289  double harmonicMomentThrust4(const Particle*)
290  {
291  StoreObjPtr<EventShapeContainer> evtShapeCont;
292  if (!evtShapeCont) {
293  B2ERROR("No EventShapeContainer object has been found in the datastore");
294  return std::numeric_limits<float>::quiet_NaN();
295  }
296  return evtShapeCont->getHarmonicMomentThrust(4);
297  }
298 
299 
300  double cleoConeThrust0(const Particle*)
301  {
302  StoreObjPtr<EventShapeContainer> evtShapeCont;
303  if (!evtShapeCont) {
304  B2ERROR("No EventShapeContainer object has been found in the datastore");
305  return std::numeric_limits<float>::quiet_NaN();
306  }
307  return evtShapeCont->getCleoConeThrust(0);
308  }
309 
310  double cleoConeThrust1(const Particle*)
311  {
312  StoreObjPtr<EventShapeContainer> evtShapeCont;
313  if (!evtShapeCont) {
314  B2ERROR("No EventShapeContainer object has been found in the datastore");
315  return std::numeric_limits<float>::quiet_NaN();
316  }
317  return evtShapeCont->getCleoConeThrust(1);
318  }
319 
320  double cleoConeThrust2(const Particle*)
321  {
322  StoreObjPtr<EventShapeContainer> evtShapeCont;
323  if (!evtShapeCont) {
324  B2ERROR("No EventShapeContainer object has been found in the datastore");
325  return std::numeric_limits<float>::quiet_NaN();
326  }
327  return evtShapeCont->getCleoConeThrust(2);
328  }
329 
330  double cleoConeThrust3(const Particle*)
331  {
332  StoreObjPtr<EventShapeContainer> evtShapeCont;
333  if (!evtShapeCont) {
334  B2ERROR("No EventShapeContainer object has been found in the datastore");
335  return std::numeric_limits<float>::quiet_NaN();
336  }
337  return evtShapeCont->getCleoConeThrust(3);
338  }
339 
340  double cleoConeThrust4(const Particle*)
341  {
342  StoreObjPtr<EventShapeContainer> evtShapeCont;
343  if (!evtShapeCont) {
344  B2ERROR("No EventShapeContainer object has been found in the datastore");
345  return std::numeric_limits<float>::quiet_NaN();
346  }
347  return evtShapeCont->getCleoConeThrust(4);
348  }
349 
350  double cleoConeThrust5(const Particle*)
351  {
352  StoreObjPtr<EventShapeContainer> evtShapeCont;
353  if (!evtShapeCont) {
354  B2ERROR("No EventShapeContainer object has been found in the datastore");
355  return std::numeric_limits<float>::quiet_NaN();
356  }
357  return evtShapeCont->getCleoConeThrust(5);
358  }
359 
360  double cleoConeThrust6(const Particle*)
361  {
362  StoreObjPtr<EventShapeContainer> evtShapeCont;
363  if (!evtShapeCont) {
364  B2ERROR("No EventShapeContainer object has been found in the datastore");
365  return std::numeric_limits<float>::quiet_NaN();
366  }
367  return evtShapeCont->getCleoConeThrust(6);
368  }
369 
370  double cleoConeThrust7(const Particle*)
371  {
372  StoreObjPtr<EventShapeContainer> evtShapeCont;
373  if (!evtShapeCont) {
374  B2ERROR("No EventShapeContainer object has been found in the datastore");
375  return std::numeric_limits<float>::quiet_NaN();
376  }
377  return evtShapeCont->getCleoConeThrust(7);
378  }
379 
380  double cleoConeThrust8(const Particle*)
381  {
382  StoreObjPtr<EventShapeContainer> evtShapeCont;
383  if (!evtShapeCont) {
384  B2ERROR("No EventShapeContainer object has been found in the datastore");
385  return std::numeric_limits<float>::quiet_NaN();
386  }
387  return evtShapeCont->getCleoConeThrust(8);
388  }
389 
390 
391  double sphericity(const Particle*)
392  {
393  StoreObjPtr<EventShapeContainer> evtShapeCont;
394  if (!evtShapeCont) {
395  B2ERROR("No EventShapeContainer object has been found in the datastore");
396  return std::numeric_limits<float>::quiet_NaN();
397  }
398  // (3/2)(lamda_2 + lambda_3)
399  return 1.5 * (evtShapeCont->getSphericityEigenvalue(1) + evtShapeCont->getSphericityEigenvalue(2)) ;
400  }
401 
402  double aplanarity(const Particle*)
403  {
404  StoreObjPtr<EventShapeContainer> evtShapeCont;
405  if (!evtShapeCont) {
406  B2ERROR("No EventShapeContainer object has been found in the datastore");
407  return std::numeric_limits<float>::quiet_NaN();
408  }
409  // (3/2)(lambda_3)
410  return 1.5 * evtShapeCont->getSphericityEigenvalue(2);
411  }
412 
413  double forwardHemisphereMass(const Particle*)
414  {
415  StoreObjPtr<EventShapeContainer> evtShapeCont;
416  if (!evtShapeCont) {
417  B2ERROR("No EventShapeContainer object has been found in the datastore");
418  return std::numeric_limits<float>::quiet_NaN();
419  }
420  return evtShapeCont->getForwardHemisphere4Momentum().Mag();
421  }
422 
423  double forwardHemisphereX(const Particle*)
424  {
425  StoreObjPtr<EventShapeContainer> evtShapeCont;
426  if (!evtShapeCont) {
427  B2ERROR("No EventShapeContainer object has been found in the datastore");
428  return std::numeric_limits<float>::quiet_NaN();
429  }
430  return evtShapeCont->getForwardHemisphere4Momentum().Vect().X();
431  }
432 
433  double forwardHemisphereY(const Particle*)
434  {
435  StoreObjPtr<EventShapeContainer> evtShapeCont;
436  if (!evtShapeCont) {
437  B2ERROR("No EventShapeContainer object has been found in the datastore");
438  return std::numeric_limits<float>::quiet_NaN();
439  }
440  return evtShapeCont->getForwardHemisphere4Momentum().Vect().Y();
441  }
442 
443  double forwardHemisphereZ(const Particle*)
444  {
445  StoreObjPtr<EventShapeContainer> evtShapeCont;
446  if (!evtShapeCont) {
447  B2ERROR("No EventShapeContainer object has been found in the datastore");
448  return std::numeric_limits<float>::quiet_NaN();
449  }
450  return evtShapeCont->getForwardHemisphere4Momentum().Vect().Z();
451  }
452 
453  double forwardHemisphereMomentum(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->getForwardHemisphere4Momentum().Vect().Mag();
461  }
462 
463  double forwardHemisphereEnergy(const Particle*)
464  {
465  StoreObjPtr<EventShapeContainer> evtShapeCont;
466  if (!evtShapeCont) {
467  B2ERROR("No EventShapeContainer object has been found in the datastore");
468  return std::numeric_limits<float>::quiet_NaN();
469  }
470  return evtShapeCont->getForwardHemisphere4Momentum().E();
471  }
472 
473 
474 
475 
476  double backwardHemisphereMass(const Particle*)
477  {
478  StoreObjPtr<EventShapeContainer> evtShapeCont;
479  if (!evtShapeCont) {
480  B2ERROR("No EventShapeContainer object has been found in the datastore");
481  return std::numeric_limits<float>::quiet_NaN();
482  }
483  return evtShapeCont->getBackwardHemisphere4Momentum().Mag();
484  }
485 
486 
487  double backwardHemisphereX(const Particle*)
488  {
489  StoreObjPtr<EventShapeContainer> evtShapeCont;
490  if (!evtShapeCont) {
491  B2ERROR("No EventShapeContainer object has been found in the datastore");
492  return std::numeric_limits<float>::quiet_NaN();
493  }
494  return evtShapeCont->getBackwardHemisphere4Momentum().Vect().X();
495  }
496 
497  double backwardHemisphereY(const Particle*)
498  {
499  StoreObjPtr<EventShapeContainer> evtShapeCont;
500  if (!evtShapeCont) {
501  B2ERROR("No EventShapeContainer object has been found in the datastore");
502  return std::numeric_limits<float>::quiet_NaN();
503  }
504  return evtShapeCont->getBackwardHemisphere4Momentum().Vect().Y();
505  }
506 
507  double backwardHemisphereZ(const Particle*)
508  {
509  StoreObjPtr<EventShapeContainer> evtShapeCont;
510  if (!evtShapeCont) {
511  B2ERROR("No EventShapeContainer object has been found in the datastore");
512  return std::numeric_limits<float>::quiet_NaN();
513  }
514  return evtShapeCont->getBackwardHemisphere4Momentum().Vect().Z();
515  }
516 
517  double backwardHemisphereMomentum(const Particle*)
518  {
519  StoreObjPtr<EventShapeContainer> evtShapeCont;
520  if (!evtShapeCont) {
521  B2ERROR("No EventShapeContainer object has been found in the datastore");
522  return std::numeric_limits<float>::quiet_NaN();
523  }
524  return evtShapeCont->getBackwardHemisphere4Momentum().Vect().Mag();
525  }
526 
527  double backwardHemisphereEnergy(const Particle*)
528  {
529  StoreObjPtr<EventShapeContainer> evtShapeCont;
530  if (!evtShapeCont) {
531  B2ERROR("No EventShapeContainer object has been found in the datastore");
532  return std::numeric_limits<float>::quiet_NaN();
533  }
534  return evtShapeCont->getBackwardHemisphere4Momentum().E();
535  }
536 
537 
538 
539 
540 
541  double thrust(const Particle*)
542  {
543  StoreObjPtr<EventShapeContainer> evtShapeCont;
544  if (!evtShapeCont) {
545  B2ERROR("No EventShapeContainer object has been found in the datastore");
546  return std::numeric_limits<float>::quiet_NaN();
547  }
548  return evtShapeCont->getThrust();
549  }
550 
551 
552  double thrustAxisX(const Particle*)
553  {
554  StoreObjPtr<EventShapeContainer> evtShapeCont;
555  if (!evtShapeCont) {
556  B2ERROR("No EventShapeContainer object has been found in the datastore");
557  return std::numeric_limits<float>::quiet_NaN();
558  }
559  return evtShapeCont->getThrustAxis().X();
560  }
561 
562  double thrustAxisY(const Particle*)
563  {
564  StoreObjPtr<EventShapeContainer> evtShapeCont;
565  if (!evtShapeCont) {
566  B2ERROR("No EventShapeContainer object has been found in the datastore");
567  return std::numeric_limits<float>::quiet_NaN();
568  }
569  return evtShapeCont->getThrustAxis().Y();
570  }
571 
572  double thrustAxisZ(const Particle*)
573  {
574  StoreObjPtr<EventShapeContainer> evtShapeCont;
575  if (!evtShapeCont) {
576  B2ERROR("No EventShapeContainer object has been found in the datastore");
577  return std::numeric_limits<float>::quiet_NaN();
578  }
579  return evtShapeCont->getThrustAxis().Z();
580  }
581 
582 
583  double thrustAxisCosTheta(const Particle*)
584  {
585  StoreObjPtr<EventShapeContainer> evtShapeCont;
586  if (!evtShapeCont) {
587  B2ERROR("No EventShapeContainer object has been found in the datastore");
588  return std::numeric_limits<float>::quiet_NaN();
589  }
590  return evtShapeCont->getThrustAxis().CosTheta();
591  }
592 
593 
594  Manager::FunctionPtr useThrustFrame(const std::vector<std::string>& arguments)
595  {
596  if (arguments.size() == 1) {
597  auto variableName = arguments[0];
598 
599  const Variable::Manager::Var* var = Manager::Instance().getVariable(variableName);
600 
601  auto func = [var](const Particle * particle) -> double {
602  StoreObjPtr<EventShapeContainer> evtShapeCont;
603  if (!evtShapeCont)
604  {
605  B2ERROR("No EventShapeContainer object has been found in the datastore");
606  return std::numeric_limits<float>::quiet_NaN();
607  }
608 
609  TVector3 newZ = evtShapeCont->getThrustAxis();
610  TVector3 newY(0, 0, 0);
611  if (newZ(2) == 0 and newZ(1) == 0)
612  newY(0) = 1;
613  else
614  {
615  newY(1) = newZ(2);
616  newY(2) = -newZ(1);
617  }
618  TVector3 newX = newY.Cross(newZ);
619 
620  UseReferenceFrame<CMSRotationFrame> signalframe(newX, newY, newZ);
621 
622  return var->function(particle);
623  };
624  return func;
625  } else {
626  B2FATAL("Wrong number of arguments for meta function useThrustFrame. It only takes one argument, the variable name.");
627  }
628  }
629 
630 
631  VARIABLE_GROUP("EventShape");
632 
633  REGISTER_VARIABLE("foxWolframR(i)", foxWolframR, R"DOC(
634 [Eventbased] Ratio of the i-th to the 0-th order Fox Wolfram moments. The order ``i`` can go from 0 up to 8th.
635 
636 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
637 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
638 )DOC");
639  REGISTER_VARIABLE("foxWolframH(i)", foxWolframH, R"DOC(
640 [Eventbased] Returns i-th order Fox Wolfram moment. The order ``i`` can go from 0 up to 8th."
641 
642 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
643 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
644 )DOC");
645  REGISTER_VARIABLE("harmonicMoment(i, axisName)", harmonicMoment, R"DOC(
646 [Eventbased] Returns i-th order harmonic moment, calculated with respect to the axis ``axisName``. The order ``i`` can go from 0 up to 8th, the ``axisName`` can be either 'thrust' or 'collision'.
647 
648 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
649 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
650 )DOC");
651  REGISTER_VARIABLE("cleoCone(i, axisName)", cleoCone, R"DOC(
652 [Eventbased] Returns i-th order Cleo cone, calculated with respect to the axis ``axisName``. The order ``i`` can go from 0 up to 8th, the ``axisName`` can be either 'thrust' or 'collision'.
653 
654 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
655 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
656 )DOC");
657  REGISTER_VARIABLE("useThrustFrame(variable)", useThrustFrame, R"DOC(
658 Evaluates a variable value in the thrust reference frame.
659 
660 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
661 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
662 )DOC");
663 
664 
665  REGISTER_VARIABLE("foxWolframR1", foxWolframR1, R"DOC(
666 [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 convenience.
667 
668 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
669 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
670 )DOC");
671  REGISTER_VARIABLE("foxWolframR2", foxWolframR2, R"DOC(
672 [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 convenience.
673 
674 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
675 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
676 )DOC");
677  REGISTER_VARIABLE("foxWolframR3", foxWolframR3, R"DOC(
678 [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 convenience.
679 
680 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
681 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
682 )DOC");
683  REGISTER_VARIABLE("foxWolframR4", foxWolframR4, R"DOC(
684 [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 convenience.
685 
686 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
687 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
688 )DOC");
689 
690  REGISTER_VARIABLE("harmonicMomentThrust0", harmonicMomentThrust0, R"DOC(
691 [Eventbased] Harmonic moment of the 0th order calculated with respect to the thrust axis.
692 
693 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
694 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
695 )DOC");
696  REGISTER_VARIABLE("harmonicMomentThrust1", harmonicMomentThrust1, R"DOC(
697 [Eventbased] Harmonic moment of the 1st order calculated with respect to the thrust axis.
698 
699 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
700 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
701 )DOC");
702  REGISTER_VARIABLE("harmonicMomentThrust2", harmonicMomentThrust2, R"DOC(
703 [Eventbased] Harmonic moment of the 2nd order calculated with respect to the thrust axis.
704 
705 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
706 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
707 )DOC");
708  REGISTER_VARIABLE("harmonicMomentThrust3", harmonicMomentThrust3, R"DOC(
709 [Eventbased] Harmonic moment of the 3rd order calculated with respect to the thrust axis.
710 
711 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
712 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
713 )DOC");
714  REGISTER_VARIABLE("harmonicMomentThrust4", harmonicMomentThrust4, R"DOC(
715 [Eventbased] Harmonic moment of the 4th order calculated with respect to the thrust axis.
716 
717 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
718 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
719 )DOC");
720 
721  REGISTER_VARIABLE("cleoConeThrust0", cleoConeThrust0, R"DOC(
722 [Eventbased] 0th Cleo cone calculated with respect to the thrust axis.
723 
724 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
725 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
726 )DOC");
727  REGISTER_VARIABLE("cleoConeThrust1", cleoConeThrust1, R"DOC(
728 [Eventbased] 1st Cleo cone calculated with respect to the thrust axis.
729 
730 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
731 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
732 )DOC");
733  REGISTER_VARIABLE("cleoConeThrust2", cleoConeThrust2, R"DOC(
734 [Eventbased] 2nd Cleo cone calculated with respect to the thrust axis.
735 
736 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
737 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
738 )DOC");
739  REGISTER_VARIABLE("cleoConeThrust3", cleoConeThrust3, R"DOC(
740 [Eventbased] 3rd Cleo cone calculated with respect to the thrust axis.
741 
742 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
743 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
744 )DOC");
745  REGISTER_VARIABLE("cleoConeThrust4", cleoConeThrust4, R"DOC(
746 [Eventbased] 4th Cleo cone calculated with respect to the thrust axis.
747 
748 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
749 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
750 )DOC");
751  REGISTER_VARIABLE("cleoConeThrust5", cleoConeThrust5, R"DOC(
752 [Eventbased] 5th Cleo cone calculated with respect to the thrust axis.
753 
754 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
755 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
756 )DOC");
757  REGISTER_VARIABLE("cleoConeThrust6", cleoConeThrust6, R"DOC(
758 [Eventbased] 6th Cleo cone calculated with respect to the thrust axis.
759 
760 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
761 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
762 )DOC");
763  REGISTER_VARIABLE("cleoConeThrust7", cleoConeThrust7, R"DOC(
764 [Eventbased] 7th Cleo cone calculated with respect to the thrust axis.
765 
766 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
767 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
768 )DOC");
769  REGISTER_VARIABLE("cleoConeThrust8", cleoConeThrust8, R"DOC(
770 [Eventbased] 8th Cleo cone calculated with respect to the thrust axis.
771 
772 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
773 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
774 )DOC");
775 
776 
777  REGISTER_VARIABLE("sphericity", sphericity, R"DOC(
778 [Eventbased] Event sphericity, defined as the linear combination of the sphericity eigenvalues :math:`\\lambda_i`: :math:`S = (3/2)(\\lambda_2+\\lambda_3)`.
779 
780 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
781 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
782 )DOC");
783  REGISTER_VARIABLE("aplanarity", aplanarity, R"DOC(
784 [Eventbased] Event aplanarity, defined as the 3/2 of the third sphericity eigenvalue.
785 
786 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
787 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
788 )DOC");
789 
790  REGISTER_VARIABLE("thrust", thrust, R"DOC(
791 [Eventbased] Event thrust.
792 
793 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
794 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
795 )DOC");
796  REGISTER_VARIABLE("thrustAxisX", thrustAxisX, R"DOC(
797 [Eventbased] X component of the thrust axis.
798 
799 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
800 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
801 )DOC");
802  REGISTER_VARIABLE("thrustAxisY", thrustAxisY, R"DOC(
803 [Eventbased] Y component of the thrust axis.
804 
805 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
806 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
807 )DOC");
808  REGISTER_VARIABLE("thrustAxisZ", thrustAxisZ, R"DOC(
809 [Eventbased] Z component of the thrust axis.
810 
811 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
812 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
813 )DOC");
814  REGISTER_VARIABLE("thrustAxisCosTheta", thrustAxisCosTheta, R"DOC(
815 [Eventbased] Cosine of the polar angle component of the thrust axis.
816 
817 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
818 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
819 )DOC");
820 
821  REGISTER_VARIABLE("forwardHemisphereMass", forwardHemisphereMass, R"DOC(
822 [Eventbased] Invariant mass of the particles flying in the same direction as the thrust axis.
823 
824 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
825 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
826 )DOC");
827  REGISTER_VARIABLE("forwardHemisphereX", forwardHemisphereX, R"DOC(
828 [Eventbased] X component of the total momentum of the particles flying in the same direction as the thrust axis.
829 
830 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
831 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
832 )DOC");
833  REGISTER_VARIABLE("forwardHemisphereY", forwardHemisphereY, R"DOC(
834 [Eventbased] Y component of the total momentum of the particles flying in the same direction as the thrust axis.
835 
836 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
837 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
838 )DOC");
839  REGISTER_VARIABLE("forwardHemisphereZ", forwardHemisphereZ, R"DOC(
840 [Eventbased] Z component of the total momentum of the particles flying in the same direction of the thrust axis.
841 
842 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
843 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
844 )DOC");
845  REGISTER_VARIABLE("forwardHemisphereMomentum", forwardHemisphereMomentum, R"DOC(
846 [Eventbased] Total momentum of the particles flying in the same direction as the thrust axis.
847 
848 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
849 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
850 )DOC");
851  REGISTER_VARIABLE("forwardHemisphereEnergy", forwardHemisphereEnergy, R"DOC(
852 [Eventbased] Total energy of the particles flying in the same direction as the thrust axis.
853 
854 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
855 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
856 )DOC");
857 
858  REGISTER_VARIABLE("backwardHemisphereMass", backwardHemisphereMass, R"DOC(
859 [Eventbased] Invariant mass of the particles flying in the direction opposite to the thrust axis.
860 
861 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
862 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
863 )DOC");
864  REGISTER_VARIABLE("backwardHemisphereX", backwardHemisphereX, R"DOC(
865 [Eventbased] X component of the total momentum of the particles flying in the direction opposite to the thrust axis.
866 
867 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
868 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
869 )DOC");
870  REGISTER_VARIABLE("backwardHemisphereY", backwardHemisphereY, R"DOC(
871 [Eventbased] Y component of the total momentum of the particles flying in the direction opposite to the thrust axis.
872 
873 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
874 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
875 )DOC");
876  REGISTER_VARIABLE("backwardHemisphereZ", backwardHemisphereZ, R"DOC(
877 [Eventbased] Z component of the total momentum of the particles flying in the direction opposite to the thrust axis.
878 
879 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
880 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
881 )DOC");
882  REGISTER_VARIABLE("backwardHemisphereMomentum", backwardHemisphereMomentum, R"DOC(
883 [Eventbased] Total momentum of the particles flying in the direction opposite to the thrust axis.
884 
885 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
886 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
887 )DOC");
888  REGISTER_VARIABLE("backwardHemisphereEnergy", backwardHemisphereEnergy, R"DOC(
889 [Eventbased] Total energy of the particles flying in the direction opposite to the thrust axis.
890 
891 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
892 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
893 )DOC");
894  }
896 }
const Var * getVariable(std::string name)
Get the variable belonging to the given key.
Definition: Manager.cc:31
static Manager & Instance()
get singleton instance.
Definition: Manager.cc:25
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:108
Abstract base class for different kinds of events.