Repository navigation
[PWGJE] Add configurable MC closure split and antiproton DCA templates - #18347
Conversation
|
O2 linter results: ❌ 0 errors, |
|
Hi @nzardosh, Many thanks. |
| // Event-wise random splitting for closure test: decide once per event | ||
| bool useDataLikeHist = (randUniform.Uniform(0, 1) < 0.5); | ||
| // One random choice is shared by the reconstructed and generated spectra of this event. | ||
| const bool useTrainingHist = randUniform.Rndm() < mcClosureTrainingFraction; |
There was a problem hiding this comment.
is it ok that this random number selection is done independently in different process functions? Shouldnt it be done once per collision and that collision should always have the same status of being training or not in all process functions?
There was a problem hiding this comment.
Hi @nzardosh,
Thank you very much for the comment. I updated the splitting so the same MC collision receives the same training/data-like treatment in both process functions.
| @@ -953,6 +983,34 @@ struct nucleiInJets { | |||
| template <bool IsMC, typename TracksType, typename JetType> | |||
There was a problem hiding this comment.
this IsMC is not used anywhere here I think? should you not gaurd against filling some blocks with if constexpr(!isMC) ?
There was a problem hiding this comment.
Thank you for pointing this out. I added if constexpr (!IsMC) around the data-only template filling.
| } | ||
|
|
||
| // Fill detector-level DCA templates before the DCAxy selection used by the spectra. | ||
| const double templateJetPt = mcdJetPt.at(indexJet) - (usebkgSubractionMC ? 0.f : backgroundRho * jetArea); |
There was a problem hiding this comment.
is this correct? isnt the background subtraction the opposite? so it should be
usebkgSubractionMC ? backgroundRho * jetArea : 0.f
There was a problem hiding this comment.
The background subtraction is already applied when constructing mcdJetPt, so the extra correction here was not needed. I removed it and use mcdJetPt.at(indexJet) directly.
| Service<o2::ccdb::BasicCCDBManager> ccdb; | ||
| Service<o2::framework::O2DatabasePDG> pdgDB; | ||
| TRandom3 randUniform; | ||
| UInt_t mcClosureSplitSeedEffective = 1; |
There was a problem hiding this comment.
not sure if this is the correct type to use because the global indices might not be in this 32 bit format and might be 64 bit instead? you can check
There was a problem hiding this comment.
Thank you. I checked this and changed the implementation to use uint64_t with std::mt19937_64, so the full 64-bit global index is preserved.
No description provided.