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
25 changes: 23 additions & 2 deletions PWGLF/Tasks/Strangeness/lambdapolsp.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
#include <cmath>
#include <cstdlib>
#include <deque>
#include <iostream>

Check failure on line 61 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <iterator>
#include <set> // <<< CHANGED: for dedup sets
#include <string>
Expand Down Expand Up @@ -205,6 +205,7 @@
ConfigurableAxis axisRadius{"axisRadius", {200, 0, 100}, "radius axis"};
ConfigurableAxis axisDca{"axisDca", {100, -5, 5}, "dca axis"};
ConfigurableAxis axisLT{"axisLT", {50, 0, 50}, "lifetime axis"};
ConfigurableAxis axisCR{"axisCR", {40, 0, 200}, "CR axis"};
Configurable<bool> filldist{"filldist", true, "fill topo distr"};
} distGrp;

Expand Down Expand Up @@ -406,6 +407,7 @@
histos.add("hdcaneglambda", "hdcaneglambda", HistType::kTH1D, {distGrp.axisDca}, true);
histos.add("hdcaposantilambda", "hdcaposantilambda", HistType::kTH1D, {distGrp.axisDca}, true);
histos.add("hdcanegantilambda", "hdcanegantilambda", HistType::kTH1D, {distGrp.axisDca}, true);
histos.add("htpcCR", "htpcCR", HistType::kTH1D, {distGrp.axisCR}, true);
}

ccdb->setURL(cfgCcdbParam.cfgURL);
Expand All @@ -429,12 +431,12 @@
template <typename Collision, typename V0>
bool SelectionV0(Collision const& collision, V0 const& candidate)
{
if (TMath::Abs(candidate.dcav0topv()) > cMaxV0DCA) {

Check failure on line 434 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
const float pT = candidate.pt();
const float tranRad = candidate.v0radius();
const float dcaDaughv0 = TMath::Abs(candidate.dcaV0daughters());

Check failure on line 439 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
const float cpav0 = candidate.v0cosPA();

float CtauLambda = candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * massLambda;
Expand All @@ -457,16 +459,16 @@
if (tranRad > ConfV0TranRadV0Max) {
return false;
}
if (analyzeLambda && TMath::Abs(CtauLambda) > cMaxV0LifeTime) {

Check failure on line 462 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
if (analyzeK0s && TMath::Abs(CtauK0s) > cMaxV0LifeTime) {

Check failure on line 465 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
if (analyzeLambda && TMath::Abs(candidate.yLambda()) > ConfV0Rap) {

Check failure on line 468 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
if (analyzeK0s && TMath::Abs(candidate.yK0Short()) > ConfV0Rap) {

Check failure on line 471 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
return true;
Expand All @@ -492,10 +494,10 @@
return false;
}

if (pid == 0 && TMath::Abs(track.tpcNSigmaPr()) > ConfDaughPIDCuts) {

Check failure on line 497 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
if (pid == 1 && TMath::Abs(track.tpcNSigmaPi()) > ConfDaughPIDCuts) {

Check failure on line 500 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
if (pid == 0 && (candidate.positivept() < cfgDaughPrPt || candidate.negativept() < cfgDaughPiPt)) {
Expand All @@ -508,7 +510,7 @@
return false;
}

if (pid2 == 0 && (TMath::Abs(candidate.dcapostopv()) < cMinV0DCAPr || TMath::Abs(candidate.dcanegtopv()) < cMinV0DCAPi)) {

Check failure on line 513 in PWGLF/Tasks/Strangeness/lambdapolsp.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return false;
}
if (pid2 == 1 && (TMath::Abs(candidate.dcapostopv()) < cMinV0DCAPi || TMath::Abs(candidate.dcanegtopv()) < cMinV0DCAPr)) {
Expand Down Expand Up @@ -1165,11 +1167,13 @@
}
}
} else {

if (distGrp.filldist) {
histos.fill(HIST("hcosine"), v0.v0cosPA());
histos.fill(HIST("hdcabwv0daugh"), v0.dcaV0daughters());
histos.fill(HIST("hlifetime"), TMath::Abs(v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * massLambda));
histos.fill(HIST("hradius"), v0.v0radius());
histos.fill(HIST("htpcCR"), postrack.tpcNClsCrossedRows());
}

if (LambdaTag) {
Expand Down Expand Up @@ -1223,6 +1227,7 @@
else if (centestim == 3)
centrality = collision.centFV0A();

auto runnumber = collision.runNumber();
// auto centrality = collision.centFT0C();
if (!collision.triggereventsp()) { // provided by StraZDCSP
return;
Expand Down Expand Up @@ -1257,6 +1262,16 @@
accprofileAL = ccdb->getForTimeStamp<TProfile2D>(ConfAccPathAL.value, bc.timestamp());
}
*/
auto timestamps = ccdb->getRunDuration(runnumber, true); /// fatalise if timestamps are not found
int64_t sorTimestamp = timestamps.first; // timestamp of the SOR/SOX/STF in ms
int64_t eorTimestamp = timestamps.second; // timestamp of the EOR/EOX/ETF in ms
int64_t ts = eorTimestamp / 2 + sorTimestamp / 2; // timestamp of the middle of the run

if (useAccCorr) {
accprofileL = ccdb->getForTimeStamp<TProfile2D>(ConfAccPathL.value, ts);
accprofileAL = ccdb->getForTimeStamp<TProfile2D>(ConfAccPathAL.value, ts);
}

//___________________________________________________________________________________________________
// retrieve further info provided by StraZDCSP
auto qxZDCA = collision.qxZDCA();
Expand Down Expand Up @@ -1430,15 +1445,21 @@
if (analyzeLambda && LambdaTag) {
Lambda = Proton + AntiPion;
tagb = 0;
double acvalue = 1.0;
int binx = accprofileL->GetXaxis()->FindBin(v0.eta());
int biny = accprofileL->GetYaxis()->FindBin(v0.pt());
double acvalue = accprofileL->GetBinContent(binx, biny);
// double acvalue = 1.0;
fillHistograms(taga, tagb, Lambda, Proton, psiZDCC, psiZDCA, psiZDC, centrality, v0.mLambda(), v0.pt(), v0.eta(), acvalue, 1.0);
}

tagb = aLambdaTag;
if (analyzeLambda && aLambdaTag) {
AntiLambda = AntiProton + Pion;
taga = 0;
double acvalue = 1.0;
int binx = accprofileAL->GetXaxis()->FindBin(v0.eta());
int biny = accprofileAL->GetYaxis()->FindBin(v0.pt());
double acvalue = accprofileAL->GetBinContent(binx, biny);
// double acvalue = 1.0;
fillHistograms(taga, tagb, AntiLambda, AntiProton, psiZDCC, psiZDCA, psiZDC, centrality, v0.mAntiLambda(), v0.pt(), v0.eta(), acvalue, 1.0);
}
}
Expand Down
Loading