Skip to content

Commit a8d3476

Browse files
authored
[PWGCF] fix mixed event for FT0A-C, add eta-phi for QA (#13462)
1 parent 9961dc3 commit a8d3476

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ struct LongRangeDihadronCor {
9999
O2_DEFINE_CONFIGURABLE(cfgCentralityWeight, std::string, "", "CCDB path to centrality weight object")
100100
O2_DEFINE_CONFIGURABLE(cfgLocalEfficiency, bool, false, "Use local efficiency object")
101101
O2_DEFINE_CONFIGURABLE(cfgUseEventWeights, bool, false, "Use event weights for mixed event")
102+
O2_DEFINE_CONFIGURABLE(cfgDrawEtaPhiDis, bool, false, "draw eta-phi distribution for detectors in used")
102103
struct : ConfigurableGroup {
103104
O2_DEFINE_CONFIGURABLE(cfgMultCentHighCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x + 10.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut");
104105
O2_DEFINE_CONFIGURABLE(cfgMultCentLowCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x - 3.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut");
@@ -208,6 +209,7 @@ struct LongRangeDihadronCor {
208209
}
209210
const AxisSpec axisPhi{72, 0.0, constants::math::TwoPI, "#varphi"};
210211
const AxisSpec axisEta{40, -1., 1., "#eta"};
212+
const AxisSpec axisEtaFull{90, -4., 5., "#eta"};
211213

212214
ccdb->setURL("http://alice-ccdb.cern.ch");
213215
ccdb->setCaching(true);
@@ -281,6 +283,9 @@ struct LongRangeDihadronCor {
281283
registry.add("zVtx_used", "zVtx_used", {HistType::kTH1D, {axisVertex}});
282284
registry.add("FT0Amp", "", {HistType::kTH2F, {axisChID, axisFit}});
283285
registry.add("FT0AmpCorrect", "", {HistType::kTH2F, {axisChID, axisFit}});
286+
if (cfgDrawEtaPhiDis) {
287+
registry.add("EtaPhi", "", {HistType::kTH2F, {axisEtaFull, axisPhi}});
288+
}
284289
}
285290
if (doprocessSameTpcFt0a) {
286291
registry.add("deltaEta_deltaPhi_same_TPC_FT0A", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0a}}); // check to see the delta eta and delta phi distribution
@@ -561,6 +566,9 @@ struct LongRangeDihadronCor {
561566
} else if (corType == kFT0A) {
562567
registry.fill(HIST("Trig_hist_TPC_FT0A"), fSampleIndex, posZ, track1.pt(), eventWeight * triggerWeight);
563568
}
569+
if (cfgDrawEtaPhiDis && corType == kFT0A) {
570+
registry.fill(HIST("EtaPhi"), track1.eta(), track1.phi(), eventWeight * triggerWeight);
571+
}
564572
}
565573

566574
std::size_t channelSize = 0;
@@ -577,6 +585,9 @@ struct LongRangeDihadronCor {
577585
getChannel(ft0, iCh, chanelid, ampl, corType);
578586
auto phi = getPhiFT0(chanelid, corType);
579587
auto eta = getEtaFT0(chanelid, corType);
588+
if (cfgDrawEtaPhiDis && system == SameEvent) {
589+
registry.fill(HIST("EtaPhi"), eta, phi, ampl * eventWeight);
590+
}
580591
float deltaPhi = RecoDecay::constrainAngle(track1.phi() - phi, -PIHalf);
581592
float deltaEta = track1.eta() - eta;
582593
// fill the right sparse and histograms
@@ -606,19 +617,19 @@ struct LongRangeDihadronCor {
606617
}
607618

608619
template <CorrelationContainer::CFStep step, typename TFT0s>
609-
void fillCorrelationsFT0AFT0C(TFT0s const& ft0, float posZ, int system, float eventWeight) // function to fill the Output functions (sparse) and the delta eta and delta phi histograms
620+
void fillCorrelationsFT0AFT0C(TFT0s const& ft0Col1, TFT0s const& ft0Col2, float posZ, int system, float eventWeight) // function to fill the Output functions (sparse) and the delta eta and delta phi histograms
610621
{
611622
int fSampleIndex = gRandom->Uniform(0, cfgSampleSize);
612623

613624
float triggerWeight = 1.0f;
614-
std::size_t channelASize = ft0.channelA().size();
615-
std::size_t channelCSize = ft0.channelC().size();
625+
std::size_t channelASize = ft0Col1.channelA().size();
626+
std::size_t channelCSize = ft0Col2.channelC().size();
616627
// loop over all tracks
617628
for (std::size_t iChA = 0; iChA < channelASize; iChA++) {
618629

619630
int chanelAid = 0;
620631
float amplA = 0.;
621-
getChannel(ft0, iChA, chanelAid, amplA, kFT0A);
632+
getChannel(ft0Col1, iChA, chanelAid, amplA, kFT0A);
622633
auto phiA = getPhiFT0(chanelAid, kFT0A);
623634
auto etaA = getEtaFT0(chanelAid, kFT0A);
624635

@@ -629,7 +640,7 @@ struct LongRangeDihadronCor {
629640
for (std::size_t iChC = 0; iChC < channelCSize; iChC++) {
630641
int chanelCid = 0;
631642
float amplC = 0.;
632-
getChannel(ft0, iChC, chanelCid, amplC, kFT0C);
643+
getChannel(ft0Col2, iChC, chanelCid, amplC, kFT0C);
633644
auto phiC = getPhiFT0(chanelCid, kFT0C);
634645
auto etaC = getEtaFT0(chanelCid, kFT0C);
635646
float deltaPhi = RecoDecay::constrainAngle(phiA - phiC, -PIHalf);
@@ -983,7 +994,7 @@ struct LongRangeDihadronCor {
983994

984995
sameFt0aFt0c->fillEvent(tracks.size(), CorrelationContainer::kCFStepReconstructed);
985996
const auto& ft0 = collision.foundFT0();
986-
fillCorrelationsFT0AFT0C<CorrelationContainer::kCFStepReconstructed>(ft0, collision.posZ(), SameEvent, weightCent);
997+
fillCorrelationsFT0AFT0C<CorrelationContainer::kCFStepReconstructed>(ft0, ft0, collision.posZ(), SameEvent, weightCent);
987998
}
988999
PROCESS_SWITCH(LongRangeDihadronCor, processSameFt0aFt0c, "Process same event for FT0A-FT0C correlation", false);
9891000

@@ -1041,8 +1052,9 @@ struct LongRangeDihadronCor {
10411052
float weightCent = 1.0f;
10421053
if (!cfgCentTableUnavailable)
10431054
getCentralityWeight(weightCent, cent1);
1044-
const auto& ft0 = collision2.foundFT0();
1045-
fillCorrelationsFT0AFT0C<CorrelationContainer::kCFStepReconstructed>(ft0, collision1.posZ(), MixedEvent, eventWeight * weightCent);
1055+
const auto& ft0Col1 = collision1.foundFT0();
1056+
const auto& ft0Col2 = collision2.foundFT0();
1057+
fillCorrelationsFT0AFT0C<CorrelationContainer::kCFStepReconstructed>(ft0Col1, ft0Col2, collision1.posZ(), MixedEvent, eventWeight * weightCent);
10461058
}
10471059
}
10481060
PROCESS_SWITCH(LongRangeDihadronCor, processMixedFt0aFt0c, "Process mixed events for FT0A-FT0C correlation", false);

0 commit comments

Comments
 (0)