Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion PWGLF/DataModel/LFHStrangeCorrelationTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
namespace triggerTracks
{
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //!
DECLARE_SOA_COLUMN(MCPhysicalPrimary, mcPhysicalPrimary, bool); // true physical primary flag

Check failure on line 45 in PWGLF/DataModel/LFHStrangeCorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_INDEX_COLUMN_FULL(Track, track, int, Tracks, "_Trigger"); //!
DECLARE_SOA_COLUMN(MCOriginalPt, mcOriginalPt, float); // true generated pt

Check failure on line 47 in PWGLF/DataModel/LFHStrangeCorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
} // namespace triggerTracks
DECLARE_SOA_TABLE(TriggerTracks, "AOD", "TRIGGERTRACKS", o2::soa::Index<>, triggerTracks::CollisionId, triggerTracks::MCPhysicalPrimary, triggerTracks::TrackId, triggerTracks::MCOriginalPt);
namespace triggerTrackExtras
Expand All @@ -60,8 +60,9 @@
DECLARE_SOA_COLUMN(MCPhysicalPrimary, mcPhysicalPrimary, bool); // true physical primary flag
DECLARE_SOA_INDEX_COLUMN_FULL(Track, track, int, Tracks, "_Assoc"); //!
DECLARE_SOA_COLUMN(MCOriginalPt, mcOriginalPt, float); // true generated pt
DECLARE_SOA_COLUMN(PDGCode, pdgCode, float); // pdg code of the MC particle
} // namespace assocHadrons
DECLARE_SOA_TABLE(AssocHadrons, "AOD", "ASSOCHADRONS", o2::soa::Index<>, assocHadrons::CollisionId, assocHadrons::MCPhysicalPrimary, assocHadrons::TrackId, assocHadrons::MCOriginalPt);
DECLARE_SOA_TABLE(AssocHadrons, "AOD", "ASSOCHADRONS", o2::soa::Index<>, assocHadrons::CollisionId, assocHadrons::MCPhysicalPrimary, assocHadrons::TrackId, assocHadrons::MCOriginalPt, assocHadrons::PDGCode);
/// _________________________________________
/// Table for storing assoc track PID
namespace assocPID
Expand Down Expand Up @@ -102,7 +103,7 @@
return true;
if (value == 1 && bitcheck(cLambda, compatibilityLevel))
return true;
if (value == 2 && bitcheck(cAntiLambda, compatibilityLevel))

Check failure on line 106 in PWGLF/DataModel/LFHStrangeCorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
return false;
});
Expand All @@ -112,7 +113,7 @@
return rK0Short;
if (value == 1)
return rLambda;
if (value == 2)

Check failure on line 116 in PWGLF/DataModel/LFHStrangeCorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return rAntiLambda;
return 1000.0f;
});
Expand All @@ -122,7 +123,7 @@
return true;
if (value == 1 && mcTrueLambda == true)
return true;
if (value == 2 && mcTrueAntiLambda == true)

Check failure on line 126 in PWGLF/DataModel/LFHStrangeCorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
return false;
});
Expand Down Expand Up @@ -168,9 +169,9 @@
return true;
if (value == 1 && bitcheck(cXiPlus, compatibilityLevel))
return true;
if (value == 2 && bitcheck(cOmegaMinus, compatibilityLevel))

Check failure on line 172 in PWGLF/DataModel/LFHStrangeCorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
if (value == 3 && bitcheck(cOmegaPlus, compatibilityLevel))

Check failure on line 174 in PWGLF/DataModel/LFHStrangeCorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
return false;
});
Expand All @@ -178,7 +179,7 @@
[](float rXi, float rOmega, int value) -> float {
if (value == 0 || value == 1)
return rXi;
if (value == 2 || value == 3)

Check failure on line 182 in PWGLF/DataModel/LFHStrangeCorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return rOmega;
return 1000.0f;
});
Expand All @@ -188,9 +189,9 @@
return true;
if (value == 1 && mcTrueXiPlus == true)
return true;
if (value == 2 && mcTrueOmegaMinus == true)

Check failure on line 192 in PWGLF/DataModel/LFHStrangeCorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
if (value == 3 && mcTrueOmegaPlus == true)

Check failure on line 194 in PWGLF/DataModel/LFHStrangeCorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
return false;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ struct HStrangeCorrelationFilter {

// do this only if information is available
float nSigmaTPCTOF[8] = {-10, -10, -10, -10, -10, -10, -10, -10};
if constexpr (requires { assoc.tofSignal(); }) {
if constexpr (requires { assoc.tofSignal(); } && !requires { assoc.mcParticle(); }) {
if (assoc.tofSignal() > 0) {
if (std::sqrt(assoc.tofNSigmaPi() * assoc.tofNSigmaPi() + assoc.tpcNSigmaPi() * assoc.tpcNSigmaPi()) > systCuts.assocPionNSigmaTPCFOF)
return false;
Expand Down Expand Up @@ -407,19 +407,22 @@ struct HStrangeCorrelationFilter {

bool physicalPrimary = false;
float origPt = -1;
float pdgCode = -9999;
if constexpr (requires { assoc.mcParticle(); }) {
if (assoc.has_mcParticle()) {
auto mcParticle = assoc.mcParticle();
physicalPrimary = mcParticle.isPhysicalPrimary();
origPt = mcParticle.pt();
pdgCode = mcParticle.pdgCode();
}
}

assocHadrons(
assoc.collisionId(),
physicalPrimary,
assoc.globalIndex(),
origPt);
origPt,
pdgCode);
assocPID(
nSigmaTPCTOF[0],
nSigmaTPCTOF[1],
Expand Down Expand Up @@ -582,7 +585,7 @@ struct HStrangeCorrelationFilter {
}
}

void processAssocPionsMC(soa::Join<aod::Collisions, aod::EvSels>::iterator const& collision, soa::Filtered<IDTracksMC> const& tracks, aod::BCsWithTimestamps const&)
void processAssocPionsMC(soa::Join<aod::Collisions, aod::EvSels>::iterator const& collision, soa::Filtered<IDTracksMC> const& tracks, aod::McParticles const&, aod::BCsWithTimestamps const&)
{
// Load parameters for sideband subtraction
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
Expand Down
Loading
Loading