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
34 changes: 30 additions & 4 deletions PWGLF/Tasks/Resonances/phianalysisrun3_PbPb.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/Tasks/Resonances/phianalysisrun3_PbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-process]

Use constant references for table subscriptions in process functions.
// 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.
// Preliminary QA analysis task for resonances

Check failure on line 11 in PWGLF/Tasks/Resonances/phianalysisrun3_PbPb.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/Tasks/Resonances/phianalysisrun3_PbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.
// (1) For Run3
// (2) Event and track selection need to be optimized
// (3) particle = 0 --> phi
Expand Down Expand Up @@ -44,13 +44,13 @@
#include "Math/Vector4D.h"
#include "TF1.h"
#include "TRandom3.h"
#include <TDatabasePDG.h>

Check failure on line 47 in PWGLF/Tasks/Resonances/phianalysisrun3_PbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
#include <TDirectory.h>
#include <TFile.h>
#include <TH1F.h>
#include <TH2F.h>
#include <THn.h>
#include <TLorentzVector.h>

Check failure on line 53 in PWGLF/Tasks/Resonances/phianalysisrun3_PbPb.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 <TPDGCode.h>
Expand Down Expand Up @@ -106,8 +106,8 @@
Configurable<double> cfgDeepAngle{"cfgDeepAngle", 0.04, "Deep Angle cut value"};
Configurable<int> nBkgRotations{"nBkgRotations", 3, "Number of rotated copies (background) per each original candidate"};
Configurable<bool> fillRotation{"fillRotation", true, "fill rotation"};
Configurable<float> confMinRot{"confMinRot", 5.0f * TMath::Pi() / 6.0f, "Minimum of rotation"};

Check failure on line 109 in PWGLF/Tasks/Resonances/phianalysisrun3_PbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
Configurable<float> confMaxRot{"confMaxRot", 7.0f * TMath::Pi() / 6.0f, "Maximum of rotation"};

Check failure on line 110 in PWGLF/Tasks/Resonances/phianalysisrun3_PbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
Configurable<bool> pdgcheck{"pdgcheck", true, "pdgcheck"};
Configurable<bool> reco{"reco", true, "reco"};
ConfigurableAxis binsImpactPar{"binsImpactPar", {VARIABLE_WIDTH, 0, 3.5, 5.67, 7.45, 8.85, 10.0, 11.21, 12.26, 13.28, 14.23, 15.27}, "Binning of the impact parameter axis"};
Expand Down Expand Up @@ -381,7 +381,7 @@
using TrackCandidates = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullKa, aod::pidTOFFullKa>>;

// using EventCandidatesMC = soa::Join<aod::Collisions, aod::EvSels, aod::FT0Mults, aod::MultZeqs, aod::McCollisionLabels>;
using EventCandidatesMC = soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels, aod::CentFT0Cs, aod::CentFV0As>;
using EventCandidatesMC = soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFV0As>;
using TrackCandidatesMC = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection,
aod::pidTPCFullKa, aod::pidTOFFullKa,
aod::McTrackLabels>>;
Expand Down Expand Up @@ -1089,7 +1089,7 @@

} // process MC
PROCESS_SWITCH(phianalysisrun3_PbPb, processMC, "Process Reconstructed", false);
void processGen(aod::McCollision const& mcCollision, aod::McParticles& mcParticles, const soa::SmallGroups<EventCandidatesMC>& collisions)

Check failure on line 1092 in PWGLF/Tasks/Resonances/phianalysisrun3_PbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-process]

Argument aod::McParticles& mcParticles is not const&.
{

histos.fill(HIST("hMC"), 0.5);
Expand Down Expand Up @@ -1453,7 +1453,7 @@
}
}
PROCESS_SWITCH(phianalysisrun3_PbPb, processMixedEventMC, "Process Mixed event MC", true);
void processGen1(aod::McCollision const& mcCollision, aod::McParticles& mcParticles, const soa::SmallGroups<EventCandidatesMC>& collisions)

Check failure on line 1456 in PWGLF/Tasks/Resonances/phianalysisrun3_PbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-process]

Argument aod::McParticles& mcParticles is not const&.
{
histos.fill(HIST("hMC1"), 0.5);
if (std::abs(mcCollision.posZ()) < cfgCutVertex) {
Expand All @@ -1462,7 +1462,6 @@
std::vector<int64_t> selectedEvents(collisions.size());
int nevts = 0;
auto multiplicity = -1.0;
histos.fill(HIST("Centgen1"), multiplicity);
histos.fill(HIST("hMC1"), 2.5);
for (const auto& collision : collisions) {
if (!collision.sel8() || std::abs(collision.mcCollision().posZ()) > cfgCutVertex) {
Expand Down Expand Up @@ -1498,7 +1497,21 @@
continue;
}
histos.fill(HIST("hMC1"), 10.5);
multiplicity = collision.centFT0C();
const int kCentFT0C = 0;
const int kCentFT0A = 1;
const int kCentFT0M = 2;
const int kCentFV0A = 3;

if (centestimator == kCentFT0C) {
multiplicity = collision.centFT0C();
} else if (centestimator == kCentFT0A) {
multiplicity = collision.centFT0A();
} else if (centestimator == kCentFT0M) {
multiplicity = collision.centFT0M();
} else if (centestimator == kCentFV0A) {
multiplicity = collision.centFV0A();
}
histos.fill(HIST("Centgen1"), multiplicity);
selectedEvents[nevts++] = collision.mcCollision_as<aod::McCollisions>().globalIndex();
}
selectedEvents.resize(nevts);
Expand Down Expand Up @@ -1578,7 +1591,20 @@
if (fillOccupancy && (occupancy > cfgCutOccupancy)) {
return;
}
auto multiplicity = collision.centFT0C();
const int kCentFT0C = 0;
const int kCentFT0A = 1;
const int kCentFT0M = 2;
const int kCentFV0A = 3;
auto multiplicity = -1.0;
if (centestimator == kCentFT0C) {
multiplicity = collision.centFT0C();
} else if (centestimator == kCentFT0A) {
multiplicity = collision.centFT0A();
} else if (centestimator == kCentFT0M) {
multiplicity = collision.centFT0M();
} else if (centestimator == kCentFV0A) {
multiplicity = collision.centFV0A();
}
histos.fill(HIST("Centrec1"), multiplicity);
histos.fill(HIST("hMC1"), 13.5);
auto oldindex = -999;
Expand Down Expand Up @@ -1659,7 +1685,7 @@
auto motherP = mothertrack1.p();
auto motherE = mothertrack1.e();
genMass = std::sqrt(motherE * motherE - motherP * motherP);
recMass = RecoDecay::m(arrMomrec, array{massKa, massKa});

Check failure on line 1688 in PWGLF/Tasks/Resonances/phianalysisrun3_PbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.

histos.fill(HIST("h1PhifinalRec"), mothertrack1.pt());
histos.fill(HIST("h3PhifinalRec"), mothertrack1.pt(), multiplicity, recMass);
Expand Down
Loading