|
11 | 11 |
|
12 | 12 | /// \file longRangeDihadronCor.cxx |
13 | 13 | /// \brief long range di-hadron correlation for O-O, Pb-Pb collisions |
14 | | -/// \author Zhiyong Lu (zhiyong.lu@cern.ch) |
| 14 | +/// \author Zhiyong Lu (zhiyong.lu@cern.ch), Joachim Hansen (joachim.hansen@cern.ch) |
15 | 15 | /// \since Sep/10/2025 |
16 | 16 |
|
17 | 17 | #include "PWGCF/Core/CorrelationContainer.h" |
@@ -150,15 +150,21 @@ struct LongRangeDihadronCor { |
150 | 150 | ConfigurableAxis axisAmplitudeFt0a{"axisAmplitudeFt0a", {5000, 0, 1000}, "FT0A amplitude"}; |
151 | 151 | ConfigurableAxis axisChannelFt0aAxis{"axisChannelFt0aAxis", {96, 0.0, 96.0}, "FT0A channel"}; |
152 | 152 |
|
| 153 | + Configurable<std::string> cfgGainEqPath{"cfgGainEqPath", "Analysis/EventPlane/GainEq", "CCDB path for gain equalization constants"}; |
| 154 | + Configurable<int> cfgCorrLevel{"cfgCorrLevel", 1, "calibration step: 0 = no corr, 1 = gain corr"}; |
| 155 | + ConfigurableAxis cfgaxisFITamp{"cfgaxisFITamp", {1000, 0, 5000}, ""}; |
| 156 | + AxisSpec axisFit{cfgaxisFITamp, "fit amplitude"}; |
| 157 | + AxisSpec axisChID = {220, 0, 220}; |
153 | 158 | // make the filters and cuts. |
154 | 159 | Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVtxZ); |
155 | | - Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz); |
| 160 | + Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast<uint8_t>(true))) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz); |
156 | 161 | using FilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSel, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::Mults>>; |
157 | 162 | using FilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>>; |
158 | 163 |
|
159 | 164 | // FT0 geometry |
160 | 165 | o2::ft0::Geometry ft0Det; |
161 | 166 | std::vector<o2::detectors::AlignParam>* offsetFT0; |
| 167 | + std::vector<float> cstFT0RelGain{}; |
162 | 168 |
|
163 | 169 | // Corrections |
164 | 170 | TH3D* mEfficiency = nullptr; |
@@ -272,6 +278,8 @@ struct LongRangeDihadronCor { |
272 | 278 | registry.add("Trig_hist", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisPtTrigger}}}); |
273 | 279 | registry.add("Assoc_amp_same", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); |
274 | 280 | registry.add("Assoc_amp_mixed", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}}); |
| 281 | + registry.add("FT0Amp", "", {HistType::kTH2F, {axisChID, axisFit}}); |
| 282 | + registry.add("FT0AmpCorr", "", {HistType::kTH2F, {axisChID, axisFit}}); |
275 | 283 | } |
276 | 284 |
|
277 | 285 | registry.add("eventcount", "bin", {HistType::kTH1F, {{4, 0, 4, "bin"}}}); // histogram to see how many events are in the same and mixed event |
@@ -354,6 +362,32 @@ struct LongRangeDihadronCor { |
354 | 362 | } |
355 | 363 | } |
356 | 364 |
|
| 365 | + void loadGain(aod::BCsWithTimestamps::iterator const& bc) |
| 366 | + { |
| 367 | + cstFT0RelGain.clear(); |
| 368 | + cstFT0RelGain = {}; |
| 369 | + std::string fullPath; |
| 370 | + |
| 371 | + auto timestamp = bc.timestamp(); |
| 372 | + constexpr int ChannelsFT0 = 208; |
| 373 | + if (cfgCorrLevel == 0) { |
| 374 | + for (auto i{0u}; i < ChannelsFT0; i++) { |
| 375 | + cstFT0RelGain.push_back(1.); |
| 376 | + } |
| 377 | + } else { |
| 378 | + fullPath = cfgGainEqPath; |
| 379 | + fullPath += "/FT0"; |
| 380 | + const auto objft0Gain = ccdb->getForTimeStamp<std::vector<float>>(fullPath, timestamp); |
| 381 | + if (!objft0Gain) { |
| 382 | + for (auto i{0u}; i < ChannelsFT0; i++) { |
| 383 | + cstFT0RelGain.push_back(1.); |
| 384 | + } |
| 385 | + } else { |
| 386 | + cstFT0RelGain = *(objft0Gain); |
| 387 | + } |
| 388 | + } |
| 389 | + } |
| 390 | + |
357 | 391 | void loadCorrection(uint64_t timestamp) |
358 | 392 | { |
359 | 393 | if (correctionsLoaded) { |
@@ -434,15 +468,21 @@ struct LongRangeDihadronCor { |
434 | 468 | void getChannel(TFT0s const& ft0, std::size_t const& iCh, int& id, float& ampl) |
435 | 469 | { |
436 | 470 | int switchCor = cfgSwitchCor; |
| 471 | + int rID{0}; |
437 | 472 | if (switchCor == kFT0C) { |
438 | 473 | id = ft0.channelC()[iCh]; |
| 474 | + rID = id + 96; |
439 | 475 | ampl = ft0.amplitudeC()[iCh]; |
440 | 476 | } else if (switchCor == kFT0A) { |
441 | 477 | id = ft0.channelA()[iCh]; |
| 478 | + rID = id; |
442 | 479 | ampl = ft0.amplitudeA()[iCh]; |
443 | 480 | } else { |
444 | 481 | LOGF(fatal, "Cor Index %d out of range", switchCor); |
445 | 482 | } |
| 483 | + registry.fill(HIST("FT0Amp"), rID, ampl); |
| 484 | + ampl = ampl / cstFT0RelGain[iCh]; |
| 485 | + registry.fill(HIST("FT0AmpCorr"), rID, ampl); |
446 | 486 | } |
447 | 487 |
|
448 | 488 | template <CorrelationContainer::CFStep step, typename TTracks, typename TFT0s> |
@@ -613,6 +653,7 @@ struct LongRangeDihadronCor { |
613 | 653 | if (!collision.has_foundFT0()) |
614 | 654 | return; |
615 | 655 | loadAlignParam(bc.timestamp()); |
| 656 | + loadGain(bc); |
616 | 657 | loadCorrection(bc.timestamp()); |
617 | 658 | if (!cfgCentTableUnavailable) { |
618 | 659 | getCentralityWeight(weightCent, cent); |
|
0 commit comments