Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider the following formatting changes to #5482 #277

Merged
merged 1 commit into from
Apr 4, 2024
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
4 changes: 2 additions & 2 deletions PWGLF/DataModel/LFStrangenessPIDTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace o2::aod
namespace dautrack
{
// ==== TPC INFORMATION ===
DECLARE_SOA_COLUMN(TPCSignal, tpcSignal, float); //! track TPC signal
DECLARE_SOA_COLUMN(TPCSignal, tpcSignal, float); //! track TPC signal
DECLARE_SOA_COLUMN(TPCNSigmaEl, tpcNSigmaEl, float); //! Nsigma proton
DECLARE_SOA_COLUMN(TPCNSigmaPi, tpcNSigmaPi, float); //! Nsigma proton
DECLARE_SOA_COLUMN(TPCNSigmaKa, tpcNSigmaKa, float); //! Nsigma proton
Expand All @@ -35,7 +35,7 @@ DECLARE_SOA_COLUMN(TPCNSigmaHe, tpcNSigmaHe, float); //! Nsigma proton
// ==== TOF INFORMATION ===
DECLARE_SOA_COLUMN(TOFSignal, tofSignal, float); //! track TOF signal
DECLARE_SOA_COLUMN(TOFEvTime, tofEvTime, float); //! track TOF signal
DECLARE_SOA_COLUMN(Length, length, float); //! track TOF signal
DECLARE_SOA_COLUMN(Length, length, float); //! track TOF signal
} // namespace dautrack

