AnalysisTree
Loading...
Searching...
No Matches
Constants.hpp
1/* Copyright (C) 2019-2021 GSI, Universität Tübingen, MEPhI
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Viktor Klochkov, Eugeny Kashirin, Ilya Selyuzhenkov */
4#ifndef BASE_CONSTANTS_H
5#define BASE_CONSTANTS_H
6
7#include <Rtypes.h>
8
9#ifndef __has_cpp_attribute// if we don't have __has_attribute, ignore it
10#define __has_cpp_attribute(x) 0
11#endif
12
13#if __has_cpp_attribute(deprecated)
14#define ANALYSISTREE_ATTR_DEPRECATED(MESSAGE) [[deprecated]]
15#else
16#define ANALYSISTREE_ATTR_DEPRECATED(MESSAGE)// attribute "deprecated" not available
17#endif
18
19#if __has_cpp_attribute(nodiscard)
20#define ANALYSISTREE_ATTR_NODISCARD [[nodiscard]]
21#else
22#define ANALYSISTREE_ATTR_NODISCARD
23#endif
24
25namespace AnalysisTree {
26
27typedef Float_t Floating_t;
28typedef Int_t Integer_t;
29typedef UInt_t UInteger_t;
30typedef Short_t ShortInt_t;
31typedef Long64_t PdgCode_t;
32
33constexpr Floating_t UndefValueFloat = -999.f;
34constexpr ShortInt_t UndefValueShort = -999;
35constexpr Integer_t UndefValueInt = -999;
36constexpr double SmallNumber = 1e-6;
37constexpr double HugeNumber = 1e9;
38
39namespace Exyz {
40enum Exyz : ShortInt_t {
41 kX = 0,
42 kY,
43 kZ
44};
45}
46
47enum class DetType : ShortInt_t {
48 kHit = 0,
49 kModule,
50 kTrack,
51 kEventHeader,
52 kParticle
53};
54
55enum class Types : ShortInt_t {
56 kFloat = 0,
57 kInteger,
58 kBool,
59 kNumberOfTypes
60};
61
62namespace TrackFields {
63enum TrackFields : ShortInt_t {
64 kPhi = -1,
65 kPt = -2,
66 kEta = -3,
67 kPx = -4,
68 kPy = -5,
69 kPz = -6,
70 kP = -7,
71 kQ = -8,
72 kId = -9
73};
74}
75
76namespace ParticleFields {
77enum ParticleFields : ShortInt_t {
78 kPhi = -1,
79 kPt = -2,
80 kRapidity = -3,
81 kPid = -4,
82 kMass = -5,
83 kEta = -6,
84 kPx = -7,
85 kPy = -8,
86 kPz = -9,
87 kP = -10,
88 kEnergy = -11,
89 kKineticEnergy = -12,
90 kQ = -13,
91 kId = -14
92};
93}
94
95namespace HitFields {
96enum HitFields : ShortInt_t {
97 kPhi = -1,
98 kSignal = -2,
99 kX = -3,
100 kY = -4,
101 kZ = -5,
102 kId = -6
103};
104}
105
106namespace ModuleFields {
107enum ModuleFields : ShortInt_t {
108 kNumber = -1,
109 kSignal = -2,
110 kId = -3
111};
112}
113
114namespace EventHeaderFields {
115enum EventHeaderFields : ShortInt_t {
116 kVertexX = -1,
117 kVertexY = -2,
118 kVertexZ = -3,
119 kId = -4
120};
121}
122
123}// namespace AnalysisTree
124
125#endif
Cuts keep list of SimpleCuts. Logical AND is applied for all SimpleCut in the Cuts object.
Definition BranchConfig.cpp:10