@@ -54,6 +54,7 @@ struct LfMyV0s {
5454 HistogramRegistry registry{" registry" };
5555 HistogramRegistry registryData{" registryData" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
5656 HistogramRegistry registryV0Data{" registryV0Data" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
57+ HistogramRegistry registryLongitudinalPolarization{" registryLongitudinalPolarization" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
5758
5859 Configurable<double > zVtx{" zVtx" , 10.0 , " Maximum zVertex" };
5960 Configurable<double > rJet{" rJet" , 0.4 , " Jet resolution parameter R" };
@@ -94,13 +95,13 @@ struct LfMyV0s {
9495 Configurable<bool > ispassdTrackSelectionForJetReconstruction{" ispassdTrackSelectionForJetReconstruction" , 1 , " do track selection" };
9596
9697 // v0Event selection
97- Configurable<bool > sel8{" sel8" , 0 , " Apply sel8 event selection" };
98+ Configurable<bool > sel8{" sel8" , 1 , " Apply sel8 event selection" };
9899 Configurable<bool > isTriggerTVX{" isTriggerTVX" , 1 , " TVX trigger" };
99100 Configurable<bool > iscutzvertex{" iscutzvertex" , 1 , " Accepted z-vertex range (cm)" };
100101 Configurable<bool > isNoTimeFrameBorder{" isNoTimeFrameBorder" , 1 , " TF border cut" };
101102 Configurable<bool > isNoITSROFrameBorder{" isNoITSROFrameBorder" , 1 , " ITS ROF border cut" };
102103 Configurable<bool > isVertexTOFmatched{" isVertexTOFmatched" , 1 , " Is Vertex TOF matched" };
103- Configurable<bool > isGoodZvtxFT0vsPV{" isGoodZvtxFT0vsPV" , 0 , " isGoodZvtxFT0vsPV" };
104+ Configurable<bool > isGoodZvtxFT0vsPV{" isGoodZvtxFT0vsPV" , 1 , " isGoodZvtxFT0vsPV" };
104105 Configurable<float > cutzvertex{" cutzvertex" , 10 .0f , " Accepted z-vertex range (cm)" };
105106 Configurable<float > CtauLambda{" ctauLambda" , 30 , " C tau Lambda (cm)" };
106107 Configurable<bool > requirepassedSingleTrackSelection{" requirepassedSingleTrackSelection" , false , " requirepassedSingleTrackSelection" };
@@ -111,10 +112,11 @@ struct LfMyV0s {
111112 Configurable<float > yMax{" V0yMax" , +0 .5f , " maximum y" };
112113 Configurable<float > v0rejLambda{" v0rejLambda" , 0.01 , " V0 rej Lambda" };
113114 Configurable<float > v0accLambda{" v0accLambda" , 0.075 , " V0 acc Lambda" };
114- Configurable<bool > ifinitpasslambda{" ifinitpasslambda" , 1 , " ifinitpasslambda" };
115- Configurable<bool > ifpasslambda{" passedLambdaSelection" , 0 , " passedLambdaSelection" };
115+ Configurable<bool > ifinitpasslambda{" ifinitpasslambda" , 0 , " ifinitpasslambda" };
116+ Configurable<bool > ifpasslambda{" passedLambdaSelection" , 1 , " passedLambdaSelection" };
116117 Configurable<float > paramArmenterosCut{" paramArmenterosCut" , 0.2 , " parameter Armenteros Cut" };
117118 Configurable<bool > doArmenterosCut{" doArmenterosCut" , 0 , " do Armenteros Cut" };
119+ Configurable<bool > noSameBunchPileUp{" noSameBunchPileUp" , true , " reject SameBunchPileUp" };
118120
119121 // Jet background subtraction
120122 JetBkgSubUtils backgroundSub;
@@ -312,6 +314,40 @@ struct LfMyV0s {
312314
313315 registryV0Data.add (" AverageSinthetainJetV0" , " AverageSinthetainJetV0" , {HistType::kTProfile , {{200 , 0.9 , 1.2 }}});
314316 registryV0Data.add (" AverageCosSquarethetainJetV0" , " AverageCosSquarethetainJetV0" , {HistType::kTProfile , {{200 , 0.9 , 1.2 }}});
317+
318+ // LongitudinalPolarization event selection
319+ registryLongitudinalPolarization.add (" hNEvents" , " hNEvents" , {HistType::kTH1I , {{5 , 0 .f , 5 .f }}});
320+ registryLongitudinalPolarization.get <TH1>(HIST (" hNEvents" ))->GetXaxis ()->SetBinLabel (1 , " all" );
321+ registryLongitudinalPolarization.get <TH1>(HIST (" hNEvents" ))->GetXaxis ()->SetBinLabel (2 , " sel8" );
322+ registryLongitudinalPolarization.get <TH1>(HIST (" hNEvents" ))->GetXaxis ()->SetBinLabel (3 , " zvertex" );
323+ registryLongitudinalPolarization.get <TH1>(HIST (" hNEvents" ))->GetXaxis ()->SetBinLabel (4 , " isGoodZvtxFT0vsPV" );
324+ registryLongitudinalPolarization.get <TH1>(HIST (" hNEvents" ))->GetXaxis ()->SetBinLabel (5 , " isNoSameBunchPileup" );
325+ registryLongitudinalPolarization.get <TH1>(HIST (" hNEvents" ))->GetXaxis ()->SetBinLabel (6 , " Applied selected" );
326+
327+ registryLongitudinalPolarization.add (" hMassVsPtLambda" , " hMassVsPtLambda" , {HistType::kTH2F , {{100 , 0 .0f , 10 .0f }, {200 , 1 .016f , 1 .216f }}});
328+ registryLongitudinalPolarization.add (" hMassVsPtAntiLambda" , " hMassVsPtAntiLambda" , {HistType::kTH2F , {{100 , 0 .0f , 10 .0f }, {200 , 1 .016f , 1 .216f }}});
329+
330+ registryLongitudinalPolarization.add (" V0pxInRest_frame" , " V0pxInRest_frame" , kTH1F , {axisPx});
331+ registryLongitudinalPolarization.add (" V0pyInRest_frame" , " V0pyInRest_frame" , kTH1F , {axisPy});
332+ registryLongitudinalPolarization.add (" V0pzInRest_frame" , " V0pzInRest_frame" , kTH1F , {axisPz});
333+
334+ registryLongitudinalPolarization.add (" nV0sPerEvent" , " nV0sPerEvent" , kTH1F , {{10 , 0.0 , 10.0 }});
335+ registryLongitudinalPolarization.add (" nV0sPerEventsel" , " nV0sPerEventsel" , kTH1F , {{10 , 0.0 , 10.0 }});
336+
337+ registryLongitudinalPolarization.add (" hprotoncosthetainV0" , " hprotoncosthetainV0" , kTH1F , {{200 , -1 .f , 1 .f }});
338+ registryLongitudinalPolarization.add (" hprotoncosSquarethetainV0" , " hprotoncosSquarethetainV0" , kTH1F , {{200 , -1 .f , 1 .f }});
339+ registryLongitudinalPolarization.add (" hLambdamassandCosthetaInV0" , " hLambdamassandCosthetaInV0" , kTH2F , {{200 , 0.9 , 1.2 }, {200 , -1 , 1 }});
340+ registryLongitudinalPolarization.add (" TProfile2DLambdaPtMassCostheta" , " " , kTProfile2D , {TProfile2DaxisMass, TProfile2DaxisPt});
341+ registryLongitudinalPolarization.add (" TProfile2DLambdaPtMassCosSquareTheta" , " " , kTProfile2D , {TProfile2DaxisMass, TProfile2DaxisPt});
342+
343+ registryLongitudinalPolarization.add (" hantiprotoncosthetainV0" , " hantiprotoncosthetainV0" , kTH1F , {{200 , -1 .f , 1 .f }});
344+ registryLongitudinalPolarization.add (" hantiprotoncosSquarethetainV0" , " hantiprotoncosSquarethetainV0" , kTH1F , {{200 , -1 .f , 1 .f }});
345+ registryLongitudinalPolarization.add (" hAntiLambdamassandCosthetaInV0" , " hAntiLambdamassandCosthetaInV0" , kTH2F , {{200 , 0.9 , 1.2 }, {200 , -1 , 1 }});
346+ registryLongitudinalPolarization.add (" TProfile2DAntiLambdaPtMassCostheta" , " TProfile2DAntiLambdaPtMassCostheta" , kTProfile2D , {TProfile2DaxisMass, TProfile2DaxisPt});
347+ registryLongitudinalPolarization.add (" TProfile2DAntiLambdaPtMassCosSquareTheta" , " TProfile2DAntiLambdaPtMassCosSquareTheta" , kTProfile2D , {TProfile2DaxisMass, TProfile2DaxisPt});
348+
349+ registryLongitudinalPolarization.add (" TProfile1DLambdaPtMassCostheta" , " Invariant Mass vs cos(#theta)" , {HistType::kTProfile , {{200 , 0.9 , 1.2 }}});
350+ registryLongitudinalPolarization.add (" TProfile1DAntiLambdaPtMassCostheta" , " Invariant Mass vs cos(#theta)" , {HistType::kTProfile , {{200 , 0.9 , 1.2 }}});
315351 }
316352 double massPr = o2::constants::physics::MassProton;
317353 double massLambda = o2::constants::physics::MassLambda;
@@ -814,6 +850,32 @@ struct LfMyV0s {
814850 return true ;
815851 }
816852
853+ template <typename TCollision>
854+ bool AcceptEventForLongitudinalPolarization (TCollision const & collision)
855+ {
856+ if (sel8 && !collision.sel8 ()) {
857+ return false ;
858+ }
859+ registryLongitudinalPolarization.fill (HIST (" hNEvents" ), 1.5 );
860+
861+ if (iscutzvertex && TMath::Abs (collision.posZ ()) > cutzvertex) {
862+ return false ;
863+ }
864+ registryLongitudinalPolarization.fill (HIST (" hNEvents" ), 2.5 );
865+
866+ if (noSameBunchPileUp && !collision.selection_bit (aod::evsel::kNoSameBunchPileup )) {
867+ return false ;
868+ }
869+ registryLongitudinalPolarization.fill (HIST (" hNEvents" ), 3.5 );
870+ // check vertex matching to FT0
871+ if (isGoodZvtxFT0vsPV && !collision.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV )) {
872+ return false ;
873+ }
874+ registryLongitudinalPolarization.fill (HIST (" hNEvents" ), 4.5 );
875+
876+ return true ;
877+ }
878+
817879 using SelCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms>;
818880 using StrHadronDaughterTracks = soa::Join<aod::Tracks, aod::TracksIU, aod::TracksExtra, aod::TracksCovIU, aod::TracksDCA, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr>;
819881 void processData (SelCollisions::iterator const & collision, aod::V0Datas const & fullV0s, StrHadronDaughterTracks const & tracks)
@@ -1151,6 +1213,94 @@ struct LfMyV0s {
11511213 registryV0Data.fill (HIST (" nV0sPerEventsel" ), V0NumbersPerEventsel);
11521214 }
11531215 PROCESS_SWITCH (LfMyV0s, processDataV0, " processDataV0" , true );
1216+
1217+ void processLongitudinalPolarization (SelCollisions::iterator const & collision, aod::V0Datas const & fullV0s, StrHadronDaughterTracks const &)
1218+ {
1219+ registryLongitudinalPolarization.fill (HIST (" hNEvents" ), 0.5 );
1220+ if (!AcceptEventForLongitudinalPolarization (collision)) {
1221+ return ;
1222+ }
1223+ registryLongitudinalPolarization.fill (HIST (" hNEvents" ), 5.5 );
1224+ int V0NumbersPerEvent = 0 ;
1225+ int V0NumbersPerEventsel = 0 ;
1226+ for (const auto & v0 : fullV0s) {
1227+ V0NumbersPerEvent++;
1228+ float ctauLambda = v0.distovertotmom (collision.posX (), collision.posY (), collision.posZ ()) * o2::constants::physics::MassLambda0;
1229+ float ctauAntiLambda = v0.distovertotmom (collision.posX (), collision.posY (), collision.posZ ()) * o2::constants::physics::MassLambda0Bar;
1230+ const auto & pos = v0.posTrack_as <StrHadronDaughterTracks>();
1231+ const auto & neg = v0.negTrack_as <StrHadronDaughterTracks>();
1232+
1233+ if (passedLambdaSelection (v0, pos, neg) && ctauLambda < CtauLambda && ifpasslambda) {
1234+ V0NumbersPerEventsel++;
1235+ registryLongitudinalPolarization.fill (HIST (" hMassVsPtLambda" ), v0.pt (), v0.mLambda ());
1236+ double PLambda = sqrt (v0.px () * v0.px () + v0.py () * v0.py () + v0.pz () * v0.pz ());
1237+ double ELambda = sqrt (v0.mLambda () * v0.mLambda () + PLambda * PLambda);
1238+ double protonE = sqrt (massPr * massPr + pos.px () * pos.px () + pos.py () * pos.py () + pos.pz () * pos.pz ());
1239+ TMatrixD pLabV0 (4 , 1 );
1240+ pLabV0 (0 , 0 ) = ELambda;
1241+ pLabV0 (1 , 0 ) = v0.px ();
1242+ pLabV0 (2 , 0 ) = v0.py ();
1243+ pLabV0 (3 , 0 ) = v0.pz ();
1244+
1245+ TMatrixD pLabproton (4 , 1 );
1246+ pLabproton (0 , 0 ) = protonE;
1247+ pLabproton (1 , 0 ) = pos.px ();
1248+ pLabproton (2 , 0 ) = pos.py ();
1249+ pLabproton (3 , 0 ) = pos.pz ();
1250+
1251+ TMatrixD V0InV0 (4 , 1 );
1252+ V0InV0 = LorentzTransInV0frame (ELambda, v0.px (), v0.py (), v0.pz ()) * pLabV0;
1253+ registryLongitudinalPolarization.fill (HIST (" V0pxInRest_frame" ), V0InV0 (1 , 0 ));
1254+ registryLongitudinalPolarization.fill (HIST (" V0pyInRest_frame" ), V0InV0 (2 , 0 ));
1255+ registryLongitudinalPolarization.fill (HIST (" V0pzInRest_frame" ), V0InV0 (3 , 0 ));
1256+
1257+ TMatrixD protonInV0 (4 , 1 );
1258+ protonInV0 = LorentzTransInV0frame (ELambda, v0.px (), v0.py (), v0.pz ()) * pLabproton;
1259+ double protonPInV0 = sqrt (protonInV0 (1 , 0 ) * protonInV0 (1 , 0 ) + protonInV0 (2 , 0 ) * protonInV0 (2 , 0 ) + protonInV0 (3 , 0 ) * protonInV0 (3 , 0 ));
1260+
1261+ double protonCosThetainV0 = protonInV0 (3 , 0 ) / protonPInV0;
1262+
1263+ registryLongitudinalPolarization.fill (HIST (" hprotoncosthetainV0" ), protonCosThetainV0);
1264+ registryLongitudinalPolarization.fill (HIST (" hprotoncosSquarethetainV0" ), protonCosThetainV0 * protonCosThetainV0);
1265+ registryLongitudinalPolarization.fill (HIST (" hLambdamassandCosthetaInV0" ), v0.mLambda (), protonCosThetainV0);
1266+
1267+ registryLongitudinalPolarization.fill (HIST (" TProfile2DLambdaPtMassCostheta" ), v0.mLambda (), v0.pt (), protonCosThetainV0);
1268+ registryLongitudinalPolarization.fill (HIST (" TProfile2DLambdaPtMassCosSquareTheta" ), v0.mLambda (), v0.pt (), protonCosThetainV0 * protonCosThetainV0);
1269+
1270+ registryLongitudinalPolarization.fill (HIST (" TProfile1DLambdaPtMassCostheta" ), v0.mLambda (), protonCosThetainV0);
1271+ }
1272+ if (passedAntiLambdaSelection (v0, pos, neg) && ctauAntiLambda < CtauLambda && ifpasslambda) {
1273+ registryLongitudinalPolarization.fill (HIST (" hMassVsPtAntiLambda" ), v0.pt (), v0.mAntiLambda ());
1274+
1275+ double PLambda = sqrt (v0.px () * v0.px () + v0.py () * v0.py () + v0.pz () * v0.pz ());
1276+ double ELambda = sqrt (v0.mAntiLambda () * v0.mAntiLambda () + PLambda * PLambda);
1277+ double protonE = sqrt (massPr * massPr + neg.px () * neg.px () + neg.py () * neg.py () + neg.pz () * neg.pz ());
1278+
1279+ TMatrixD pLabproton (4 , 1 );
1280+ pLabproton (0 , 0 ) = protonE;
1281+ pLabproton (1 , 0 ) = neg.px ();
1282+ pLabproton (2 , 0 ) = neg.py ();
1283+ pLabproton (3 , 0 ) = neg.pz ();
1284+
1285+ TMatrixD protonInV0 (4 , 1 );
1286+ protonInV0 = LorentzTransInV0frame (ELambda, v0.px (), v0.py (), v0.pz ()) * pLabproton;
1287+ double protonPInV0 = sqrt (protonInV0 (1 , 0 ) * protonInV0 (1 , 0 ) + protonInV0 (2 , 0 ) * protonInV0 (2 , 0 ) + protonInV0 (3 , 0 ) * protonInV0 (3 , 0 ));
1288+
1289+ double protonCosThetainV0 = protonInV0 (3 , 0 ) / protonPInV0;
1290+
1291+ registryLongitudinalPolarization.fill (HIST (" hantiprotoncosthetainV0" ), protonCosThetainV0);
1292+ registryLongitudinalPolarization.fill (HIST (" hantiprotoncosSquarethetainV0" ), protonCosThetainV0 * protonCosThetainV0);
1293+ registryLongitudinalPolarization.fill (HIST (" hAntiLambdamassandCosthetaInV0" ), v0.mAntiLambda (), protonCosThetainV0);
1294+
1295+ registryLongitudinalPolarization.fill (HIST (" TProfile2DAntiLambdaPtMassCostheta" ), v0.mAntiLambda (), v0.pt (), protonCosThetainV0);
1296+ registryLongitudinalPolarization.fill (HIST (" TProfile2DAntiLambdaPtMassCosSquareTheta" ), v0.mAntiLambda (), v0.pt (), protonCosThetainV0 * protonCosThetainV0);
1297+ registryLongitudinalPolarization.fill (HIST (" TProfile1DAntiLambdaPtMassCostheta" ), v0.mAntiLambda (), protonCosThetainV0);
1298+ }
1299+ }
1300+ registryLongitudinalPolarization.fill (HIST (" nV0sPerEvent" ), V0NumbersPerEvent);
1301+ registryLongitudinalPolarization.fill (HIST (" nV0sPerEventsel" ), V0NumbersPerEventsel);
1302+ }
1303+ PROCESS_SWITCH (LfMyV0s, processLongitudinalPolarization, " processLongitudinalPolarization" , true );
11541304};
11551305
11561306WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
0 commit comments