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
58 changes: 29 additions & 29 deletions PWGLF/DataModel/LFSpincorrelationTables.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGLF/DataModel/LFSpincorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -10,7 +10,7 @@
// or submit itself to any jurisdiction.

///
/// \author Sourav Kundu <sourav.kundu@cern.ch>

Check failure on line 13 in PWGLF/DataModel/LFSpincorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check failure on line 13 in PWGLF/DataModel/LFSpincorrelationTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

#ifndef PWGLF_DATAMODEL_LFSPINCORRELATIONTABLES_H_
#define PWGLF_DATAMODEL_LFSPINCORRELATIONTABLES_H_
Expand All @@ -28,21 +28,21 @@

namespace o2::aod
{
namespace lambdaspincorrevent
namespace lambdaevent
{
DECLARE_SOA_COLUMN(Cent, cent, float);
DECLARE_SOA_COLUMN(Posz, posz, float);
} // namespace lambdaspincorrevent
DECLARE_SOA_TABLE(LambdaSpinCorrEvents, "AOD", "LAMBDASPINCOREVENT",
} // namespace lambdaevent
DECLARE_SOA_TABLE(LambdaEvents, "AOD", "LAMBDAEVENT",
o2::soa::Index<>,
lambdaspincorrevent::Cent,
lambdaspincorrevent::Posz)
using LambdaSpinCorrEvent = LambdaSpinCorrEvents::iterator;
lambdaevent::Cent,
lambdaevent::Posz)
using LambdaEvent = LambdaEvents::iterator;

namespace lambdaspincorrpair
namespace lambdapair
{
DECLARE_SOA_INDEX_COLUMN(LambdaSpinCorrEvent, lambdaspincorrevent);
DECLARE_SOA_COLUMN(V0Status, v0Status, float); //! Lambda or Anti-Lambda status
DECLARE_SOA_INDEX_COLUMN(LambdaEvent, lambdaevent);

Check failure on line 44 in PWGLF/DataModel/LFSpincorrelationTables.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_COLUMN(V0Status, v0Status, int); //! Lambda or Anti-Lambda status
DECLARE_SOA_COLUMN(DoubleStatus, doubleStatus, bool); //! Double status
DECLARE_SOA_COLUMN(V0Cospa, v0Cospa, float); //! V0 Cospa
DECLARE_SOA_COLUMN(V0Radius, v0Radius, float); //! V0 Radius
Expand All @@ -58,27 +58,27 @@
DECLARE_SOA_COLUMN(ProtonPhi, protonPhi, float); //! Proton Phi
DECLARE_SOA_COLUMN(ProtonIndex, protonIndex, int); //! Proton index
DECLARE_SOA_COLUMN(PionIndex, pionIndex, int); //! Pion index
} // namespace lambdaspincorrpair
DECLARE_SOA_TABLE(LambdaSpinCorrPairs, "AOD", "LAMBDAPAIR",
} // namespace lambdapair
DECLARE_SOA_TABLE(LambdaPairs, "AOD", "LAMBDAPAIR",
o2::soa::Index<>,
lambdaspincorrpair::LambdaSpinCorrEventId,
lambdaspincorrpair::V0Status,
lambdaspincorrpair::DoubleStatus,
lambdaspincorrpair::V0Cospa,
lambdaspincorrpair::V0Radius,
lambdaspincorrpair::DcaPositive,
lambdaspincorrpair::DcaNegative,
lambdaspincorrpair::DcaBetweenDaughter,
lambdaspincorrpair::LambdaPt,
lambdaspincorrpair::LambdaEta,
lambdaspincorrpair::LambdaPhi,
lambdaspincorrpair::LambdaMass,
lambdaspincorrpair::ProtonPt,
lambdaspincorrpair::ProtonEta,
lambdaspincorrpair::ProtonPhi,
lambdaspincorrpair::ProtonIndex,
lambdaspincorrpair::PionIndex);
lambdapair::LambdaEventId,
lambdapair::V0Status,
lambdapair::DoubleStatus,
lambdapair::V0Cospa,
lambdapair::V0Radius,
lambdapair::DcaPositive,
lambdapair::DcaNegative,
lambdapair::DcaBetweenDaughter,
lambdapair::LambdaPt,
lambdapair::LambdaEta,
lambdapair::LambdaPhi,
lambdapair::LambdaMass,
lambdapair::ProtonPt,
lambdapair::ProtonEta,
lambdapair::ProtonPhi,
lambdapair::ProtonIndex,
lambdapair::PionIndex);

using LambdaSpinCorrPair = LambdaSpinCorrPairs::iterator;
using LambdaPair = LambdaPairs::iterator;
} // namespace o2::aod
#endif // PWGLF_DATAMODEL_LFSPINCORRELATIONTABLES_H_
35 changes: 19 additions & 16 deletions PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)

Check failure on line 1 in PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -13,7 +13,7 @@
/// \brief Analysis task for Lambda spin spin correlation
///
/// \author prottay.das@cern.ch
/// \author sourav.kundu@cern.ch

Check failure on line 16 in PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

#include "PWGLF/DataModel/LFSpincorrelationTables.h"
#include "PWGLF/DataModel/LFStrangenessPIDTables.h"
Expand Down Expand Up @@ -56,10 +56,10 @@
using std::array;
using namespace o2::aod::rctsel;

