Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions PWGCF/Core/AnalysisConfigurableCuts.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

#include "PWGCF/Core/AnalysisConfigurableCuts.h"

#include <TNamed.h>

#include <Rtypes.h>

using namespace o2::analysis;

ClassImp(SimpleInclusiveCut);
Expand Down
2 changes: 0 additions & 2 deletions PWGCF/Core/AnalysisConfigurableCuts.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
#ifndef PWGCF_CORE_ANALYSISCONFIGURABLECUTS_H_
#define PWGCF_CORE_ANALYSISCONFIGURABLECUTS_H_

#include <TMath.h>
#include <TNamed.h>
#include <TObject.h>

#include <Rtypes.h>

Expand Down
37 changes: 23 additions & 14 deletions PWGCF/Core/CorrelationContainer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,29 @@
// Author: Jan Fiete Grosse-Oetringhaus

#include "PWGCF/Core/CorrelationContainer.h"
#include "Framework/StepTHn.h"
#include "Framework/Logger.h"
#include "THnSparse.h"
#include "TMath.h"
#include "TList.h"
#include "TCollection.h"
#include "TH1D.h"
#include "TH2D.h"
#include "TH3D.h"
#include "TCanvas.h"
#include "TF1.h"
#include "THn.h"
#include "Framework/HistogramSpec.h"
#include "CommonConstants/MathConstants.h"

#include <CommonConstants/MathConstants.h>
#include <Framework/HistogramSpec.h>
#include <Framework/Logger.h>
#include <Framework/StepTHn.h>

#include <TCanvas.h>
#include <TCollection.h>
#include <TF1.h>
#include <THn.h>
#include <TIterator.h>
#include <TList.h>
#include <TMath.h>
#include <TMathBase.h>
#include <TNamed.h>
#include <TObject.h>
#include <TString.h>

#include <Rtypes.h>
#include <RtypesCore.h>

#include <cstring>
#include <vector>

using namespace o2;
using namespace o2::framework;
Expand Down Expand Up @@ -322,7 +331,7 @@
Int_t binBegin[4];
Int_t binEnd[4];

for (Int_t i = 0; i < 4; i++) {

Check failure on line 334 in PWGCF/Core/CorrelationContainer.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.
binBegin[i] = 1;
binEnd[i] = mPairHist->getTHn(step)->GetAxis(i)->GetNbins();
}
Expand All @@ -349,7 +358,7 @@
Int_t count = 0;
Int_t vars[4];

for (Int_t i = 0; i < 4; i++) {

Check failure on line 361 in PWGCF/Core/CorrelationContainer.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.
vars[i] = binBegin[i];
}

Expand Down Expand Up @@ -702,7 +711,7 @@
}
}

