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