@@ -58,8 +58,8 @@ using namespace o2::aod::rctsel;
5858
5959struct lambdaspincorrelation {
6060
61- Produces<aod::LambdaSpinCorrEvents> spinCorrEvent ;
62- Produces<aod::LambdaSpinCorrPairs> spinCorrPair ;
61+ Produces<aod::LambdaEvents> lambdaEvent ;
62+ Produces<aod::LambdaPairs> lambdaPair ;
6363
6464 Service<o2::ccdb::BasicCCDBManager> ccdb;
6565
@@ -246,22 +246,24 @@ struct lambdaspincorrelation {
246246
247247 void processData (EventCandidates::iterator const & collision, AllTrackCandidates const &, ResoV0s const & V0s)
248248 {
249+ std::vector<ROOT::Math::PxPyPzMVector> lambdaMother, protonDaughter, pionDaughter;
250+ std::vector<int > v0Status = {};
251+ std::vector<bool > doubleStatus = {};
252+ std::vector<float > v0Cospa = {};
253+ std::vector<float > v0Radius = {};
254+ std::vector<float > dcaPositive = {};
255+ std::vector<float > dcaNegative = {};
256+ std::vector<int > positiveIndex = {};
257+ std::vector<int > negativeIndex = {};
258+ std::vector<float > dcaBetweenDaughter = {};
259+ int numbV0 = 0 ;
249260 // LOGF(info, "event collisions: (%d)", collision.index());
250261 auto centrality = collision.centFT0C ();
262+ auto vz = collision.posZ ();
251263 int occupancy = collision.trackOccupancyInTimeRange ();
252264 histos.fill (HIST (" hEvtSelInfo" ), 0.5 );
253265 if ((rctCut.requireRCTFlagChecker && rctChecker (collision)) && collision.selection_bit (aod::evsel::kNoSameBunchPileup ) && collision.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ) && collision.selection_bit (aod::evsel::kNoTimeFrameBorder ) && collision.selection_bit (aod::evsel::kNoITSROFrameBorder ) && collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard ) && collision.sel8 () && collision.selection_bit (o2::aod::evsel::kIsGoodITSLayersAll ) && occupancy < cfgCutOccupancy) {
254266 histos.fill (HIST (" hEvtSelInfo" ), 1.5 );
255- std::vector<ROOT::Math::PxPyPzMVector> lambdaMother, protonDaughter, pionDaughter;
256- std::vector<int > v0Status = {};
257- std::vector<bool > doubleStatus = {};
258- std::vector<double > v0Cospa = {};
259- std::vector<double > v0Radius = {};
260- std::vector<double > dcaPositive = {};
261- std::vector<double > dcaNegative = {};
262- std::vector<double > positiveIndex = {};
263- std::vector<double > negativeIndex = {};
264- std::vector<double > dcaBetweenDaughter = {};
265267 for (const auto & v0 : V0s) {
266268 // LOGF(info, "v0 index 0 : (%d)", v0.index());
267269 auto [lambdaTag, aLambdaTag, isValid] = getLambdaTags (v0, collision);
@@ -320,19 +322,20 @@ struct lambdaspincorrelation {
320322 pionDaughter.push_back (pion);
321323 histos.fill (HIST (" hLambdaMass" ), lambda.M ());
322324 }
325+ numbV0 = numbV0 + 1 ;
323326 }
324327 }
325- if (v0Status .size () > 1 ) {
328+ if (numbV0 > 1 && v0Cospa .size () > 1 ) {
326329 histos.fill (HIST (" hEvtSelInfo" ), 2.5 );
327- spinCorrEvent (centrality, collision. posZ () );
328- auto indexEvent = spinCorrEvent .lastIndex ();
330+ lambdaEvent (centrality, vz );
331+ auto indexEvent = lambdaEvent .lastIndex ();
329332 // // Fill track table for V0//////////////////
330333 for (auto if1 = lambdaMother.begin (); if1 != lambdaMother.end (); ++if1) {
331334 auto i5 = std::distance (lambdaMother.begin (), if1);
332335 lambdaDummy = lambdaMother.at (i5);
333336 protonDummy = protonDaughter.at (i5);
334337 pionDummy = pionDaughter.at (i5);
335- spinCorrPair (indexEvent, v0Status.at (i5), doubleStatus.at (i5), v0Cospa.at (i5), v0Radius.at (i5), dcaPositive.at (i5), dcaNegative.at (i5), dcaBetweenDaughter.at (i5), lambdaDummy.Pt (), lambdaDummy.Eta (), lambdaDummy.Phi (), lambdaDummy.M (), protonDummy.Pt (), protonDummy.Eta (), protonDummy.Phi (), positiveIndex.at (i5), negativeIndex.at (i5));
338+ lambdaPair (indexEvent, v0Status.at (i5), doubleStatus.at (i5), v0Cospa.at (i5), v0Radius.at (i5), dcaPositive.at (i5), dcaNegative.at (i5), dcaBetweenDaughter.at (i5), lambdaDummy.Pt (), lambdaDummy.Eta (), lambdaDummy.Phi (), lambdaDummy.M (), protonDummy.Pt (), protonDummy.Eta (), protonDummy.Phi (), positiveIndex.at (i5), negativeIndex.at (i5));
336339 }
337340 }
338341 }
0 commit comments