AnalysisTree
All Classes Namespaces Functions Variables Friends Pages
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 kGeneric
54};
55
56enum class Types : ShortInt_t {
57 kFloat = 0,
58 kInteger,
59 kBool,
60 kNumberOfTypes
61};
62
63namespace TrackFields {
64enum TrackFields : ShortInt_t {
65 kPhi = -1,
66 kPt = -2,
67 kEta = -3,
68 kPx = -4,
69 kPy = -5,
70 kPz = -6,
71 kP = -7,
72 kQ = -8,
73 kId = -9
74};
75}
76
77namespace ParticleFields {
78enum ParticleFields : ShortInt_t {
79 kPhi = -1,
80 kPt = -2,
81 kRapidity = -3,
82 kPid = -4,
83 kMass = -5,
84 kEta = -6,
85 kPx = -7,
86 kPy = -8,
87 kPz = -9,
88 kP = -10,
89 kEnergy = -11,
90 kKineticEnergy = -12,
91 kQ = -13,
92 kId = -14
93};
94}
95
96namespace HitFields {
97enum HitFields : ShortInt_t {
98 kPhi = -1,
99 kSignal = -2,
100 kX = -3,
101 kY = -4,
102 kZ = -5,
103 kId = -6
104};
105}
106
107namespace ModuleFields {
108enum ModuleFields : ShortInt_t {
109 kNumber = -1,
110 kSignal = -2,
111 kId = -3
112};
113}
114
115namespace EventHeaderFields {
116enum EventHeaderFields : ShortInt_t {
117 kVertexX = -1,
118 kVertexY = -2,
119 kVertexZ = -3,
120 kId = -4
121};
122}
123
124}// namespace AnalysisTree
125
126#endif
Cuts keep list of SimpleCuts. Logical AND is applied for all SimpleCut in the Cuts object.
Definition BranchConfig.cpp:10