Skip to content

Commit 9c93277

Browse files
committed
Updated FIT Multiplicity task
1 parent 33b9998 commit 9c93277

1 file changed

Lines changed: 87 additions & 8 deletions

File tree

PWGUD/Tasks/upcFITMultiplicity.cxx

Lines changed: 87 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ struct UpcTestFITBitMapping {
8181
{"debug/hCollisionIndexMod", "Collision index mod 100;collision.globalIndex() % 100;events", {HistType::kTH1F, {{100, -0.5, 99.5}}}},
8282
{"debug/hFT0AChannelOccupancy", "FT0A fired channel occupancy;FT0A channel;counts",{HistType::kTH1F, {{97, -0.5, 96.5}}}},
8383
{"debug/hFT0CChannelOccupancy", "FT0C fired channel occupancy;FT0C channel;counts",{HistType::kTH1F, {{112, 95.5, 207.5}}}},
84+
{"debug/hFT0CChannelOccupancy_2tracks", "FT0C fired channel occupancy with 2 tracks;FT0C channel;counts",{HistType::kTH1F, {{112, 95.5, 207.5}}}},
85+
{"debug/hFT0CChannelOccupancy_ntracks", "FT0C fired channel occupancy with >2 tracks;FT0C channel;counts",{HistType::kTH1F, {{112, 95.5, 207.5}}}},
8486

8587
{"map/hPhiA", "FT0A #varphi;#varphi;counts", {HistType::kTH1F, {{9, 0, 2*M_PI}}}},
8688
{"map/hEtaA", "FT0A #eta;#eta;counts", {HistType::kTH1F, {{7, 3.4, 4.8}}}},
@@ -89,6 +91,14 @@ struct UpcTestFITBitMapping {
8991
{"map/hPhiC", "FT0C #varphi;#varphi;counts", {HistType::kTH1F, {{9, 0, 2*M_PI}}}},
9092
{"map/hEtaC", "FT0C #eta;#eta;counts", {HistType::kTH1F, {{5, -3.1, -2.1}}}},
9193
{"map/hEtaPhiC", "FT0C #eta vs #varphi;#eta;#varphi", {HistType::kTH2F, {{5, -3.1, -2.1}, {9, 0, 2*M_PI}}}},
94+
95+
{"map/hPhiC_2tracks", "FT0C #varphi with 2 tracks;#varphi;counts", {HistType::kTH1F, {{9, 0, 2*M_PI}}}},
96+
{"map/hEtaC_2tracks", "FT0C #eta with 2 tracks;#eta;counts", {HistType::kTH1F, {{5, -3.1, -2.1}}}},
97+
{"map/hEtaPhiC_2tracks", "FT0C #eta vs #varphi with 2 tracks;#eta;#varphi", {HistType::kTH2F, {{5, -3.1, -2.1}, {9, 0, 2*M_PI}}}},
98+
99+
{"map/hPhiC_ntracks", "FT0C #varphi with >2 tracks;#varphi;counts", {HistType::kTH1F, {{9, 0, 2*M_PI}}}},
100+
{"map/hEtaC_ntracks", "FT0C #eta with >2 tracks;#eta;counts", {HistType::kTH1F, {{5, -3.1, -2.1}}}},
101+
{"map/hEtaPhiC_ntracks", "FT0C #eta vs #varphi with >2 tracks;#eta;#varphi", {HistType::kTH2F, {{5, -3.1, -2.1}, {9, 0, 2*M_PI}}}},
92102

93103
{"mult/hPnFT0A", "P(n): FT0A fired-channel multiplicity;N_{fired}^{FT0A};events", {HistType::kTH1F, {{97, -0.5, 96.5}}}},
94104
{"mult/hPnFT0C", "P(n): FT0C fired-channel multiplicity;N_{fired}^{FT0C};events", {HistType::kTH1F, {{50, -0.5, 49.5}}}},
@@ -102,7 +112,9 @@ struct UpcTestFITBitMapping {
102112
{"qaBeforeCuts/hZNEnergy","ZNA vs ZNC energy before cuts;ZNA energy;ZNC energy", {HistType::kTH2F, {{250, -5.0, 20.}, {250, -5.0, 20.}}}},
103113

104114
{"map/hXYA", "FT0A fired channels in x-y;x [cm];y [cm]", {HistType::kTH2F, {{12, -18., 18.}, {12, -18., 18.}}}},
105-
{"map/hXYC", "FT0C fired channels in x-y;x [cm];y [cm]", {HistType::kTH2F, {{12, -18., 18.}, {12, -18., 18.}}}}
115+
{"map/hXYC", "FT0C fired channels in x-y;x [cm];y [cm]", {HistType::kTH2F, {{12, -18., 18.}, {12, -18., 18.}}}},
116+
{"map/hXYC_2tracks", "FT0C fired channels in x-y with 2 tracks;x [cm];y [cm]", {HistType::kTH2F, {{12, -18., 18.}, {12, -18., 18.}}}},
117+
{"map/hXYC_ntracks", "FT0C fired channels in x-y with >2 tracks;x [cm];y [cm]", {HistType::kTH2F, {{12, -18., 18.}, {12, -18., 18.}}}}
106118
}};
107119

108120
int countParticlesInRange(udhelpers::Bits256 const& thr1, udhelpers::Bits256 const& thr2, int first, int last)
@@ -355,26 +367,93 @@ struct UpcTestFITBitMapping {
355367
registry.fill(HIST("mult/hPnFV0A"), nFV0A);
356368
registry.fill(HIST("mult/hNfiredA_vs_C"), nFT0A, nFT0C);
357369

358-
if (collision.globalIndex() < debugPrintFirst ||
359-
(debugPrintEvery > 0 && collision.globalIndex() % debugPrintEvery == 0)) {
370+
if (collision.globalIndex() < debugPrintFirst || (debugPrintEvery > 0 && collision.globalIndex() % debugPrintEvery == 0))
371+
{
360372
LOGF(info,
361373
"collision %d: fitBits.size=%d nFT0A=%d nFT0C=%d nFV0A=%d",
362374
collision.globalIndex(), fitBits.size(), nFT0A, nFT0C, nFV0A);
363375
}
364-
if (collision.globalIndex() < 5) {
365-
for (int bit = 96; bit < 208; ++bit) {
366-
if (udhelpers::testBit(w1, bit)) {
376+
/// Only print the first 5 entries for debugging purpose
377+
if (collision.globalIndex() < 5)
378+
{
379+
for (int bit = 96; bit < 208; ++bit)
380+
{
381+
if (udhelpers::testBit(w1, bit))
382+
{
367383
LOGF(info, "ANALYSIS sees one fired bit %d", bit);
368384
}
369-
if (udhelpers::testBit(w2, bit)) {
385+
if (udhelpers::testBit(w2, bit))
386+
{
370387
LOGF(info, "ANALYSIS sees two fired bits %d", bit);
371388
}
372389
}
373390
}
374391

392+
/// Checking for special event geometry of rho (resonances that decays into 2 tracks, in general)
393+
if( nFT0C == 2 )
394+
{
395+
for (int bit = 0; bit < udhelpers::kFT0Bits; ++bit)
396+
{
397+
if (!udhelpers::testBit(w1, bit)) {
398+
continue;
399+
}
400+
401+
double phi = 0., eta = 0.;
402+
const bool ok = udhelpers::getPhiEtaFromFitBit(ft0Det, bit, offsetFT0, iRunOffset, phi, eta);
403+
if (!ok) {
404+
continue;
405+
}
406+
407+
auto pos = ft0Det.getChannelCenter(bit);
408+
409+
const double x = pos.X() - offsetFT0[iRunOffset].getX();
410+
const double y = pos.Y() - offsetFT0[iRunOffset].getY();
411+
412+
if (bit >= udhelpers::kFT0AChannels)
413+
{
414+
registry.fill(HIST("debug/hFT0CChannelOccupancy_2tracks"), bit);
415+
registry.fill(HIST("map/hPhiC_2tracks"), phi);
416+
registry.fill(HIST("map/hEtaC_2tracks"), eta);
417+
registry.fill(HIST("map/hEtaPhiC_2tracks"), eta, phi);
418+
registry.fill(HIST("map/hXYC_2tracks"), x, y);
419+
}
420+
}
421+
}
422+
423+
if( nFT0C > 2 )
424+
{
425+
for (int bit = 0; bit < udhelpers::kFT0Bits; ++bit)
426+
{
427+
if (!udhelpers::testBit(w1, bit)) {
428+
continue;
429+
}
430+
431+
double phi = 0., eta = 0.;
432+
const bool ok = udhelpers::getPhiEtaFromFitBit(ft0Det, bit, offsetFT0, iRunOffset, phi, eta);
433+
if (!ok) {
434+
continue;
435+
}
436+
437+
auto pos = ft0Det.getChannelCenter(bit);
438+
439+
const double x = pos.X() - offsetFT0[iRunOffset].getX();
440+
const double y = pos.Y() - offsetFT0[iRunOffset].getY();
441+
442+
if (bit >= udhelpers::kFT0AChannels)
443+
{
444+
registry.fill(HIST("debug/hFT0CChannelOccupancy_ntracks"), bit);
445+
registry.fill(HIST("map/hPhiC_ntracks"), phi);
446+
registry.fill(HIST("map/hEtaC_ntracks"), eta);
447+
registry.fill(HIST("map/hEtaPhiC_ntracks"), eta, phi);
448+
registry.fill(HIST("map/hXYC_ntracks"), x, y);
449+
}
450+
}
451+
}
452+
375453

376454
/* Mapping for at least 1 fired channel only */
377-
for (int bit = 0; bit < udhelpers::kFT0Bits; ++bit) {
455+
for (int bit = 0; bit < udhelpers::kFT0Bits; ++bit)
456+
{
378457
if (!udhelpers::testBit(w1, bit)) {
379458
continue;
380459
}

0 commit comments

Comments
 (0)