Skip to content

Commit c7d1f45

Browse files
Update flattenicityTask.cxx
1 parent c3852eb commit c7d1f45

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

‎PWGMM/UE/Tasks/flattenicityTask.cxx‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ using FullTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod:
5757

5858
using CollisionsWithMult = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::PVMults>;
5959
using CollisionsNoMult = soa::Join<aod::Collisions, aod::EvSels>;
60-
// Reco collisions grouped per MC collision (as in the DeepSeek/Monday version)
60+
// Reco collisions grouped per MC collision
6161
using ColMCRecTable = soa::SmallGroups<soa::Join<aod::McCollisionLabels, aod::Collisions, aod::EvSels>>;
6262

6363
struct FlattenicityTask {
@@ -113,10 +113,13 @@ struct FlattenicityTask {
113113
static constexpr float kModuleHalfWidth = 2.65f;
114114

115115
static constexpr float kZDetA = 335.5f;
116+
static constexpr float kZPlaneC = -85.6f;
116117
static constexpr float kModuleAx[NSectorsA] = {-12.2500f, -6.1500f, -0.0500f, 6.1500f, 12.2500f, -12.2500f, -6.1500f, -0.0500f, 6.1500f, 12.2500f, -13.5800f, -7.4800f, 7.4800f, 13.5800f, -12.2500f, -6.1500f, 0.0500f, 6.1500f, 12.2500f, -12.2500f, -6.1500f, 0.0500f, 6.1500f, 12.2500f};
117118
static constexpr float kModuleAy[NSectorsA] = {12.2000f, 12.2000f, 13.5300f, 12.2000f, 12.2000f, 6.1000f, 6.1000f, 7.4300f, 6.1000f, 6.1000f, 0.0000f, 0.0000f, 0.0000f, 0.0000f, -6.1000f, -6.1000f, -7.4300f, -6.1000f, -6.1000f, -12.2000f, -12.2000f, -13.5300f, -12.2000f, -12.2000f};
118119
static constexpr float kModuleCx[NSectorsC] = {-15.5426f, 15.5426f, -15.5069f, 15.5069f, -9.3296f, 9.3296f, -9.3296f, 9.3296f, -9.3296f, 9.3296f, -3.1011f, 3.1011f, -3.1286f, 3.1286f, 3.1010f, -3.1010f, 3.1286f, -3.1286f, 9.3295f, -9.3295f, 9.3296f, -9.3296f, 9.3296f, -9.3296f, 15.5425f, -15.5425f, 15.5068f, -15.5068f};
119120
static constexpr float kModuleCy[NSectorsC] = {3.2659f, -3.2659f, 9.4726f, -9.4726f, 3.2436f, -3.2436f, 9.4726f, -9.4726f, 15.6494f, -15.6494f, 9.4725f, -9.4725f, 15.6982f, -15.6982f, 9.4724f, -9.4724f, 15.6981f, -15.6981f, 3.2435f, -3.2435f, 9.4725f, -9.4725f, 15.6493f, -15.6493f, 3.2659f, -3.2659f, 9.4725f, -9.4725f};
121+
// Official FT0 channel ID -> geometry module index, built by inverting
122+
// localChannelOrder[] from AliceO2 Detectors/FIT/FT0/base/include/FT0Base/
120123
// Geometry.h (localChannelOrder[4*module + k] = official channel; A modules
121124
// 0-23, C modules 24-51). Module index = same order as kModuleA*/kModuleC*
122125
// above, so truth-level and reco-level sectors are the same physical
@@ -126,7 +129,7 @@ struct FlattenicityTask {
126129
static constexpr int kChannelToModuleC[NchC] = {18, 18, 18, 18, 20, 20, 20, 20, 14, 14, 14, 14, 10, 10, 10, 10, 6, 6, 6, 6, 4, 4, 4, 4, 19, 19, 19, 19, 21, 21, 21, 21, 15, 15, 15, 15, 11, 11, 11, 11, 7, 7, 7, 7, 5, 5, 5, 5, 24, 24, 24, 24, 26, 26, 26, 26, 22, 22, 22, 22, 16, 16, 16, 16, 12, 12, 12, 12, 8, 8, 8, 8, 2, 2, 2, 2, 0, 0, 0, 0, 25, 25, 25, 25, 27, 27, 27, 27, 23, 23, 23, 23, 17, 17, 17, 17, 13, 13, 13, 13, 9, 9, 9, 9, 3, 3, 3, 3, 1, 1, 1, 1};
127130

128131
static constexpr int NFlatBins = 10000;
129-
static constexpr int NCorrTitleUpdateInterval = 500; // refresh Pearson r in the titles every N filled events
132+
static constexpr int NCorrTitleUpdateInterval = 500; // refresh Pearson r in the titles every N filled events
130133

131134
// ========================================================================
132135
// Histograms
@@ -376,7 +379,7 @@ struct FlattenicityTask {
376379
// FT0-C: project using a representative plane z (module z varies by
377380
// < 1.5 cm across the 84.8-86.2 cm concave support, negligible for the
378381
// nearest-module search below).
379-
projectToPlane(eta, phi, -85.6f, vz, x, y);
382+
projectToPlane(eta, phi, kZPlaneC, vz, x, y);
380383
int best = -1;
381384
float bestD2 = std::numeric_limits<float>::max();
382385
for (int m = 0; m < NSectorsC; ++m) {
@@ -502,12 +505,12 @@ struct FlattenicityTask {
502505

503506
// ========================================================================
504507
// processMC - MC truth per-module plots, truth flattenicity, and
505-
// truth-vs-reco correlation. Selection criteria as in the DeepSeek/Monday
506-
// version: truth uses only |vz| < cfgVzMax (no truth INEL>0, no both-sides
507-
// requirement); the correlation uses the first reco collision of the MC
508-
// collision with the standard reco event selection. Geometry: real FT0
509-
// module positions (see kModule* / kChannelToModule* above).
508+
// truth-vs-reco correlation. The truth flattenicity only requires
509+
// |vz| < cfgVzMax, while the correlation uses the first reconstructed
510+
// collision of the MC collision that passes the standard event selection.
511+
// Geometry: real FT0 module positions (see kModule* / kChannelToModule*).
510512
// ========================================================================
513+
511514
void processMC(aod::McCollisions::iterator const& mcCollision,
512515
ColMCRecTable const& recCols,
513516
aod::McParticles const& mcParticles,
@@ -522,7 +525,7 @@ struct FlattenicityTask {
522525
std::array<float, NSectorsCombined> truthCombArr{};
523526

524527
int nChINEL = 0;
525-
std::vector<float> truthPt; // primary charged, |eta| < cfgEtaMax, pT > cfgPtMin
528+
std::vector<float> truthPt; // primary charged, |eta| < cfgEtaMax, pT > cfgPtMin
526529
for (const auto& particle : mcParticles) {
527530
if (particle.mcCollisionId() != mcCollision.globalIndex())
528531
continue;

0 commit comments

Comments
 (0)