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
2 changes: 1 addition & 1 deletion PWGCF/Femto/DataModel/PionDeuteronTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ DECLARE_SOA_TABLE(PionDeuteronMult, "AOD", "PIDEUTERONMULT",

} // namespace o2::aod

#endif // PWGCF_DATAMODEL_PIONDEUTERONTABLES_H_
#endif // PWGCF_DATAMODEL_PIONDEUTERONTABLES_H_
29 changes: 14 additions & 15 deletions PWGCF/Femto/TableProducer/PiDeuteronFemto.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 PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/file-cpp]

Use lowerCamelCase or UpperCamelCase for names of C++ files. See the O2 naming conventions for details.
// 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.
//
//

/// \file PiDeuteronFemto.cxx
/// \brief Analysis task for Deuteron-Pion femto analysis
Expand All @@ -18,12 +18,12 @@
#include <TH1F.h>
#include <TDirectory.h>
#include <THn.h>
#include <TLorentzVector.h>

Check failure on line 21 in PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
#include <TMath.h>
#include <TObjArray.h>
#include <TFile.h>
#include <TH2F.h>
#include <TLorentzVector.h>

Check failure on line 26 in PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.

#include <cmath>
#include <string>
Expand Down Expand Up @@ -80,10 +80,9 @@

namespace
{
constexpr double betheBlochDefault[1][6]{{-136.71,0.441,0.2269,1.347,0.8035,0.09}};
constexpr double betheBlochDefault[1][6]{{-136.71, 0.441, 0.2269, 1.347, 0.8035, 0.09}};
static const std::vector<std::string> betheBlochParNames{"p0", "p1", "p2", "p3", "p4", "resolution"};


enum Selections {
kNoCuts = 0,
kTrackCuts,
Expand Down Expand Up @@ -148,7 +147,7 @@

Produces<aod::PionDeuteronTable> mOutputDataTable;
Produces<aod::PionDeuteronMult> mOutputMultiplicityTable;

// Selections
Configurable<float> settingCutVertex{"settingCutVertex", 10.0f, "Accepted z-vertex range"};
Configurable<float> settingCutPinMinDe{"settingCutPinMinDe", 0.0f, "Minimum Pin for De"};
Expand Down Expand Up @@ -263,11 +262,11 @@
int mat{static_cast<int>(settingMaterialCorrection)};
mFitter.setMatCorrType(static_cast<o2::base::Propagator::MatCorrType>(mat));

const int numParticles = 5;
const int numParticles = 5;
for (int i = 0; i < numParticles; i++) {
mBBparamsDe[i] = settingBetheBlochParams->get("De", Form("p%i", i));
}
mBBparamsDe[5] = settingBetheBlochParams->get("De", "resolution");// wdf?
mBBparamsDe[5] = settingBetheBlochParams->get("De", "resolution"); // wdf?

std::vector<std::string> selectionLabels = {"All", "Track selection", "PID"};
for (int i = 0; i < Selections::kAll; i++) {
Expand Down Expand Up @@ -388,7 +387,7 @@
return false;
}
mQaRegistry.fill(HIST("h2NsigmaPiTOF_preselection"), candidate.pt(), tofNSigmaPi);
if (std::sqrt(tofNSigmaPi*tofNSigmaPi + tpcNSigmaPi*tpcNSigmaPi) > settingCutNsigmaTOFTPCPi) {
if (std::sqrt(tofNSigmaPi * tofNSigmaPi + tpcNSigmaPi * tpcNSigmaPi) > settingCutNsigmaTOFTPCPi) {
return false;
}
mQaRegistry.fill(HIST("h2NsigmaPiTPC"), candidate.pt(), tpcNSigmaPi);
Expand All @@ -403,8 +402,8 @@

template <typename Ttrack>
float computeNSigmaDe(const Ttrack& candidate)
{
float expTPCSignal = o2::tpc::BetheBlochAleph(static_cast<float>(candidate.tpcInnerParam()/ constants::physics::MassDeuteron), mBBparamsDe[0], mBBparamsDe[1], mBBparamsDe[2], mBBparamsDe[3], mBBparamsDe[4]);
{
float expTPCSignal = o2::tpc::BetheBlochAleph(static_cast<float>(candidate.tpcInnerParam() / constants::physics::MassDeuteron), mBBparamsDe[0], mBBparamsDe[1], mBBparamsDe[2], mBBparamsDe[3], mBBparamsDe[4]);
double resoTPC{expTPCSignal * mBBparamsDe[5]};
return static_cast<float>((candidate.tpcSignal() - expTPCSignal) / resoTPC);
}
Expand All @@ -426,12 +425,12 @@
if (std::abs(tpcNSigmaDe) > settingCutNsigmaTPCDe) {
return false;
}
if (std::sqrt(tofNSigmaDe*tofNSigmaDe + tpcNSigmaDe*tpcNSigmaDe) > settingCutNsigmaTOFTPCDe) {
if (std::sqrt(tofNSigmaDe * tofNSigmaDe + tpcNSigmaDe * tpcNSigmaDe) > settingCutNsigmaTOFTPCDe) {
return false;
}
o2::aod::ITSResponse mResponseITS;
auto itsnSigmaDe = mResponseITS.nSigmaITS<o2::track::PID::Deuteron>(candidate.itsClusterSizes(), candidate.p(), candidate.eta());

mQaRegistry.fill(HIST("h2NSigmaDeITS_preselection"), candidate.sign() * candidate.pt(), itsnSigmaDe);
if (itsnSigmaDe < settingCutNsigmaITSDe) {
return false;
Expand All @@ -451,7 +450,7 @@

template <typename Ttrack, typename Tcollisions, typename Ttracks>
bool fillCandidateInfo(const Ttrack& trackDe, const Ttrack& trackPi, const CollBracket& collBracket, const Tcollisions& collisions, PiDecandidate& piDecand, const Ttracks& /*trackTable*/, bool isMixedEvent)
{
{
const int numCoordinates = 3;
if (!isMixedEvent) {
auto trackCovDe = getTrackParCov(trackDe);
Expand Down Expand Up @@ -495,7 +494,7 @@

piDecand.momDe = std::array{trackDe.px(), trackDe.py(), trackDe.pz()};
for (int i = 0; i < numCoordinates; i++)
piDecand.momPi = std::array{trackPi.px(), trackPi.py(), trackPi.pz()};
piDecand.momPi = std::array{trackPi.px(), trackPi.py(), trackPi.pz()};
float invMass = 0;
invMass = RecoDecay::m(std::array{piDecand.momDe, piDecand.momPi}, std::array{o2::constants::physics::MassDeuteron, o2::constants::physics::MassPiPlus});
if (settingCutInvMass > 0 && invMass > settingCutInvMass) {
Expand Down Expand Up @@ -564,8 +563,8 @@

template <typename Ttrack>
void pairTracksSameEvent(const Ttrack& tracks)
{
//LOG(info) << "Number of tracks: " << tracks.size();
{
// LOG(info) << "Number of tracks: " << tracks.size();
for (const auto& track0 : tracks) {

mQaRegistry.fill(HIST("hTrackSel"), Selections::kNoCuts);
Expand Down
Loading