@@ -85,11 +85,11 @@ struct femtoUniversePairTaskTrackPhi {
8585 // / Particle 1 --- IDENTIFIED HADRON
8686 Configurable<bool > ConfIsSame{" ConfIsSame" , false , " Pairs of the same particle" };
8787 struct : o2::framework::ConfigurableGroup {
88- Configurable<int > ConfTrackChoicePartTwo{ " ConfTrackChoicePartTwo " , 0 , " Type of particle (track1 ): {0:Proton, 1:Pion, 2:Kaon}" };
89- Configurable<int > ConfPDGCodePartTwo{ " ConfPDGCodePartTwo " , 2212 , " Particle 2 - PDG code" };
88+ Configurable<int > ConfTrackChoiceHadron{ " ConfTrackChoiceHadron " , 0 , " Type of particle (track ): {0:Proton, 1:Pion, 2:Kaon}" };
89+ Configurable<int > ConfPDGCodeHadron{ " ConfPDGCodeHadron " , 2212 , " Particle 2 - PDG code" };
9090 // Configurable<uint32_t> ConfCutPartTwo{"ConfCutPartTwo", 5542474, "Particle 2 - Selection bit"};
91- Configurable<int > ConfPIDPartTwo{ " ConfPIDPartTwo " , 2 , " Particle 2 - Read from cutCulator" }; // we also need the possibility to specify whether the bit is true/false ->std>>vector<std::pair<int, int>>
92- } trackhadronfilter ;
91+ Configurable<int > ConfPIDHadron{ " ConfPIDHadron " , 2 , " Particle 2 - Read from cutCulator" }; // we also need the possibility to specify whether the bit is true/false ->std>>vector<std::pair<int, int>>
92+ } trackHadronfilter ;
9393
9494 // / Partition for particle 1
9595 Partition<FemtoFullParticles> partsHadron = (aod::femtouniverseparticle::partType == uint8_t (aod::femtouniverseparticle::ParticleType::kTrack ));
@@ -100,12 +100,11 @@ struct femtoUniversePairTaskTrackPhi {
100100
101101 // / Particle 2 --- PHI
102102 struct : o2::framework::ConfigurableGroup {
103- Configurable<int > ConfTrackChoicePartOne{" ConfTrackChoicePartOne" , 3 , " Type of particle (track1): {0:Proton, 1:Pion, 2:Kaon, 3:DIFFERENT}" };
104- Configurable<int > ConfPDGCodePartOne{" ConfPDGCodePartOne" , 333 , " Phi meson - PDG code" };
105- Configurable<uint32_t > ConfCutPartOne{" ConfCutPartOne" , 5542474 , " Phi meson - Selection bit from cutCulator" };
106- Configurable<int > ConfPIDPartOne{" ConfPIDPartOne" , 2 , " Phi meson - Read from cutCulator" }; // we also need the possibility to specify whether the bit is true/false ->std>>vector<std::pair<int, int>>int>>
107- Configurable<float > cfgPtLowPart1{" cfgPtLowPart1" , 0.5 , " Lower limit for Pt for the Phi meson" }; // change according to wrzesa cuts
108- Configurable<float > cfgPtHighPart1{" cfgPtHighPart1" , 1.5 , " Higher limit for Pt for the Phi meson" };
103+ Configurable<int > ConfPDGCodePhi{" ConfPDGCodePhi" , 333 , " Phi meson - PDG code" };
104+ Configurable<uint32_t > ConfCutPhi{" ConfCutPhi" , 5542474 , " Phi meson - Selection bit from cutCulator" };
105+ Configurable<int > ConfPIDPhi{" ConfPIDPhi" , 2 , " Phi meson - Read from cutCulator" }; // we also need the possibility to specify whether the bit is true/false ->std>>vector<std::pair<int, int>>int>>
106+ Configurable<float > cfgPtLowPhi{" cfgPtLowPhi" , 0.5 , " Lower limit for Pt for the Phi meson" }; // change according to wrzesa cuts
107+ Configurable<float > cfgPtHighPhi{" cfgPtHighPhi" , 1.5 , " Higher limit for Pt for the Phi meson" };
109108 } trackPhifilter;
110109
111110 // / Partition for particle 2
@@ -187,30 +186,41 @@ struct femtoUniversePairTaskTrackPhi {
187186
188187 bool IsKaonNSigma (float mom, float nsigmaTPCK, float nsigmaTOFK)
189188 {
190- // |nsigma_TPC| < 3 for p < 0.5 GeV/c
191- // |nsigma_combined| < 3 for p > 0.5
192-
193- // using configurables:
194- // ConfNsigmaTPCTOFKaon -> are we doing TPC TOF PID for Kaons? (boolean)
195- // ConfNsigmaTPCKaon -> TPC Kaon Sigma for momentum < 0.5
196- // ConfNsigmaCombinedKaon -> TPC and TOF Kaon Sigma (combined) for momentum > 0.5
197- if (true ) {
198- if (mom < 0.5 ) {
199- if (TMath::Abs (nsigmaTPCK) < twotracksconfigs.ConfNsigmaTPCKaon ) {
200- return true ;
201- } else {
202- return false ;
203- }
204- } else if (mom > 0.5 ) {
205- // if (TMath::Hypot(nsigmaTOFK, nsigmaTPCK) < twotracksconfigs.ConfNsigmaCombinedKaon) {
206- if (TMath::Abs (nsigmaTPCK) < twotracksconfigs.ConfNsigmaCombinedKaon ) {
189+ if (mom < 0.3 ) { // 0.0-0.3
190+ if (TMath::Abs (nsigmaTPCK) < 3.0 ) {
191+ return true ;
192+ } else {
193+ return false ;
194+ }
195+ } else if (mom < 0.45 ) { // 0.30 - 0.45
196+ if (TMath::Abs (nsigmaTPCK) < 2.0 ) {
197+ return true ;
198+ } else {
199+ return false ;
200+ }
201+ } else if (mom < 0.55 ) { // 0.45-0.55
202+ if (TMath::Abs (nsigmaTPCK) < 1.0 ) {
203+ return true ;
204+ } else {
205+ return false ;
206+ }
207+ } else if (mom < 1.5 ) { // 0.55-1.5 (now we use TPC and TOF)
208+ if ((TMath::Abs (nsigmaTOFK) < 3.0 ) && (TMath::Abs (nsigmaTPCK) < 3.0 )) {
209+ {
207210 return true ;
208- } else {
209- return false ;
210211 }
212+ } else {
213+ return false ;
214+ }
215+ } else if (mom > 1.5 ) { // 1.5 -
216+ if ((TMath::Abs (nsigmaTOFK) < 2.0 ) && (TMath::Abs (nsigmaTPCK) < 3.0 )) {
217+ return true ;
218+ } else {
219+ return false ;
211220 }
221+ } else {
222+ return false ;
212223 }
213- return false ;
214224 }
215225
216226 bool IsPionNSigma (float mom, float nsigmaTPCPi, float nsigmaTOFPi)
@@ -242,7 +252,7 @@ struct femtoUniversePairTaskTrackPhi {
242252
243253 bool IsParticleNSigma (float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, float nsigmaTOFPi, float nsigmaTPCK, float nsigmaTOFK)
244254 {
245- switch (trackhadronfilter. ConfTrackChoicePartTwo ) {
255+ switch (trackHadronfilter. ConfTrackChoiceHadron ) {
246256 case 0 : // Proton
247257 return IsProtonNSigma (mom, nsigmaTPCPr, nsigmaTOFPr);
248258 break ;
@@ -255,15 +265,14 @@ struct femtoUniversePairTaskTrackPhi {
255265 default :
256266 return false ;
257267 }
258- return false ;
259268 }
260269
261270 void init (InitContext&)
262271 {
263272 eventHisto.init (&qaRegistry);
264- trackHistoPartPhi.init (&qaRegistry, ConfTempFitVarpTBins, ConfTempFitVarInvMassBins, twotracksconfigs.ConfIsMC , trackPhifilter.ConfPDGCodePartOne );
273+ trackHistoPartPhi.init (&qaRegistry, ConfTempFitVarpTBins, ConfTempFitVarInvMassBins, twotracksconfigs.ConfIsMC , trackPhifilter.ConfPDGCodePhi );
265274 if (!ConfIsSame) {
266- trackHistoPartHadron.init (&qaRegistry, ConfTempFitVarpTBins, ConfTempFitVarBins, twotracksconfigs.ConfIsMC , trackhadronfilter. ConfPDGCodePartTwo );
275+ trackHistoPartHadron.init (&qaRegistry, ConfTempFitVarpTBins, ConfTempFitVarBins, twotracksconfigs.ConfIsMC , trackHadronfilter. ConfPDGCodeHadron );
267276 }
268277
269278 MixQaRegistry.add (" MixingQA/hSECollisionBins" , " ;bin;Entries" , kTH1F , {{120 , -0.5 , 119.5 }});
@@ -274,18 +283,18 @@ struct femtoUniversePairTaskTrackPhi {
274283 sameEventAngularCont.init (&resultRegistry, ConfkstarBins, ConfMultBins, ConfkTBins, ConfmTBins, ConfmultBins3D, ConfmTBins3D, twotracksconfigs.ConfEtaBins , twotracksconfigs.ConfPhiBins , twotracksconfigs.ConfIsMC , twotracksconfigs.ConfUse3D );
275284 mixedEventAngularCont.init (&resultRegistry, ConfkstarBins, ConfMultBins, ConfkTBins, ConfmTBins, ConfmultBins3D, ConfmTBins3D, twotracksconfigs.ConfEtaBins , twotracksconfigs.ConfPhiBins , twotracksconfigs.ConfIsMC , twotracksconfigs.ConfUse3D );
276285
277- sameEventFemtoCont.setPDGCodes (trackPhifilter.ConfPDGCodePartOne , trackhadronfilter. ConfPDGCodePartTwo );
278- mixedEventFemtoCont.setPDGCodes (trackPhifilter.ConfPDGCodePartOne , trackhadronfilter. ConfPDGCodePartTwo );
279- sameEventAngularCont.setPDGCodes (trackPhifilter.ConfPDGCodePartOne , trackhadronfilter. ConfPDGCodePartTwo );
280- mixedEventAngularCont.setPDGCodes (trackPhifilter.ConfPDGCodePartOne , trackhadronfilter. ConfPDGCodePartTwo );
286+ sameEventFemtoCont.setPDGCodes (trackPhifilter.ConfPDGCodePhi , trackHadronfilter. ConfPDGCodeHadron );
287+ mixedEventFemtoCont.setPDGCodes (trackPhifilter.ConfPDGCodePhi , trackHadronfilter. ConfPDGCodeHadron );
288+ sameEventAngularCont.setPDGCodes (trackPhifilter.ConfPDGCodePhi , trackHadronfilter. ConfPDGCodeHadron );
289+ mixedEventAngularCont.setPDGCodes (trackPhifilter.ConfPDGCodePhi , trackHadronfilter. ConfPDGCodeHadron );
281290
282291 pairCleaner.init (&qaRegistry);
283292 if (ConfIsCPR.value ) {
284293 pairCloseRejection.init (&resultRegistry, &qaRegistry, ConfCPRdeltaPhiMax.value , ConfCPRdeltaEtaMax.value , ConfCPRPlotPerRadii.value );
285294 }
286295
287- vPIDPartOne = trackPhifilter.ConfPIDPartOne .value ;
288- vPIDPartTwo = trackhadronfilter. ConfPIDPartTwo .value ;
296+ vPIDPartOne = trackPhifilter.ConfPIDPhi .value ;
297+ vPIDPartTwo = trackHadronfilter. ConfPIDHadron .value ;
289298 kNsigma = twotracksconfigs.ConfTrkPIDnSigmaMax .value ;
290299 }
291300
@@ -311,17 +320,17 @@ struct femtoUniversePairTaskTrackPhi {
311320 {
312321
313322 // / Histogramming same event
314- for (auto & part : groupPartsPhi) {
315- trackHistoPartPhi.fillQA <isMC, false >(part );
323+ for (auto & phicandidate : groupPartsPhi) {
324+ trackHistoPartPhi.fillQA <isMC, false >(phicandidate );
316325 }
317326
318327 if (!ConfIsSame) {
319- for (auto & part : groupPartsHadron) {
320- // if (part .p() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxP") || part .pt() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxPt")) {
328+ for (auto & hadron : groupPartsHadron) {
329+ // if (hadron .p() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxP") || hadron .pt() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxPt")) {
321330 // continue;
322331 // }
323- // if (!isFullPIDSelected(part .pidcut(),
324- // part .p(),
332+ // if (!isFullPIDSelected(hadron .pidcut(),
333+ // hadron .p(),
325334 // twotracksconfigs.ConfCutTable->get("PartTwo", "PIDthr"),
326335 // vPIDPartTwo,
327336 // twotracksconfigs.ConfNspecies,
@@ -330,27 +339,27 @@ struct femtoUniversePairTaskTrackPhi {
330339 // twotracksconfigs.ConfCutTable->get("PartTwo", "nSigmaTPCTOF"))) {
331340 // continue;
332341 // }
333- if (!IsParticleNSigma (part .p (), trackCuts.getNsigmaTPC (part , o2::track::PID::Proton), trackCuts.getNsigmaTOF (part , o2::track::PID::Proton), trackCuts.getNsigmaTPC (part , o2::track::PID::Pion), trackCuts.getNsigmaTOF (part , o2::track::PID::Pion), trackCuts.getNsigmaTPC (part , o2::track::PID::Kaon), trackCuts.getNsigmaTOF (part , o2::track::PID::Kaon))) {
342+ if (!IsParticleNSigma (hadron .p (), trackCuts.getNsigmaTPC (hadron , o2::track::PID::Proton), trackCuts.getNsigmaTOF (hadron , o2::track::PID::Proton), trackCuts.getNsigmaTPC (hadron , o2::track::PID::Pion), trackCuts.getNsigmaTOF (hadron , o2::track::PID::Pion), trackCuts.getNsigmaTPC (hadron , o2::track::PID::Kaon), trackCuts.getNsigmaTOF (hadron , o2::track::PID::Kaon))) {
334343 continue ;
335344 }
336- trackHistoPartHadron.fillQA <isMC, false >(part );
345+ trackHistoPartHadron.fillQA <isMC, false >(hadron );
337346 }
338347 }
339348 // / Now build the combinations
340- for (auto & [p1, p2 ] : combinations (CombinationsFullIndexPolicy (groupPartsHadron, groupPartsPhi))) {
341- // if (p1 .p() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxP") || p1 .pt() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxPt") || p2 .p() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxP") || p2 .pt() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxPt")) {
349+ for (auto & [hadron, phicandidate ] : combinations (CombinationsFullIndexPolicy (groupPartsHadron, groupPartsPhi))) {
350+ // if (hadron .p() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxP") || hadron .pt() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxPt") || phicandidate .p() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxP") || phicandidate .pt() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxPt")) {
342351 // continue;
343352 // }
344- // if (!isFullPIDSelected(p1 .pidcut(),
345- // p1 .p(),
353+ // if (!isFullPIDSelected(hadron .pidcut(),
354+ // hadron .p(),
346355 // twotracksconfigs.ConfCutTable->get("PartOne", "PIDthr"),
347356 // vPIDPartOne,
348357 // twotracksconfigs.ConfNspecies,
349358 // kNsigma,
350359 // twotracksconfigs.ConfCutTable->get("PartOne", "nSigmaTPC"),
351360 // twotracksconfigs.ConfCutTable->get("PartOne", "nSigmaTPCTOF")) ||
352- // !isFullPIDSelected(p2 .pidcut(),
353- // p2 .p(),
361+ // !isFullPIDSelected(phicandidate .pidcut(),
362+ // phicandidate .p(),
354363 // twotracksconfigs.ConfCutTable->get("PartTwo", "PIDthr"),
355364 // vPIDPartTwo,
356365 // twotracksconfigs.ConfNspecies,
@@ -360,23 +369,23 @@ struct femtoUniversePairTaskTrackPhi {
360369 // continue;
361370 // }
362371
363- if (!IsParticleNSigma (p2 .p (), trackCuts.getNsigmaTPC (p2 , o2::track::PID::Proton), trackCuts.getNsigmaTOF (p2 , o2::track::PID::Proton), trackCuts.getNsigmaTPC (p2 , o2::track::PID::Pion), trackCuts.getNsigmaTOF (p2 , o2::track::PID::Pion), trackCuts.getNsigmaTPC (p2 , o2::track::PID::Kaon), trackCuts.getNsigmaTOF (p2 , o2::track::PID::Kaon))) {
372+ if (!IsParticleNSigma (hadron .p (), trackCuts.getNsigmaTPC (hadron , o2::track::PID::Proton), trackCuts.getNsigmaTOF (hadron , o2::track::PID::Proton), trackCuts.getNsigmaTPC (hadron , o2::track::PID::Pion), trackCuts.getNsigmaTOF (hadron , o2::track::PID::Pion), trackCuts.getNsigmaTPC (hadron , o2::track::PID::Kaon), trackCuts.getNsigmaTOF (hadron , o2::track::PID::Kaon))) {
364373 continue ;
365374 }
366375
367376 // Close Pair Rejection
368377 // if (ConfIsCPR.value) {
369- if (pairCloseRejection.isClosePair (p1, p2 , parts, magFieldTesla)) {
378+ if (pairCloseRejection.isClosePair (hadron, phicandidate , parts, magFieldTesla)) {
370379 continue ;
371380 }
372381 // }
373382
374383 // Track Cleaning
375- if (!pairCleaner.isCleanPair (p1, p2 , parts)) {
384+ if (!pairCleaner.isCleanPair (hadron, phicandidate , parts)) {
376385 continue ;
377386 }
378- sameEventFemtoCont.setPair <isMC>(p1, p2 , multCol, twotracksconfigs.ConfUse3D );
379- sameEventAngularCont.setPair <isMC>(p1, p2 , multCol, twotracksconfigs.ConfUse3D );
387+ sameEventFemtoCont.setPair <isMC>(hadron, phicandidate , multCol, twotracksconfigs.ConfUse3D );
388+ sameEventAngularCont.setPair <isMC>(hadron, phicandidate , multCol, twotracksconfigs.ConfUse3D );
380389 }
381390 }
382391
@@ -426,20 +435,20 @@ struct femtoUniversePairTaskTrackPhi {
426435 void doMixedEvent (PartitionType groupPartsHadron, PartitionType groupPartsPhi, PartType parts, float magFieldTesla, int multCol)
427436 {
428437
429- for (auto & [p1, p2 ] : combinations (CombinationsFullIndexPolicy (groupPartsHadron, groupPartsPhi))) {
430- // if (p1 .p() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxP") || p1 .pt() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxPt") || p2 .p() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxP") || p2 .pt() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxPt")) {
438+ for (auto & [hadron, phicandidate ] : combinations (CombinationsFullIndexPolicy (groupPartsHadron, groupPartsPhi))) {
439+ // if (hadron .p() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxP") || hadron .pt() > twotracksconfigs.ConfCutTable->get("PartOne", "MaxPt") || phicandidate .p() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxP") || phicandidate .pt() > twotracksconfigs.ConfCutTable->get("PartTwo", "MaxPt")) {
431440 // continue;
432441 // }
433- // if (!isFullPIDSelected(p1 .pidcut(),
434- // p1 .p(),
442+ // if (!isFullPIDSelected(hadron .pidcut(),
443+ // hadron .p(),
435444 // twotracksconfigs.ConfCutTable->get("PartOne", "PIDthr"),
436445 // vPIDPartOne,
437446 // twotracksconfigs.ConfNspecies,
438447 // kNsigma,
439448 // twotracksconfigs.ConfCutTable->get("PartOne", "nSigmaTPC"),
440449 // twotracksconfigs.ConfCutTable->get("PartOne", "nSigmaTPCTOF")) ||
441- // !isFullPIDSelected(p2 .pidcut(),
442- // p2 .p(),
450+ // !isFullPIDSelected(phicandidate .pidcut(),
451+ // phicandidate .p(),
443452 // twotracksconfigs.ConfCutTable->get("PartTwo", "PIDthr"),
444453 // vPIDPartTwo,
445454 // twotracksconfigs.ConfNspecies,
@@ -449,18 +458,18 @@ struct femtoUniversePairTaskTrackPhi {
449458 // continue;
450459 // }
451460
452- if (!IsParticleNSigma (p2 .p (), trackCuts.getNsigmaTPC (p2 , o2::track::PID::Proton), trackCuts.getNsigmaTOF (p2 , o2::track::PID::Proton), trackCuts.getNsigmaTPC (p2 , o2::track::PID::Pion), trackCuts.getNsigmaTOF (p2 , o2::track::PID::Pion), trackCuts.getNsigmaTPC (p2 , o2::track::PID::Kaon), trackCuts.getNsigmaTOF (p2 , o2::track::PID::Kaon))) {
461+ if (!IsParticleNSigma (hadron .p (), trackCuts.getNsigmaTPC (hadron , o2::track::PID::Proton), trackCuts.getNsigmaTOF (hadron , o2::track::PID::Proton), trackCuts.getNsigmaTPC (hadron , o2::track::PID::Pion), trackCuts.getNsigmaTOF (hadron , o2::track::PID::Pion), trackCuts.getNsigmaTPC (hadron , o2::track::PID::Kaon), trackCuts.getNsigmaTOF (hadron , o2::track::PID::Kaon))) {
453462 continue ;
454463 }
455464
456- // if (ConfIsCPR.value) {
457- if (pairCloseRejection.isClosePair (p1, p2 , parts, magFieldTesla)) {
465+ // // if (ConfIsCPR.value) {
466+ if (pairCloseRejection.isClosePair (hadron, phicandidate , parts, magFieldTesla)) {
458467 continue ;
459468 }
460469 // }
461470
462- mixedEventFemtoCont.setPair <isMC>(p1, p2 , multCol, twotracksconfigs.ConfUse3D );
463- mixedEventAngularCont.setPair <isMC>(p1, p2 , multCol, twotracksconfigs.ConfUse3D );
471+ mixedEventFemtoCont.setPair <isMC>(hadron, phicandidate , multCol, twotracksconfigs.ConfUse3D );
472+ mixedEventAngularCont.setPair <isMC>(hadron, phicandidate , multCol, twotracksconfigs.ConfUse3D );
464473 }
465474 }
466475
0 commit comments