Skip to content

Commit 2539168

Browse files
authored
eliptical shape for deta & dphi cut (#5938)
1 parent 5a1dce9 commit 2539168

File tree

2 files changed

+49
-19
lines changed

2 files changed

+49
-19
lines changed

PWGCF/Femto3D/Core/femto3dPairTask.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,10 @@ bool FemtoPair<TrackType>::IsClosePair(const float& deta, const float& dphi, con
205205
return true;
206206
if (_magfield1 * _magfield2 == 0)
207207
return true;
208-
if (abs(GetEtaDiff()) < deta && abs(GetPhiStarDiff(radius)) < dphi)
208+
if (std::pow(abs(GetEtaDiff()) / deta, 2) + std::pow(abs(GetPhiStarDiff(radius)) / dphi, 2) < 1.0f)
209209
return true;
210+
// if (abs(GetEtaDiff()) < deta && abs(GetPhiStarDiff(radius)) < dphi)
211+
// return true;
210212

211213
return false;
212214
}

PWGCF/Femto3D/Tasks/femto3dPairTask.cxx

Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ struct FemtoCorrelations {
9292
ConfigurableAxis CFkStarBinning{"CFkStarBinning", {500, 0.005, 5.005}, "k* binning of the CF (Nbins, lowlimit, uplimit)"};
9393

9494
Configurable<bool> _fill3dCF{"fill3dCF", false, "flag for filling 3D LCMS histos: true -- fill; false -- not"};
95-
Configurable<bool> _fillDetaDphi{"fillDetaDphi", false, "flag for filling dEta(dPhi*) histos: true -- fill; false -- not; note: they're filled before the double track cut"};
95+
Configurable<int> _fillDetaDphi{"fillDetaDphi", -1, "flag for filling dEta(dPhi*) histos: '-1' -- don't fill; '0' -- fill before the cut; '1' -- fill after the cut; '2' -- fill before & after the cut"};
9696
ConfigurableAxis CF3DqLCMSBinning{"CF3DqLCMSBinning", {60, -0.3, 0.3}, "q_out/side/long binning of the CF 3D in LCMS (Nbins, lowlimit, uplimit)"};
9797
// the next configarable is responsible for skipping (pseudo)randomly chosen ($value -1) pairs of events in the mixing process
9898
// migth be useful (for the sake of execution time and the output file size ...) in case of too many events per DF since in the SE thacks are mixed in N_ev and in the ME 0.5*N_ev*(N_ev - 1)
@@ -147,8 +147,11 @@ struct FemtoCorrelations {
147147
std::vector<std::vector<std::shared_ptr<TH3>>> MEhistos_3D;
148148
std::vector<std::vector<std::shared_ptr<TH3>>> qLCMSvskStar;
149149

150-
std::vector<std::vector<std::shared_ptr<TH2>>> DoubleTrack_SE_histos;
151-
std::vector<std::vector<std::shared_ptr<TH2>>> DoubleTrack_ME_histos;
150+
std::vector<std::vector<std::shared_ptr<TH2>>> DoubleTrack_SE_histos_BC; // BC -- before cutting
151+
std::vector<std::vector<std::shared_ptr<TH2>>> DoubleTrack_ME_histos_BC; // BC -- before cutting
152+
153+
std::vector<std::vector<std::shared_ptr<TH2>>> DoubleTrack_SE_histos_AC; // AC -- after cutting
154+
std::vector<std::vector<std::shared_ptr<TH2>>> DoubleTrack_ME_histos_AC; // AC -- after cutting
152155

153156
void init(o2::framework::InitContext&)
154157
{
@@ -214,19 +217,33 @@ struct FemtoCorrelations {
214217
qLCMSvskStar.push_back(std::move(qLCMSvskStarperMult));
215218
}
216219

217-
if (_fillDetaDphi) {
218-
std::vector<std::shared_ptr<TH2>> DoubleTrack_SE_histos_perMult;
219-
std::vector<std::shared_ptr<TH2>> DoubleTrack_ME_histos_perMult;
220+
if (_fillDetaDphi > -1) {
221+
TString suffix[] = {"_nocut", "_cut"};
220222

221-
for (unsigned int j = 0; j < _kTbins.value.size() - 1; j++) {
222-
auto hDblTrk_SE = registry.add<TH2>(Form("Cent%i/DoubleTrackEffects_SE_cent%i_kT%i", i, i, j), Form("DoubleTrackEffects_deta(dphi*)_SE_cent%i_kT%i", i, j), kTH2F, {{628, -M_PI, M_PI, "dphi*"}, {200, -0.5, 0.5, "deta"}});
223-
auto hDblTrk_ME = registry.add<TH2>(Form("Cent%i/DoubleTrackEffects_ME_cent%i_kT%i", i, i, j), Form("DoubleTrackEffects_deta(dphi*)_ME_cent%i_kT%i", i, j), kTH2F, {{628, -M_PI, M_PI, "dphi*"}, {200, -0.5, 0.5, "deta"}});
223+
for (int f = 0; f < 2; f++) {
224+
std::vector<std::shared_ptr<TH2>> DoubleTrack_SE_histos_perMult;
225+
std::vector<std::shared_ptr<TH2>> DoubleTrack_ME_histos_perMult;
226+
227+
if (_fillDetaDphi == 0 && f == 1)
228+
continue;
229+
if (_fillDetaDphi == 1 && f == 0)
230+
continue;
224231

225-
DoubleTrack_SE_histos_perMult.push_back(std::move(hDblTrk_SE));
226-
DoubleTrack_ME_histos_perMult.push_back(std::move(hDblTrk_ME));
232+
for (unsigned int j = 0; j < _kTbins.value.size() - 1; j++) {
233+
auto hDblTrk_SE = registry.add<TH2>(Form("Cent%i/DoubleTrackEffects/SE_cent%i_kT%i", i, i, j) + suffix[f], Form("DoubleTrackEffects_deta(dphi*)_SE_cent%i_kT%i", i, j) + suffix[f], kTH2F, {{628, -M_PI / 2.0, M_PI / 2.0, "dphi*"}, {200, -0.5, 0.5, "deta"}});
234+
auto hDblTrk_ME = registry.add<TH2>(Form("Cent%i/DoubleTrackEffects/ME_cent%i_kT%i", i, i, j) + suffix[f], Form("DoubleTrackEffects_deta(dphi*)_ME_cent%i_kT%i", i, j) + suffix[f], kTH2F, {{628, -M_PI / 2.0, M_PI / 2.0, "dphi*"}, {200, -0.5, 0.5, "deta"}});
235+
236+
DoubleTrack_SE_histos_perMult.push_back(std::move(hDblTrk_SE));
237+
DoubleTrack_ME_histos_perMult.push_back(std::move(hDblTrk_ME));
238+
}
239+
if (f == 0) {
240+
DoubleTrack_SE_histos_BC.push_back(std::move(DoubleTrack_SE_histos_perMult)); // BC -- before cutting
241+
DoubleTrack_ME_histos_BC.push_back(std::move(DoubleTrack_ME_histos_perMult));
242+
} else {
243+
DoubleTrack_SE_histos_AC.push_back(std::move(DoubleTrack_SE_histos_perMult)); // AC -- after cutting
244+
DoubleTrack_ME_histos_AC.push_back(std::move(DoubleTrack_ME_histos_perMult));
245+
}
227246
}
228-
DoubleTrack_SE_histos.push_back(std::move(DoubleTrack_SE_histos_perMult));
229-
DoubleTrack_ME_histos.push_back(std::move(DoubleTrack_ME_histos_perMult));
230247
}
231248
}
232249

@@ -263,11 +280,15 @@ struct FemtoCorrelations {
263280
if (_fill3dCF && kTbin > SEhistos_3D[multBin].size())
264281
LOGF(fatal, "kTbin value obtained for a pair exceeds the configured number of kT bins (3D)");
265282

266-
if (_fillDetaDphi)
267-
DoubleTrack_SE_histos[multBin][kTbin]->Fill(Pair->GetPhiStarDiff(_radiusTPC), Pair->GetEtaDiff());
283+
if (_fillDetaDphi % 2 == 0)
284+
DoubleTrack_SE_histos_BC[multBin][kTbin]->Fill(Pair->GetPhiStarDiff(_radiusTPC), Pair->GetEtaDiff());
285+
268286
if (Pair->IsClosePair(_deta, _dphi, _radiusTPC))
269287
continue;
270288

289+
if (_fillDetaDphi > 0)
290+
DoubleTrack_SE_histos_AC[multBin][kTbin]->Fill(Pair->GetPhiStarDiff(_radiusTPC), Pair->GetEtaDiff());
291+
271292
kThistos[multBin][kTbin]->Fill(pair_kT);
272293
mThistos[multBin][kTbin]->Fill(Pair->GetMt()); // test
273294
SEhistos_1D[multBin][kTbin]->Fill(Pair->GetKstar()); // close pair rejection and fillig the SE histo
@@ -305,16 +326,23 @@ struct FemtoCorrelations {
305326
if (_fill3dCF && kTbin > SEhistos_3D[multBin].size())
306327
LOGF(fatal, "kTbin value obtained for a pair exceeds the configured number of kT bins (3D)");
307328

308-
if (_fillDetaDphi) {
329+
if (_fillDetaDphi % 2 == 0) {
309330
if (!SE_or_ME)
310-
DoubleTrack_SE_histos[multBin][kTbin]->Fill(Pair->GetPhiStarDiff(_radiusTPC), Pair->GetEtaDiff());
331+
DoubleTrack_SE_histos_BC[multBin][kTbin]->Fill(Pair->GetPhiStarDiff(_radiusTPC), Pair->GetEtaDiff());
311332
else
312-
DoubleTrack_ME_histos[multBin][kTbin]->Fill(Pair->GetPhiStarDiff(_radiusTPC), Pair->GetEtaDiff());
333+
DoubleTrack_ME_histos_BC[multBin][kTbin]->Fill(Pair->GetPhiStarDiff(_radiusTPC), Pair->GetEtaDiff());
313334
}
314335

315336
if (Pair->IsClosePair(_deta, _dphi, _radiusTPC))
316337
continue;
317338

339+
if (_fillDetaDphi > 0) {
340+
if (!SE_or_ME)
341+
DoubleTrack_SE_histos_AC[multBin][kTbin]->Fill(Pair->GetPhiStarDiff(_radiusTPC), Pair->GetEtaDiff());
342+
else
343+
DoubleTrack_ME_histos_AC[multBin][kTbin]->Fill(Pair->GetPhiStarDiff(_radiusTPC), Pair->GetEtaDiff());
344+
}
345+
318346
if (!SE_or_ME) {
319347
SEhistos_1D[multBin][kTbin]->Fill(Pair->GetKstar());
320348
kThistos[multBin][kTbin]->Fill(pair_kT);

0 commit comments

Comments
 (0)