Skip to content

Commit fee6ed0

Browse files
authored
[ALICE3] Use track updates instead of mc info for causality check in a3 strangeness (#18269)
1 parent c5a388f commit fee6ed0

1 file changed

Lines changed: 5 additions & 51 deletions

File tree

‎ALICE3/TableProducer/alice3strangenessFinder.cxx‎

Lines changed: 5 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
#include "PWGLF/DataModel/LFStrangenessTables.h"
2323

24-
#include "ALICE3/Core/GeometryContainer.h"
2524
#include "ALICE3/Core/TrackUtilities.h"
2625
#include "ALICE3/DataModel/OTFPIDTrk.h"
2726
#include "ALICE3/DataModel/OTFRICH.h"
@@ -32,7 +31,6 @@
3231
#include "Common/Core/trackUtilities.h"
3332
#include "Common/DataModel/TrackSelectionTables.h"
3433

35-
#include <CCDB/BasicCCDBManager.h>
3634
#include <CommonConstants/PhysicsConstants.h>
3735
#include <DCAFitter/DCAFitterN.h>
3836
#include <DetectorsBase/Propagator.h>
@@ -74,9 +72,6 @@ struct Alice3strangenessFinder {
7472
SliceCache cache;
7573

7674
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
77-
Service<o2::ccdb::BasicCCDBManager> ccdb{};
78-
o2::fastsim::GeometryContainer geoContainer;
79-
std::vector<std::vector<float>> trackingLayers;
8075

8176
Produces<aod::V0CandidateIndices> v0CandidateIndices; // contains V0 candidate indices
8277
Produces<aod::V0CandidateCores> v0CandidateCores; // contains V0 candidate core information
@@ -151,7 +146,6 @@ struct Alice3strangenessFinder {
151146
o2::vertexing::DCAFitterN<2> fitter;
152147
Service<o2::framework::O2DatabasePDG> pdgDB{};
153148
static constexpr float ToMicrons = 1e+4;
154-
static constexpr int LutConfig = 0; // todo
155149

156150
// partitions for v0/casc dau tracks
157151
Partition<Alice3TracksACTS> positiveSecondaryTracksACTS =
@@ -199,7 +193,7 @@ struct Alice3strangenessFinder {
199193
float dcaToPV{};
200194
};
201195

202-
void init(InitContext& initContext)
196+
void init(InitContext&)
203197
{
204198
// Initialization code here
205199
fitter.setBz(magneticField);
@@ -280,30 +274,6 @@ struct Alice3strangenessFinder {
280274
histos.add("Generated/hGeneratedAntiOmega", "hGeneratedAntiOmega", kTH2D, {{axisPt}, {axisEta}});
281275
}
282276

283-
if (doprocessFindV0CandidateOTF) {
284-
ccdb->setURL("http://alice-ccdb.cern.ch");
285-
ccdb->setTimestamp(-1);
286-
geoContainer.setCcdbManager(ccdb.operator->());
287-
geoContainer.init(initContext);
288-
const int nGeometries = geoContainer.getNumberOfConfigurations();
289-
trackingLayers.resize(nGeometries);
290-
291-
for (int icfg = 0; icfg < nGeometries; ++icfg) {
292-
auto globalConfiguration = geoContainer.getConfigurations(icfg);
293-
294-
for (const auto& [outerKey, innerMap] : globalConfiguration) {
295-
if (outerKey.empty() || outerKey[0] != 'B') {
296-
continue;
297-
}
298-
299-
auto it = innerMap.find("r");
300-
if (it != innerMap.end()) {
301-
trackingLayers[icfg].push_back(std::stof(it->second));
302-
}
303-
}
304-
}
305-
}
306-
307277
if (buildCascade) {
308278
histos.add("CascadeBuilding/hDcaBetweenDaus", "hDcaBetweenDaus", kTH1D, {{axisDCA}});
309279
histos.add("CascadeBuilding/hXiMass", "", kTH1D, {axisXiMass});
@@ -374,19 +344,6 @@ struct Alice3strangenessFinder {
374344
return returnValue;
375345
}
376346

377-
template <typename TTrackType>
378-
[[nodiscard]] float getFirstLayerHitRadius(const TTrackType& track, const std::vector<float>& layers)
379-
{
380-
const float trueRadius = std::hypot(track.x(), track.y());
381-
for (const float layerRadius : layers) {
382-
if (layerRadius >= trueRadius) {
383-
return layerRadius;
384-
}
385-
}
386-
static constexpr float OutsideALICE3 = 100.f;
387-
return OutsideALICE3;
388-
}
389-
390347
template <typename TTrackType>
391348
bool buildDecayCandidateTwoBody(TTrackType const& t0, TTrackType const& t1, std::array<float, 3> vtx, Candidate& thisCandidate)
392349
{
@@ -672,23 +629,20 @@ struct Alice3strangenessFinder {
672629

673630
const float radiusV0 = std::hypot(v0Cand.posSV[0], v0Cand.posSV[1]);
674631
const float radiusCasc = std::hypot(cascCand.posSV[0], cascCand.posSV[1]);
675-
const float posCausalityRadius = getFirstLayerHitRadius(posTrack, trackingLayers[LutConfig]);
676-
const float negCausalityRadius = getFirstLayerHitRadius(negTrack, trackingLayers[LutConfig]);
677-
const float bachCausalityRadius = getFirstLayerHitRadius(bachTrack, trackingLayers[LutConfig]);
678-
679-
if (posCausalityRadius < radiusV0) {
632+
// tracks without update information (IU < 0) are not checked
633+
if (posTrack.trackIU() > 0.f && posTrack.trackIU() < radiusV0) {
680634
continue; // positive track hit a layer before v0 decayed
681635
}
682636

683-
if (negCausalityRadius < radiusV0) {
637+
if (negTrack.trackIU() > 0.f && negTrack.trackIU() < radiusV0) {
684638
continue; // negative track hit a layer before v0 decayed
685639
}
686640

687641
if (radiusV0 < radiusCasc) {
688642
continue; // v0 decayed before cascade
689643
}
690644

691-
if (bachCausalityRadius < radiusCasc) {
645+
if (bachTrack.trackIU() > 0.f && bachTrack.trackIU() < radiusCasc) {
692646
continue; // bachelor track hit a layer before v0 decayed
693647
}
694648

0 commit comments

Comments
 (0)