Skip to content

Commit 14b8722

Browse files
authored
PWGEM/PhotonMeson: reduce histogram bins for ee (#5747)
* PWGEM/PhotonMeson: reduce histogram bins for ee * PWGEM/PhotonMeson: add protection against TTCA * PWGEM/PhotonMeson: change histogram bins in mee
1 parent 53f543d commit 14b8722

6 files changed

Lines changed: 66 additions & 55 deletions

File tree

PWGEM/PhotonMeson/Core/HistogramsLibrary.cxx

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -204,19 +204,19 @@ void o2::aod::pwgem::photon::histogram::DefineHistograms(THashList* list, const
204204
}
205205

206206
if (TString(histClass).Contains("EE")) {
207-
const int nm = 167;
207+
const int nm = 145;
208208
double mee[nm] = {0.f};
209209
for (int i = 0; i < 110; i++) {
210210
mee[i] = 0.01 * (i - 0) + 0.0; // every 0.01 GeV/c2 up to 1.1 GeV/c2
211211
}
212-
for (int i = 110; i < 128; i++) {
213-
mee[i] = 0.1 * (i - 110) + 1.1; // every 0.1 GeV/c2 from 1.1 to 2.9 GeV/c2
212+
for (int i = 110; i < 126; i++) {
213+
mee[i] = 0.1 * (i - 110) + 1.1; // every 0.1 GeV/c2 from 1.1 to 2.7 GeV/c2
214214
}
215-
for (int i = 128; i < 158; i++) {
216-
mee[i] = 0.01 * (i - 128) + 2.9; // every 0.01 GeV/c2 from 2.9 to 3.2 GeV/c2
215+
for (int i = 126; i < 136; i++) {
216+
mee[i] = 0.05 * (i - 126) + 2.7; // every 0.05 GeV/c2 from 2.7 to 3.2 GeV/c2
217217
}
218-
for (int i = 158; i < nm; i++) {
219-
mee[i] = 0.1 * (i - 158) + 3.2; // every 0.01 GeV/c2 from 3.2 to 3.5 GeV/c2
218+
for (int i = 136; i < nm; i++) {
219+
mee[i] = 0.1 * (i - 136) + 3.2; // every 0.1 GeV/c2 from 3.2 to 4.0 GeV/c2
220220
}
221221

222222
const int npt = 61;
@@ -228,39 +228,45 @@ void o2::aod::pwgem::photon::histogram::DefineHistograms(THashList* list, const
228228
pt[i] = 0.5 * (i - 50) + 5.0;
229229
}
230230

231-
const int ndim = 4; // m, pt, dca, phiv
232-
const int nbins[ndim] = {nm - 1, npt - 1, ndca - 1, 18};
233-
const double xmin[ndim] = {0.0, 0.0, 0.0, 0.0};
234-
const double xmax[ndim] = {4.0, 10.0, 5.0, M_PI};
231+
const int ndim = 3; // m, pt, dca
232+
const int nbins[ndim] = {nm - 1, npt - 1, ndca - 1};
233+
const double xmin[ndim] = {0.0, 0.0, 0.0};
234+
const double xmax[ndim] = {4.0, 10.0, 5.0};
235235

236-
hs_dilepton_uls_same = new THnSparseF("hs_dilepton_uls_same", "hs_dilepton_uls;m_{ee} (GeV/c^{2});p_{T,ee} (GeV/c);DCA_{ee}^{3D} (#sigma);#varphi_{V} (rad.);", ndim, nbins, xmin, xmax);
236+
hs_dilepton_uls_same = new THnSparseF("hs_dilepton_uls_same", "hs_dilepton_uls;m_{ee} (GeV/c^{2});p_{T,ee} (GeV/c);DCA_{ee}^{3D} (#sigma);", ndim, nbins, xmin, xmax);
237237
hs_dilepton_uls_same->SetBinEdges(0, mee);
238238
hs_dilepton_uls_same->SetBinEdges(1, pt);
239239
hs_dilepton_uls_same->SetBinEdges(2, dca);
240240
hs_dilepton_uls_same->Sumw2();
241241
list->Add(hs_dilepton_uls_same);
242242

243-
hs_dilepton_lspp_same = new THnSparseF("hs_dilepton_lspp_same", "hs_dilepton_lspp;m_{ee} (GeV/c^{2});p_{T,ee} (GeV/c);DCA_{ee}^{3D} (#sigma);#varphi_{V} (rad.);", ndim, nbins, xmin, xmax);
243+
hs_dilepton_lspp_same = new THnSparseF("hs_dilepton_lspp_same", "hs_dilepton_lspp;m_{ee} (GeV/c^{2});p_{T,ee} (GeV/c);DCA_{ee}^{3D} (#sigma);", ndim, nbins, xmin, xmax);
244244
hs_dilepton_lspp_same->SetBinEdges(0, mee);
245245
hs_dilepton_lspp_same->SetBinEdges(1, pt);
246246
hs_dilepton_lspp_same->SetBinEdges(2, dca);
247247
hs_dilepton_lspp_same->Sumw2();
248248
list->Add(hs_dilepton_lspp_same);
249249

250-
hs_dilepton_lsmm_same = new THnSparseF("hs_dilepton_lsmm_same", "hs_dilepton_lsmm;m_{ee} (GeV/c^{2});p_{T,ee} (GeV/c);DCA_{ee}^{3D} (#sigma);#varphi_{V} (rad.);", ndim, nbins, xmin, xmax);
250+
hs_dilepton_lsmm_same = new THnSparseF("hs_dilepton_lsmm_same", "hs_dilepton_lsmm;m_{ee} (GeV/c^{2});p_{T,ee} (GeV/c);DCA_{ee}^{3D} (#sigma);", ndim, nbins, xmin, xmax);
251251
hs_dilepton_lsmm_same->SetBinEdges(0, mee);
252252
hs_dilepton_lsmm_same->SetBinEdges(1, pt);
253253
hs_dilepton_lsmm_same->SetBinEdges(2, dca);
254254
hs_dilepton_lsmm_same->Sumw2();
255255
list->Add(hs_dilepton_lsmm_same);
256256

257+
TH2F* hMvsPhiV_uls_same = new TH2F("hMvsPhiV_uls_same", "m_{ee} vs. #varphi_{V};#varphi_{V} (rad.);m_{ee} (GeV/c^{2})", 72, 0, M_PI, 100, 0.0f, 0.1f);
258+
hMvsPhiV_uls_same->Sumw2();
259+
list->Add(hMvsPhiV_uls_same);
260+
list->Add(reinterpret_cast<TH2F*>(hMvsPhiV_uls_same->Clone("hMvsPhiV_lspp_same")));
261+
list->Add(reinterpret_cast<TH2F*>(hMvsPhiV_uls_same->Clone("hMvsPhiV_lsmm_same")));
262+
257263
if (TString(subGroup).Contains("mix")) {
258-
THnSparseF* hs_dilepton_uls_mix = reinterpret_cast<THnSparseF*>(hs_dilepton_uls_same->Clone("hs_dilepton_uls_mix"));
259-
THnSparseF* hs_dilepton_lspp_mix = reinterpret_cast<THnSparseF*>(hs_dilepton_lspp_same->Clone("hs_dilepton_lspp_mix"));
260-
THnSparseF* hs_dilepton_lsmm_mix = reinterpret_cast<THnSparseF*>(hs_dilepton_lsmm_same->Clone("hs_dilepton_lsmm_mix"));
261-
list->Add(hs_dilepton_uls_mix);
262-
list->Add(hs_dilepton_lspp_mix);
263-
list->Add(hs_dilepton_lsmm_mix);
264+
list->Add(reinterpret_cast<THnSparseF*>(hs_dilepton_uls_same->Clone("hs_dilepton_uls_mix")));
265+
list->Add(reinterpret_cast<THnSparseF*>(hs_dilepton_lspp_same->Clone("hs_dilepton_lspp_mix")));
266+
list->Add(reinterpret_cast<THnSparseF*>(hs_dilepton_lsmm_same->Clone("hs_dilepton_lsmm_mix")));
267+
list->Add(reinterpret_cast<TH2F*>(hMvsPhiV_uls_same->Clone("hMvsPhiV_uls_mix")));
268+
list->Add(reinterpret_cast<TH2F*>(hMvsPhiV_uls_same->Clone("hMvsPhiV_lspp_mix")));
269+
list->Add(reinterpret_cast<TH2F*>(hMvsPhiV_uls_same->Clone("hMvsPhiV_lsmm_mix")));
264270
}
265271

266272
if (TString(subGroup).Contains("dca")) {
@@ -312,33 +318,30 @@ void o2::aod::pwgem::photon::histogram::DefineHistograms(THashList* list, const
312318
}
313319
} // end of mc
314320
} else if (TString(histClass).Contains("MuMu")) {
315-
const int ndim = 4; // m, pt, dca, phiv
316-
const int nbins[ndim] = {90, 20, ndca - 1, 1};
317-
const double xmin[ndim] = {0.2, 0.0, 0.0, 0.0};
318-
const double xmax[ndim] = {1.1, 2.0, 5.0, 3.2};
321+
const int ndim = 3; // m, pt, dca
322+
const int nbins[ndim] = {90, 20, ndca - 1};
323+
const double xmin[ndim] = {0.2, 0.0, 0.0};
324+
const double xmax[ndim] = {1.1, 2.0, 5.0};
319325

320-
hs_dilepton_uls_same = new THnSparseF("hs_dilepton_uls_same", "hs_dilepton_uls;m_{#mu#mu} (GeV/c^{2});p_{T,#mu#mu} (GeV/c);DCA_{#mu#mu}^{3D} (#sigma);#varphi_{V} (rad.);", ndim, nbins, xmin, xmax);
326+
hs_dilepton_uls_same = new THnSparseF("hs_dilepton_uls_same", "hs_dilepton_uls;m_{#mu#mu} (GeV/c^{2});p_{T,#mu#mu} (GeV/c);DCA_{#mu#mu}^{3D} (#sigma);", ndim, nbins, xmin, xmax);
321327
hs_dilepton_uls_same->Sumw2();
322328
hs_dilepton_uls_same->SetBinEdges(2, dca);
323329
list->Add(hs_dilepton_uls_same);
324330

325-
hs_dilepton_lspp_same = new THnSparseF("hs_dilepton_lspp_same", "hs_dilepton_lspp;m_{#mu#mu} (GeV/c^{2});p_{T,#mu#mu} (GeV/c);DCA_{#mu#mu}^{3D} (#sigma);#varphi_{V} (rad.);", ndim, nbins, xmin, xmax);
331+
hs_dilepton_lspp_same = new THnSparseF("hs_dilepton_lspp_same", "hs_dilepton_lspp;m_{#mu#mu} (GeV/c^{2});p_{T,#mu#mu} (GeV/c);DCA_{#mu#mu}^{3D} (#sigma);", ndim, nbins, xmin, xmax);
326332
hs_dilepton_lspp_same->Sumw2();
327333
hs_dilepton_lspp_same->SetBinEdges(2, dca);
328334
list->Add(hs_dilepton_lspp_same);
329335

330-
hs_dilepton_lsmm_same = new THnSparseF("hs_dilepton_lsmm_same", "hs_dilepton_lsmm;m_{#mu#mu} (GeV/c^{2});p_{T,#mu#mu} (GeV/c);DCA_{#mu#mu}^{3D} (#sigma);#varphi_{V} (rad.);", ndim, nbins, xmin, xmax);
336+
hs_dilepton_lsmm_same = new THnSparseF("hs_dilepton_lsmm_same", "hs_dilepton_lsmm;m_{#mu#mu} (GeV/c^{2});p_{T,#mu#mu} (GeV/c);DCA_{#mu#mu}^{3D} (#sigma);", ndim, nbins, xmin, xmax);
331337
hs_dilepton_lsmm_same->Sumw2();
332338
hs_dilepton_lsmm_same->SetBinEdges(2, dca);
333339
list->Add(hs_dilepton_lsmm_same);
334340

335341
if (TString(subGroup).Contains("mix")) {
336-
THnSparseF* hs_dilepton_uls_mix = reinterpret_cast<THnSparseF*>(hs_dilepton_uls_same->Clone("hs_dilepton_uls_mix"));
337-
THnSparseF* hs_dilepton_lspp_mix = reinterpret_cast<THnSparseF*>(hs_dilepton_lspp_same->Clone("hs_dilepton_lspp_mix"));
338-
THnSparseF* hs_dilepton_lsmm_mix = reinterpret_cast<THnSparseF*>(hs_dilepton_lsmm_same->Clone("hs_dilepton_lsmm_mix"));
339-
list->Add(hs_dilepton_uls_mix);
340-
list->Add(hs_dilepton_lspp_mix);
341-
list->Add(hs_dilepton_lsmm_mix);
342+
list->Add(reinterpret_cast<THnSparseF*>(hs_dilepton_uls_same->Clone("hs_dilepton_uls_mix")));
343+
list->Add(reinterpret_cast<THnSparseF*>(hs_dilepton_lspp_same->Clone("hs_dilepton_lspp_mix")));
344+
list->Add(reinterpret_cast<THnSparseF*>(hs_dilepton_lsmm_same->Clone("hs_dilepton_lsmm_mix")));
342345
}
343346
} else {
344347
LOGF(info, "EE or MuMu are supported.");

PWGEM/PhotonMeson/Tasks/dalitzEEQC.cxx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ struct DalitzEEQC {
146146
THashList* list_ev_after = static_cast<THashList*>(fMainList->FindObject("Event")->FindObject(event_types[1].data()));
147147
THashList* list_dalitzee = static_cast<THashList*>(fMainList->FindObject("DalitzEE"));
148148
THashList* list_track = static_cast<THashList*>(fMainList->FindObject("Track"));
149-
double values[4] = {0, 0, 0, 0};
149+
double values[3] = {0, 0, 0};
150150
double values_single[4] = {0, 0, 0, 0};
151151
float dca_pos_3d = 999.f, dca_ele_3d = 999.f, dca_ee_3d = 999.f;
152152

@@ -195,8 +195,8 @@ struct DalitzEEQC {
195195
values[0] = uls_pair.mass();
196196
values[1] = uls_pair.pt();
197197
values[2] = dca_ee_3d;
198-
values[3] = uls_pair.phiv();
199198
reinterpret_cast<THnSparseF*>(list_dalitzee_cut->FindObject("hs_dilepton_uls_same"))->Fill(values);
199+
reinterpret_cast<TH2F*>(list_dalitzee_cut->FindObject("hMvsPhiV_uls_same"))->Fill(uls_pair.phiv(), uls_pair.mass());
200200
nuls++;
201201
for (auto& track : {pos, ele}) {
202202
if (std::find(used_trackIds.begin(), used_trackIds.end(), track.globalIndex()) == used_trackIds.end()) {
@@ -226,8 +226,8 @@ struct DalitzEEQC {
226226
values[0] = lspp_pair.mass();
227227
values[1] = lspp_pair.pt();
228228
values[2] = dca_ee_3d;
229-
values[3] = lspp_pair.phiv();
230229
reinterpret_cast<THnSparseF*>(list_dalitzee_cut->FindObject("hs_dilepton_lspp_same"))->Fill(values);
230+
reinterpret_cast<TH2F*>(list_dalitzee_cut->FindObject("hMvsPhiV_lspp_same"))->Fill(lspp_pair.phiv(), lspp_pair.mass());
231231
nlspp++;
232232
}
233233
} // end of lspp pair loop
@@ -252,8 +252,8 @@ struct DalitzEEQC {
252252
values[0] = lsmm_pair.mass();
253253
values[1] = lsmm_pair.pt();
254254
values[2] = dca_ee_3d;
255-
values[3] = lsmm_pair.phiv();
256255
reinterpret_cast<THnSparseF*>(list_dalitzee_cut->FindObject("hs_dilepton_lsmm_same"))->Fill(values);
256+
reinterpret_cast<TH2F*>(list_dalitzee_cut->FindObject("hMvsPhiV_lsmm_same"))->Fill(lsmm_pair.phiv(), lsmm_pair.mass());
257257
nlsmm++;
258258
}
259259
} // end of lsmm pair loop
@@ -286,7 +286,7 @@ struct DalitzEEQC {
286286
void MixedEventPairing(TEvents const& collisions, TTracks const& tracks, TMixedBinning const& colBinning)
287287
{
288288
THashList* list_dalitzee = static_cast<THashList*>(fMainList->FindObject("DalitzEE"));
289-
double values[4] = {0, 0, 0, 0};
289+
double values[3] = {0, 0, 0};
290290
ROOT::Math::PtEtaPhiMVector v1, v2, v12;
291291
float phiv = 0;
292292
double values_single[4] = {0, 0, 0, 0};
@@ -317,6 +317,13 @@ struct DalitzEEQC {
317317
v2 = ROOT::Math::PtEtaPhiMVector(t2.pt(), t2.eta(), t2.phi(), o2::constants::physics::MassElectron);
318318
v12 = v1 + v2;
319319
phiv = getPhivPair(t1.px(), t1.py(), t1.pz(), t2.px(), t2.py(), t2.pz(), t1.sign(), t2.sign(), collision1.bz());
320+
// if (!std::isfinite(phiv)) {
321+
// LOGF(info, "t1.px() = %f, t1.py() = %f, t1.pz() = %f, t2.px() = %f, t2.py() = %f, t2.pz() = %f, phiv = %f", t1.px(), t1.py(), t1.pz(), t2.px(), t2.py(), t2.pz(), phiv);
322+
// }
323+
324+
if (t1.trackId() == t2.trackId()) { // this is protection against pairing identical 2 tracks. This happens, when TTCA is used. TTCA can assign a track to several possible collisions.
325+
continue;
326+
}
320327

321328
dca_pos_3d = t1.dca3DinSigma();
322329
dca_ele_3d = t2.dca3DinSigma();
@@ -330,15 +337,17 @@ struct DalitzEEQC {
330337
values[0] = v12.M();
331338
values[1] = v12.Pt();
332339
values[2] = dca_ee_3d;
333-
values[3] = phiv;
334340

335341
if (cut.IsSelectedTrack(t1) && cut.IsSelectedTrack(t2) && cut.IsSelectedPair(v12.M(), dca_ee_3d, phiv)) {
336342
if (t1.sign() * t2.sign() < 0) {
337343
reinterpret_cast<THnSparseF*>(list_dalitzee_cut->FindObject("hs_dilepton_uls_mix"))->Fill(values);
344+
reinterpret_cast<TH2F*>(list_dalitzee_cut->FindObject("hMvsPhiV_uls_mix"))->Fill(phiv, v12.M());
338345
} else if (t1.sign() > 0 && t2.sign() > 0) {
339346
reinterpret_cast<THnSparseF*>(list_dalitzee_cut->FindObject("hs_dilepton_lspp_mix"))->Fill(values);
347+
reinterpret_cast<TH2F*>(list_dalitzee_cut->FindObject("hMvsPhiV_lspp_mix"))->Fill(phiv, v12.M());
340348
} else if (t1.sign() < 0 && t2.sign() < 0) {
341349
reinterpret_cast<THnSparseF*>(list_dalitzee_cut->FindObject("hs_dilepton_lsmm_mix"))->Fill(values);
350+
reinterpret_cast<TH2F*>(list_dalitzee_cut->FindObject("hMvsPhiV_lsmm_mix"))->Fill(phiv, v12.M());
342351
} else {
343352
LOGF(info, "This should not happen.");
344353
}

PWGEM/PhotonMeson/Tasks/dalitzEEQCMC.cxx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ struct DalitzEEQCMC {
170170
THashList* list_ev_after = static_cast<THashList*>(fMainList->FindObject("Event")->FindObject(event_types[1].data()));
171171
THashList* list_dalitzee = static_cast<THashList*>(fMainList->FindObject("DalitzEE"));
172172
THashList* list_track = static_cast<THashList*>(fMainList->FindObject("Track"));
173-
double values[4] = {0, 0, 0, 0};
173+
double values[3] = {0, 0, 0};
174174
double values_single[4] = {0, 0, 0, 0};
175175
float dca_pos_3d = 999.f, dca_ele_3d = 999.f, dca_ee_3d = 999.f;
176176

@@ -227,7 +227,6 @@ struct DalitzEEQCMC {
227227
values[0] = uls_pair.mass();
228228
values[1] = uls_pair.pt();
229229
values[2] = dca_ee_3d;
230-
values[3] = uls_pair.phiv();
231230

232231
if (mother_id > -1) {
233232
auto mcmother = mcparticles.iteratorAt(mother_id);
@@ -354,7 +353,6 @@ struct DalitzEEQCMC {
354353
values[0] = lspp_pair.mass();
355354
values[1] = lspp_pair.pt();
356355
values[2] = dca_ee_3d;
357-
values[3] = lspp_pair.phiv();
358356

359357
if ((posmc.isPhysicalPrimary() || posmc.producedByGenerator()) && (elemc.isPhysicalPrimary() || elemc.producedByGenerator())) {
360358
switch (hfee_type) {
@@ -418,7 +416,6 @@ struct DalitzEEQCMC {
418416
values[0] = lsmm_pair.mass();
419417
values[1] = lsmm_pair.pt();
420418
values[2] = dca_ee_3d;
421-
values[3] = lsmm_pair.phiv();
422419

423420
if ((posmc.isPhysicalPrimary() || posmc.producedByGenerator()) && (elemc.isPhysicalPrimary() || elemc.producedByGenerator())) {
424421
switch (hfee_type) {

PWGEM/PhotonMeson/Tasks/dalitzMuMuQC.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ struct DalitzMuMuQC {
156156
THashList* list_ev_after = static_cast<THashList*>(fMainList->FindObject("Event")->FindObject(event_types[1].data()));
157157
THashList* list_dalitzmumu = static_cast<THashList*>(fMainList->FindObject("DalitzMuMu"));
158158
THashList* list_track = static_cast<THashList*>(fMainList->FindObject("Track"));
159-
double values[4] = {0, 0, 0, 0};
159+
double values[3] = {0, 0, 0};
160160
float dca_pos_3d = 999.f, dca_ele_3d = 999.f, dca_ee_3d = 999.f;
161161

162162
for (auto& collision : grouped_collisions) {
@@ -195,7 +195,6 @@ struct DalitzMuMuQC {
195195
values[0] = uls_pair.mass();
196196
values[1] = uls_pair.pt();
197197
values[2] = dca_ee_3d;
198-
values[3] = uls_pair.phiv();
199198
reinterpret_cast<THnSparseF*>(list_dalitzmumu_cut->FindObject("hs_dilepton_uls_same"))->Fill(values);
200199
nuls++;
201200
for (auto& track : {pos, ele}) {
@@ -219,7 +218,6 @@ struct DalitzMuMuQC {
219218
values[0] = lspp_pair.mass();
220219
values[1] = lspp_pair.pt();
221220
values[2] = dca_ee_3d;
222-
values[3] = lspp_pair.phiv();
223221
reinterpret_cast<THnSparseF*>(list_dalitzmumu_cut->FindObject("hs_dilepton_lspp_same"))->Fill(values);
224222
nlspp++;
225223
}
@@ -237,7 +235,6 @@ struct DalitzMuMuQC {
237235
values[0] = lsmm_pair.mass();
238236
values[1] = lsmm_pair.pt();
239237
values[2] = dca_ee_3d;
240-
values[3] = lsmm_pair.phiv();
241238
reinterpret_cast<THnSparseF*>(list_dalitzmumu_cut->FindObject("hs_dilepton_lsmm_same"))->Fill(values);
242239
nlsmm++;
243240
}
@@ -271,7 +268,7 @@ struct DalitzMuMuQC {
271268
void MixedEventPairing(TEvents const& collisions, TTracks const& tracks, TMixedBinning const& colBinning)
272269
{
273270
THashList* list_dalitzmumu = static_cast<THashList*>(fMainList->FindObject("DalitzMuMu"));
274-
double values[4] = {0, 0, 0, 0};
271+
double values[3] = {0, 0, 0};
275272
ROOT::Math::PtEtaPhiMVector v1, v2, v12;
276273
float phiv = 0;
277274
float dca_pos_3d = 999.f, dca_ele_3d = 999.f, dca_ee_3d = 999.f;
@@ -297,6 +294,10 @@ struct DalitzMuMuQC {
297294
for (auto& cut : fDalitzMuMuCuts) {
298295
THashList* list_dalitzmumu_cut = static_cast<THashList*>(list_dalitzmumu->FindObject(cut.GetName()));
299296
for (auto& [t1, t2] : combinations(soa::CombinationsFullIndexPolicy(tracks_coll1, tracks_coll2))) {
297+
if (t1.trackId() == t2.trackId()) { // this is protection against pairing identical 2 tracks. This happens, when TTCA is used. TTCA can assign a track to several possible collisions.
298+
continue;
299+
}
300+
300301
v1 = ROOT::Math::PtEtaPhiMVector(t1.pt(), t1.eta(), t1.phi(), o2::constants::physics::MassMuon);
301302
v2 = ROOT::Math::PtEtaPhiMVector(t2.pt(), t2.eta(), t2.phi(), o2::constants::physics::MassMuon);
302303
v12 = v1 + v2;
@@ -308,7 +309,6 @@ struct DalitzMuMuQC {
308309
values[0] = v12.M();
309310
values[1] = v12.Pt();
310311
values[2] = dca_ee_3d;
311-
values[3] = phiv;
312312

313313
if (cut.IsSelectedTrack(t1) && cut.IsSelectedTrack(t2) && cut.IsSelectedPair(v12.M(), dca_ee_3d, phiv)) {
314314
if (t1.sign() * t2.sign() < 0) {

PWGEM/PhotonMeson/Tasks/dalitzMuMuQCMC.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ struct DalitzMuMuQCMC {
161161
THashList* list_ev_after = static_cast<THashList*>(fMainList->FindObject("Event")->FindObject(event_types[1].data()));
162162
THashList* list_dalitzmumu = static_cast<THashList*>(fMainList->FindObject("DalitzMuMu"));
163163
THashList* list_track = static_cast<THashList*>(fMainList->FindObject("Track"));
164-
double values[4] = {0, 0, 0, 0};
164+
double values[3] = {0, 0, 0};
165165
float dca_pos_3d = 999.f, dca_ele_3d = 999.f, dca_ee_3d = 999.f;
166166

167167
for (auto& collision : grouped_collisions) {
@@ -211,7 +211,6 @@ struct DalitzMuMuQCMC {
211211
values[0] = uls_pair.mass();
212212
values[1] = uls_pair.pt();
213213
values[2] = dca_ee_3d;
214-
values[3] = uls_pair.phiv();
215214
reinterpret_cast<THnSparseF*>(list_dalitzmumu_cut->FindObject("hs_dilepton_uls_same"))->Fill(values);
216215

217216
nuls++;

0 commit comments

Comments
 (0)