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 double UndefValueDouble = -999.;
34constexpr Floating_t UndefValueFloat = -999.f;
35constexpr ShortInt_t UndefValueShort = -999;
36constexpr Integer_t UndefValueInt = -999;
37constexpr double SmallNumber = 1e-6;
38constexpr double HugeNumber = 1e9;
39
40namespace Exyz {
41enum Exyz : ShortInt_t {
42 kX = 0,
43 kY,
44 kZ
45};
46}
47
48enum class DetType : ShortInt_t {
49 kHit = 0,
50 kModule,
51 kTrack,
52 kEventHeader,
53 kParticle,
54 kGeneric
55};
56
57enum class Types : ShortInt_t {
58 kFloat = 0,
59 kInteger,
60 kBool,
61 kDouble,
62 kNumberOfTypes
63};
64
65namespace TrackFields {
66enum TrackFields : ShortInt_t {
67 kPhi = -1,
68 kPt = -2,
69 kEta = -3,
70 kPx = -4,
71 kPy = -5,
72 kPz = -6,
73 kP = -7,
74 kQ = -8,
75 kId = -9
76};
77}
78
79namespace ParticleFields {
80enum ParticleFields : ShortInt_t {
81 kPhi = -1,
82 kPt = -2,
83 kRapidity = -3,
84 kPid = -4,
85 kMass = -5,
86 kEta = -6,
87 kPx = -7,
88 kPy = -8,
89 kPz = -9,
90 kP = -10,
91 kEnergy = -11,
92 kKineticEnergy = -12,
93 kQ = -13,
94 kId = -14
95};
96}
97
98namespace HitFields {
99enum HitFields : ShortInt_t {
100 kPhi = -1,
101 kSignal = -2,
102 kX = -3,
103 kY = -4,
104 kZ = -5,
105 kId = -6
106};
107}
108
109namespace ModuleFields {
110enum ModuleFields : ShortInt_t {
111 kNumber = -1,
112 kSignal = -2,
113 kId = -3
114};
115}
116
117namespace EventHeaderFields {
118enum EventHeaderFields : ShortInt_t {
119 kVertexX = -1,
120 kVertexY = -2,
121 kVertexZ = -3,
122 kId = -4
123};
124}
125
126}// namespace AnalysisTree
127
128#endif
Cuts keep list of SimpleCuts. Logical AND is applied for all SimpleCut in the Cuts object.
Definition BranchConfig.cpp:10