Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ struct ThreeParticleCorrelations {
Filter mcCollZvtx = nabs(aod::mccollision::posZ) < zvtxMax;
Filter evSelect = aod::evsel::sel8 == true;

// V0 filters
Filter v0Pt = aod::v0data::pt > v0PtMin&& aod::v0data::pt < v0PtMax;
Filter v0Eta = nabs(aod::v0data::eta) < v0EtaMax;

// Track filters
Filter trackPt = aod::track::pt > trackPtMin&& aod::track::pt < trackPtMax;
Filter trackEta = nabs(aod::track::eta) < trackEtaMax;
Expand All @@ -83,7 +79,6 @@ struct ThreeParticleCorrelations {
// Table aliases - Data
using MyFilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::CentFT0Cs, aod::EvSels>>;
using MyFilteredCollision = MyFilteredCollisions::iterator;
using MyFilteredV0s = soa::Filtered<aod::V0Datas>;
using MyFilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection,
aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCPr,
aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr, aod::pidTOFbeta>>;
Expand Down Expand Up @@ -122,7 +117,7 @@ struct ThreeParticleCorrelations {

BinningType collBinning{{confCentBins, confZvtxBins}, true};
BinningTypeMC collBinningMC{{confCentBins, confZvtxBins}, true};
Pair<MyFilteredCollisions, MyFilteredV0s, MyFilteredTracks, BinningType> pairData{collBinning, 5, -1, &cache};
Pair<MyFilteredCollisions, aod::V0Datas, MyFilteredTracks, BinningType> pairData{collBinning, 5, -1, &cache};
SameKindPair<MyFilteredMCGenCollisions, MyFilteredMCParticles, BinningTypeMC> pairMC{collBinningMC, 5, -1, &cache};

// Process configurables
Expand Down Expand Up @@ -313,7 +308,7 @@ struct ThreeParticleCorrelations {

//==========================================================================================================================================================================================================================================================================

void processSame(MyFilteredCollision const& collision, MyFilteredV0s const& v0s, MyFilteredTracks const& tracks, aod::BCsWithTimestamps const&)
void processSame(MyFilteredCollision const& collision, aod::V0Datas const& v0s, MyFilteredTracks const& tracks, aod::BCsWithTimestamps const&)
{

if (!acceptEvent(collision, true)) {
Expand Down Expand Up @@ -425,7 +420,7 @@ struct ThreeParticleCorrelations {
// End of the Same-Event correlations
}

void processMixed(MyFilteredCollisions const&, MyFilteredV0s const&, MyFilteredTracks const&, aod::BCsWithTimestamps const&)
void processMixed(MyFilteredCollisions const&, aod::V0Datas const&, MyFilteredTracks const&, aod::BCsWithTimestamps const&)
{

// Start of the Mixed-Event correlations
Expand Down Expand Up @@ -886,7 +881,6 @@ struct ThreeParticleCorrelations {
template <class CollCand>
bool acceptEvent(const CollCand& collision, bool FillHist) // Event filter
{

if (FillHist) {
rQARegistry.fill(HIST("hNEvents"), 0.5);
}
Expand All @@ -911,8 +905,12 @@ struct ThreeParticleCorrelations {
template <class V0Cand>
bool v0Filters(const V0Cand& v0, bool MCRec) // V0 filter
{

if (!MCRec) { // Data
if (v0.pt() < v0PtMin || v0.pt() > v0PtMax)
return false;
if (std::abs(v0.eta()) > v0EtaMax)
return false;

if (v0Sign(v0) == 1) {
const auto& posDaughter = v0.template posTrack_as<MyFilteredTracks>();
if (std::abs(posDaughter.tpcNSigmaPr()) > nSigma4) {
Expand All @@ -925,6 +923,11 @@ struct ThreeParticleCorrelations {
}
}
} else { // MC Reconstructed
if (v0.pt() < v0PtMin || v0.pt() > v0PtMax)
return false;
if (std::abs(v0.eta()) > v0EtaMax)
return false;

if (v0Sign(v0) == 1) {
const auto& posDaughter = v0.template posTrack_as<MyFilteredMCTracks>();
if (std::abs(posDaughter.tpcNSigmaPr()) > nSigma4) {
Expand Down
9 changes: 1 addition & 8 deletions PWGEM/PhotonMeson/TableProducer/createPCM.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
d_bz = d_bz_input;
fitter.setBz(d_bz);
o2::parameters::GRPMagField grpmag;
if (fabs(d_bz) > 1e-5) {

Check failure on line 162 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
grpmag.setL3Current(30000.f / (d_bz / 5.0f));
}
o2::base::Propagator::initFieldFromGRP(&grpmag);
Expand Down Expand Up @@ -242,7 +242,7 @@

float xyz[3] = {0.f, 0.f, 0.f};
Vtx_recalculation(o2::base::Propagator::Instance(), pos, ele, xyz, matCorr);
float recalculatedVtxR = std::sqrt(pow(xyz[0], 2) + pow(xyz[1], 2));

Check failure on line 245 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
// LOGF(info, "recalculated vtx : x = %f , y = %f , z = %f", xyz[0], xyz[1], xyz[2]);
if (recalculatedVtxR > std::min(pos.x(), ele.x()) + margin_r && (pos.x() > 1.f && ele.x() > 1.f)) {
return false;
Expand Down Expand Up @@ -329,10 +329,10 @@
template <typename TTrack>
bool isSelected(TTrack const& track)
{
if (track.pt() < minpt || abs(track.eta()) > maxeta) {

Check failure on line 332 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return false;
}
if (abs(track.dcaXY()) < dcamin || dcamax < abs(track.dcaXY())) {

Check failure on line 335 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return false;
}
if (!track.hasITS() && !track.hasTPC()) {
Expand All @@ -357,7 +357,7 @@
return false;
}

if (abs(track.z() / track.x() - track.tgl()) > 0.5) {

Check failure on line 360 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return false;
}

Expand Down Expand Up @@ -419,9 +419,9 @@
}
// LOGF(info, "min_sw = %d , max_sw = %d , collision.globalIndex() = %d , n posTracks_sw = %d , n negTracks_sw = %d", min_sw, max_sw, collision.globalIndex(), npos, nneg);

for (auto& negTracks_coll : negTracks_sw) {

Check failure on line 422 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
for (auto& posTracks_coll : posTracks_sw) {

Check failure on line 423 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
for (auto& [ele, pos] : combinations(CombinationsFullIndexPolicy(negTracks_coll, posTracks_coll))) {

Check failure on line 424 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (!isSelected(ele) || !isSelected(pos)) {
continue;
}
Expand Down Expand Up @@ -522,7 +522,7 @@
Preslice<aod::TrackAssoc> trackIndicesPerCollision = aod::track_association::collisionId;
void processTrkCollAsso(aod::TrackAssoc const& trackIndices, FullTracksExtIU const&, aod::Collisions const& collisions, aod::BCsWithTimestamps const&)
{
for (auto& collision : collisions) {

Check failure on line 525 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
registry.fill(HIST("hEventCounter"), 1);

auto bc = collision.bc_as<aod::BCsWithTimestamps>();
Expand All @@ -530,7 +530,7 @@
auto trackIdsThisCollision = trackIndices.sliceBy(trackIndicesPerCollision, collision.globalIndex());

// LOGF(info,"%d tracks in collision %d", trackIdsThisCollision.size(), collision.globalIndex());
for (auto& [eleId, posId] : combinations(CombinationsStrictlyUpperIndexPolicy(trackIdsThisCollision, trackIdsThisCollision))) {

Check failure on line 533 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
auto ele = eleId.track_as<FullTracksExtIU>();
auto pos = posId.track_as<FullTracksExtIU>();
// LOGF(info,"eleId = %d , posId = %d", ele.globalIndex(), pos.globalIndex());
Expand All @@ -554,15 +554,8 @@
PROCESS_SWITCH(createPCM, processTrkCollAsso, "create V0s with track-to-collision associator", false);
};

// Extends the v0data table with expression columns
struct v0Initializer {
Spawns<aod::V0Cores> v0cores;
void init(InitContext const&) {}
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<createPCM>(cfgc, TaskName{"v0-finder"}),
adaptAnalysisTask<v0Initializer>(cfgc, TaskName{"v0-initializer"})};
adaptAnalysisTask<createPCM>(cfgc, TaskName{"v0-finder"})};
}
Loading
Loading