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: 15 additions & 19 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 @@ -101,13 +101,15 @@
Configurable<bool> ispTdepPID{"ispTdepPID", true, "pT dependent PID"};
Configurable<int> cfgITScluster{"cfgITScluster", 0, "Number of ITS cluster"};
Configurable<double> confRapidity{"confRapidity", 0.5, "Rapidity cut"};
Configurable<double> rapiditycut1{"rapiditycut1", -1.0f, "Rapidity cut lower"};
Configurable<double> rapiditycut2{"rapiditycut2", 1.0f, "Rapidity cut upper"};
Configurable<bool> timFrameEvsel{"timFrameEvsel", false, "TPC Time frame boundary cut"};
Configurable<bool> isDeepAngle{"isDeepAngle", false, "Deep Angle cut"};
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 111 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 112 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 @@ -311,7 +313,7 @@
return false;
if (additionalEvSel5 && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard))
return false;
if (additionalEvSel6 && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard))
if (additionalEvSel6 && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV))
return false;
int occupancy = collision.trackOccupancyInTimeRange();
if (fillOccupancy && (occupancy > cfgCutOccupancy))
Expand Down Expand Up @@ -358,12 +360,10 @@
candidate1.pz() + candidate2.pz()},
mass);

constexpr float kRapidityCut = 0.5;
constexpr int kOppositeCharge = 0;

// default filling
if (std::abs(rapidity) < kRapidityCut && track1Sign * track2Sign < kOppositeCharge) {

if (rapidity > rapiditycut1 && rapidity < rapiditycut2 && track1Sign * track2Sign < kOppositeCharge) {
if (unlike) {
histos.fill(HIST("h3PhiInvMassUnlikeSign"), multiplicity, pT, mass);
histos.fill(HIST("h2PhiRapidity"), pT, rapidity);
Expand Down Expand Up @@ -434,7 +434,7 @@
return;
}
histos.fill(HIST("hEvtSelInfo"), 7.5);
if (additionalEvSel6 && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) {
if (additionalEvSel6 && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) {
return;
}
histos.fill(HIST("hEvtSelInfo"), 8.5);
Expand Down Expand Up @@ -588,7 +588,7 @@
if (additionalEvSel5 && (!c1.selection_bit(aod::evsel::kNoCollInTimeRangeStandard) || !c2.selection_bit(aod::evsel::kNoCollInTimeRangeStandard))) {
continue;
}
if (additionalEvSel6 && (!c1.selection_bit(aod::evsel::kNoCollInRofStandard) || !c2.selection_bit(aod::evsel::kNoCollInRofStandard))) {
if (additionalEvSel6 && (!c1.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !c2.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV))) {
continue;
}
int occupancy1 = c1.trackOccupancyInTimeRange();
Expand Down Expand Up @@ -655,7 +655,7 @@
if (additionalEvSel5 && (!c1.selection_bit(aod::evsel::kNoCollInTimeRangeStandard) || !c2.selection_bit(aod::evsel::kNoCollInTimeRangeStandard))) {
continue;
}
if (additionalEvSel6 && (!c1.selection_bit(aod::evsel::kNoCollInRofStandard) || !c2.selection_bit(aod::evsel::kNoCollInRofStandard))) {
if (additionalEvSel6 && (!c1.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !c2.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV))) {
continue;
}
int occupancy1 = c1.trackOccupancyInTimeRange();
Expand Down Expand Up @@ -723,7 +723,7 @@
if (additionalEvSel5 && (!c1.selection_bit(aod::evsel::kNoCollInTimeRangeStandard) || !c2.selection_bit(aod::evsel::kNoCollInTimeRangeStandard))) {
continue;
}
if (additionalEvSel6 && (!c1.selection_bit(aod::evsel::kNoCollInRofStandard) || !c2.selection_bit(aod::evsel::kNoCollInRofStandard))) {
if (additionalEvSel6 && (!c1.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !c2.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV))) {
continue;
}
int occupancy1 = c1.trackOccupancyInTimeRange();
Expand Down Expand Up @@ -791,7 +791,7 @@
if (additionalEvSel5 && (!c1.selection_bit(aod::evsel::kNoCollInTimeRangeStandard) || !c2.selection_bit(aod::evsel::kNoCollInTimeRangeStandard))) {
continue;
}
if (additionalEvSel6 && (!c1.selection_bit(aod::evsel::kNoCollInRofStandard) || !c2.selection_bit(aod::evsel::kNoCollInRofStandard))) {
if (additionalEvSel6 && (!c1.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !c2.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV))) {
continue;
}
int occupancy1 = c1.trackOccupancyInTimeRange();
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 @@ -1315,7 +1315,7 @@
if (additionalEvSel5 && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) {
return;
}
if (additionalEvSel6 && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) {
if (additionalEvSel6 && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) {
return;
}
int occupancy = collision.trackOccupancyInTimeRange();
Expand Down Expand Up @@ -1410,7 +1410,7 @@
if (additionalEvSel5 && (!c1.selection_bit(aod::evsel::kNoCollInTimeRangeStandard) || !c2.selection_bit(aod::evsel::kNoCollInTimeRangeStandard))) {
continue;
}
if (additionalEvSel6 && (!c1.selection_bit(aod::evsel::kNoCollInRofStandard) || !c2.selection_bit(aod::evsel::kNoCollInRofStandard))) {
if (additionalEvSel6 && (!c1.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !c2.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV))) {
continue;
}
int occupancy1 = c1.trackOccupancyInTimeRange();
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 Down Expand Up @@ -1488,7 +1488,7 @@
continue;
}
histos.fill(HIST("hMC1"), 8.5);
if (additionalEvSel6 && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) {
if (additionalEvSel6 && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) {
continue;
}
histos.fill(HIST("hMC1"), 9.5);
Expand Down Expand Up @@ -1522,9 +1522,8 @@
}
histos.fill(HIST("hMC1"), 12.5);
for (const auto& mcParticle : mcParticles) {
const double kMaxRapidityCut = 0.5;

if (std::abs(mcParticle.y()) >= kMaxRapidityCut) {
if (mcParticle.y() < rapiditycut1 || mcParticle.y() > rapiditycut2) {
continue;
}

Expand Down Expand Up @@ -1584,7 +1583,7 @@
if (additionalEvSel5 && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) {
return;
}
if (additionalEvSel6 && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) {
if (additionalEvSel6 && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) {
return;
}
int occupancy = collision.trackOccupancyInTimeRange();
Expand Down Expand Up @@ -1657,12 +1656,9 @@
if (!mothertrack1.producedByGenerator()) {
continue;
}
const double kMaxRapidityCut = 0.5;

if (std::abs(mothertrack1.y()) >= kMaxRapidityCut) {
if (mothertrack1.y() < rapiditycut1 || mothertrack1.y() > rapiditycut2) {
continue;
}

if (std::abs(mothertrack1.pdgCode()) != o2::constants::physics::kPhi) {
continue;
}
Expand All @@ -1685,7 +1681,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 1684 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