DECLARE_SOA_TABLE(DauTrackTPCPIDs, "AOD", "DAUTRACKTPCPID", // nsigma table (for analysis)
Expand Down
16 changes: 9 additions & 7 deletions PWGLF/TableProducer/cascadepid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ using namespace o2::framework::expressions;
using std::array;

// For original data loops
using CascOriginalDatas = soa::Join<aod::CascIndices, aod::CascCores>;
using CascOriginalDatas = soa::Join<aod::CascIndices, aod::CascCores>;
using TracksWithAllExtras = soa::Join<aod::TracksIU, aod::TracksExtra, aod::pidTPCFullEl, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTPCFullHe, aod::TOFEvTime, aod::TOFSignal>;

// Cores with references and TOF pid
Expand All @@ -74,7 +74,8 @@ struct cascadepid {
Service<o2::ccdb::BasicCCDBManager> ccdb;

// For manual sliceBy
Preslice<CascOriginalDatas> perCollisionOriginal = o2::aod::cascdata::collisionId;;
Preslice<CascOriginalDatas> perCollisionOriginal = o2::aod::cascdata::collisionId;
;
Preslice<CascDerivedDatas> perCollisionDerived = o2::aod::cascdata::straCollisionId;

HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
Expand Down Expand Up @@ -383,7 +384,8 @@ struct cascadepid {
}

template <class TCollision, typename TCascade, typename TTrack>
void processCascadeCandidate(TCollision const& collision, TCascade const& cascade, TTrack const& pTra, TTrack const &nTra, TTrack const &bTra) {
void processCascadeCandidate(TCollision const& collision, TCascade const& cascade, TTrack const& pTra, TTrack const& nTra, TTrack const& bTra)
{
// initialize from positions and momenta as needed
o2::track::TrackPar posTrack = o2::track::TrackPar({cascade.xlambda(), cascade.ylambda(), cascade.zlambda()}, {cascade.pxpos(), cascade.pypos(), cascade.pzpos()}, +1);
o2::track::TrackPar negTrack = o2::track::TrackPar({cascade.xlambda(), cascade.ylambda(), cascade.zlambda()}, {cascade.pxneg(), cascade.pyneg(), cascade.pzneg()}, -1);
Expand Down Expand Up @@ -580,8 +582,8 @@ struct cascadepid {
auto pTra = cascade.posTrack_as<TracksWithAllExtras>();
auto nTra = cascade.negTrack_as<TracksWithAllExtras>();
auto bTra = cascade.bachelor_as<TracksWithAllExtras>();
processCascadeCandidate(collision, cascade, pTra, nTra, bTra);

processCascadeCandidate(collision, cascade, pTra, nTra, bTra);
}
}
}
Expand All @@ -600,8 +602,8 @@ struct cascadepid {
auto pTra = cascade.posTrackExtra_as<dauTracks>();
auto nTra = cascade.negTrackExtra_as<dauTracks>();
auto bTra = cascade.bachTrackExtra_as<dauTracks>();
processCascadeCandidate(collision, cascade, pTra, nTra, bTra);

processCascadeCandidate(collision, cascade, pTra, nTra, bTra);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions PWGLF/TableProducer/converters/strangederivedconverter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ struct strangeDerivedConverter {
auto nTra = casc.negTrackExtra_as<soa::Join<aod::DauTrackExtras, aod::DauTrackTOFPIDs>>();
auto bTra = casc.bachTrackExtra_as<soa::Join<aod::DauTrackExtras, aod::DauTrackTOFPIDs>>();
casctofs(pTra.length(), nTra.length(), bTra.length(),
pTra.tofSignal(), nTra.tofSignal(), bTra.tofSignal(),
pTra.tofEvTime(), nTra.tofEvTime(), bTra.tofEvTime());
pTra.tofSignal(), nTra.tofSignal(), bTra.tofSignal(),
pTra.tofEvTime(), nTra.tofEvTime(), bTra.tofEvTime());
}

PROCESS_SWITCH(strangeDerivedConverter, processStraRawCents000to001, "from StraRawCents 000 to 001", false);
Expand Down
26 changes: 14 additions & 12 deletions PWGLF/TableProducer/lambdakzeropid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ using TracksWithAllExtras = soa::Join<aod::TracksIU, aod::TracksExtra, aod::pidT

// For derived data analysis
using dauTracks = soa::Join<aod::DauTrackExtras, aod::DauTrackTPCPIDs, aod::DauTrackTOFPIDs>;
using V0DerivedDatas = soa::Join<aod::V0Cores, aod::V0Extras, aod::V0CollRefs>;
using V0DerivedDatas = soa::Join<aod::V0Cores, aod::V0Extras, aod::V0CollRefs>;

struct lambdakzeropid {
// TOF pid for strangeness (recalculated with topology)
Expand All @@ -76,7 +76,8 @@ struct lambdakzeropid {
Service<o2::ccdb::BasicCCDBManager> ccdb;

// For manual sliceBy
Preslice<V0OriginalDatas> perCollisionOriginal = o2::aod::v0data::collisionId;;
Preslice<V0OriginalDatas> perCollisionOriginal = o2::aod::v0data::collisionId;
;
Preslice<V0DerivedDatas> perCollisionDerived = o2::aod::v0data::straCollisionId;

HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
Expand Down Expand Up @@ -403,9 +404,10 @@ struct lambdakzeropid {
return 0.0299792458 * TMath::Sqrt(lA / (1 + lA));
}

// templatized process function for symmetric operation in derived and original AO2D
// templatized process function for symmetric operation in derived and original AO2D
template <class TCollision, typename TV0, typename TTrack>
void processV0Candidate(TCollision const& collision, TV0 const& v0, TTrack const& pTra, TTrack const &nTra) {
void processV0Candidate(TCollision const& collision, TV0 const& v0, TTrack const& pTra, TTrack const& nTra)
{
// time of V0 segment
float lengthV0 = std::hypot(v0.x() - collision.posX(), v0.y() - collision.posY(), v0.z() - collision.posZ());
float velocityK0Short = velocity(v0.p(), o2::constants::physics::MassKaonNeutral);
Expand Down Expand Up @@ -497,10 +499,10 @@ struct lambdakzeropid {
betaK0Short = (lengthV0 / decayTimeK0Short) / 0.0299792458;
}

v0tofpid( deltaTimePositiveLambdaPi, deltaTimePositiveLambdaPr,
deltaTimeNegativeLambdaPi, deltaTimeNegativeLambdaPr,
deltaTimePositiveK0ShortPi, deltaTimeNegativeK0ShortPi,
deltaDecayTimeLambda, deltaDecayTimeAntiLambda, deltaDecayTimeK0Short);
v0tofpid(deltaTimePositiveLambdaPi, deltaTimePositiveLambdaPr,
deltaTimeNegativeLambdaPi, deltaTimeNegativeLambdaPr,
deltaTimePositiveK0ShortPi, deltaTimeNegativeK0ShortPi,
deltaDecayTimeLambda, deltaDecayTimeAntiLambda, deltaDecayTimeK0Short);
v0tofbeta(betaLambda, betaAntiLambda, betaK0Short);
v0tofdebugs(timeLambda, timeK0Short, timePositivePr, timePositivePi, timeNegativePr, timeNegativePi);

Expand Down Expand Up @@ -594,8 +596,8 @@ struct lambdakzeropid {
// de-reference interlinks by hand for derived data
auto pTra = v0.posTrack_as<TracksWithAllExtras>();
auto nTra = v0.negTrack_as<TracksWithAllExtras>();
processV0Candidate(collision, v0, pTra, nTra);

processV0Candidate(collision, v0, pTra, nTra);
}
}
}
Expand All @@ -614,8 +616,8 @@ struct lambdakzeropid {
// de-reference interlinks by hand for derived data
auto pTra = v0.posTrackExtra_as<dauTracks>();
auto nTra = v0.negTrackExtra_as<dauTracks>();
processV0Candidate(collision, v0, pTra, nTra);

processV0Candidate(collision, v0, pTra, nTra);
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions PWGLF/Tasks/Strangeness/cascadeanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@ struct cascadeAnalysis {
bool lCompatiblePID_Xi = (lPIDvalue >> 0 & 1);
bool lCompatiblePID_Om = (lPIDvalue >> 1 & 1);

if (casc.v0radius() > v0setting_radius &&
casc.cascradius() > cascadesetting_cascradius &&
casc.v0cosPA(pvx, pvy, pvz) > v0setting_cospa &&
casc.casccosPA(pvx, pvy, pvz) > cascadesetting_cospa &&
casc.dcav0topv(pvx, pvy, pvz) > cascadesetting_mindcav0topv &&
TMath::Abs(casc.mLambda() - 1.115683) < cascadesetting_v0masswindow) {
if (casc.v0radius() > v0setting_radius &&
casc.cascradius() > cascadesetting_cascradius &&
casc.v0cosPA(pvx, pvy, pvz) > v0setting_cospa &&
casc.casccosPA(pvx, pvy, pvz) > cascadesetting_cospa &&
casc.dcav0topv(pvx, pvy, pvz) > cascadesetting_mindcav0topv &&
TMath::Abs(casc.mLambda() - 1.115683) < cascadesetting_v0masswindow) {
registry.fill(HIST("hCandidateCounter"), 3.5); // pass cascade selections
if (casc.sign() < 0) { // FIXME: could be done better...
if (TMath::Abs(casc.yXi()) < 0.5 && lCompatiblePID_Xi) {
Expand Down
Loading