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
10 changes: 10 additions & 0 deletions PWGCF/Femto3D/Tasks/femto3dPairTask.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/Femto3D/Tasks/femto3dPairTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -165,6 +165,7 @@
std::shared_ptr<TH2> TOFhisto_second;

std::vector<std::shared_ptr<TH1>> MultHistos;
std::vector<std::shared_ptr<TH1>> MultHistos_pair;
std::vector<std::vector<std::shared_ptr<TH1>>> kThistos;
std::vector<std::vector<std::shared_ptr<TH1>>> mThistos; // test
std::vector<std::vector<std::shared_ptr<TH1>>> SEhistos_1D;
Expand All @@ -183,9 +184,9 @@
void init(o2::framework::InitContext&)
{

if (_centBins.value.size() < 2)

Check failure on line 187 in PWGCF/Femto3D/Tasks/femto3dPairTask.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(fatal, "The configured number of multiplicity/centrality bins in the array is less than 2 !!!");
if (_kTbins.value.size() < 2)

Check failure on line 189 in PWGCF/Femto3D/Tasks/femto3dPairTask.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(fatal, "The configured number of kT bins in the array is less than 2 !!!");
if (_vertexNbinsToMix.value < 1)
LOGF(fatal, "The configured number of VertexZ bins is less than 1 !!!");
Expand All @@ -210,6 +211,11 @@
auto hMult = registry.add<TH1>(Form("Cent%i/TPCMult_cent%i", i, i), Form("TPCMult_cent%i", i), kTH1F, {{5001, -0.5, 5000.5, "Mult."}});
MultHistos.push_back(std::move(hMult));

if (IsIdentical) {
auto hMult_pair = registry.add<TH1>(Form("Cent%i/TPCMult_pair_cond_cent%i", i, i), Form("TPCMult_pair_cond_cent%i", i), kTH1F, {{5001, -0.5, 5000.5, "Mult."}});
MultHistos_pair.push_back(std::move(hMult_pair));
}

for (unsigned int j = 0; j < _kTbins.value.size() - 1; j++) {
auto hSE_1D = registry.add<TH1>(Form("Cent%i/SE_1D_cent%i_kT%i", i, i, j), Form("SE_1D_cent%i_kT%i", i, j), kTH1F, {{CFkStarBinning, "k* (GeV/c)"}});
auto hME_1D = registry.add<TH1>(Form("Cent%i/ME_1D_cent%i_kT%i", i, i, j), Form("ME_1D_cent%i_kT%i", i, j), kTH1F, {{CFkStarBinning, "k* (GeV/c)"}});
Expand Down Expand Up @@ -240,7 +246,7 @@
if (_fill3dAddHistos == 1) {
auto hAdd3dHistos = registry.add<TH3>(Form("Cent%i/qLCMSvskStar_cent%i_kT%i", i, i, j), Form("qLCMSvskStar_cent%i_kT%i", i, j), kTH3F, {{CF3DqLCMSBinning, "q_out (GeV/c)"}, {CF3DqLCMSBinning, "q_side (GeV/c)"}, {CF3DqLCMSBinning, "q_long (GeV/c)"}});
Add3dHistosperMult.push_back(std::move(hAdd3dHistos));
} else if (_fill3dAddHistos == 2) {

Check failure on line 249 in PWGCF/Femto3D/Tasks/femto3dPairTask.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.
auto hAdd3dHistos = registry.add<TH3>(Form("Cent%i/qLCMSvsGout_cent%i_kT%i", i, i, j), Form("qLCMSvsGout_cent%i_kT%i", i, j), kTH3F, {{CF3DqLCMSBinning, "q_out (GeV/c)"}, {CF3DqLCMSBinning, "q_side (GeV/c)"}, {CF3DqLCMSBinning, "q_long (GeV/c)"}});
Add3dHistosperMult.push_back(std::move(hAdd3dHistos));
}
Expand All @@ -254,7 +260,7 @@
if (_fillDetaDphi > -1) {
TString suffix[] = {"_nocut", "_cut"};

for (int f = 0; f < 2; f++) {

Check failure on line 263 in PWGCF/Femto3D/Tasks/femto3dPairTask.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.
std::vector<std::shared_ptr<TH2>> DoubleTrack_SE_histos_perMult;
std::vector<std::shared_ptr<TH2>> DoubleTrack_ME_histos_perMult;

Expand Down Expand Up @@ -317,7 +323,7 @@
if (_fill3dCF && kTbin > SEhistos_3D[multBin].size())
LOGF(fatal, "kTbin value obtained for a pair exceeds the configured number of kT bins (3D)");

if (_fillDetaDphi % 2 == 0)

Check failure on line 326 in PWGCF/Femto3D/Tasks/femto3dPairTask.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.
DoubleTrack_SE_histos_BC[multBin][kTbin]->Fill(_dPhiMode.value == 0 ? Pair->GetPhiStarDiff(_radiusTPC) : Pair->GetAvgPhiStarDiff(), Pair->GetEtaDiff());

if (_deta > 0 && _dphi > 0 && (_dPhiMode.value == 0 ? Pair->IsClosePair(_deta, _dphi, _radiusTPC) : Pair->IsClosePair(_deta, _dphi)))
Expand Down Expand Up @@ -350,8 +356,8 @@
if (_fill3dCF && multBin > SEhistos_3D.size())
LOGF(fatal, "multBin value passed to the mixTracks function exceeds the configured number of Cent. bins (3D)");

for (auto ii : tracks1) {

Check failure on line 359 in PWGCF/Femto3D/Tasks/femto3dPairTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
for (auto iii : tracks2) {

Check failure on line 360 in PWGCF/Femto3D/Tasks/femto3dPairTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.

Pair->SetPair(ii, iii);
float pair_kT = Pair->GetKt();
Expand All @@ -365,7 +371,7 @@
if (_fill3dCF && kTbin > SEhistos_3D[multBin].size())
LOGF(fatal, "kTbin value obtained for a pair exceeds the configured number of kT bins (3D)");

if (_fillDetaDphi % 2 == 0) {

Check failure on line 374 in PWGCF/Femto3D/Tasks/femto3dPairTask.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 (!SE_or_ME)
DoubleTrack_SE_histos_BC[multBin][kTbin]->Fill(_dPhiMode.value == 0 ? Pair->GetPhiStarDiff(_radiusTPC) : Pair->GetAvgPhiStarDiff(), Pair->GetEtaDiff());
else
Expand Down Expand Up @@ -403,7 +409,7 @@
MEhistos_3D[multBin][kTbin]->Fill(qLCMS.X(), qLCMS.Y(), qLCMS.Z());
if (_fill3dAddHistos == 1)
Add3dHistos[multBin][kTbin]->Fill(qLCMS.X(), qLCMS.Y(), qLCMS.Z(), Pair->GetKstar());
else if (_fill3dAddHistos == 2)

Check failure on line 412 in PWGCF/Femto3D/Tasks/femto3dPairTask.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.
Add3dHistos[multBin][kTbin]->Fill(qLCMS.X(), qLCMS.Y(), qLCMS.Z(), Pair->GetGammaOut());
}
}
Expand Down Expand Up @@ -513,6 +519,10 @@
unsigned int centBin = std::floor((i->first).second);
MultHistos[centBin]->Fill(col1->mult());

if (selectedtracks_1[col1->index()].size() > 1) {
MultHistos_pair[centBin]->Fill(col1->mult());
}

mixTracks(selectedtracks_1[col1->index()], centBin); // mixing SE identical

for (unsigned int indx2 = indx1 + 1; indx2 < EvPerBin; indx2++) { // nested loop for all the combinations of collisions in a chosen mult/vertex bin
Expand Down
Loading