1616#ifndef O2_O2DATABASEPDG_H
1717#define O2_O2DATABASEPDG_H
1818
19- #include < atomic>
2019#include < cmath>
2120#include < string>
2221#include " TDatabasePDG.h"
@@ -40,8 +39,7 @@ class O2DatabasePDG
4039 static bool initialized = false ; // initialize this --> adds particles to TDatabasePDG;
4140 auto db = TDatabasePDG::Instance ();
4241 if (!initialized) {
43- // uses the monopole mass of the simulation if a reader has already set it
44- addALICEParticles (db, getMonopoleMass ());
42+ addALICEParticles (db);
4543 initialized = true ;
4644 }
4745 return db;
@@ -70,26 +68,6 @@ class O2DatabasePDG
7068 return true ;
7169 }
7270
73- // Sets the mass (GeV) of the monopole species for consumers of simulated data, which do not
74- // have access to G4Params.monopoleMass. It is taken from the MCEventHeader of the
75- // simulation (key o2::sim::MonopoleMassHeaderKey) by MCKinematicsReader.
76- // It only affects Mass() (hence MCTrack::GetMass() / GetEnergy() / GetRapidity()) and
77- // Instance() if called before the first Instance(): particles already registered in a
78- // TDatabasePDG keep their mass, since ROOT offers no way to change it afterwards.
79- // Not used (and not needed) in the simulation itself, where TDatabasePDG is registered
80- // with G4Params.monopoleMass.
81- static void setMonopoleMass (double massGeV) { monopoleMassOverride ().store (massGeV); }
82-
83- // mass set by setMonopoleMass(), or the default if it was never set
84- static double getMonopoleMass ()
85- {
86- const double mass = monopoleMassOverride ().load ();
87- return mass > 0 . ? mass : o2::sim::MonopoleMassDefaultGeV;
88- }
89-
90- // true if a monopole mass was set by setMonopoleMass()
91- static bool hasMonopoleMassOverride () { return monopoleMassOverride ().load () > 0 .; }
92-
9371 // get particle's (if any) mass
9472 static Double_t MassImpl (TParticlePDG* particle, bool & success)
9573 {
@@ -104,11 +82,6 @@ class O2DatabasePDG
10482 // determine particle to get mass for based on PDG
10583 static Double_t Mass (int pdg, bool & success, TDatabasePDG* db = O2DatabasePDG::Instance())
10684 {
107- if (hasMonopoleMassOverride () && o2::sim::isMonopole (pdg)) {
108- // the table may have been filled with the default mass before the simulation mass was known
109- success = true ;
110- return getMonopoleMass ();
111- }
11285 if (pdg < IONBASELOW || pdg > IONBASEHIGH ) {
11386 // not an ion, return immediately
11487 return MassImpl (db->GetParticle (pdg), success);
@@ -126,13 +99,6 @@ class O2DatabasePDG
12699 O2DatabasePDG () = delete ;
127100
128101 private:
129- // negative: not set (the TDatabasePDG content is used)
130- static std::atomic<double >& monopoleMassOverride ()
131- {
132- static std::atomic<double > mass{-1 .};
133- return mass;
134- }
135-
136102 static constexpr int IONBASELOW {1000000000 };
137103 static constexpr int IONBASEHIGH {1099999999 };
138104};
@@ -195,7 +161,7 @@ inline void O2DatabasePDG::addALICEParticles(TDatabasePDG* db, double monopoleMa
195161 db->AddParticle (" A_0+ " , " " , 0.9960 , kFALSE , 0.0 , +3 , " meson" , 9000211 );
196162 db->AddParticle (" A_0- " , " " , 0.9960 , kFALSE , 0.0 , -3 , " meson" , -9000211 );
197163
198- // db->AddParticle("F0P0 ", " ", 0.9960, kFALSE, 0.0, 0, "meson", 9010221);
164+ // db->AddParticle("F0P0 ", " ", 0.9960, kFALSE, 0.0, 0, "meson", 9010221);
199165
200166 db->AddParticle (" KDL_2+ " , " " , 1.773 , kFALSE , 0.0 , +3 , " meson" , 10325 );
201167 db->AddParticle (" KDL_2- " , " " , 1.773 , kFALSE , 0.0 , -3 , " meson" , -10325 );
@@ -295,7 +261,7 @@ inline void O2DatabasePDG::addALICEParticles(TDatabasePDG* db, double monopoleMa
295261 db->AddParticle (" FeedbackPhoton" , " FeedbackPhoton" , 0 , kFALSE ,
296262 0 , 0 , " Special" , kspe + 51 );
297263
298- // Hyper nuclei and exotica
264+ // Hyper nuclei and exotica
299265 ionCode = 1010010030 ;
300266 if (!db->GetParticle (ionCode)) {
301267 db->AddParticle (" HyperTriton" , " HyperTriton" , 2.991134 , kFALSE ,
@@ -308,25 +274,25 @@ inline void O2DatabasePDG::addALICEParticles(TDatabasePDG* db, double monopoleMa
308274 2.5e-15 , 3 , " Ion" , ionCode);
309275 }
310276
311- // hyper hydrogen 4 ground state
277+ // hyper hydrogen 4 ground state
312278 ionCode = 1010010040 ;
313279 if (!db->GetParticle (ionCode)) {
314280 db->AddParticle (" Hyperhydrog4" , " Hyperhydrog4" , 3.922434 , kFALSE ,
315281 2.5e-15 , 3 , " Ion" , ionCode);
316282 }
317- // anti hyper hydrogen 4 ground state
283+ // anti hyper hydrogen 4 ground state
318284 ionCode = -1010010040 ;
319285 if (!db->GetParticle (ionCode)) {
320286 db->AddParticle (" AntiHyperhydrog4" , " AntiHyperhydrog4" , 3.922434 , kFALSE ,
321287 2.5e-15 , 3 , " Ion" , ionCode);
322288 }
323- // hyper helium 4 ground state
289+ // hyper helium 4 ground state
324290 ionCode = 1010020040 ;
325291 if (!db->GetParticle (ionCode)) {
326292 db->AddParticle (" Hyperhelium4" , " Hyperhelium4" , 3.921728 , kFALSE ,
327293 2.5e-15 , 6 , " Ion" , ionCode);
328294 }
329- // anti hyper helium 4 ground state
295+ // anti hyper helium 4 ground state
330296 ionCode = -1010020040 ;
331297 if (!db->GetParticle (ionCode)) {
332298 db->AddParticle (" AntiHyperhelium4" , " AntiHyperhelium4" , 3.921728 , kFALSE ,
@@ -676,9 +642,9 @@ inline void O2DatabasePDG::addALICEParticles(TDatabasePDG* db, double monopoleMa
676642 0.040 , -3 , " Resonance" , -ionCode);
677643 }
678644
679- // Additional Hidden Strangeness Pentaquarks
645+ // Additional Hidden Strangeness Pentaquarks
680646
681- // Ps +/-
647+ // Ps +/-
682648 ionCode = 9322132 ;
683649 if (!db->GetParticle (ionCode)) {
684650 db->AddParticle (" Ps_Plus_1870" , " Ps_Plus_1870" , 1.870 , kFALSE ,
@@ -716,7 +682,7 @@ inline void O2DatabasePDG::addALICEParticles(TDatabasePDG* db, double monopoleMa
716682 0.10 , -3 , " Resonance" , -ionCode);
717683 }
718684
719- // Ps0
685+ // Ps0
720686 ionCode = 9322131 ;
721687 if (!db->GetParticle (ionCode)) {
722688 db->AddParticle (" Ps_0_1870" , " Ps_0_1870" , 1.870 , kFALSE ,
@@ -820,14 +786,14 @@ inline void O2DatabasePDG::addALICEParticles(TDatabasePDG* db, double monopoleMa
820786
821787 // d*(2380) - dibaryon resonance
822788
823- ionCode = 900010020 ; // Arbitrary choice - as deuteron but with leading 9 instead of 10
789+ ionCode = 900010020 ; // Arbitrary choice - as deuteron but with leading 9 instead of 10
824790 if (!db->GetParticle (ionCode)) {
825791 db->AddParticle (" d*_2380" , " d*_2380" , 2.38 , kFALSE ,
826792 0.070 , 3 , " Resonance" , ionCode);
827793 }
828794 db->AddAntiParticle (" d*_2380_bar" , -ionCode);
829795
830- // Sexaquark (uuddss): compact, neutral and stable hypothetical bound state (arxiv.org/abs/1708.08951)
796+ // Sexaquark (uuddss): compact, neutral and stable hypothetical bound state (arxiv.org/abs/1708.08951)
831797 ionCode = 900000020 ;
832798 if (!db->GetParticle (ionCode)) {
833799 db->AddParticle (" Sexaquark" , " Sexaquark" , 2.0 , kTRUE , 0.0 , 0 , " Special" , ionCode);
@@ -860,4 +826,4 @@ inline void O2DatabasePDG::addParticlesFromExternalFile(TDatabasePDG* db)
860826
861827} // namespace o2
862828
863- #endif // O2_O2DATABASEPDG_H
829+ #endif // O2_O2DATABASEPDG_H
0 commit comments