for (Int_t x = 0; x < 3; x++) {

Check failure on line 714 in PWGCF/Core/CorrelationContainer.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.
if (sums[x] > 0) {
errors[x] /= sums[x];
}
Expand Down Expand Up @@ -848,7 +857,7 @@

StepTHn* sourceContainer = nullptr;

if (source == 1 || source == 2) {

Check failure on line 860 in PWGCF/Core/CorrelationContainer.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.
sourceContainer = mTrackHistEfficiency;
} else {
return nullptr;
Expand All @@ -867,17 +876,17 @@
sourceContainer->getTHn(step1)->GetAxis(1)->SetRangeUser(mPtMin, mPtMax);
sourceContainer->getTHn(step2)->GetAxis(1)->SetRangeUser(mPtMin, mPtMax);
}
if (mPartSpecies != -1 && axis1 != 2 && axis2 != 2 && axis3 != 2) {

Check failure on line 879 in PWGCF/Core/CorrelationContainer.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.
LOGF(info, "Restricted to particle species %d", mPartSpecies);
sourceContainer->getTHn(step1)->GetAxis(2)->SetRangeUser(mPartSpecies, mPartSpecies);
sourceContainer->getTHn(step2)->GetAxis(2)->SetRangeUser(mPartSpecies, mPartSpecies);
}
if (mCentralityMax > mCentralityMin && axis1 != 3 && axis2 != 3 && axis3 != 3) {

Check failure on line 884 in PWGCF/Core/CorrelationContainer.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.
LOGF(info, "Restricted centrality range to %f %f", mCentralityMin, mCentralityMax);
sourceContainer->getTHn(step1)->GetAxis(3)->SetRangeUser(mCentralityMin, mCentralityMax);
sourceContainer->getTHn(step2)->GetAxis(3)->SetRangeUser(mCentralityMin, mCentralityMax);
}
if (mZVtxMax > mZVtxMin && axis1 != 4 && axis2 != 4 && axis3 != 4) {

Check failure on line 889 in PWGCF/Core/CorrelationContainer.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.
LOGF(info, "Restricted z-vtx range to %f %f", mZVtxMin, mZVtxMax);
sourceContainer->getTHn(step1)->GetAxis(4)->SetRangeUser(mZVtxMin, mZVtxMax);
sourceContainer->getTHn(step2)->GetAxis(4)->SetRangeUser(mZVtxMin, mZVtxMax);
Expand Down Expand Up @@ -945,7 +954,7 @@
Int_t count = 0;
Int_t vars[3];

for (Int_t i = 0; i < 3; i++) {

Check failure on line 957 in PWGCF/Core/CorrelationContainer.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.
vars[i] = binBegin[i];
}

Expand All @@ -954,7 +963,7 @@
if (generated->GetDimension() == 1 && generated->GetBinContent(vars[0]) < limit) {
LOGF(info, "Empty bin at %s=%.2f (%.2f entries)", generated->GetXaxis()->GetTitle(), generated->GetXaxis()->GetBinCenter(vars[0]), generated->GetBinContent(vars[0]));
count++;
} else if (generated->GetDimension() == 2 && generated->GetBinContent(vars[0], vars[1]) < limit) {

Check failure on line 966 in PWGCF/Core/CorrelationContainer.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.
LOGF(info, "Empty bin at %s=%.2f %s=%.2f (%.2f entries)",
generated->GetXaxis()->GetTitle(), generated->GetXaxis()->GetBinCenter(vars[0]),
generated->GetYaxis()->GetTitle(), generated->GetYaxis()->GetBinCenter(vars[1]),
Expand Down Expand Up @@ -1438,7 +1447,7 @@
Int_t binEta = target->GetAxis(0)->FindBin(-target->GetAxis(0)->GetBinCenter(i0));
Double_t phi = -target->GetAxis(4)->GetBinCenter(i4);
if (phi < -PIHalf) {
phi += TwoPI;

Check failure on line 1450 in PWGCF/Core/CorrelationContainer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
}
Int_t binPhi = target->GetAxis(4)->FindBin(phi);

Expand Down
17 changes: 11 additions & 6 deletions PWGCF/Core/CorrelationContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#ifndef CorrelationContainer_H
#define CorrelationContainer_H
#ifndef PWGCF_CORE_CORRELATIONCONTAINER_H_
#define PWGCF_CORE_CORRELATIONCONTAINER_H_

// encapsulate histogram and corrections for correlation analysis

#include "TNamed.h"
#include "TString.h"
#include "Framework/HistogramSpec.h"
#include <Framework/HistogramSpec.h>

#include <TNamed.h>

#include <Rtypes.h>
#include <RtypesCore.h>

#include <vector>

class TH1;
class TH1F;
Expand Down Expand Up @@ -181,4 +186,4 @@ class CorrelationContainer : public TNamed
ClassDef(CorrelationContainer, 2) // underlying event histogram container
};

#endif
#endif // PWGCF_CORE_CORRELATIONCONTAINER_H_
63 changes: 31 additions & 32 deletions PWGCF/Core/PairCuts.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,22 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#ifndef O2_ANALYSIS_PAIRCUTS_H
#define O2_ANALYSIS_PAIRCUTS_H
#ifndef PWGCF_CORE_PAIRCUTS_H_
#define PWGCF_CORE_PAIRCUTS_H_

#include <cmath>
#include <CommonConstants/MathConstants.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/Logger.h>

#include <RtypesCore.h>

#include "Framework/Logger.h"
#include "Framework/HistogramRegistry.h"
#include "CommonConstants/MathConstants.h"
#include <cmath>

// Functions which cut on particle pairs (decays, conversions, two-track cuts)
//
// Author: Jan Fiete Grosse-Oetringhaus

using namespace o2;
using namespace o2::framework;
using namespace constants::math;

class PairCuts
{
public:
Expand All @@ -36,14 +35,14 @@ class PairCuts
Rho,
ParticlesLastEntry };

void SetHistogramRegistry(HistogramRegistry* registry) { histogramRegistry = registry; }
void SetHistogramRegistry(o2::framework::HistogramRegistry* registry) { histogramRegistry = registry; }

void SetPairCut(Particle particle, float cut)
{
LOGF(info, "Enabled pair cut for %d with value %f", static_cast<int>(particle), cut);
mCuts[particle] = cut;
if (histogramRegistry != nullptr && histogramRegistry->contains(HIST("ControlConvResonances")) == false) {
histogramRegistry->add("ControlConvResonances", "", {HistType::kTH2F, {{6, -0.5, 5.5, "id"}, {500, -0.5, 0.5, "delta mass"}}});
histogramRegistry->add("ControlConvResonances", "", {o2::framework::HistType::kTH2F, {{6, -0.5, 5.5, "id"}, {500, -0.5, 0.5, "delta mass"}}});
}
}

Expand All @@ -54,7 +53,7 @@ class PairCuts
mTwoTrackRadius = radius;

if (histogramRegistry != nullptr && histogramRegistry->contains(HIST("TwoTrackDistancePt_0")) == false) {
histogramRegistry->add("TwoTrackDistancePt_0", "", {HistType::kTH3F, {{100, -0.15, 0.15, "#Delta#eta"}, {100, -0.05, 0.05, "#Delta#varphi^{*}_{min}"}, {20, 0, 10, "#Delta p_{T}"}}});
histogramRegistry->add("TwoTrackDistancePt_0", "", {o2::framework::HistType::kTH3F, {{100, -0.15, 0.15, "#Delta#eta"}, {100, -0.05, 0.05, "#Delta#varphi^{*}_{min}"}, {20, 0, 10, "#Delta p_{T}"}}});
histogramRegistry->addClone("TwoTrackDistancePt_0", "TwoTrackDistancePt_1");
}
}
Expand All @@ -70,7 +69,7 @@ class PairCuts
float mTwoTrackDistance = -1; // distance below which the pair is flagged as to be removed
float mTwoTrackRadius = 0.8f; // radius at which the two track cuts are applied

HistogramRegistry* histogramRegistry = nullptr; // if set, control histograms are stored here
o2::framework::HistogramRegistry* histogramRegistry = nullptr; // if set, control histograms are stored here

template <typename T>
bool conversionCut(T const& track1, T const& track2, Particle conv, double cut);
Expand Down Expand Up @@ -147,7 +146,7 @@ bool PairCuts::twoTrackCut(T const& track1, T const& track2, int magField)
}

if (dphistarminabs < mTwoTrackDistance && std::fabs(deta) < mTwoTrackDistance) {
//LOGF(debug, "Removed track pair %ld %ld with %f %f %f %f %d %f %f %d %d", track1.index(), track2.index(), deta, dphistarminabs, track1.phi2(), track1.pt(), track1.sign(), track2.phi2(), track2.pt(), track2.sign(), magField);
// LOGF(debug, "Removed track pair %ld %ld with %f %f %f %f %d %f %f %d %d", track1.index(), track2.index(), deta, dphistarminabs, track1.phi2(), track1.pt(), track1.sign(), track2.phi2(), track2.pt(), track2.sign(), magField);
return true;
}

Expand All @@ -163,7 +162,7 @@ bool PairCuts::twoTrackCut(T const& track1, T const& track2, int magField)
template <typename T>
bool PairCuts::conversionCut(T const& track1, T const& track2, Particle conv, double cut)
{
//LOGF(info, "pt is %f %f", track1.pt(), track2.pt());
// LOGF(info, "pt is %f %f", track1.pt(), track2.pt());

if (cut < 0) {
return false;
Expand Down Expand Up @@ -286,25 +285,25 @@ double PairCuts::getInvMassSquaredFast(T const& track1, double m0_1, T const& tr

// fold onto 0...pi
float deltaPhi = std::fabs(phi1 - phi2);
while (deltaPhi > TwoPI) {
deltaPhi -= TwoPI;
while (deltaPhi > o2::constants::math::TwoPI) {
deltaPhi -= o2::constants::math::TwoPI;
}
if (deltaPhi > PI) {
deltaPhi = TwoPI - deltaPhi;
if (deltaPhi > o2::constants::math::PI) {
deltaPhi = o2::constants::math::TwoPI - deltaPhi;
}

float cosDeltaPhi = 0;
if (deltaPhi < PI / 3.0f) {
if (deltaPhi < o2::constants::math::PI / 3.0f) {
cosDeltaPhi = 1.0 - deltaPhi * deltaPhi / 2 + deltaPhi * deltaPhi * deltaPhi * deltaPhi / 24;
} else if (deltaPhi < 2.0f * PI / 3.0f) {
cosDeltaPhi = -(deltaPhi - PI / 2) + 1.0 / 6 * std::pow((deltaPhi - PI / 2), 3);
} else if (deltaPhi < 2.0f * o2::constants::math::PI / 3.0f) {
cosDeltaPhi = -(deltaPhi - o2::constants::math::PI / 2) + 1.0 / 6 * std::pow((deltaPhi - o2::constants::math::PI / 2), 3);
} else {
cosDeltaPhi = -1.0f + 1.0f / 2.0f * (deltaPhi - PI) * (deltaPhi - PI) - 1.0f / 24.0f * std::pow(deltaPhi - PI, 4.0f);
cosDeltaPhi = -1.0f + 1.0f / 2.0f * (deltaPhi - o2::constants::math::PI) * (deltaPhi - o2::constants::math::PI) - 1.0f / 24.0f * std::pow(deltaPhi - o2::constants::math::PI, 4.0f);
}

double mass2 = m0_1 * m0_1 + m0_2 * m0_2 + 2.0f * (std::sqrt(e1squ * e2squ) - (pt1 * pt2 * (cosDeltaPhi + 1.0f / tantheta1 / tantheta2)));

//LOGF(debug, "%f %f %f %f %f %f %f %f %f", pt1, eta1, phi1, pt2, eta2, phi2, m0_1, m0_2, mass2);
// LOGF(debug, "%f %f %f %f %f %f %f %f %f", pt1, eta1, phi1, pt2, eta2, phi2, m0_1, m0_2, mass2);

return mass2;
}
Expand All @@ -326,17 +325,17 @@ float PairCuts::getDPhiStar(T const& track1, T const& track2, float radius, int

float dphistar = phi1 - phi2 - charge1 * std::asin(0.015 * magField * radius / pt1) + charge2 * std::asin(0.015 * magField * radius / pt2);

if (dphistar > PI) {
dphistar = TwoPI - dphistar;
if (dphistar > o2::constants::math::PI) {
dphistar = o2::constants::math::TwoPI - dphistar;
}
if (dphistar < -PI) {
dphistar = -TwoPI - dphistar;
if (dphistar < -o2::constants::math::PI) {
dphistar = -o2::constants::math::TwoPI - dphistar;
}
if (dphistar > PI) { // might look funny but is needed
dphistar = TwoPI - dphistar;
if (dphistar > o2::constants::math::PI) { // might look funny but is needed
dphistar = o2::constants::math::TwoPI - dphistar;
}

return dphistar;
}

#endif
#endif // PWGCF_CORE_PAIRCUTS_H_
7 changes: 3 additions & 4 deletions PWGCF/DataModel/CorrelationsDerived.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
#ifndef PWGCF_DATAMODEL_CORRELATIONSDERIVED_H_
#define PWGCF_DATAMODEL_CORRELATIONSDERIVED_H_

#include "Common/DataModel/Centrality.h"

#include "Framework/ASoA.h"
#include "Framework/AnalysisDataModel.h"
#include <Framework/ASoA.h>
#include <Framework/AnalysisDataModel.h>

#include <cstdint>
#include <vector>

namespace o2::aod
Expand Down
6 changes: 4 additions & 2 deletions PWGCF/DataModel/DptDptFiltered.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
#ifndef PWGCF_DATAMODEL_DPTDPTFILTERED_H_
#define PWGCF_DATAMODEL_DPTDPTFILTERED_H_

#include "Framework/ASoA.h"
#include "Framework/AnalysisDataModel.h"
#include <Framework/ASoA.h>
#include <Framework/AnalysisDataModel.h>

#include <cstdint>

namespace o2
{
Expand Down
19 changes: 7 additions & 12 deletions PWGCF/DataModel/FemtoDerived.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,17 @@
#ifndef PWGCF_DATAMODEL_FEMTODERIVED_H_
#define PWGCF_DATAMODEL_FEMTODERIVED_H_

#include "PWGHF/Core/HfHelper.h"
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
#include "PWGHF/DataModel/CandidateSelectionTables.h"

#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/PIDResponseTOF.h"
#include "Common/DataModel/PIDResponseTPC.h"
#include "Common/Core/RecoDecay.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "Framework/ASoA.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/DataTypes.h"
#include "Framework/Expressions.h"
#include "MathUtils/Utils.h"
#include <CommonConstants/PhysicsConstants.h>
#include <Framework/ASoA.h>
#include <Framework/AnalysisDataModel.h>
#include <Framework/Expressions.h>

#include <cmath>
#include <cstdint>
#include <string_view>

namespace o2::aod
{
Expand Down
6 changes: 2 additions & 4 deletions PWGCF/DataModel/SPTableZDC.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
#ifndef PWGCF_DATAMODEL_SPTABLEZDC_H_
#define PWGCF_DATAMODEL_SPTABLEZDC_H_

#include "Common/Core/RecoDecay.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "Framework/AnalysisDataModel.h"
#include <Framework/AnalysisDataModel.h>

#include <cmath>
#include <cstdint>
#include <vector>

namespace o2::aod
Expand Down
40 changes: 27 additions & 13 deletions PWGCF/EbyEFluctuations/Tasks/FactorialMomentsTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,40 @@
/// \author Salman Malik
/// \author Balwan Singh

#include "TRandom.h"
#include <TH1F.h>

// O2 includes
#include "Common/CCDB/EventSelectionParams.h"
#include "Common/CCDB/TriggerAliases.h"
#include "Common/Core/RecoDecay.h"
#include "Common/Core/TrackSelection.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/GlobalTrackID.h"
#include "ReconstructionDataFormats/Track.h"
#include <CommonConstants/MathConstants.h>
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
#include <Framework/AnalysisTask.h>
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/InitContext.h>
#include <Framework/O2DatabasePDGPlugin.h>
#include <Framework/OutputObjHeader.h>
#include <Framework/runDataProcessing.h>

#include <TH1.h>
#include <TH2.h>
#include <TMath.h>
#include <TRandom.h>
#include <TString.h>

#include <Rtypes.h>
#include <RtypesCore.h>

#include <unordered_set>
#include <array>
#include <cmath>
#include <cstdlib>
#include <memory>
#include <string_view>
#include <vector>

using namespace o2;
Expand Down
Loading
Loading