99// granted to it by virtue of its status as an Intergovernmental Organization
1010// or submit itself to any jurisdiction.
1111
12- // / \file alice3-strangenessFinder .cxx
12+ // / \file alice3strangenessFinder .cxx
1313// /
1414// / \brief finding of V0 and cascade candidates for ALICE 3
1515// /
@@ -45,7 +45,7 @@ using namespace o2::constants::physics;
4545using Alice3TracksWPid = soa::Join<aod::Tracks, aod::TracksCov, aod::McTrackLabels, aod::TracksDCA, aod::UpgradeTrkPids, aod::UpgradeTofs, aod::UpgradeRichs>;
4646using Alice3Tracks = soa::Join<aod::StoredTracks, aod::StoredTracksCov, aod::McTrackLabels, aod::TracksDCA, aod::TracksCovExtension, aod::TracksAlice3>;
4747
48- struct alice3strangenessFinder {
48+ struct Alice3strangenessFinder {
4949 SliceCache cache;
5050
5151 HistogramRegistry histos{" histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
@@ -95,9 +95,9 @@ struct alice3strangenessFinder {
9595 struct {
9696 float dcaDau;
9797 std::array<float , 3 > posSV;
98- std::array<float , 3 > P ;
99- std::array<float , 3 > Pdaug ; // positive track
100- std::array<float , 3 > Ndaug ; // negative track
98+ std::array<float , 3 > pV0 ;
99+ std::array<float , 3 > pPos ; // positive track
100+ std::array<float , 3 > pNeg ; // negative track
101101 float cosPA;
102102 float dcaToPV;
103103 } v0cand;
@@ -165,24 +165,24 @@ struct alice3strangenessFinder {
165165 std::array<float , 3 > negP;
166166 posTrackCov.getPxPyPzGlo (posP);
167167 negTrackCov.getPxPyPzGlo (negP);
168- v0cand.dcaDau = TMath::Sqrt (fitter.getChi2AtPCACandidate ());
169- v0cand.Pdaug [0 ] = posP[0 ];
170- v0cand.Pdaug [1 ] = posP[1 ];
171- v0cand.Pdaug [2 ] = posP[2 ];
172- v0cand.Ndaug [0 ] = negP[0 ];
173- v0cand.Ndaug [1 ] = negP[1 ];
174- v0cand.Ndaug [2 ] = negP[2 ];
175- v0cand.P [0 ] = posP[0 ] + negP[0 ];
176- v0cand.P [1 ] = posP[1 ] + negP[1 ];
177- v0cand.P [2 ] = posP[2 ] + negP[2 ];
168+ v0cand.dcaDau = std::sqrt (fitter.getChi2AtPCACandidate ());
169+ v0cand.pPos [0 ] = posP[0 ];
170+ v0cand.pPos [1 ] = posP[1 ];
171+ v0cand.pPos [2 ] = posP[2 ];
172+ v0cand.pNeg [0 ] = negP[0 ];
173+ v0cand.pNeg [1 ] = negP[1 ];
174+ v0cand.pNeg [2 ] = negP[2 ];
175+ v0cand.pV0 [0 ] = posP[0 ] + negP[0 ];
176+ v0cand.pV0 [1 ] = posP[1 ] + negP[1 ];
177+ v0cand.pV0 [2 ] = posP[2 ] + negP[2 ];
178178 const auto posSV = fitter.getPCACandidatePos ();
179179 v0cand.posSV [0 ] = posSV[0 ];
180180 v0cand.posSV [1 ] = posSV[1 ];
181181 v0cand.posSV [2 ] = posSV[2 ];
182182
183183 return true ;
184184 }
185- float CalculateDCAStraightToPV (float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ)
185+ float calculateDCAStraightToPV (float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ)
186186 {
187187 return std::sqrt ((std::pow ((pvY - Y) * Pz - (pvZ - Z) * Py, 2 ) + std::pow ((pvX - X) * Pz - (pvZ - Z) * Px, 2 ) + std::pow ((pvX - X) * Py - (pvY - Y) * Px, 2 )) / (Px * Px + Py * Py + Pz * Pz));
188188 }
@@ -205,26 +205,26 @@ struct alice3strangenessFinder {
205205 continue ;
206206 if (!buildDecayCandidateTwoBody (posTrack, negTrack))
207207 continue ;
208- v0cand.cosPA = RecoDecay::cpa (std::array{collision.posX (), collision.posY (), collision.posZ ()}, std::array{v0cand.posSV [0 ], v0cand.posSV [1 ], v0cand.posSV [2 ]}, std::array{v0cand.P [0 ], v0cand.P [1 ], v0cand.P [2 ]});
209- v0cand.dcaToPV = CalculateDCAStraightToPV (
208+ v0cand.cosPA = RecoDecay::cpa (std::array{collision.posX (), collision.posY (), collision.posZ ()}, std::array{v0cand.posSV [0 ], v0cand.posSV [1 ], v0cand.posSV [2 ]}, std::array{v0cand.pV0 [0 ], v0cand.pV0 [1 ], v0cand.pV0 [2 ]});
209+ v0cand.dcaToPV = calculateDCAStraightToPV (
210210 v0cand.posSV [0 ], v0cand.posSV [1 ], v0cand.posSV [2 ],
211- v0cand.P [0 ], v0cand.P [1 ], v0cand.P [2 ],
211+ v0cand.pV0 [0 ], v0cand.pV0 [1 ], v0cand.pV0 [2 ],
212212 collision.posX (), collision.posY (), collision.posZ ());
213213 v0CandidateIndices (collision.globalIndex (),
214214 posTrack.globalIndex (),
215215 negTrack.globalIndex (),
216216 mcParticle1.globalIndex ());
217217 v0CandidateCores (
218218 v0cand.posSV [0 ], v0cand.posSV [1 ], v0cand.posSV [2 ],
219- v0cand.Pdaug [0 ], v0cand.Pdaug [1 ], v0cand.Pdaug [2 ],
220- v0cand.Ndaug [0 ], v0cand.Ndaug [1 ], v0cand.Ndaug [2 ],
219+ v0cand.pPos [0 ], v0cand.pPos [1 ], v0cand.pPos [2 ],
220+ v0cand.pNeg [0 ], v0cand.pNeg [1 ], v0cand.pNeg [2 ],
221221 v0cand.dcaDau , posTrack.dcaXY (), negTrack.dcaXY (),
222222 v0cand.cosPA , v0cand.dcaToPV );
223- if (mcParticle1.pdgCode () == 310 ) {
223+ if (mcParticle1.pdgCode () == kK0Short ) {
224224 histos.fill (HIST (" hV0Counter" ), 0.5 );
225- } else if (mcParticle1.pdgCode () == 3122 ) {
225+ } else if (mcParticle1.pdgCode () == kLambda0 ) {
226226 histos.fill (HIST (" hV0Counter" ), 1.5 );
227- } else if (mcParticle1.pdgCode () == - 3122 ) {
227+ } else if (mcParticle1.pdgCode () == kLambda0Bar ) {
228228 histos.fill (HIST (" hV0Counter" ), 2.5 );
229229 } else {
230230 histos.fill (HIST (" hV0Counter" ), 3.5 );
@@ -239,12 +239,12 @@ struct alice3strangenessFinder {
239239 // auto secondaryProtonsGrouped = secondaryProtons->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
240240 // auto secondaryAntiProtonsGrouped = secondaryAntiProtons->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
241241 // }
242- PROCESS_SWITCH (alice3strangenessFinder , processFindV0CandidateNoPid, " find V0 without PID" , true );
242+ PROCESS_SWITCH (Alice3strangenessFinder , processFindV0CandidateNoPid, " find V0 without PID" , true );
243243 // PROCESS_SWITCH(alice3strangenessFinder, processFindV0CandidateWithPid, "find V0 with PID", false);
244244};
245245
246246WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
247247{
248248 return WorkflowSpec{
249- adaptAnalysisTask<alice3strangenessFinder >(cfgc)};
249+ adaptAnalysisTask<Alice3strangenessFinder >(cfgc)};
250250}
0 commit comments