@@ -90,7 +90,7 @@ struct Alice3Strangeness {
9090 Configurable<bool > applyLifetimeSelection{" applyLifetimeSelection" , true , " apply lifetime selection" };
9191 Configurable<bool > applyEtaDaughterSelection{" applyEtaDaughterSelection" , true , " apply eta daughter selection" };
9292 Configurable<bool > doQAforSelectionVariables{" doQAforSelectionVariables" , false , " enable QA plots" };
93- Configurable<bool > analyseOnlyTrueV0s{ " analyseOnlyTrueV0s " , false , " analyse only true V0s from MC " };
93+ Configurable<bool > analyseRecoV0Candidates{ " analyseRecoV0Candidates " , false , " analyse reconstructed V0 candidates " };
9494 } v0SelectionFlags;
9595
9696 struct : ConfigurableGroup {
@@ -299,6 +299,8 @@ struct Alice3Strangeness {
299299 histos.add (" reconstructedCandidates/Lambda/hMass1D" , " hMass1D" , kTH1D , {histAxes.axisLambdaMass });
300300 histos.add (" reconstructedCandidates/hArmeterosBeforeAllSelections" , " hArmeterosBeforeAllSelections" , kTH2D , {{100 , -1 .0f , 1 .0f }, {200 , 0 .0f , 0 .5f }});
301301 histos.add (" reconstructedCandidates/hArmeterosAfterAllSelections" , " hArmeterosAfterAllSelections" , kTH2D , {{100 , -1 .0f , 1 .0f }, {200 , 0 .0f , 0 .5f }});
302+ histos.add (" reconstructedCandidates/hPtEtaPosDaughter" , " hPtEtaPosDaughter" , kTH2D , {histAxes.axisPt , histAxes.axisEta });
303+ histos.add (" reconstructedCandidates/hPtEtaNegDaughter" , " hPtEtaNegDaughter" , kTH2D , {histAxes.axisPt , histAxes.axisEta });
302304
303305 if (doprocessFoundCascadeCandidates) {
304306 analysedCascade.setCascadeType (static_cast <Cascade::Type>(cascadeFlags.analyseCascade .value ));
@@ -432,9 +434,9 @@ struct Alice3Strangeness {
432434 auto negV0Daughter = v0Cand.negTrack_as <Alice3Tracks>(); // de-reference negative track
433435 auto posV0Daughter = v0Cand.posTrack_as <Alice3Tracks>(); // de-reference positive track
434436
435- bool isK0 = v0Cand.mK0 () > 0 ;
437+ bool isK0 = v0Cand.mK0Short () > 0 ;
436438 if (isK0) {
437- histos.fill (HIST (" K0/hMassAllCandidates" ), v0Cand.mK0 (), v0Cand.pt ());
439+ histos.fill (HIST (" K0/hMassAllCandidates" ), v0Cand.mK0Short (), v0Cand.pt ());
438440 histos.fill (HIST (" K0/hSelections" ), 0 ); // all candidates
439441 histos.fill (HIST (" K0/hDCANegDaughter" ), negV0Daughter.dcaXY ());
440442 histos.fill (HIST (" K0/hDCAPosDaughter" ), posV0Daughter.dcaXY ());
@@ -453,7 +455,7 @@ struct Alice3Strangeness {
453455 if (std::abs (negV0Daughter.eta ()) > v0SelectionValues.etaDaughterSelection || std::abs (posV0Daughter.eta ()) > v0SelectionValues.etaDaughterSelection )
454456 continue ;
455457 histos.fill (HIST (" K0/hSelections" ), 5 ); // eta cut
456- histos.fill (HIST (" K0/hMassSelected" ), v0Cand.mK0 (), v0Cand.pt ());
458+ histos.fill (HIST (" K0/hMassSelected" ), v0Cand.mK0Short (), v0Cand.pt ());
457459 }
458460 }
459461
@@ -470,7 +472,7 @@ struct Alice3Strangeness {
470472 }
471473 }
472474
473- void processFoundV0Candidates (aod::Collision const & collision, FullV0Candidates const & v0Candidates, Alice3Tracks const &, aod::McParticles const &)
475+ void processFoundV0Candidates (aod::Collision const & collision, FullV0Candidates const & v0Candidates, Alice3Tracks const &, aod::McParticles const & mcParticles )
474476 {
475477 // if(collision.lutConfigId()!=idGeometry)
476478 // return;
@@ -550,15 +552,29 @@ struct Alice3Strangeness {
550552 selectionCheck = v0.distOverTotMom (collision.posX (), collision.posY (), collision.posZ ()) * o2::constants::physics::MassLambda0;
551553 }
552554 histos.fill (HIST (" hV0CandidateCounter" ), 8.5 );
553- auto posTrack = v0.template posTrack_as <Alice3Tracks>();
554- auto negTrack = v0.template negTrack_as <Alice3Tracks>();
555- if (v0SelectionFlags.applyEtaDaughterSelection ) {
556- if (std::abs (posTrack.eta ()) > v0SelectionValues.etaDaughterSelection || std::abs (negTrack.eta ()) > v0SelectionValues.etaDaughterSelection )
557- continue ;
555+ if (v0SelectionFlags.analyseRecoV0Candidates ) {
556+ auto posTrack = v0.template posTrack_as <Alice3Tracks>();
557+ auto negTrack = v0.template negTrack_as <Alice3Tracks>();
558+ if (v0SelectionFlags.applyEtaDaughterSelection ) {
559+ if (std::abs (posTrack.eta ()) > v0SelectionValues.etaDaughterSelection || std::abs (negTrack.eta ()) > v0SelectionValues.etaDaughterSelection )
560+ continue ;
561+ }
562+ histos.fill (HIST (" reconstructedCandidates/hEtaDaughters" ), posTrack.eta ());
563+ histos.fill (HIST (" reconstructedCandidates/hEtaDaughters" ), negTrack.eta ());
564+ histos.fill (HIST (" hV0CandidateCounter" ), 9.5 );
565+ histos.fill (HIST (" reconstructedCandidates/hPtEtaPosDaughter" ), posTrack.pt (), posTrack.eta ());
566+ histos.fill (HIST (" reconstructedCandidates/hPtEtaNegDaughter" ), negTrack.pt (), negTrack.eta ());
567+ } else {
568+ int posDaugID = v0.posTrackId ();
569+ int negDaugID = v0.negTrackId ();
570+ auto posMcParticle = mcParticles.rawIteratorAt (posDaugID);
571+ auto negMcParticle = mcParticles.rawIteratorAt (negDaugID);
572+ // auto posTrack = v0.posTrack_as<o2::aod::McParticle>();
573+ // auto negTrack = v0.negTrack_as<o2::aod::McParticle>();
574+
575+ histos.fill (HIST (" reconstructedCandidates/hPtEtaPosDaughter" ), posMcParticle.pt (), posMcParticle.eta ());
576+ histos.fill (HIST (" reconstructedCandidates/hPtEtaNegDaughter" ), negMcParticle.pt (), negMcParticle.eta ());
558577 }
559- histos.fill (HIST (" reconstructedCandidates/hEtaDaughters" ), posTrack.eta ());
560- histos.fill (HIST (" reconstructedCandidates/hEtaDaughters" ), negTrack.eta ());
561- histos.fill (HIST (" hV0CandidateCounter" ), 9.5 );
562578
563579 histos.fill (HIST (" reconstructedCandidates/hArmeterosAfterAllSelections" ), v0.alpha (), v0.qtArm ());
564580 if (v0SelectionFlags.doQAforSelectionVariables ) {
@@ -576,6 +592,7 @@ struct Alice3Strangeness {
576592 }
577593 });
578594 }
595+
579596 if (isK0) {
580597 histos.fill (HIST (" reconstructedCandidates/K0/hMass" ), v0.mK0Short (), v0.pt (), v0.eta ());
581598 histos.fill (HIST (" reconstructedCandidates/K0/hMass1D" ), v0.mK0Short ());
0 commit comments