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