@@ -106,6 +106,7 @@ std::shared_ptr<TH2> hTPCnSigmaAll;
106106std::shared_ptr<TH2> hTPCnSigmaHe3;
107107std::shared_ptr<TH2> hArmenterosPodolanskiAll;
108108std::shared_ptr<TH2> hArmenterosPodolanskiSelected;
109+ std::shared_ptr<TH2> hInvariantMass;
109110
110111}; // namespace
111112
@@ -204,7 +205,6 @@ struct he3LambdaAnalysis {
204205 float mBz = 0 .0f ; // Magnetic field in T
205206 HistogramRegistry mRegistry {" He3LambdaAnalysis" };
206207 int mRunNumber = 0 ; // Current run number
207- int mEventIndex = 0 ; // Current event index
208208
209209 void init (InitContext const &)
210210 {
@@ -248,6 +248,9 @@ struct he3LambdaAnalysis {
248248 hArmenterosPodolanskiAll = mRegistry .add <TH2>(" hArmenterosPodolanskiAll" , " Armenteros-Podolanski All" , {HistType::kTH2D , {{100 , -1 ., 1 .}, {100 , 0 ., 0.5 }}});
249249 hArmenterosPodolanskiSelected = mRegistry .add <TH2>(" hArmenterosPodolanskiSelected" , " Armenteros-Podolanski Selected" , {HistType::kTH2D , {{100 , -1 ., 1 .}, {100 , 0 ., 0.5 }}});
250250
251+ constexpr double ConstituentsMass = o2::constants::physics::MassProton + o2::constants::physics::MassNeutron * 2 + o2::constants::physics::MassSigmaPlus;
252+ hInvariantMass = mRegistry .add <TH2>(" hInvariantMass" , " Invariant Mass" , {HistType::kTH2D , {{45 , 1 ., 10 }, {100 , ConstituentsMass - 0.05 , ConstituentsMass + 0.05 }}});
253+
251254 LOGF (info, " He3-Lambda analysis initialized" );
252255 }
253256
@@ -426,14 +429,20 @@ struct he3LambdaAnalysis {
426429 // Fill output tables
427430 lfHe3V0Collision (collision.posZ (), collision.centFT0C ());
428431 for (const auto & he3 : he3Candidates) {
429- lfHe3 (mEventIndex , he3.momentum .Pt (), he3.momentum .Eta (), he3.momentum .Phi (),
432+ lfHe3 (lfHe3V0Collision. lastIndex () , he3.momentum .Pt (), he3.momentum .Eta (), he3.momentum .Phi (),
430433 he3.dcaXY , he3.dcaZ , he3.tpcNClsFound , he3.itsClusterSizes , he3.nSigmaTPC , he3.sign );
431434 }
432435 for (const auto & lambda : lambdaCandidates) {
433- lfLambda (mEventIndex , lambda.momentum .Pt (), lambda.momentum .Eta (), lambda.momentum .Phi (),
436+ lfLambda (lfHe3V0Collision. lastIndex () , lambda.momentum .Pt (), lambda.momentum .Eta (), lambda.momentum .Phi (),
434437 lambda.mass , lambda.cosPA , lambda.dcaV0Daughters , lambda.dcaProtonToPV , lambda.dcaPionToPV , lambda.v0Radius , lambda.sign );
435438 }
436- mEventIndex ++;
439+
440+ for (const auto & he3 : he3Candidates) {
441+ for (const auto & lambda : lambdaCandidates) {
442+ auto pairMomentum = lambda.momentum + he3.momentum ; // Calculate invariant mass
443+ hInvariantMass->Fill (pairMomentum.Pt (), pairMomentum.M ());
444+ }
445+ }
437446 }
438447 PROCESS_SWITCH (he3LambdaAnalysis, processData, " Process data" , true );
439448};
0 commit comments