@@ -90,18 +90,38 @@ struct strangeness_tutorial {
9090 // Configurable for track selection and multiplicity
9191 Configurable<float > cfgPTcut{" cfgPTcut" , 0 .2f , " Track PT cut" };
9292 Configurable<int > cfgNmixedEvents{" cfgNmixedEvents" , 5 , " Number of mixed events" };
93- Configurable<bool > cfgMultFT0{" cfgMultFT0" , false , " Use FT0 multiplicity" };
94- Configurable<bool > cfgMultFOTM{" cfgMultFOTM" , false , " Use FOTM multiplicity" };
95- Configurable<bool > cfgMultFT0C{" cfgMultFT0C" , true , " Use FT0C multiplicity" };
93+ Configurable<bool > cfgMultFOTM{" cfgMultFOTM" , true , " Use FOTM multiplicity if pp else use 0 here for PbPb" };
9694 ConfigurableAxis binsCent{" binsCent" , {VARIABLE_WIDTH, 0 ., 5 ., 10 ., 30 ., 50 ., 70 ., 100 ., 110 ., 150 .}, " Binning of the centrality axis" };
9795
96+ // Other cuts on Ks and glueball
97+ Configurable<bool > rapidityks{" rapidityks" , true , " rapidity cut on K0s" };
98+ Configurable<bool > masslambda{" masslambda" , false , " mass under lambda hypothesis" };
99+ Configurable<float > competingcascrejlambda{" competingcascrejlambda" , 4.3 , " rejecting competing cascade lambda" };
100+ Configurable<float > competingcascrejlambdaanti{" competingcascrejlambdaanti" , 4.3 , " rejecting competing cascade anti-lambda" };
101+ Configurable<int > tpcCrossedrows{" tpcCrossedrows" , 70 , " TPC crossed rows" };
102+ Configurable<float > tpcCrossedrowsOverfcls{" tpcCrossedrowsOverfcls" , 0.8 , " TPC crossed rows over findable clusters" };
103+ Configurable<bool > piluprejection{" piluprejection" , false , " Pileup rejection" };
104+ Configurable<bool > goodzvertex{" goodzvertex" , false , " removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference." };
105+ Configurable<bool > itstpctracks{" itstpctracks" , false , " selects collisions with at least one ITS-TPC track," };
106+
107+ // Mass and pT axis as configurables
108+ Configurable<float > cPtMin{" cPtMin" , 0 .0f , " Minimum pT" };
109+ Configurable<float > cPtMax{" cPtMax" , 15 .0f , " Maximum pT" };
110+ Configurable<int > cPtBins{" cPtBins" , 150 , " Number of pT bins" };
111+ Configurable<float > cMassMin{" cMassMin" , 0 .9f , " Minimum mass of glueball" };
112+ Configurable<float > cMassMax{" cMassMax" , 2 .4f , " Maximum mass of glueball" };
113+ Configurable<int > cMassBins{" cMassBins" , 150 , " Number of mass bins for glueball" };
114+ Configurable<float > ksMassMin{" ksMassMin" , 0 .45f , " Minimum mass of K0s" };
115+ Configurable<float > ksMassMax{" ksMassMax" , 0 .55f , " Maximum mass of K0s" };
116+ Configurable<int > ksMassBins{" ksMassBins" , 200 , " Number of mass bins for K0s" };
117+
98118 void init (InitContext const &)
99119 {
100120 // Axes
101- AxisSpec K0ShortMassAxis = {200 , 0 . 45f , 0 . 55f , " #it{M}_{inv} [GeV/#it{c}^{2}]" };
102- AxisSpec glueballMassAxis = {150 , 0 . 9f , 2 . 4f , " #it{M}_{inv} [GeV/#it{c}^{2}]" };
121+ AxisSpec K0ShortMassAxis = {ksMassBins, ksMassMin, ksMassMax , " #it{M}_{inv} [GeV/#it{c}^{2}]" };
122+ AxisSpec glueballMassAxis = {cMassBins, cMassMin, cMassMax , " #it{M}_{inv} [GeV/#it{c}^{2}]" };
103123 AxisSpec vertexZAxis = {100 , -15 .f , 15 .f , " vrtx_{Z} [cm]" }; // for histogram
104- AxisSpec ptAxis = {150 , 0 . 0f , 15 . 0f , " #it{p}_{T} (GeV/#it{c})" };
124+ AxisSpec ptAxis = {cPtBins, cPtMin, cPtMax , " #it{p}_{T} (GeV/#it{c})" };
105125 // AxisSpec multiplicityAxis = {110, 0.0f, 150.0f, "Multiplicity Axis"};
106126 AxisSpec multiplicityAxis = {binsCent, " Multiplicity Axis" };
107127
@@ -120,7 +140,8 @@ struct strangeness_tutorial {
120140 // K0s topological/PID cuts
121141 if (QAv0) {
122142 // Invariant Mass
123- rKzeroShort.add (" hMassK0ShortSelected" , " hMassK0ShortSelected" , {HistType::kTH1F , {K0ShortMassAxis}});
143+ rKzeroShort.add (" hMassK0Shortbefore" , " hMassK0Shortbefore" , kTH2F , {K0ShortMassAxis, ptAxis});
144+ rKzeroShort.add (" hMassK0ShortSelected" , " hMassK0ShortSelected" , kTH2F , {K0ShortMassAxis, ptAxis});
124145 // Topological cuts
125146 rKzeroShort.add (" hDCAV0Daughters" , " hDCAV0Daughters" , {HistType::kTH1F , {{55 , 0 .0f , 2 .2f }}});
126147 rKzeroShort.add (" hV0CosPA" , " hV0CosPA" , {HistType::kTH1F , {{100 , 0 .95f , 1 .f }}});
@@ -138,11 +159,19 @@ struct strangeness_tutorial {
138159 bool SelectionV0 (Collision const & collision, V0 const & candidate,
139160 float multiplicity)
140161 {
162+ if (QAv0) {
163+ rKzeroShort.fill (HIST (" hMassK0Shortbefore" ), candidate.mK0Short (), candidate.pt ());
164+ }
165+
141166 if (!DCAv0topv && fabs (candidate.dcav0topv ()) > cMaxV0DCA) {
142167 return false ;
143168 }
144169
145- if (TMath::Abs (candidate.yK0Short ()) > 0.5 ) {
170+ if (rapidityks && TMath::Abs (candidate.yK0Short ()) >= 0.5 ) {
171+ return false ;
172+ }
173+
174+ if (masslambda && TMath::Abs (candidate.mLambda () - candidate.mK0Short ()) >= competingcascrejlambda && TMath::Abs (candidate.mAntiLambda () - candidate.mK0Short ()) >= competingcascrejlambdaanti) {
146175 return false ;
147176 }
148177
@@ -182,7 +211,7 @@ struct strangeness_tutorial {
182211 }
183212
184213 if (QAv0) {
185- rKzeroShort.fill (HIST (" hMassK0ShortSelected" ), candidate.mK0Short ());
214+ rKzeroShort.fill (HIST (" hMassK0ShortSelected" ), candidate.mK0Short (), candidate. pt () );
186215 rKzeroShort.fill (HIST (" hLT" ), CtauK0s);
187216 rKzeroShort.fill (HIST (" hDCAV0Daughters" ), candidate.dcaV0daughters ());
188217 rKzeroShort.fill (HIST (" hV0CosPA" ), candidate.v0cosPA ());
@@ -208,9 +237,9 @@ struct strangeness_tutorial {
208237
209238 if (!track.hasTPC ())
210239 return false ;
211- if (track.tpcNClsCrossedRows () < 70 )
240+ if (track.tpcNClsCrossedRows () < tpcCrossedrows )
212241 return false ;
213- if (track.tpcCrossedRowsOverFindableCls () < 0.8 )
242+ if (track.tpcCrossedRowsOverFindableCls () < tpcCrossedrowsOverfcls )
214243 return false ;
215244
216245 if (charge < 0 && sign > 0 ) {
@@ -267,16 +296,25 @@ struct strangeness_tutorial {
267296 if (!collision.sel8 ()) {
268297 return ;
269298 }
270- if (timFrameEvsel && !collision.selection_bit (aod::evsel::kNoTimeFrameBorder )) {
299+ if (timFrameEvsel && (!collision.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !collision.selection_bit (aod::evsel::kNoITSROFrameBorder ))) {
300+ return ;
301+ }
302+ if (piluprejection && !collision.selection_bit (o2::aod::evsel::kNoSameBunchPileup )) {
303+ return ;
304+ }
305+ if (goodzvertex && !collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV )) {
306+ return ;
307+ }
308+ if (itstpctracks && !collision.selection_bit (o2::aod::evsel::kIsVertexITSTPC )) {
271309 return ;
272310 }
311+
273312 float multiplicity = 0 .0f ;
274- if (cfgMultFT0)
275- multiplicity = collision.multZeqFT0A () + collision.multZeqFT0C ();
276- else if (cfgMultFOTM)
313+ if (cfgMultFOTM) {
277314 multiplicity = collision.centFT0M ();
278- else if (cfgMultFT0C)
315+ } else {
279316 multiplicity = collision.centFT0C ();
317+ }
280318
281319 rEventSelection.fill (HIST (" hVertexZRec" ), collision.posZ ());
282320 rEventSelection.fill (HIST (" hmultiplicity" ), multiplicity);
@@ -327,7 +365,7 @@ struct strangeness_tutorial {
327365 lv2.SetPtEtaPhiM (v2.pt (), v2.eta (), v2.phi (), massK0s);
328366 lv3 = lv1 + lv2;
329367
330- if (TMath::Abs (lv3.Rapidity () <= 0.5 )) {
368+ if (TMath::Abs (lv3.Rapidity () < 0.5 )) {
331369 if (inv_mass1D) {
332370 hglue.fill (HIST (" h1glueInvMassDS" ), lv3.M ());
333371 }
@@ -354,76 +392,166 @@ struct strangeness_tutorial {
354392 void processME (EventCandidates const & collisions, TrackCandidates const & tracks, V0TrackCandidate const & v0s)
355393 {
356394 const double massK0s = TDatabasePDG::Instance ()->GetParticle (kK0Short )->Mass ();
395+ if (cfgMultFOTM) {
396+ for (auto & [c1, tracks1, c2, tracks2] : pair2) // two different centrality c1 and c2 and tracks corresponding to them
397+ {
357398
358- for (auto & [c1, tracks1, c2, tracks2] : pair1) // two different centrality c1 and c2 and tracks corresponding to them
359- {
399+ if (!c1.sel8 ()) {
400+ continue ;
401+ }
402+ if (!c2.sel8 ()) {
403+ continue ;
404+ }
360405
361- if (!c1.sel8 ()) {
362- continue ;
363- }
364- if (!c2.sel8 ()) {
365- continue ;
366- }
406+ if (timFrameEvsel && (!c1.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !c2.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !c1.selection_bit (aod::evsel::kNoITSROFrameBorder ) || !c2.selection_bit (aod::evsel::kNoITSROFrameBorder ))) {
407+ continue ;
408+ }
367409
368- if (timFrameEvsel && (!c1.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !c2.selection_bit (aod::evsel::kNoTimeFrameBorder ))) {
369- return ;
370- }
410+ if (piluprejection && !c1.selection_bit (o2::aod::evsel::kNoSameBunchPileup )) {
411+ continue ;
412+ }
413+ if (piluprejection && !c2.selection_bit (o2::aod::evsel::kNoSameBunchPileup )) {
414+ continue ;
415+ }
416+ if (goodzvertex && (!c1.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV ) || !c2.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV ))) {
417+ continue ;
418+ }
419+ if (itstpctracks && (!c1.selection_bit (o2::aod::evsel::kIsVertexITSTPC ) || !c2.selection_bit (o2::aod::evsel::kIsVertexITSTPC ))) {
420+ continue ;
421+ }
371422
372- float multiplicity = 0 .0f ;
373- if (cfgMultFT0)
374- multiplicity = c1.multZeqFT0A () + c1.multZeqFT0C ();
375- else if (cfgMultFOTM)
423+ float multiplicity = 0 .0f ;
376424 multiplicity = c1.centFT0M ();
377- else if (cfgMultFT0C)
378- multiplicity = c1.centFT0C ();
379425
380- for (auto & [t1, t2] : o2::soa::combinations (o2::soa::CombinationsStrictlyUpperIndexPolicy (tracks1, tracks2))) {
381- if (t1.size () == 0 || t2.size () == 0 ) {
382- continue ;
426+ for (auto & [t1, t2] : o2::soa::combinations (o2::soa::CombinationsStrictlyUpperIndexPolicy (tracks1, tracks2))) {
427+ if (t1.size () == 0 || t2.size () == 0 ) {
428+ continue ;
429+ }
430+
431+ if (!SelectionV0 (c1, t1, multiplicity))
432+ continue ;
433+ if (!SelectionV0 (c2, t2, multiplicity))
434+ continue ;
435+
436+ auto postrack1 = t1.template posTrack_as <TrackCandidates>();
437+ auto negtrack1 = t1.template negTrack_as <TrackCandidates>();
438+ auto postrack2 = t2.template posTrack_as <TrackCandidates>();
439+ auto negtrack2 = t2.template negTrack_as <TrackCandidates>();
440+ if (postrack1.globalIndex () == postrack2.globalIndex ()) {
441+ continue ;
442+ }
443+ if (negtrack1.globalIndex () == negtrack2.globalIndex ()) {
444+ continue ;
445+ }
446+ double nTPCSigmaPos1[1 ]{postrack1.tpcNSigmaPi ()};
447+ double nTPCSigmaNeg1[1 ]{negtrack1.tpcNSigmaPi ()};
448+ double nTPCSigmaPos2[1 ]{postrack2.tpcNSigmaPi ()};
449+ double nTPCSigmaNeg2[1 ]{negtrack2.tpcNSigmaPi ()};
450+
451+ if (!isSelectedV0Daughter (postrack1, 1 , nTPCSigmaPos1[0 ], t1)) {
452+ continue ;
453+ }
454+ if (!isSelectedV0Daughter (postrack2, 1 , nTPCSigmaPos2[0 ], t2)) {
455+ continue ;
456+ }
457+ if (!isSelectedV0Daughter (negtrack1, -1 , nTPCSigmaNeg1[0 ], t1)) {
458+ continue ;
459+ }
460+ if (!isSelectedV0Daughter (negtrack2, -1 , nTPCSigmaNeg2[0 ], t2)) {
461+ continue ;
462+ }
463+
464+ TLorentzVector lv1, lv2, lv3;
465+ lv1.SetPtEtaPhiM (t1.pt (), t1.eta (), t1.phi (), massK0s);
466+ lv2.SetPtEtaPhiM (t2.pt (), t2.eta (), t2.phi (), massK0s);
467+ lv3 = lv1 + lv2;
468+ if (TMath::Abs (lv3.Rapidity () < 0.5 )) {
469+ if (inv_mass1D) {
470+ hglue.fill (HIST (" h1glueInvMassME" ), lv3.M ());
471+ }
472+ hglue.fill (HIST (" h3glueInvMassME" ), multiplicity, lv3.Pt (), lv3.M ());
473+ }
383474 }
475+ }
476+ } else {
477+ for (auto & [c1, tracks1, c2, tracks2] : pair1) // two different centrality c1 and c2 and tracks corresponding to them
478+ {
384479
385- if (!SelectionV0 (c1, t1, multiplicity))
480+ if (!c1. sel8 ()) {
386481 continue ;
387- if (!SelectionV0 (c2, t2, multiplicity))
388- continue ;
389-
390- auto postrack1 = t1.template posTrack_as <TrackCandidates>();
391- auto negtrack1 = t1.template negTrack_as <TrackCandidates>();
392- auto postrack2 = t2.template posTrack_as <TrackCandidates>();
393- auto negtrack2 = t2.template negTrack_as <TrackCandidates>();
394- if (postrack1.globalIndex () == postrack2.globalIndex ()) {
482+ }
483+ if (!c2.sel8 ()) {
395484 continue ;
396485 }
397- if (negtrack1.globalIndex () == negtrack2.globalIndex ()) {
486+
487+ if (timFrameEvsel && (!c1.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !c2.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !c1.selection_bit (aod::evsel::kNoITSROFrameBorder ) || !c2.selection_bit (aod::evsel::kNoITSROFrameBorder ))) {
398488 continue ;
399489 }
400- double nTPCSigmaPos1[1 ]{postrack1.tpcNSigmaPi ()};
401- double nTPCSigmaNeg1[1 ]{negtrack1.tpcNSigmaPi ()};
402- double nTPCSigmaPos2[1 ]{postrack2.tpcNSigmaPi ()};
403- double nTPCSigmaNeg2[1 ]{negtrack2.tpcNSigmaPi ()};
404490
405- if (! isSelectedV0Daughter (postrack1, 1 , nTPCSigmaPos1[ 0 ], t1 )) {
491+ if (piluprejection && !c1. selection_bit (o2::aod::evsel:: kNoSameBunchPileup )) {
406492 continue ;
407493 }
408- if (! isSelectedV0Daughter (postrack2, 1 , nTPCSigmaPos2[ 0 ], t2 )) {
494+ if (piluprejection && !c2. selection_bit (o2::aod::evsel:: kNoSameBunchPileup )) {
409495 continue ;
410496 }
411- if (! isSelectedV0Daughter (negtrack1, - 1 , nTPCSigmaNeg1[ 0 ], t1 )) {
497+ if (goodzvertex && (!c1. selection_bit (o2::aod::evsel:: kIsGoodZvtxFT0vsPV ) || !c2. selection_bit (o2::aod::evsel:: kIsGoodZvtxFT0vsPV ) )) {
412498 continue ;
413499 }
414- if (! isSelectedV0Daughter (negtrack2, - 1 , nTPCSigmaNeg2[ 0 ], t2 )) {
500+ if (itstpctracks && (!c1. selection_bit (o2::aod::evsel:: kIsVertexITSTPC ) || !c2. selection_bit (o2::aod::evsel:: kIsVertexITSTPC ) )) {
415501 continue ;
416502 }
417503
418- TLorentzVector lv1, lv2, lv3;
419- lv1.SetPtEtaPhiM (t1.pt (), t1.eta (), t1.phi (), massK0s);
420- lv2.SetPtEtaPhiM (t2.pt (), t2.eta (), t2.phi (), massK0s);
421- lv3 = lv1 + lv2;
422- if (TMath::Abs (lv3.Rapidity () <= 0.5 )) {
423- if (inv_mass1D) {
424- hglue.fill (HIST (" h1glueInvMassME" ), lv3.M ());
504+ float multiplicity = 0 .0f ;
505+ multiplicity = c1.centFT0C ();
506+
507+ for (auto & [t1, t2] : o2::soa::combinations (o2::soa::CombinationsStrictlyUpperIndexPolicy (tracks1, tracks2))) {
508+ if (t1.size () == 0 || t2.size () == 0 ) {
509+ continue ;
510+ }
511+
512+ if (!SelectionV0 (c1, t1, multiplicity))
513+ continue ;
514+ if (!SelectionV0 (c2, t2, multiplicity))
515+ continue ;
516+
517+ auto postrack1 = t1.template posTrack_as <TrackCandidates>();
518+ auto negtrack1 = t1.template negTrack_as <TrackCandidates>();
519+ auto postrack2 = t2.template posTrack_as <TrackCandidates>();
520+ auto negtrack2 = t2.template negTrack_as <TrackCandidates>();
521+ if (postrack1.globalIndex () == postrack2.globalIndex ()) {
522+ continue ;
523+ }
524+ if (negtrack1.globalIndex () == negtrack2.globalIndex ()) {
525+ continue ;
526+ }
527+ double nTPCSigmaPos1[1 ]{postrack1.tpcNSigmaPi ()};
528+ double nTPCSigmaNeg1[1 ]{negtrack1.tpcNSigmaPi ()};
529+ double nTPCSigmaPos2[1 ]{postrack2.tpcNSigmaPi ()};
530+ double nTPCSigmaNeg2[1 ]{negtrack2.tpcNSigmaPi ()};
531+
532+ if (!isSelectedV0Daughter (postrack1, 1 , nTPCSigmaPos1[0 ], t1)) {
533+ continue ;
534+ }
535+ if (!isSelectedV0Daughter (postrack2, 1 , nTPCSigmaPos2[0 ], t2)) {
536+ continue ;
537+ }
538+ if (!isSelectedV0Daughter (negtrack1, -1 , nTPCSigmaNeg1[0 ], t1)) {
539+ continue ;
540+ }
541+ if (!isSelectedV0Daughter (negtrack2, -1 , nTPCSigmaNeg2[0 ], t2)) {
542+ continue ;
543+ }
544+
545+ TLorentzVector lv1, lv2, lv3;
546+ lv1.SetPtEtaPhiM (t1.pt (), t1.eta (), t1.phi (), massK0s);
547+ lv2.SetPtEtaPhiM (t2.pt (), t2.eta (), t2.phi (), massK0s);
548+ lv3 = lv1 + lv2;
549+ if (TMath::Abs (lv3.Rapidity () < 0.5 )) {
550+ if (inv_mass1D) {
551+ hglue.fill (HIST (" h1glueInvMassME" ), lv3.M ());
552+ }
553+ hglue.fill (HIST (" h3glueInvMassME" ), multiplicity, lv3.Pt (), lv3.M ());
425554 }
426- hglue.fill (HIST (" h3glueInvMassME" ), multiplicity, lv3.Pt (), lv3.M ());
427555 }
428556 }
429557 }
0 commit comments