Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Constants.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Constants.h
1 // ----------------------------------------------------------------------------
2 // 'Constants.h'
3 // Derek Anderson
4 // 11.16.2023
5 //
6 // Various constants used throughout the SColdQcdCorrelatorAnalysis
7 // namespace are collected here.
8 // ----------------------------------------------------------------------------
9 
10 #pragma once
11 
12 // c++ utilities
13 #include <map>
14 
15 // make common namespaces implicit
16 using namespace std;
17 
18 
19 
20 namespace SColdQcdCorrelatorAnalysis {
21 
22  // constants, enums, etc. ---------------------------------------------------
23 
24  namespace {
25 
26  // object types
27  enum Object {Track, Cluster, Flow, Particle, Unknown};
28 
29  // subsystem indices
30  enum Subsys {Mvtx, Intt, Tpc, EMCal, IHCal, OHCal};
31 
32  // particle charge subsets
33  enum Subset {All, Charged, Neutral};
34 
35  // subevent options
36  enum SubEvtOpt {Everything, OnlySignal, AllBkgd, PrimaryBkgd, Pileup, Specific};
37 
38  // special subevent indices
39  enum SubEvt {
40  Background = 0,
41  NotEmbedSignal = 1,
42  EmbedSignal = 2
43  };
44 
45  // hard scatter product statuses
46  enum HardScatterStatus {
47  First = 23,
48  Second = 24
49  };
50 
51  // parton pdg codes
52  enum Parton {
53  Down = 1,
54  Up = 2,
55  Strange = 3,
56  Charm = 4,
57  Bottom = 5,
58  Top = 6,
59  Gluon = 21
60  };
61 
62  // tracking-related constants
63  const uint16_t NMvtxLayer = 3;
64  const uint16_t NInttLayer = 8;
65  const uint16_t NTpcLayer = 48;
66  const uint16_t NTpcSector = 12;
67 
68  // charged pion mass in GeV/c^2
69  const double MassPion = 0.140;
70 
71  // map of PID onto charges
72  map<int, float> MapPidOntoCharge = {
73  {11, -1.},
74  {12, 0.},
75  {13, -1.},
76  {14, 0.},
77  {15, -1.},
78  {16, 0.},
79  {22, 0.},
80  {23, 0.},
81  {24, 1.},
82  {111, 0.},
83  {130, 0.},
84  {211, 1.},
85  {221, 0.},
86  {310, 0.},
87  {321, 1.},
88  {421, 0.},
89  {431, 1.},
90  {441, 1.},
91  {2112, 1.},
92  {2212, 1.},
93  {3112, -1.},
94  {3122, 0.},
95  {3212, 0.},
96  {3222, 1.},
97  {3322, 0.},
98  {700201, 0.},
99  {700202, 2.},
100  {700301, 0.},
101  {700302, 3.}
102  };
103 
104  // map of node name onto subsystem index
105  map<string, int> MapNodeOntoIndex = {
106  {"CLUSTER_CEMC", Subsys::EMCal},
107  {"CLUSTER_HCALIN", Subsys::IHCal},
108  {"CLUSTER_HCALOUT", Subsys::OHCal}
109  };
110 
111  // map of forbidden strings onto good ones
112  map<string, string> MapBadOntoGoodStrings = {
113  {"/", "_"},
114  {"(", "_"},
115  {")", ""},
116  {"+", "plus"},
117  {"-", "minus"},
118  {"*", "star"},
119  };
120 
121  } // end constants
122 
123 } // end SColdQcdCorrealtorAnalysis namespace
124 
125 // end ------------------------------------------------------------------------