Skip to content
Merged
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
19 changes: 14 additions & 5 deletions PWGLF/TableProducer/Nuspex/he3LambdaAnalysis.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/Nuspex/he3LambdaAnalysis.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 @@ -8,7 +8,7 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

Check failure on line 11 in PWGLF/TableProducer/Nuspex/he3LambdaAnalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.

Check failure on line 11 in PWGLF/TableProducer/Nuspex/he3LambdaAnalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check failure on line 11 in PWGLF/TableProducer/Nuspex/he3LambdaAnalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
Expand Down Expand Up @@ -57,15 +57,15 @@

namespace lfv0he3
{
DECLARE_SOA_INDEX_COLUMN(LFEvent, lfEvent); // Collision ID for the event

Check failure on line 60 in PWGLF/TableProducer/Nuspex/he3LambdaAnalysis.cxx

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(Pt, pt, float);
DECLARE_SOA_COLUMN(Eta, eta, float);
DECLARE_SOA_COLUMN(Phi, phi, float);
DECLARE_SOA_COLUMN(Mass, mass, float);
DECLARE_SOA_COLUMN(CosPA, cosPA, float);
DECLARE_SOA_COLUMN(DCAxy, dcaXY, float);

Check failure on line 66 in PWGLF/TableProducer/Nuspex/he3LambdaAnalysis.cxx

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(DCAz, dcaZ, float);

Check failure on line 67 in PWGLF/TableProducer/Nuspex/he3LambdaAnalysis.cxx

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(TPCnCls, tpcNCls, int);

Check failure on line 68 in PWGLF/TableProducer/Nuspex/he3LambdaAnalysis.cxx

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(ITSClusterSizes, itsClusterSizes, uint32_t);
DECLARE_SOA_COLUMN(NsigmaTPC, nSigmaTPC, float);
DECLARE_SOA_COLUMN(DCAdaughters, dcaDaughters, float);
Expand All @@ -80,7 +80,7 @@

namespace
{
constexpr double betheBlochDefault[1][6]{{-1.e32, -1.e32, -1.e32, -1.e32, -1.e32, -1.e32}};

Check failure on line 83 in PWGLF/TableProducer/Nuspex/he3LambdaAnalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".
static const std::vector<std::string> betheBlochParNames{"p0", "p1", "p2", "p3", "p4", "resolution"};
static const std::vector<std::string> particleName{"He3"};
o2::base::MatLayerCylSet* matLUT = nullptr;
Expand All @@ -106,6 +106,7 @@
std::shared_ptr<TH2> hTPCnSigmaHe3;
std::shared_ptr<TH2> hArmenterosPodolanskiAll;
std::shared_ptr<TH2> hArmenterosPodolanskiSelected;
std::shared_ptr<TH2> hInvariantMass;

}; // namespace

Expand Down Expand Up @@ -203,8 +204,7 @@
std::array<double, 6> mBBparamsHe;
float mBz = 0.0f; // Magnetic field in T
HistogramRegistry mRegistry{"He3LambdaAnalysis"};
int mRunNumber = 0; // Current run number
int mEventIndex = 0; // Current event index
int mRunNumber = 0; // Current run number

void init(InitContext const&)
{
Expand All @@ -213,7 +213,7 @@
ccdb->setLocalObjectValidityChecking();
ccdb->setFatalWhenNull(true);

for (int i = 0; i < 5; i++) {

Check failure on line 216 in PWGLF/TableProducer/Nuspex/he3LambdaAnalysis.cxx

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.
mBBparamsHe[i] = cfgHe3.betheBlochParams->get("He3", Form("p%i", i));
}
mBBparamsHe[5] = cfgHe3.betheBlochParams->get("He3", "resolution");
Expand Down Expand Up @@ -248,6 +248,9 @@
hArmenterosPodolanskiAll = mRegistry.add<TH2>("hArmenterosPodolanskiAll", "Armenteros-Podolanski All", {HistType::kTH2D, {{100, -1., 1.}, {100, 0., 0.5}}});
hArmenterosPodolanskiSelected = mRegistry.add<TH2>("hArmenterosPodolanskiSelected", "Armenteros-Podolanski Selected", {HistType::kTH2D, {{100, -1., 1.}, {100, 0., 0.5}}});

constexpr double ConstituentsMass = o2::constants::physics::MassProton + o2::constants::physics::MassNeutron * 2 + o2::constants::physics::MassSigmaPlus;
hInvariantMass = mRegistry.add<TH2>("hInvariantMass", "Invariant Mass", {HistType::kTH2D, {{45, 1., 10}, {100, ConstituentsMass - 0.05, ConstituentsMass + 0.05}}});

LOGF(info, "He3-Lambda analysis initialized");
}

Expand Down Expand Up @@ -426,14 +429,20 @@
// Fill output tables
lfHe3V0Collision(collision.posZ(), collision.centFT0C());
for (const auto& he3 : he3Candidates) {
lfHe3(mEventIndex, he3.momentum.Pt(), he3.momentum.Eta(), he3.momentum.Phi(),
lfHe3(lfHe3V0Collision.lastIndex(), he3.momentum.Pt(), he3.momentum.Eta(), he3.momentum.Phi(),
he3.dcaXY, he3.dcaZ, he3.tpcNClsFound, he3.itsClusterSizes, he3.nSigmaTPC, he3.sign);
}
for (const auto& lambda : lambdaCandidates) {
lfLambda(mEventIndex, lambda.momentum.Pt(), lambda.momentum.Eta(), lambda.momentum.Phi(),
lfLambda(lfHe3V0Collision.lastIndex(), lambda.momentum.Pt(), lambda.momentum.Eta(), lambda.momentum.Phi(),
lambda.mass, lambda.cosPA, lambda.dcaV0Daughters, lambda.dcaProtonToPV, lambda.dcaPionToPV, lambda.v0Radius, lambda.sign);
}
mEventIndex++;

for (const auto& he3 : he3Candidates) {
for (const auto& lambda : lambdaCandidates) {
auto pairMomentum = lambda.momentum + he3.momentum; // Calculate invariant mass
hInvariantMass->Fill(pairMomentum.Pt(), pairMomentum.M());
}
}
}
PROCESS_SWITCH(he3LambdaAnalysis, processData, "Process data", true);
};
Expand Down
Loading