|
16 | 16 | #ifndef PWGCF_FEMTODREAM_CORE_FEMTODREAMDETADPHISTAR_H_ |
17 | 17 | #define PWGCF_FEMTODREAM_CORE_FEMTODREAMDETADPHISTAR_H_ |
18 | 18 |
|
| 19 | +#include "PWGCF/DataModel/FemtoDerived.h" |
| 20 | + |
| 21 | +#include "Framework/HistogramRegistry.h" |
| 22 | + |
19 | 23 | #include <memory> |
20 | 24 | #include <string> |
21 | 25 | #include <vector> |
22 | | -#include "PWGCF/DataModel/FemtoDerived.h" |
23 | | -#include "Framework/HistogramRegistry.h" |
24 | 26 |
|
25 | 27 | using namespace o2; |
26 | 28 | using namespace o2::framework; |
@@ -98,6 +100,24 @@ class FemtoDreamDetaDphiStar |
98 | 100 | } |
99 | 101 | } |
100 | 102 | } |
| 103 | + if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kV0 && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kV0) { |
| 104 | + for (int i = 0; i < 4; i++) { |
| 105 | + std::string dirName = static_cast<std::string>(dirNames[1]); |
| 106 | + histdetadpi[i][0] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(histNames[0][i]) + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); |
| 107 | + histdetadpi[i][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(histNames[1][i]) + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); |
| 108 | + histdetadpi[i][2] = mHistogramRegistry->add<TH2>((dirName + "at_PV_" + std::to_string(i) + "_before" + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); |
| 109 | + histdetadpi[i][3] = mHistogramRegistry->add<TH2>((dirName + "at_PV_" + std::to_string(i) + "_after" + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); |
| 110 | + if (plotForEveryRadii) { |
| 111 | + for (int j = 0; j < 9; j++) { |
| 112 | + histdetadpiRadii[i][j] = mHistogramRegistryQA->add<TH2>((dirName + static_cast<std::string>(histNamesRadii[i][j]) + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); |
| 113 | + } |
| 114 | + } |
| 115 | + if (fillQA) { |
| 116 | + histdetadpi_eta[i] = mHistogramRegistry->add<THnSparse>((dirName + "dEtadPhi_Eta_" + std::to_string(i) + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}; #eta_{1}; #eta_{2}", kTHnSparseF, {{100, -0.15, 0.15}, {100, -0.15, 0.15}, {100, -0.8, 0.8}, {100, -0.8, 0.8}}); |
| 117 | + histdetadpi_phi[i] = mHistogramRegistry->add<THnSparse>((dirName + "dEtadPhi_Phi_" + std::to_string(i) + static_cast<std::string>(histNameSEorME[meORse])).c_str(), "; #Delta #eta; #Delta #phi^{*}; #phi_{1}; #phi_{2}", kTHnSparseF, {{100, -0.15, 0.15}, {100, -0.15, 0.15}, {100, 0, 6.28}, {100, 0, 6.28}}); |
| 118 | + } |
| 119 | + } |
| 120 | + } |
101 | 121 | if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kCharmHadron) { |
102 | 122 | for (int i = 0; i < Nprongs; i++) { |
103 | 123 | std::string dirName = static_cast<std::string>(dirNames[2]); |
@@ -293,6 +313,86 @@ class FemtoDreamDetaDphiStar |
293 | 313 | } |
294 | 314 | } |
295 | 315 | } |
| 316 | + return pass; |
| 317 | + } else if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kV0 && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kV0) { |
| 318 | + /// V0-V0 combination |
| 319 | + // check if provided particles are in agreement with the class instantiation |
| 320 | + if (part1.partType() != o2::aod::femtodreamparticle::ParticleType::kV0 || part2.partType() != o2::aod::femtodreamparticle::ParticleType::kV0) { |
| 321 | + LOG(fatal) << "FemtoDreamDetaDphiStar: passed arguments don't agree with FemtoDreamDetaDphiStar instantiation! Please provide kV0,kV0 candidates."; |
| 322 | + return false; |
| 323 | + } |
| 324 | + |
| 325 | + bool pass = false; |
| 326 | + int nhist = 0; |
| 327 | + for (int i = 0; i < 2; i++) { |
| 328 | + int indexOfDaughterPart1, indexOfDaughterPart2; |
| 329 | + for (int j = 0; j < 2; j++) { |
| 330 | + if (isMixedEventLambda) { |
| 331 | + indexOfDaughterPart1 = part1.globalIndex() - 2 + i; |
| 332 | + indexOfDaughterPart2 = part2.globalIndex() - 2 + j; |
| 333 | + } else { |
| 334 | + indexOfDaughterPart1 = part1.index() - 2 + i; |
| 335 | + indexOfDaughterPart2 = part2.index() - 2 + j; |
| 336 | + } |
| 337 | + |
| 338 | + auto daughterPart1 = particles.begin() + indexOfDaughterPart1; |
| 339 | + auto daughterPart2 = particles.begin() + indexOfDaughterPart2; |
| 340 | + auto deta = daughterPart1.eta() - daughterPart2.eta(); |
| 341 | + auto dphi_AT_PV = daughterPart1.phi() - daughterPart2.phi(); |
| 342 | + auto dphi_AT_SpecificRadii = PhiAtSpecificRadiiTPC(daughterPart1, radiiTPC) - PhiAtSpecificRadiiTPC(daughterPart2, radiiTPC); |
| 343 | + bool sameCharge = false; |
| 344 | + auto dphiAvg = AveragePhiStar(*daughterPart1, *daughterPart2, nhist, &sameCharge); |
| 345 | + if (Q3 == 999) { |
| 346 | + histdetadpi[nhist][0]->Fill(deta, dphiAvg); |
| 347 | + histdetadpi[nhist][2]->Fill(deta, dphi_AT_PV); |
| 348 | + if (fillQA) { |
| 349 | + histdetadpi_eta[nhist]->Fill(deta, dphiAvg, daughterPart1.eta(), daughterPart2.eta()); |
| 350 | + histdetadpi_phi[nhist]->Fill(deta, dphiAvg, daughterPart1.phi(), daughterPart2.phi()); |
| 351 | + } |
| 352 | + } |
| 353 | + if (sameCharge) { |
| 354 | + if (atWhichRadiiToSelect == 1) { |
| 355 | + if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) { |
| 356 | + pass = true; |
| 357 | + } else { |
| 358 | + if (Q3 == 999) { |
| 359 | + histdetadpi[nhist][1]->Fill(deta, dphiAvg); |
| 360 | + histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV); |
| 361 | + } else if (Q3 < upperQ3LimitForPlotting) { |
| 362 | + histdetadpi[nhist][1]->Fill(deta, dphiAvg); |
| 363 | + histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV); |
| 364 | + } |
| 365 | + } |
| 366 | + } else if (atWhichRadiiToSelect == 0) { |
| 367 | + if (pow(dphi_AT_PV, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) { |
| 368 | + pass = true; |
| 369 | + } else { |
| 370 | + if (Q3 == 999) { |
| 371 | + histdetadpi[nhist][1]->Fill(deta, dphiAvg); |
| 372 | + histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV); |
| 373 | + } else if (Q3 < upperQ3LimitForPlotting) { |
| 374 | + histdetadpi[nhist][1]->Fill(deta, dphiAvg); |
| 375 | + histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV); |
| 376 | + } |
| 377 | + } |
| 378 | + } else if (atWhichRadiiToSelect == 2) { |
| 379 | + if (pow(dphi_AT_SpecificRadii, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) { |
| 380 | + pass = true; |
| 381 | + } else { |
| 382 | + if (Q3 == 999) { |
| 383 | + histdetadpi[nhist][1]->Fill(deta, dphiAvg); |
| 384 | + histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV); |
| 385 | + } else if (Q3 < upperQ3LimitForPlotting) { |
| 386 | + histdetadpi[nhist][1]->Fill(deta, dphiAvg); |
| 387 | + histdetadpi[nhist][3]->Fill(deta, dphi_AT_PV); |
| 388 | + } |
| 389 | + } |
| 390 | + } |
| 391 | + } |
| 392 | + nhist += 1; |
| 393 | + } |
| 394 | + } |
| 395 | + |
296 | 396 | return pass; |
297 | 397 | } else if constexpr (mPartOneType == o2::aod::femtodreamparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtodreamparticle::ParticleType::kCharmHadron) { |
298 | 398 | // check if provided particles are in agreement with the class instantiation |
|
0 commit comments