@@ -55,6 +55,7 @@ namespace
5555{
5656static const int nParticles = 6 ;
5757static const std::vector<std::string> particleNames{" pion" , " proton" , " deuteron" , " triton" , " helion" , " alpha" };
58+ static const std::vector<std::string> correctedparticleNames{" helion" , " antihelion" , " alpha" , " antialpha" };
5859static const std::vector<int > particlePdgCodes{211 , 2212 , o2::constants::physics::kDeuteron , o2::constants::physics::kTriton , o2::constants::physics::kHelium3 , o2::constants::physics::kAlpha };
5960static const std::vector<double > particleMasses{o2::constants::physics::MassPionCharged, o2::constants::physics::MassProton, o2::constants::physics::MassDeuteron, o2::constants::physics::MassTriton, o2::constants::physics::MassHelium3, o2::constants::physics::MassAlpha};
6061static const std::vector<int > particleCharge{1 , 1 , 1 , 1 , 2 , 2 };
@@ -88,6 +89,15 @@ constexpr double kTrackPIDSettings2[nParticles][nTrkSettings2]{
8889 {1 , -5 , 4 , 1 , 1 , 2 },
8990 {1 , -5 , 4 , 1 , 1 , 2 }};
9091
92+ static const int nfittingparticle = 4 ;
93+ const int nfittingparameters = 4 ;
94+ static const std::vector<std::string> trackcorrectionNames{" correctionneed" , " a" , " b" , " c" };
95+ constexpr double ktrackcorrection[nfittingparticle][nfittingparameters]{
96+ {1 , 0.464215 , 0.195771 , 0.0183111 }, // He3
97+ {1 , 0.464215 , 0.195771 , 0.0183111 }, // anti-He3
98+ {1 , 0.00765 , 0.503791 , -1.10517 }, // He4
99+ {1 , 0.00765 , 0.503791 , -1.10517 }}; // anti-He4
100+
91101struct PrimParticles {
92102 TString name;
93103 int pdgCode, charge;
@@ -145,13 +155,14 @@ struct NucleitpcPbPb {
145155 Configurable<bool > cfgminGetMeanItsClsSizeRequire{" cfgminGetMeanItsClsSizeRequire" , true , " Require minGetMeanItsClsSize Cut" };
146156 Configurable<bool > cfgmaxGetMeanItsClsSizeRequire{" cfgmaxGetMeanItsClsSizeRequire" , true , " Require maxGetMeanItsClsSize Cut" };
147157 Configurable<bool > cfgRequirebetaplot{" cfgRequirebetaplot" , true , " Require beta plot" };
148- Configurable<bool > cfgMasscut{" cfgMasscut" , true , " Require mass cut on He4 particles" };
149158 Configurable<bool > cfgdcaxynopt{" cfgdcaxynopt" , true , " DCA xy cut without pT dependent" };
150159 Configurable<bool > cfgdcaznopt{" cfgdcaznopt" , false , " DCA xy cut without pT dependent" };
160+ Configurable<bool > cfgmass2{" cfgmass2" , true , " Fill mass square difference" };
151161
152162 Configurable<LabeledArray<double >> cfgBetheBlochParams{" cfgBetheBlochParams" , {kBetheBlochDefault [0 ], nParticles, nBetheParams, particleNames, betheBlochParNames}, " TPC Bethe-Bloch parameterisation for light nuclei" };
153163 Configurable<LabeledArray<double >> cfgTrackPIDsettings{" cfgTrackPIDsettings" , {kTrackPIDSettings [0 ], nParticles, nTrkSettings, particleNames, trackPIDsettingsNames}, " track selection and PID criteria" };
154164 Configurable<LabeledArray<double >> cfgTrackPIDsettings2{" cfgTrackPIDsettings2" , {kTrackPIDSettings2 [0 ], nParticles, nTrkSettings2, particleNames, trackPIDsettingsNames2}, " track selection and PID criteria" };
165+ Configurable<LabeledArray<double >> cfgktrackcorrection{" cfgktrackcorrection" , {ktrackcorrection[0 ], nfittingparticle, nfittingparameters, correctedparticleNames, trackcorrectionNames}, " fitting paramters" };
155166 Configurable<bool > cfgFillhspectra{" cfgFillhspectra" , true , " fill data sparsh" };
156167 Configurable<bool > cfgFillmass{" cfgFillmass" , false , " Fill mass histograms" };
157168 Configurable<bool > cfgFillmassnsigma{" cfgFillmassnsigma" , true , " Fill mass vs nsigma histograms" };
@@ -162,6 +173,10 @@ struct NucleitpcPbPb {
162173 Configurable<float > cfgZvertex{" cfgZvertex" , 10 , " Min Z Vertex" };
163174 Configurable<bool > cfgZvertexRequireMC{" cfgZvertexRequireMC" , true , " Pos Z cut in MC" };
164175 Configurable<bool > cfgsel8Require{" cfgsel8Require" , true , " sel8 cut require" };
176+ Configurable<float > cfgminmassrejection{" cfgminmassrejection" , 6.5 , " Min side of He3 particle rejection" };
177+ Configurable<float > cfgmaxmassrejection{" cfgmaxmassrejection" , 9.138 , " Max side of He3 particle rejection" };
178+ Configurable<bool > cfghe3massrejreq{" cfghe3massrejreq" , true , " Require mass cut on He4 particles" };
179+
165180 o2::track::TrackParametrizationWithError<float > mTrackParCov ;
166181 // Binning configuration
167182 ConfigurableAxis axisMagField{" axisMagField" , {10 , -10 ., 10 .}, " magnetic field" };
@@ -225,6 +240,8 @@ struct NucleitpcPbPb {
225240 histos.add <THnSparse>(" hSpectra" , " " , HistType::kTHnSparseF , {speciesBitAxis, ptAxis, nsigmaAxis, {5 , -2.5 , 2.5 }, axisCent, axisDCA, axisDCA});
226241 }
227242 histos.add (" histeta" , " histeta" , kTH1F , {axiseta});
243+ histos.add (" dcaZ" , " dcaZ" , kTH2F , {ptAxis, axisDCA});
244+ histos.add (" dcaXY" , " dcaXY" , kTH2F , {ptAxis, axisDCA});
228245 histos.add (" Tofsignal" , " Tofsignal" , kTH2F , {axisRigidity, {4000 , 0.2 , 1.2 , " #beta" }});
229246 histos.add (" Tpcsignal" , " Tpcsignal" , kTH2F , {axisRigidity, axisdEdx});
230247
@@ -343,6 +360,33 @@ struct NucleitpcPbPb {
343360 mTrackParCov .setPID (track.pidForTracking ());
344361 ptMomn = (i == he3 || i == he4) ? 2 * mTrackParCov .getPt () : mTrackParCov .getPt ();
345362
363+ double a = 0 , b = 0 , c = 0 ;
364+
365+ int param = -1 ;
366+ if (i == he3) {
367+ param = (track.sign () > 0 ) ? 0 : 1 ;
368+ } else if (i == he4) {
369+ param = (track.sign () > 0 ) ? 2 : 3 ;
370+ }
371+
372+ if (param >= 0 ) {
373+ a = cfgktrackcorrection->get (param, " a" );
374+ b = cfgktrackcorrection->get (param, " b" );
375+ c = cfgktrackcorrection->get (param, " c" );
376+ }
377+
378+ if (i == he4 && cfgmccorrectionhe4Require) {
379+ ptMomn = ptMomn + a + b * std::exp (c * ptMomn);
380+ }
381+
382+ if (i == he3 && cfgmccorrectionhe4Require) {
383+ int pidGuess = track.pidForTracking ();
384+ int antitriton = 6 ;
385+ if (pidGuess == antitriton) {
386+ ptMomn = ptMomn - a + b * ptMomn - c * ptMomn * ptMomn;
387+ }
388+ }
389+
346390 int sign = (track.sign () > 0 ) ? 1 : ((track.sign () < 0 ) ? -1 : 0 );
347391
348392 if (std::abs (getRapidity (track, i)) > cfgCutRapidity && cfgRapidityRequire)
@@ -391,6 +435,9 @@ struct NucleitpcPbPb {
391435
392436 histos.fill (HIST (" Tpcsignal" ), getRigidity (track) * track.sign (), track.tpcSignal ());
393437
438+ histos.fill (HIST (" dcaXY" ), ptMomn, track.dcaXY ());
439+ histos.fill (HIST (" dcaZ" ), ptMomn, track.dcaZ ());
440+
394441 if (cfgFillhspectra && cfgTrackPIDsettings2->get (i, " fillsparsh" ) == 1 ) {
395442
396443 if (i != he4) {
@@ -411,7 +458,7 @@ struct NucleitpcPbPb {
411458 float massTOF = p * charge * std::sqrt (1 .f / (beta * beta) - 1 .f );
412459
413460 // Apply mass cut for he4 (mass^2 around 3.73^2 = 13.9)
414- if (cfgMasscut && (massTOF * massTOF > 6.5 && massTOF * massTOF < 9.138 )) {
461+ if (cfghe3massrejreq && (massTOF * massTOF > cfgminmassrejection && massTOF * massTOF < cfgmaxmassrejection )) {
415462 continue ; // Skip if mass cut fails
416463 }
417464
@@ -685,9 +732,6 @@ struct NucleitpcPbPb {
685732 if (std::abs (pdg) != std::abs (particlePdgCodes.at (i)))
686733 continue ;
687734
688- if (std::abs (getRapidity (track, i)) > cfgCutRapidity && cfgRapidityRequire)
689- continue ;
690-
691735 float ptReco;
692736 setTrackParCov (track, mTrackParCov );
693737 mTrackParCov .setPID (track.pidForTracking ());
@@ -696,18 +740,36 @@ struct NucleitpcPbPb {
696740
697741 int particleAnti = (pdg > 0 ) ? 0 : 1 ;
698742
699- if (pdg == -particlePdgCodes.at (5 ) && cfgmccorrectionhe4Require) {
700- ptReco = ptReco + 0.00765 + 0.503791 * std::exp (-1.10517 * ptReco);
743+ double a = 0 , b = 0 , c = 0 ;
744+
745+ int param = -1 ;
746+ if (i == he3) {
747+ param = (-particlePdgCodes.at (4 ) > 0 ) ? 0 : 1 ;
748+ } else if (i == he4) {
749+ param = (-particlePdgCodes.at (4 ) > 0 ) ? 2 : 3 ;
750+ }
751+
752+ if (param >= 0 ) {
753+ a = cfgktrackcorrection->get (param, " a" );
754+ b = cfgktrackcorrection->get (param, " b" );
755+ c = cfgktrackcorrection->get (param, " c" );
701756 }
702757
703- if (pdg == -particlePdgCodes.at (4 ) && cfgmccorrectionhe4Require) {
758+ if (std::abs (pdg) == particlePdgCodes.at (5 ) && cfgmccorrectionhe4Require) {
759+ ptReco = ptReco + a + b * std::exp (c * ptReco);
760+ }
761+
762+ if (std::abs (pdg) == particlePdgCodes.at (4 ) && cfgmccorrectionhe4Require) {
704763 int pidGuess = track.pidForTracking ();
705764 int antitriton = 6 ;
706765 if (pidGuess == antitriton) {
707- ptReco = ptReco - 0.464215 + 0.195771 * ptReco - 0.0183111 * ptReco * ptReco;
766+ ptReco = ptReco - a + b * ptReco - c * ptReco * ptReco;
708767 }
709768 }
710769
770+ if (std::abs (getRapidity (track, i)) > cfgCutRapidity && cfgRapidityRequire)
771+ continue ;
772+
711773 if (track.tpcNClsFound () < cfgTrackPIDsettings->get (i, " minTPCnCls" ) && cfgTPCNClsfoundRequire)
712774 continue ;
713775 if (((track.tpcNClsCrossedRows () < cfgTrackPIDsettings->get (i, " minTPCnClsCrossedRows" )) || track.tpcNClsCrossedRows () < cfgtpcNClsFindable * track.tpcNClsFindable ()) && cfgTPCNClsCrossedRowsRequire)
@@ -752,6 +814,11 @@ struct NucleitpcPbPb {
752814 ptReco, ptTOF);
753815 }
754816
817+ float tpcNsigma = getTPCnSigma (track, primaryParticles.at (i));
818+ fillhmassnsigma (track, i, tpcNsigma);
819+ histos.fill (HIST (" dcaXY" ), ptReco, track.dcaXY ());
820+ histos.fill (HIST (" dcaZ" ), ptReco, track.dcaZ ());
821+
755822 histos.fill (HIST (" Tpcsignal" ), getRigidity (track) * track.sign (), track.tpcSignal ());
756823
757824 // Fill the requested histograms
@@ -854,12 +921,24 @@ struct NucleitpcPbPb {
854921 float pdgMass = particleMasses[species];
855922 float massDiff = 0.0 ;
856923 if (species != he4) {
857- massDiff = massTOF - pdgMass;
924+ if (cfgmass2) {
925+ // Compare squared masses
926+ massDiff = massTOF * massTOF - pdgMass * pdgMass;
927+ } else {
928+ // Compare linear masses
929+ massDiff = massTOF - pdgMass;
930+ }
858931 }
859932 if (species == he4) {
860- if (cfgMasscut && (massTOF * massTOF > 6.5 && massTOF * massTOF < 9.138 ))
933+ if (cfghe3massrejreq && (massTOF * massTOF > cfgminmassrejection && massTOF * massTOF < cfgmaxmassrejection ))
861934 return ;
862- massDiff = massTOF - pdgMass;
935+ if (cfgmass2) {
936+ // Compare squared masses
937+ massDiff = massTOF * massTOF - pdgMass * pdgMass;
938+ } else {
939+ // Compare linear masses
940+ massDiff = massTOF - pdgMass;
941+ }
863942 }
864943
865944 float ptMomn;
@@ -893,7 +972,7 @@ struct NucleitpcPbPb {
893972 masssquare = massTOF * massTOF;
894973 }
895974 if (species == he4) {
896- if (cfgMasscut && (massTOF * massTOF > 6.5 && massTOF * massTOF < 9.138 ))
975+ if (cfghe3massrejreq && (massTOF * massTOF > cfgminmassrejection && massTOF * massTOF < cfgmaxmassrejection ))
897976 return ;
898977 masssquare = massTOF * massTOF;
899978 }
0 commit comments