struct lambdaspincorrelation {

Check failure on line 59 in PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/struct]

Use UpperCamelCase for names of structs.

Produces<aod::LambdaSpinCorrEvents> spinCorrEvent;
Produces<aod::LambdaSpinCorrPairs> spinCorrPair;
Produces<aod::LambdaEvents> lambdaEvent;
Produces<aod::LambdaPairs> lambdaPair;

Service<o2::ccdb::BasicCCDBManager> ccdb;

Expand Down Expand Up @@ -246,22 +246,24 @@

void processData(EventCandidates::iterator const& collision, AllTrackCandidates const&, ResoV0s const& V0s)
{
std::vector<ROOT::Math::PxPyPzMVector> lambdaMother, protonDaughter, pionDaughter;
std::vector<int> v0Status = {};
std::vector<bool> doubleStatus = {};
std::vector<float> v0Cospa = {};
std::vector<float> v0Radius = {};
std::vector<float> dcaPositive = {};
std::vector<float> dcaNegative = {};
std::vector<int> positiveIndex = {};
std::vector<int> negativeIndex = {};
std::vector<float> dcaBetweenDaughter = {};
int numbV0 = 0;
// LOGF(info, "event collisions: (%d)", collision.index());
auto centrality = collision.centFT0C();
auto vz = collision.posZ();
int occupancy = collision.trackOccupancyInTimeRange();
histos.fill(HIST("hEvtSelInfo"), 0.5);
if ((rctCut.requireRCTFlagChecker && rctChecker(collision)) && collision.selection_bit(aod::evsel::kNoSameBunchPileup) && collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) && collision.selection_bit(aod::evsel::kNoTimeFrameBorder) && collision.selection_bit(aod::evsel::kNoITSROFrameBorder) && collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard) && collision.sel8() && collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll) && occupancy < cfgCutOccupancy) {
histos.fill(HIST("hEvtSelInfo"), 1.5);
std::vector<ROOT::Math::PxPyPzMVector> lambdaMother, protonDaughter, pionDaughter;
std::vector<int> v0Status = {};
std::vector<bool> doubleStatus = {};
std::vector<double> v0Cospa = {};
std::vector<double> v0Radius = {};
std::vector<double> dcaPositive = {};
std::vector<double> dcaNegative = {};
std::vector<double> positiveIndex = {};
std::vector<double> negativeIndex = {};
std::vector<double> dcaBetweenDaughter = {};
for (const auto& v0 : V0s) {
// LOGF(info, "v0 index 0 : (%d)", v0.index());
auto [lambdaTag, aLambdaTag, isValid] = getLambdaTags(v0, collision);
Expand All @@ -275,7 +277,7 @@
}
if (lambdaTag && aLambdaTag) {
doubleStatus.push_back(true);
if (std::abs(v0.mLambda() - 1.1154) < std::abs(v0.mAntiLambda() - 1.1154)) {

Check failure on line 280 in PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-mass]

Avoid hard-coded particle masses. Use o2::constants::physics::Mass... instead.
lambdaTag = true;
aLambdaTag = false;
} else {
Expand Down Expand Up @@ -320,19 +322,20 @@
pionDaughter.push_back(pion);
histos.fill(HIST("hLambdaMass"), lambda.M());
}
numbV0 = numbV0 + 1;
}
}
if (v0Status.size() > 1) {
if (numbV0 > 1 && v0Cospa.size() > 1) {
histos.fill(HIST("hEvtSelInfo"), 2.5);
spinCorrEvent(centrality, collision.posZ());
auto indexEvent = spinCorrEvent.lastIndex();
lambdaEvent(centrality, vz);
auto indexEvent = lambdaEvent.lastIndex();
//// Fill track table for V0//////////////////
for (auto if1 = lambdaMother.begin(); if1 != lambdaMother.end(); ++if1) {
auto i5 = std::distance(lambdaMother.begin(), if1);
lambdaDummy = lambdaMother.at(i5);
protonDummy = protonDaughter.at(i5);
pionDummy = pionDaughter.at(i5);
spinCorrPair(indexEvent, v0Status.at(i5), doubleStatus.at(i5), v0Cospa.at(i5), v0Radius.at(i5), dcaPositive.at(i5), dcaNegative.at(i5), dcaBetweenDaughter.at(i5), lambdaDummy.Pt(), lambdaDummy.Eta(), lambdaDummy.Phi(), lambdaDummy.M(), protonDummy.Pt(), protonDummy.Eta(), protonDummy.Phi(), positiveIndex.at(i5), negativeIndex.at(i5));
lambdaPair(indexEvent, v0Status.at(i5), doubleStatus.at(i5), v0Cospa.at(i5), v0Radius.at(i5), dcaPositive.at(i5), dcaNegative.at(i5), dcaBetweenDaughter.at(i5), lambdaDummy.Pt(), lambdaDummy.Eta(), lambdaDummy.Phi(), lambdaDummy.M(), protonDummy.Pt(), protonDummy.Eta(), protonDummy.Phi(), positiveIndex.at(i5), negativeIndex.at(i5));
}
}
}
Expand Down
Loading