Belle II Software  release-06-02-00
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  B2ERROR("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  newY(1) = newZ(2);
615  newY(2) = -newZ(1);
616  }
617  TVector3 newX = newY.Cross(newZ);
618 
619  UseReferenceFrame<CMSRotationFrame> signalframe(newX, newY, newZ);
620 
621  return var->function(particle);
622  };
623  return func;
624  } else {
625  B2FATAL("Wrong number of arguments for meta function useThrustFrame. It only takes one argument, the variable name.");
626  }
627  }
628 
629 
630  VARIABLE_GROUP("EventShape");
631 
632  REGISTER_VARIABLE("foxWolframR(i)", foxWolframR, R"DOC(
633 [Eventbased] Ratio of the i-th to the 0-th order Fox Wolfram moments. The order ``i`` can go from 0 up to 8th.
634 
635 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
636 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
637 )DOC");
638  REGISTER_VARIABLE("foxWolframH(i)", foxWolframH, R"DOC(
639 [Eventbased] Returns i-th order Fox Wolfram moment. The order ``i`` can go from 0 up to 8th."
640 
641 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
642 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
643 )DOC");
644  REGISTER_VARIABLE("harmonicMoment(i, axisName)", harmonicMoment, R"DOC(
645 [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'.
646 
647 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
648 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
649 )DOC");
650  REGISTER_VARIABLE("cleoCone(i, axisName)", cleoCone, R"DOC(
651 [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'.
652 
653 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
654 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
655 )DOC");
656  REGISTER_VARIABLE("useThrustFrame(variable)", useThrustFrame, R"DOC(
657 Evaluates a variable value in the thrust reference frame.
658 
659 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
660 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
661 )DOC");
662 
663 
664  REGISTER_VARIABLE("foxWolframR1", foxWolframR1, R"DOC(
665 [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.
666 
667 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
668 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
669 )DOC");
670  REGISTER_VARIABLE("foxWolframR2", foxWolframR2, R"DOC(
671 [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.
672 
673 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
674 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
675 )DOC");
676  REGISTER_VARIABLE("foxWolframR3", foxWolframR3, R"DOC(
677 [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.
678 
679 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
680 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
681 )DOC");
682  REGISTER_VARIABLE("foxWolframR4", foxWolframR4, R"DOC(
683 [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.
684 
685 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
686 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
687 )DOC");
688 
689  REGISTER_VARIABLE("harmonicMomentThrust0", harmonicMomentThrust0, R"DOC(
690 [Eventbased] Harmonic moment of the 0th order calculated with respect to the thrust axis.
691 
692 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
693 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
694 )DOC");
695  REGISTER_VARIABLE("harmonicMomentThrust1", harmonicMomentThrust1, R"DOC(
696 [Eventbased] Harmonic moment of the 1st order calculated with respect to the thrust axis.
697 
698 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
699 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
700 )DOC");
701  REGISTER_VARIABLE("harmonicMomentThrust2", harmonicMomentThrust2, R"DOC(
702 [Eventbased] Harmonic moment of the 2nd order calculated with respect to the thrust axis.
703 
704 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
705 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
706 )DOC");
707  REGISTER_VARIABLE("harmonicMomentThrust3", harmonicMomentThrust3, R"DOC(
708 [Eventbased] Harmonic moment of the 3rd order calculated with respect to the thrust axis.
709 
710 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
711 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
712 )DOC");
713  REGISTER_VARIABLE("harmonicMomentThrust4", harmonicMomentThrust4, R"DOC(
714 [Eventbased] Harmonic moment of the 4th order calculated with respect to the thrust axis.
715 
716 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
717 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
718 )DOC");
719 
720  REGISTER_VARIABLE("cleoConeThrust0", cleoConeThrust0, R"DOC(
721 [Eventbased] 0th Cleo cone calculated with respect to the thrust axis.
722 
723 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
724 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
725 )DOC");
726  REGISTER_VARIABLE("cleoConeThrust1", cleoConeThrust1, R"DOC(
727 [Eventbased] 1st Cleo cone calculated with respect to the thrust axis.
728 
729 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
730 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
731 )DOC");
732  REGISTER_VARIABLE("cleoConeThrust2", cleoConeThrust2, R"DOC(
733 [Eventbased] 2nd Cleo cone calculated with respect to the thrust axis.
734 
735 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
736 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
737 )DOC");
738  REGISTER_VARIABLE("cleoConeThrust3", cleoConeThrust3, R"DOC(
739 [Eventbased] 3rd Cleo cone calculated with respect to the thrust axis.
740 
741 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
742 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
743 )DOC");
744  REGISTER_VARIABLE("cleoConeThrust4", cleoConeThrust4, R"DOC(
745 [Eventbased] 4th Cleo cone calculated with respect to the thrust axis.
746 
747 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
748 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
749 )DOC");
750  REGISTER_VARIABLE("cleoConeThrust5", cleoConeThrust5, R"DOC(
751 [Eventbased] 5th Cleo cone calculated with respect to the thrust axis.
752 
753 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
754 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
755 )DOC");
756  REGISTER_VARIABLE("cleoConeThrust6", cleoConeThrust6, R"DOC(
757 [Eventbased] 6th Cleo cone calculated with respect to the thrust axis.
758 
759 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
760 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
761 )DOC");
762  REGISTER_VARIABLE("cleoConeThrust7", cleoConeThrust7, R"DOC(
763 [Eventbased] 7th Cleo cone calculated with respect to the thrust axis.
764 
765 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
766 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
767 )DOC");
768  REGISTER_VARIABLE("cleoConeThrust8", cleoConeThrust8, R"DOC(
769 [Eventbased] 8th Cleo cone calculated with respect to the thrust axis.
770 
771 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
772 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
773 )DOC");
774 
775 
776  REGISTER_VARIABLE("sphericity", sphericity, R"DOC(
777 [Eventbased] Event sphericity, defined as the linear combination of the sphericity eigenvalues :math:`\\lambda_i`: :math:`S = (3/2)(\\lambda_2+\\lambda_3)`.
778 
779 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
780 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
781 )DOC");
782  REGISTER_VARIABLE("aplanarity", aplanarity, R"DOC(
783 [Eventbased] Event aplanarity, defined as the 3/2 of the third sphericity eigenvalue.
784 
785 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
786 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
787 )DOC");
788 
789  REGISTER_VARIABLE("thrust", thrust, R"DOC(
790 [Eventbased] Event thrust.
791 
792 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
793 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
794 )DOC");
795  REGISTER_VARIABLE("thrustAxisX", thrustAxisX, R"DOC(
796 [Eventbased] X component of the thrust axis.
797 
798 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
799 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
800 )DOC");
801  REGISTER_VARIABLE("thrustAxisY", thrustAxisY, R"DOC(
802 [Eventbased] Y component of the thrust axis.
803 
804 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
805 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
806 )DOC");
807  REGISTER_VARIABLE("thrustAxisZ", thrustAxisZ, R"DOC(
808 [Eventbased] Z component of the thrust axis.
809 
810 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
811 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
812 )DOC");
813  REGISTER_VARIABLE("thrustAxisCosTheta", thrustAxisCosTheta, R"DOC(
814 [Eventbased] Cosine of the polar angle component of the thrust axis.
815 
816 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
817 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
818 )DOC");
819 
820  REGISTER_VARIABLE("forwardHemisphereMass", forwardHemisphereMass, R"DOC(
821 [Eventbased] Invariant mass of the particles flying in the same direction as the thrust axis.
822 
823 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
824 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
825 )DOC");
826  REGISTER_VARIABLE("forwardHemisphereX", forwardHemisphereX, R"DOC(
827 [Eventbased] X component of the total momentum of the particles flying in the same direction as the thrust axis.
828 
829 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
830 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
831 )DOC");
832  REGISTER_VARIABLE("forwardHemisphereY", forwardHemisphereY, R"DOC(
833 [Eventbased] Y component of the total momentum of the particles flying in the same direction as the thrust axis.
834 
835 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
836 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
837 )DOC");
838  REGISTER_VARIABLE("forwardHemisphereZ", forwardHemisphereZ, R"DOC(
839 [Eventbased] Z component of the total momentum of the particles flying in the same direction of the thrust axis.
840 
841 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
842 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
843 )DOC");
844  REGISTER_VARIABLE("forwardHemisphereMomentum", forwardHemisphereMomentum, R"DOC(
845 [Eventbased] Total momentum of the particles flying in the same direction as the thrust axis.
846 
847 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
848 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
849 )DOC");
850  REGISTER_VARIABLE("forwardHemisphereEnergy", forwardHemisphereEnergy, R"DOC(
851 [Eventbased] Total energy of the particles flying in the same direction as the thrust axis.
852 
853 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
854 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
855 )DOC");
856 
857  REGISTER_VARIABLE("backwardHemisphereMass", backwardHemisphereMass, R"DOC(
858 [Eventbased] Invariant mass of the particles flying in the direction opposite to the thrust axis.
859 
860 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
861 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
862 )DOC");
863  REGISTER_VARIABLE("backwardHemisphereX", backwardHemisphereX, R"DOC(
864 [Eventbased] X component of the total momentum of the particles flying in the direction opposite to the thrust axis.
865 
866 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
867 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
868 )DOC");
869  REGISTER_VARIABLE("backwardHemisphereY", backwardHemisphereY, R"DOC(
870 [Eventbased] Y component of the total momentum of the particles flying in the direction opposite to the thrust axis.
871 
872 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
873 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
874 )DOC");
875  REGISTER_VARIABLE("backwardHemisphereZ", backwardHemisphereZ, R"DOC(
876 [Eventbased] Z component of the total momentum of the particles flying in the direction opposite to the thrust axis.
877 
878 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
879 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
880 )DOC");
881  REGISTER_VARIABLE("backwardHemisphereMomentum", backwardHemisphereMomentum, R"DOC(
882 [Eventbased] Total momentum of the particles flying in the direction opposite to the thrust axis.
883 
884 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
885 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
886 )DOC");
887  REGISTER_VARIABLE("backwardHemisphereEnergy", backwardHemisphereEnergy, R"DOC(
888 [Eventbased] Total energy of the particles flying in the direction opposite to the thrust axis.
889 
890 .. warning:: You have to run the Event Shape builder module for this variable to be meaningful.
891 .. seealso:: :ref:`analysis_eventshape` and `modularAnalysis.buildEventShape`.
892 )DOC");
893  }
895 }
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.