Conversation
Please consider the following formatting changes to AliceO2Group#15615
833f9a1 to
dfc712d
Compare
dfc712d to
cc9dea4
Compare
| namespace KrGenConfig | ||
| { | ||
| inline double rInner = 83.5; | ||
| inline double rOuter = 246.5; // TPC outermost pad row outer edge ~247 cm; stay inside | ||
| inline double halfZ = 249.7; | ||
| inline int nPerEvent = 1000; // override at runtime via KR_N_PER_EVENT env var | ||
| } // namespace KrGenConfig |
There was a problem hiding this comment.
Is this namespace needed? I guess the variables could also go to the class.
If you would like to keep it follow the naming convention for the namespaces: lower case with underscore
namespace kr_gen_config
Part of the variable can then be const or constexpr.
There was a problem hiding this comment.
Thanks for the comments. I have made the changes
| struct KrProduct { | ||
| int pdg; | ||
| double eKin; | ||
| }; |
There was a problem hiding this comment.
Seems to be only used in KrDecayTable, so it could also go there.
| std::cout << "[KrDecayTable] Loaded from " << path << "\n" | ||
| << " T1: E=" << fE1 << " keV ICC=" << ICC_T1 | ||
| << " K_frac=" << Kfrac_T1 << "\n" | ||
| << " T2: E=" << fE2 << " keV ICC=" << ICC_T2 << "\n"; |
There was a problem hiding this comment.
Use LOG(info) and remove last \n. Also in other places. Or the appropriate log level.
| o2::tpc::KrGenConfig::nPerEvent = n; | ||
| } | ||
| } | ||
| std::cout << "[GeneratorKrDecay] Init:" |
| << " K_frac=" << Kfrac_T1 << "\n" | ||
| << " T2: E=" << fE2 << " keV ICC=" << ICC_T2 << "\n"; | ||
| } else { | ||
| std::cout << "[KrDecayTable] WARNING: could not parse " << path |
| << " — using hardcoded fallback values\n"; | ||
| } | ||
| } else { | ||
| std::cout << "[KrDecayTable] WARNING: G4LEVELGAMMADATA not set" |
| Bool_t importParticles() override; | ||
|
|
||
| private: | ||
| o2::tpc::KrDecayTable* mTable; |
cc9dea4 to
d6a0c54
Compare
d6a0c54 to
7f4271e
Compare
7f4271e to
38af72c
Compare
| namespace o2 | ||
| { | ||
| namespace tpc | ||
| { |
There was a problem hiding this comment.
| namespace o2 | |
| { | |
| namespace tpc | |
| { | |
| namespace o2::tpc | |
| { |
There was a problem hiding this comment.
Thanks for the comments. I have included the suggested changes
| } // namespace tpc | ||
| } // namespace o2 |
There was a problem hiding this comment.
| } // namespace tpc | |
| } // namespace o2 | |
| } // namespace o2::tpc |
| namespace o2 | ||
| { | ||
| namespace eventgen | ||
| { |
There was a problem hiding this comment.
| namespace o2 | |
| { | |
| namespace eventgen | |
| { | |
| namespace o2::eventgen | |
| { |
| // O2 status encoding from MCGenProperties.h | ||
| // bits 0-8: hepmc(9), bits 9-18: gen(10), bits 19-28: reserved(10), bits 29-31: sentinel=5 | ||
| inline int krO2EncodedStatus(int hepmc, int gen = 0) | ||
| { | ||
| return (5 << 29) | ((gen & 0x3FF) << 9) | (hepmc & 0x1FF); | ||
| } |
There was a problem hiding this comment.
Can be part of GeneratorKrDecay
| } // namespace eventgen | ||
| } // namespace o2 |
There was a problem hiding this comment.
| } // namespace eventgen | |
| } // namespace o2 | |
| } // namespace o2::eventgen |
| static bool parseG4PhotonEvap(const char* path, | ||
| double& E_T1, // T1 gamma energy [keV] | ||
| double& ICC_T1, // T1 ICC_total | ||
| double& Kfrac_T1, // T1 K-shell fraction of ICC | ||
| double& E_T2, // T2 gamma energy [keV] | ||
| double& ICC_T2) // T2 ICC_total |
There was a problem hiding this comment.
Can't this be part of KrDecayTable?
| namespace o2 | ||
| { |
|
|
||
| // ── GeneratorKrDecay ───────────────────────────────────────────────────── | ||
|
|
||
| namespace o2 |
There was a problem hiding this comment.
also here collapse the namespace
…on support - TPCDetParam.UseGeant4Edep: use Geant4's own energy deposit for ionisation instead of Bethe-Bloch/NA49, with a configurable SpecialCutsGeV threshold - Adds the Kr-83m decay generator (GeneratorKrDecay) as a compiled Generator subclass in Detectors/TPC/simulation, with a thin krGenerator.C macro for use as an o2-sim external generator - Adds plotCluster.C for viewing the resulting calibration spectrum
38af72c to
89cf669
Compare
TPCDetParam.UseGeant4Edep, an opt-in flag (default off) that uses Geant4's energy deposit directly for ionisation inDetector::ProcessHits, with Fano-limited charge fluctuation via a Gamma-distributed smear (mean/variance tuned for GEANT4). Used for 83mKr TPC calibration simulations.SetSpecialPhysicsCuts()callsmatmgr.SpecialCut()for the TPC drift-gas media before the base class readssimcuts.dat(which sets a 10 keV default for these media). This is now exposed asTPCDetParam.SpecialCutsGeV(default 1e-6 GeV = 1 keV), so the actual effective cutcan be set via configKeyValues.