1515// / \author Your Name (your.email@cern.ch)
1616// / \since April 2025
1717
18- #include < TH1F.h>
19- #include < TDirectory.h>
20- #include < THn.h>
21- #include < TMath.h>
22- #include < TObjArray.h>
23- #include < TFile.h>
24- #include < TH2F.h>
25- #include < TPDGCode.h>
26- #include < TDatabasePDG.h>
27-
28- #include < cmath>
29- #include < string>
30- #include < algorithm>
31- #include < vector>
32- #include < array>
33- #include < cstdlib>
34- #include < iterator> // std::prev
35-
36- #include " Framework/ASoAHelpers.h"
37- #include " Framework/runDataProcessing.h"
38- #include " Framework/AnalysisTask.h"
39- #include " Framework/AnalysisDataModel.h"
40- #include " Framework/HistogramRegistry.h"
41- #include " Framework/StepTHn.h"
18+ #include " PWGLF/DataModel/EPCalibrationTables.h"
19+ #include " PWGLF/DataModel/LFhe3HadronTables.h"
20+ #include " PWGLF/Utils/svPoolCreator.h"
4221
4322#include " Common/Core/PID/PIDTOF.h"
4423#include " Common/Core/PID/TPCPIDResponse.h"
5231#include " Common/DataModel/PIDResponseITS.h"
5332#include " Common/DataModel/TrackSelectionTables.h"
5433#include " Common/TableProducer/PID/pidTOFBase.h"
55-
5634#include " EventFiltering/Zorro.h"
5735#include " EventFiltering/ZorroSummary.h"
5836
5937#include " CCDB/BasicCCDBManager.h"
60- #include " DetectorsBase/Propagator.h"
61- #include " DetectorsBase/GeometryManager.h"
62- #include " DataFormatsTPC/BetheBlochAleph.h"
63- #include " DataFormatsParameters/GRPObject.h"
6438#include " DataFormatsParameters/GRPMagField.h"
39+ #include " DataFormatsParameters/GRPObject.h"
40+ #include " DataFormatsTPC/BetheBlochAleph.h"
41+ #include " DetectorsBase/GeometryManager.h"
42+ #include " DetectorsBase/Propagator.h"
43+ #include " Framework/ASoAHelpers.h"
44+ #include " Framework/AnalysisDataModel.h"
45+ #include " Framework/AnalysisTask.h"
46+ #include " Framework/HistogramRegistry.h"
47+ #include " Framework/StepTHn.h"
48+ #include " Framework/runDataProcessing.h"
6549#include " ReconstructionDataFormats/Track.h"
6650
67- #include " PWGLF/DataModel/EPCalibrationTables.h"
68- #include " PWGLF/DataModel/LFhe3HadronTables.h"
69- #include " PWGLF/Utils/svPoolCreator.h"
51+ #include < TDatabasePDG.h>
52+ #include < TDirectory.h>
53+ #include < TFile.h>
54+ #include < TH1F.h>
55+ #include < TH2F.h>
56+ #include < THn.h>
57+ #include < TMath.h>
58+ #include < TObjArray.h>
59+ #include < TPDGCode.h>
60+
61+ #include < algorithm>
62+ #include < array>
63+ #include < cmath>
64+ #include < cstdlib>
65+ #include < iterator> // std::prev
66+ #include < string>
67+ #include < vector>
7068
7169using namespace o2 ;
7270using namespace o2 ::framework;
@@ -100,17 +98,17 @@ enum Selections {
10098};
10199
102100enum Flags {
103- kBothPrimaries = BIT (0 ),
101+ kBothPrimaries = BIT (0 ),
104102 kBothFromLi4 = BIT (1 ),
105103 kBothFromHypertriton = BIT (2 ),
106104 kMixedPair = BIT (3 ), // a primary and one from Li4/hypertriton/material/other decays (or any other combination)
107105};
108106
109107enum ParticleFlags {
110108 kPhysicalPrimary = BIT (0 ), // primary particle
111- kFromLi4 = BIT (1 ), // from Li4 decay
109+ kFromLi4 = BIT (1 ), // from Li4 decay
112110 kFromHypertriton = BIT (2 ), // from hypertriton decay
113- kFromMaterial = BIT (3 ), // from material
111+ kFromMaterial = BIT (3 ), // from material
114112 kFromOtherDecays = BIT (4 ), // from other decays
115113};
116114
@@ -177,7 +175,7 @@ struct He3HadCandidate {
177175
178176 uint8_t flagsHe3 = 0 ; // flags for He3
179177 uint8_t flagsHad = 0 ; // flags for hadron
180- uint8_t flags = 0 ; // flags for the pair
178+ uint8_t flags = 0 ; // flags for the pair
181179
182180 // collision information
183181 int32_t collisionID = 0 ;
@@ -578,7 +576,6 @@ struct he3HadronFemto {
578576 return false ;
579577 }
580578 return collIdxMin;
581-
582579 }
583580
584581 template <typename Ttrack, typename Tcollisions, typename Ttracks>
@@ -611,10 +608,10 @@ struct he3HadronFemto {
611608 he3Hadcand.signHe3 = trackHe3.sign ();
612609 he3Hadcand.signHad = trackHad.sign ();
613610
614- // he3Hadcand.dcaxyHe3 = trackHe3.dcaXY();
615- // he3Hadcand.dcaxyHad = trackHad.dcaXY();
616- // he3Hadcand.dcazHe3 = trackHe3.dcaZ();
617- // he3Hadcand.dcazHad = trackHad.dcaZ();
611+ // he3Hadcand.dcaxyHe3 = trackHe3.dcaXY();
612+ // he3Hadcand.dcaxyHad = trackHad.dcaXY();
613+ // he3Hadcand.dcazHe3 = trackHe3.dcaZ();
614+ // he3Hadcand.dcazHad = trackHad.dcaZ();
618615 auto trackCovHe3 = getTrackParCov (trackHe3);
619616 auto trackCovHad = getTrackParCov (trackHad);
620617 std::array<float , 2 > dcaInfo;
@@ -626,7 +623,6 @@ struct he3HadronFemto {
626623 he3Hadcand.dcazHad = dcaInfo[1 ];
627624 he3Hadcand.dcaPair = std::sqrt (std::abs (mFitter .getChi2AtPCACandidate ()));
628625
629-
630626 he3Hadcand.tpcSignalHe3 = trackHe3.tpcSignal ();
631627 bool heliumPID = trackHe3.pidForTracking () == o2::track::PID::Helium3 || trackHe3.pidForTracking () == o2::track::PID::Alpha;
632628 float correctedTPCinnerParamHe3 = (heliumPID && settingCompensatePIDinTracking) ? trackHe3.tpcInnerParam () / 2 .f : trackHe3.tpcInnerParam ();
@@ -862,7 +858,7 @@ struct he3HadronFemto {
862858 void setMcParticleFlag (const TmcParticle& mcParticle, std::vector<unsigned int >& mothers, uint8_t & flag)
863859 {
864860 if (mcParticle.isPhysicalPrimary ()) {
865-
861+
866862 flag |= ParticleFlags::kPhysicalPrimary ;
867863 if (!mcParticle.has_mothers ()) {
868864 return ;
@@ -879,9 +875,9 @@ struct he3HadronFemto {
879875 flag |= ParticleFlags::kFromOtherDecays ;
880876 }
881877 }
882-
878+
883879 } else {
884-
880+
885881 if (!mcParticle.has_mothers ()) {
886882 flag |= ParticleFlags::kFromMaterial ;
887883 return ;
@@ -896,7 +892,7 @@ struct he3HadronFemto {
896892 flag |= ParticleFlags::kFromHypertriton ;
897893 } else {
898894 flag |= ParticleFlags::kFromOtherDecays ;
899- }
895+ }
900896 }
901897 }
902898 }
@@ -1039,19 +1035,19 @@ struct he3HadronFemto {
10391035 if ((he3Hadcand.flagsHe3 == ParticleFlags::kPhysicalPrimary && he3Hadcand.flagsHad == ParticleFlags::kPhysicalPrimary )) {
10401036 he3Hadcand.flags |= Flags::kBothPrimaries ;
10411037 isMixedPair = false ;
1042-
1038+
10431039 } else if ((he3Hadcand.flagsHe3 & ParticleFlags::kFromLi4 ) && (he3Hadcand.flagsHad & ParticleFlags::kFromLi4 )) {
1044-
1040+
10451041 std::unordered_set<unsigned int > motherHe3SetIdxs (motherHe3Idxs.begin (), motherHe3Idxs.end ());
10461042 for (const auto & motherHadIdx : motherHadIdxs) {
10471043 if (!motherHe3SetIdxs.contains (motherHadIdx)) {
10481044 continue ;
10491045 }
1050-
1046+
10511047 motherParticle = mcParticles.rawIteratorAt (motherHadIdx);
10521048 motherIdx = motherHadIdx;
10531049 if (std::abs (motherParticle.pdgCode ()) != Li4PDG || std::abs (motherParticle.y ()) > 1 ) {
1054- continue ;
1050+ continue ;
10551051 }
10561052 isMixedPair = false ;
10571053 break ;
@@ -1067,11 +1063,11 @@ struct he3HadronFemto {
10671063 if (!motherHe3SetIdxs.contains (motherHadIdx)) {
10681064 continue ;
10691065 }
1070-
1066+
10711067 motherParticle = mcParticles.rawIteratorAt (motherHadIdx);
10721068 motherIdx = motherHadIdx;
10731069 if (std::abs (motherParticle.pdgCode ()) != o2::constants::physics::Pdg::kHyperTriton || std::abs (motherParticle.y ()) > 1 ) {
1074- continue ;
1070+ continue ;
10751071 }
10761072 isMixedPair = false ;
10771073 break ;
@@ -1080,9 +1076,8 @@ struct he3HadronFemto {
10801076 if (!isMixedPair) {
10811077 he3Hadcand.flags |= Flags::kBothFromHypertriton ;
10821078 }
1079+ }
10831080
1084- }
1085-
10861081 if (isMixedPair) {
10871082 he3Hadcand.flags |= Flags::kMixedPair ;
10881083 }
@@ -1091,7 +1086,7 @@ struct he3HadronFemto {
10911086 continue ;
10921087 }
10931088 fillCandidateInfoMC (mctrackHe3, mctrackHad, he3Hadcand);
1094-
1089+
10951090 if ((he3Hadcand.flags == Flags::kBothFromLi4 ) || (he3Hadcand.flags == Flags::kBothFromHypertriton )) {
10961091 fillMotherInfoMC (mctrackHe3, mctrackHad, motherParticle, he3Hadcand);
10971092 filledMothers.push_back (motherIdx);
0 commit comments