@@ -62,6 +62,7 @@ struct strangeness_tutorial {
6262 Configurable<bool > QAv0{" QAv0" , false , " QAv0" };
6363 Configurable<bool > QAPID{" QAPID" , false , " QAPID" };
6464 Configurable<bool > QAv0_daughters{" QAv0_daughters" , false , " QA of v0 daughters" };
65+ Configurable<bool > QAevents{" QAevents" , false , " QA of events" };
6566 Configurable<bool > inv_mass1D{" inv_mass1D" , false , " 1D invariant mass histograms" };
6667 Configurable<bool > DCAv0topv{" DCAv0topv" , false , " DCA V0 to PV" };
6768 Configurable<bool > armcut{" armcut" , true , " arm cut" };
@@ -131,6 +132,8 @@ struct strangeness_tutorial {
131132 Configurable<float > ksMassMax{" ksMassMax" , 0 .55f , " Maximum mass of K0s" };
132133 Configurable<int > ksMassBins{" ksMassBins" , 200 , " Number of mass bins for K0s" };
133134 ConfigurableAxis configThnAxisPOL{" configThnAxisPOL" , {20 , -1.0 , 1.0 }, " Costheta axis" };
135+ ConfigurableAxis axisdEdx{" axisdEdx" , {20000 , 0 .0f , 200 .0f }, " dE/dx (a.u.)" };
136+ ConfigurableAxis axisPtfordEbydx{" axisPtfordEbydx" , {2000 , 0 , 20 }, " pT (GeV/c)" };
134137
135138 // Event selection cuts - Alex (Temporary, need to fix!)
136139 TF1* fMultPVCutLow = nullptr ;
@@ -173,8 +176,14 @@ struct strangeness_tutorial {
173176 }
174177
175178 // Event selection
176- rEventSelection.add (" hVertexZRec" , " hVertexZRec" , {HistType::kTH1F , {vertexZAxis}});
177- rEventSelection.add (" hmultiplicity" , " hmultiplicity" , {HistType::kTH1F , {{150 , 0 .0f , 150 .0f }}});
179+ if (QAevents) {
180+ rEventSelection.add (" hVertexZRec" , " hVertexZRec" , {HistType::kTH1F , {vertexZAxis}});
181+ rEventSelection.add (" hmultiplicity" , " multiplicity percentile distribution" , {HistType::kTH1F , {{150 , 0 .0f , 150 .0f }}});
182+ rEventSelection.add (" multdist_FT0M" , " FT0M Multiplicity distribution" , kTH1F , {{2000 , 0 , 20000 }});
183+ rEventSelection.add (" multdist_FT0A" , " FT0A Multiplicity distribution" , kTH1F , {{2000 , 0 , 20000 }});
184+ rEventSelection.add (" multdist_FT0C" , " FT0C Multiplicity distribution" , kTH1F , {{2000 , 0 , 20000 }});
185+ rEventSelection.add (" hNcontributor" , " Number of primary vertex contributor" , kTH1F , {{2000 , 0 .0f , 10000 .0f }});
186+ }
178187
179188 if (inv_mass1D) {
180189 hglue.add (" h1glueInvMassDS" , " h1glueInvMassDS" , kTH1F , {glueballMassAxis});
@@ -185,14 +194,9 @@ struct strangeness_tutorial {
185194 hglue.add (" h3glueInvMassDS" , " h3glueInvMassDS" , kTHnSparseF , {multiplicityAxis, ptAxis, glueballMassAxis, thnAxisPOL}, true );
186195 hglue.add (" h3glueInvMassME" , " h3glueInvMassME" , kTHnSparseF , {multiplicityAxis, ptAxis, glueballMassAxis, thnAxisPOL}, true );
187196 hglue.add (" h3glueInvMassRot" , " h3glueInvMassRot" , kTHnSparseF , {multiplicityAxis, ptAxis, glueballMassAxis, thnAxisPOL}, true );
188-
189- hglue.add (" heventscheck" , " heventscheck" , kTH1F , {{9 , 0 , 9 }});
190-
191- // add angular distribution polarization axes
192- // histos.add("hSparseHESASameEvent", "hSparseHESASameEvent", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt,thnAxisCentrality,thnAxisPOL});
193- // histos.add("hSparsePPSASameEvent", "hSparsePPSASameEvent", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt,thnAxisCentrality,thnAxisPOL});
194- // histos.add("hSparseBASASameEvent", "hSparseBASASameEvent", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt,thnAxisCentrality,thnAxisPOL});
195- // histos.add("hSparseRndASASameEvent", "hSparseRndASASameEvent", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt,thnAxisCentrality,thnAxisPOL});
197+ hglue.add (" heventscheck" , " heventscheck" , kTH1I , {{10 , 0 , 10 }});
198+ hglue.add (" htrackscheck_v0" , " htrackscheck_v0" , kTH1I , {{15 , 0 , 15 }});
199+ hglue.add (" htrackscheck_v0_daughters" , " htrackscheck_v0_daughters" , kTH1I , {{15 , 0 , 15 }});
196200
197201 // K0s topological/PID cuts
198202 if (QAv0) {
@@ -226,9 +230,10 @@ struct strangeness_tutorial {
226230 }
227231 if (QAPID) {
228232 rKzeroShort.add (" hNSigmaPosPionK0s_before" , " hNSigmaPosPionK0s_before" , {HistType::kTH2F , {{ptAxis}, {100 , -5 .f , 5 .f }}});
229- rKzeroShort.add (" hNSigmaPosPionK0s_after" , " hNSigmaPosPionK0s_after" , {HistType::kTH2F , {{ptAxis}, {100 , -5 .f , 5 .f }}});
233+ // rKzeroShort.add("hNSigmaPosPionK0s_after", "hNSigmaPosPionK0s_after", {HistType::kTH2F, {{ptAxis}, {100, -5.f, 5.f}}});
230234 rKzeroShort.add (" hNSigmaNegPionK0s_before" , " hNSigmaNegPionK0s_before" , {HistType::kTH2F , {{ptAxis}, {100 , -5 .f , 5 .f }}});
231- rKzeroShort.add (" hNSigmaNegPionK0s_after" , " hNSigmaNegPionK0s_after" , {HistType::kTH2F , {{ptAxis}, {100 , -5 .f , 5 .f }}});
235+ // rKzeroShort.add("hNSigmaNegPionK0s_after", "hNSigmaNegPionK0s_after", {HistType::kTH2F, {{ptAxis}, {100, -5.f, 5.f}}});
236+ rKzeroShort.add (" dE_by_dx_TPC" , " dE/dx signal in the TPC as a function of pT" , kTH2F , {axisPtfordEbydx, axisdEdx});
232237 }
233238 if (QAv0_daughters) {
234239 rKzeroShort.add (" negative_pt" , " Negative daughter pT" , kTH1F , {ptAxis});
@@ -255,21 +260,28 @@ struct strangeness_tutorial {
255260 template <typename Collision>
256261 bool eventselection (Collision const & collision, const float & multiplicity)
257262 {
258- if (!collision.sel8 ()) {
263+ hglue.fill (HIST (" heventscheck" ), 1.5 );
264+
265+ if (timFrameEvsel && (!collision.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !collision.selection_bit (aod::evsel::kNoITSROFrameBorder ))) {
259266 return false ;
260267 }
261- if (timFrameEvsel && (!collision.selection_bit (aod::evsel::kNoTimeFrameBorder ) || !collision.selection_bit (aod::evsel::kNoITSROFrameBorder ))) {
268+ hglue.fill (HIST (" heventscheck" ), 2.5 );
269+ if (!collision.sel8 ()) {
262270 return false ;
263271 }
272+ hglue.fill (HIST (" heventscheck" ), 3.5 );
264273 if (piluprejection && !collision.selection_bit (o2::aod::evsel::kNoSameBunchPileup )) {
265274 return false ;
266275 }
276+ hglue.fill (HIST (" heventscheck" ), 4.5 );
267277 if (goodzvertex && !collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV )) {
268278 return false ;
269279 }
280+ hglue.fill (HIST (" heventscheck" ), 5.5 );
270281 if (itstpctracks && !collision.selection_bit (o2::aod::evsel::kIsVertexITSTPC )) {
271282 return false ;
272283 }
284+ hglue.fill (HIST (" heventscheck" ), 6.5 );
273285 // if (collision.alias_bit(kTVXinTRD)) {
274286 // // TRD triggered
275287 // // return 0;
@@ -278,9 +290,11 @@ struct strangeness_tutorial {
278290 if (additionalEvsel && multNTracksPV < fMultPVCutLow ->Eval (multiplicity)) {
279291 return false ;
280292 }
293+ hglue.fill (HIST (" heventscheck" ), 7.5 );
281294 if (additionalEvsel && multNTracksPV > fMultPVCutHigh ->Eval (multiplicity)) {
282295 return false ;
283296 }
297+ hglue.fill (HIST (" heventscheck" ), 8.5 );
284298 // if (multTrk < fMultCutLow->Eval(multiplicity))
285299 // return 0;
286300 // if (multTrk > fMultCutHigh->Eval(multiplicity))
@@ -329,43 +343,64 @@ struct strangeness_tutorial {
329343 rKzeroShort.fill (HIST (" mass_lambda_kshort" ), candidate.mK0Short (), candidate.mLambda ());
330344 }
331345
346+ hglue.fill (HIST (" htrackscheck_v0" ), 0.5 );
347+
332348 if (!DCAv0topv && fabs (candidate.dcav0topv ()) > cMaxV0DCA) {
333349 return false ;
334350 }
335351
352+ hglue.fill (HIST (" htrackscheck_v0" ), 1.5 );
353+
336354 if (rapidityks && TMath::Abs (candidate.yK0Short ()) >= ConfKsrapidity) {
337355 return false ;
338356 }
339357
358+ hglue.fill (HIST (" htrackscheck_v0" ), 2.5 );
359+
340360 if (masslambda && TMath::Abs (candidate.mLambda () - candidate.mK0Short ()) >= competingcascrejlambda && TMath::Abs (candidate.mAntiLambda () - candidate.mK0Short ()) >= competingcascrejlambdaanti) {
341361 return false ;
342362 }
343363
364+ hglue.fill (HIST (" htrackscheck_v0" ), 3.5 );
365+
344366 // if (isStandarv0 && candidate.isStandardV0 == 0) {
345367 // return false;
346368 // }
347369
348370 if (pT < ConfV0PtMin) {
349371 return false ;
350372 }
373+ hglue.fill (HIST (" htrackscheck_v0" ), 4.5 );
374+
351375 if (dcaDaughv0 > ConfV0DCADaughMax) {
352376 return false ;
353377 }
378+ hglue.fill (HIST (" htrackscheck_v0" ), 5.5 );
379+
354380 if (cpav0 < ConfV0CPAMin) {
355381 return false ;
356382 }
383+ hglue.fill (HIST (" htrackscheck_v0" ), 6.5 );
384+
357385 if (tranRad < ConfV0TranRadV0Min) {
358386 return false ;
359387 }
388+ hglue.fill (HIST (" htrackscheck_v0" ), 7.5 );
389+
360390 if (tranRad > ConfV0TranRadV0Max) {
361391 return false ;
362392 }
393+ hglue.fill (HIST (" htrackscheck_v0" ), 8.5 );
394+
363395 if (fabs (CtauK0s) > cMaxV0LifeTime || candidate.mK0Short () < lowmasscutks0 || candidate.mK0Short () > highmasscutks0) {
364396 return false ;
365397 }
398+ hglue.fill (HIST (" htrackscheck_v0" ), 9.5 );
399+
366400 if (!armcut && arm < Confarmcut) {
367401 return false ;
368402 }
403+ hglue.fill (HIST (" htrackscheck_v0" ), 10.5 );
369404
370405 if (QAv0) {
371406 rKzeroShort.fill (HIST (" hMassK0ShortSelected" ), candidate.mK0Short (), candidate.pt ());
@@ -381,46 +416,55 @@ struct strangeness_tutorial {
381416 // Filling the PID of the V0 daughters in the region of the K0 peak.
382417 // tpcInnerParam is the momentum at the inner wall of TPC. So momentum of tpc vs nsigma of tpc is plotted.
383418 // if (0.45 < candidate.mK0Short() && candidate.mK0Short() < 0.55) {
384- (charge == 1 ) ? rKzeroShort.fill (HIST (" hNSigmaPosPionK0s_before" ), track.tpcInnerParam (), track.tpcNSigmaPi ()) : rKzeroShort.fill (HIST (" hNSigmaNegPionK0s_before" ), track.tpcInnerParam (), track.tpcNSigmaPi ());
385419 // }
420+ (charge == 1 ) ? rKzeroShort.fill (HIST (" hNSigmaPosPionK0s_before" ), track.tpcInnerParam (), track.tpcNSigmaPi ()) : rKzeroShort.fill (HIST (" hNSigmaNegPionK0s_before" ), track.tpcInnerParam (), track.tpcNSigmaPi ());
421+ rKzeroShort.fill (HIST (" dE_by_dx_TPC" ), track.pt (), track.tpcSignal ());
386422 }
387423 const auto eta = track.eta ();
388424 const auto tpcNClsF = track.tpcNClsFound ();
389425 // const auto dcaXY = track.dcaXY(); // for this we need TrackDCA table
390426 const auto sign = track.sign ();
391-
427+ hglue. fill ( HIST ( " htrackscheck_v0_daughters " ), 0.5 );
392428 if (!track.hasTPC ())
393429 return false ;
430+ hglue.fill (HIST (" htrackscheck_v0_daughters" ), 1.5 );
394431 if (track.tpcNClsCrossedRows () < tpcCrossedrows)
395432 return false ;
433+ hglue.fill (HIST (" htrackscheck_v0_daughters" ), 2.5 );
396434 if (track.tpcCrossedRowsOverFindableCls () < tpcCrossedrowsOverfcls)
397435 return false ;
436+ hglue.fill (HIST (" htrackscheck_v0_daughters" ), 3.5 );
398437
399438 if (charge < 0 && sign > 0 ) {
400439 return false ;
401440 }
441+ hglue.fill (HIST (" htrackscheck_v0_daughters" ), 4.5 );
402442 if (charge > 0 && sign < 0 ) {
403443 return false ;
404444 }
445+ hglue.fill (HIST (" htrackscheck_v0_daughters" ), 5.5 );
405446 if (std::abs (eta) > ConfDaughEta) {
406447 return false ;
407448 }
449+ hglue.fill (HIST (" htrackscheck_v0_daughters" ), 6.5 );
408450 if (tpcNClsF < ConfDaughTPCnclsMin) {
409451 return false ;
410452 }
453+ hglue.fill (HIST (" htrackscheck_v0_daughters" ), 7.5 );
411454 // if (std::abs(dcaXY) < ConfDaughDCAMin) {
412455 // return false;
413456 // }
414457 // v0 PID selection
415458 if (std::abs (nsigmaV0Daughter) > ConfDaughPIDCuts) {
416459 return false ;
417460 }
461+ hglue.fill (HIST (" htrackscheck_v0_daughters" ), 8.5 );
418462
419- if (QAPID) {
420- // if (0.45 < candidate.mK0Short() && candidate.mK0Short() < 0.55) {
421- (charge == 1 ) ? rKzeroShort.fill (HIST (" hNSigmaPosPionK0s_after" ), track.tpcInnerParam (), track.tpcNSigmaPi ()) : rKzeroShort.fill (HIST (" hNSigmaNegPionK0s_after" ), track.tpcInnerParam (), track.tpcNSigmaPi ());
422- // }
423- }
463+ // if (QAPID) {
464+ // // if (0.45 < candidate.mK0Short() && candidate.mK0Short() < 0.55) {
465+ // (charge == 1) ? rKzeroShort.fill(HIST("hNSigmaPosPionK0s_after"), track.tpcInnerParam(), track.tpcNSigmaPi()) : rKzeroShort.fill(HIST("hNSigmaNegPionK0s_after"), track.tpcInnerParam(), track.tpcNSigmaPi());
466+ // // }
467+ // }
424468
425469 if (QAv0_daughters) {
426470 (charge == 1 ) ? rKzeroShort.fill (HIST (" positive_pt" ), track.pt ()) : rKzeroShort.fill (HIST (" negative_pt" ), track.pt ());
@@ -466,15 +510,17 @@ struct strangeness_tutorial {
466510 return ;
467511 }
468512
469- hglue.fill (HIST (" heventscheck" ), 1.5 );
470-
471- rEventSelection.fill (HIST (" hVertexZRec" ), collision.posZ ());
472- rEventSelection.fill (HIST (" hmultiplicity" ), multiplicity);
513+ if (QAevents) {
514+ rEventSelection.fill (HIST (" hVertexZRec" ), collision.posZ ());
515+ rEventSelection.fill (HIST (" hmultiplicity" ), multiplicity);
516+ rEventSelection.fill (HIST (" multdist_FT0M" ), collision.centFT0M ());
517+ rEventSelection.fill (HIST (" multdist_FT0A" ), collision.centFT0A ());
518+ rEventSelection.fill (HIST (" multdist_FT0C" ), collision.centFT0C ());
519+ rEventSelection.fill (HIST (" hNcontributor" ), collision.numContrib ());
520+ }
473521
474522 for (auto & [v1, v2] : combinations (CombinationsStrictlyUpperIndexPolicy (V0s, V0s))) {
475523
476- hglue.fill (HIST (" heventscheck" ), 2.5 );
477-
478524 if (v1.size () == 0 || v2.size () == 0 ) {
479525 continue ;
480526 }
@@ -497,6 +543,7 @@ struct strangeness_tutorial {
497543 if (negtrack1.globalIndex () == negtrack2.globalIndex ()) {
498544 continue ;
499545 }
546+
500547 double nTPCSigmaPos1{postrack1.tpcNSigmaPi ()};
501548 double nTPCSigmaNeg1{negtrack1.tpcNSigmaPi ()};
502549 double nTPCSigmaPos2{postrack2.tpcNSigmaPi ()};
@@ -515,8 +562,6 @@ struct strangeness_tutorial {
515562 continue ;
516563 }
517564
518- hglue.fill (HIST (" heventscheck" ), 3.5 );
519-
520565 TLorentzVector lv1, lv2, lv3, lv4, lv5;
521566
522567 lv1.SetPtEtaPhiM (v1.pt (), v1.eta (), v1.phi (), massK0s);
@@ -604,7 +649,6 @@ struct strangeness_tutorial {
604649
605650 void processME (EventCandidates const & collisions, TrackCandidates const & /* tracks*/ , V0TrackCandidate const & v0s)
606651 {
607- hglue.fill (HIST (" heventscheck" ), 4.5 );
608652
609653 const double massK0s = TDatabasePDG::Instance ()->GetParticle (kK0Short )->Mass ();
610654 auto tracksTuple = std::make_tuple (v0s);
@@ -617,7 +661,6 @@ struct strangeness_tutorial {
617661 if (cfgMultFOTM) {
618662 for (auto & [c1, tracks1, c2, tracks2] : pair2) // two different centrality c1 and c2 and tracks corresponding to them
619663 {
620- hglue.fill (HIST (" heventscheck" ), 5.5 );
621664
622665 float multiplicity = 0 .0f ;
623666
@@ -626,10 +669,8 @@ struct strangeness_tutorial {
626669 if (!eventselection (c1, multiplicity) || !eventselection (c2, multiplicity)) {
627670 continue ;
628671 }
629- hglue.fill (HIST (" heventscheck" ), 6.5 );
630672
631673 for (auto & [t1, t2] : o2::soa::combinations (o2::soa::CombinationsFullIndexPolicy (tracks1, tracks2))) {
632- hglue.fill (HIST (" heventscheck" ), 7.5 );
633674
634675 if (t1.size () == 0 || t2.size () == 0 ) {
635676 continue ;
@@ -668,8 +709,6 @@ struct strangeness_tutorial {
668709 continue ;
669710 }
670711
671- hglue.fill (HIST (" heventscheck" ), 8.5 );
672-
673712 TLorentzVector lv1, lv2, lv3;
674713 lv1.SetPtEtaPhiM (t1.pt (), t1.eta (), t1.phi (), massK0s);
675714 lv2.SetPtEtaPhiM (t2.pt (), t2.eta (), t2.phi (), massK0s);
0 commit comments