Skip to content

Commit 3693c23

Browse files
victor-gonzalezVictor
andauthored
Second step towards identified analysis (#4668)
Also collisions within ITS read out frame border are rejected Co-authored-by: Victor <victor@cern.ch>
1 parent 0fc0205 commit 3693c23

File tree

3 files changed

+71
-50
lines changed

3 files changed

+71
-50
lines changed

PWGCF/TableProducer/dptdptfilter.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ struct DptDptFilterTracks {
666666
template <typename ParticleObject>
667667
int8_t whichTruthSpecies(ParticleObject part)
668668
{
669-
int pdgcode = abs(part.pdgCode());
669+
int pdgcode = std::abs(part.pdgCode());
670670
/* let's first check the exclusion from the analysis */
671671
for (uint8_t ix = 0; ix < configexclude.size(); ++ix) {
672672
if (pdgcode == pdgcodes[speciesexclude[ix]]) {

PWGCF/TableProducer/dptdptfilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ inline bool triggerSelectionReco(CollisionObject const& collision)
350350
case kPbPbRun3:
351351
switch (fTriggerSelection) {
352352
case kMB:
353-
if (collision.sel8()) {
353+
if (collision.sel8() && collision.selection_bit(aod::evsel::kNoITSROFrameBorder)) {
354354
trigsel = true;
355355
}
356356
break;

PWGCF/Tasks/dptdptcorrelations.cxx

Lines changed: 69 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ PairCuts fPairCuts; // pair suppression engine
6868
bool fUseConversionCuts = false; // suppress resonances and conversions
6969
bool fUseTwoTrackCut = false; // suppress too close tracks
7070

71-
std::vector<std::string> tname = {"O", "T"}; ///< the track names
71+
std::vector<std::string> poinames; ///< the species of interest names
72+
std::vector<std::string> tnames; ///< the track names
73+
std::vector<std::vector<std::string>> trackPairsNames; ///< the track pairs names
7274
} // namespace correlationstask
7375

7476
// Task for building <dpt,dpt> correlations
@@ -77,8 +79,7 @@ struct DptDptCorrelationsTask {
7779
/* the data collecting engine */
7880
template <bool smallsingles>
7981
struct DataCollectingEngine {
80-
int nspecies = 1; /* for the time being just hadrons */
81-
size_t nch = nspecies * 2;
82+
size_t nch = correlationstask::tnames.size();
8283

8384
//============================================================================================
8485
// The DptDptCorrelationsAnalysisTask output objects
@@ -111,7 +112,6 @@ struct DptDptCorrelationsTask {
111112
std::vector<std::vector<TProfile*>> fhSum2PtPtnw_vsC{nch, {nch, nullptr}}; //!<! un-weighted accumulated \f${p_T}_1 {p_T}_2\f$ distribution vs event centrality/multiplicity 1-1,1-2,2-1,2-2, combinations
112113
std::vector<std::vector<TProfile*>> fhSum2DptDptnw_vsC{nch, {nch, nullptr}}; //!<! un-weighted accumulated \f$\sum ({p_T}_1- <{p_T}_1>) ({p_T}_2 - <{p_T}_2>) \f$ distribution vs \f$\Delta\eta,\;\Delta\phi\f$ distribution vs event centrality/multiplicity 1-1,1-2,2-1,2-2, combinations
113114

114-
std::vector<std::vector<std::string>> trackPairsNames = {{"OO", "OT"}, {"TO", "TT"}};
115115
bool ccdbstored = false;
116116

117117
float isCCDBstored()
@@ -475,28 +475,28 @@ struct DptDptCorrelationsTask {
475475
fOutputList->Add(fhVertexZA);
476476
for (uint i = 0; i < nch; ++i) {
477477
/* histograms for each track, one and two */
478-
fhN1_vsPt[i] = new TH1F(TString::Format("n1_%s_vsPt", tname[i].c_str()).Data(),
479-
TString::Format("#LT n_{1} #GT;p_{t,%s} (GeV/c);#LT n_{1} #GT", tname[i].c_str()).Data(),
478+
fhN1_vsPt[i] = new TH1F(TString::Format("n1_%s_vsPt", tnames[i].c_str()).Data(),
479+
TString::Format("#LT n_{1} #GT;p_{t,%s} (GeV/c);#LT n_{1} #GT", tnames[i].c_str()).Data(),
480480
ptbins, ptlow, ptup);
481481
/* we don't want the Sumw2 structure being created here */
482482
bool defSumw2 = TH1::GetDefaultSumw2();
483483
if constexpr (smallsingles) {
484-
fhN1_vsEtaPhi[i] = new TH2F(TString::Format("n1_%s_vsEtaPhi", tname[i].c_str()).Data(),
485-
TString::Format("#LT n_{1} #GT;#eta_{%s};#varphi_{%s} (radian);#LT n_{1} #GT", tname[i].c_str(), tname[i].c_str()).Data(),
484+
fhN1_vsEtaPhi[i] = new TH2F(TString::Format("n1_%s_vsEtaPhi", tnames[i].c_str()).Data(),
485+
TString::Format("#LT n_{1} #GT;#eta_{%s};#varphi_{%s} (radian);#LT n_{1} #GT", tnames[i].c_str(), tnames[i].c_str()).Data(),
486486
etabins, etalow, etaup, phibins, philow, phiup);
487-
fhSum1Pt_vsEtaPhi[i] = new TH2F(TString::Format("sumPt_%s_vsEtaPhi", tname[i].c_str()).Data(),
487+
fhSum1Pt_vsEtaPhi[i] = new TH2F(TString::Format("sumPt_%s_vsEtaPhi", tnames[i].c_str()).Data(),
488488
TString::Format("#LT #Sigma p_{t,%s} #GT;#eta_{%s};#varphi_{%s} (radian);#LT #Sigma p_{t,%s} #GT (GeV/c)",
489-
tname[i].c_str(), tname[i].c_str(), tname[i].c_str(), tname[i].c_str())
489+
tnames[i].c_str(), tnames[i].c_str(), tnames[i].c_str(), tnames[i].c_str())
490490
.Data(),
491491
etabins, etalow, etaup, phibins, philow, phiup);
492492
} else {
493493
TH1::SetDefaultSumw2(false);
494494
fhN1_vsZEtaPhiPt[i] = new TH3F(
495-
TString::Format("n1_%s_vsZ_vsEtaPhi_vsPt", tname[i].c_str()).Data(),
495+
TString::Format("n1_%s_vsZ_vsEtaPhi_vsPt", tnames[i].c_str()).Data(),
496496
TString::Format("#LT n_{1} #GT;vtx_{z};#eta_{%s}#times#varphi_{%s};p_{t,%s} (GeV/c)",
497-
tname[i].c_str(),
498-
tname[i].c_str(),
499-
tname[i].c_str())
497+
tnames[i].c_str(),
498+
tnames[i].c_str(),
499+
tnames[i].c_str())
500500
.Data(),
501501
zvtxbins,
502502
zvtxlow,
@@ -508,13 +508,13 @@ struct DptDptCorrelationsTask {
508508
ptlow,
509509
ptup);
510510
fhSum1Pt_vsZEtaPhiPt[i] = new TH3F(
511-
TString::Format("sumPt1_%s_vsZ_vsEtaPhi_vsPt", tname[i].c_str()).Data(),
511+
TString::Format("sumPt1_%s_vsZ_vsEtaPhi_vsPt", tnames[i].c_str()).Data(),
512512
TString::Format(
513513
"#LT #Sigma p_{t,%s}#GT;vtx_{z};#eta_{%s}#times#varphi_{%s};p_{t,%s} (GeV/c)",
514-
tname[i].c_str(),
515-
tname[i].c_str(),
516-
tname[i].c_str(),
517-
tname[i].c_str())
514+
tnames[i].c_str(),
515+
tnames[i].c_str(),
516+
tnames[i].c_str(),
517+
tnames[i].c_str())
518518
.Data(),
519519
zvtxbins,
520520
zvtxlow,
@@ -556,25 +556,25 @@ struct DptDptCorrelationsTask {
556556
} else {
557557
for (uint i = 0; i < nch; ++i) {
558558
/* histograms for each track species */
559-
fhN1_vsEtaPhi[i] = new TH2F(TString::Format("n1_%s_vsEtaPhi", tname[i].c_str()).Data(),
560-
TString::Format("#LT n_{1} #GT;#eta_{%s};#varphi_{%s} (radian);#LT n_{1} #GT", tname[i].c_str(), tname[i].c_str()).Data(),
559+
fhN1_vsEtaPhi[i] = new TH2F(TString::Format("n1_%s_vsEtaPhi", tnames[i].c_str()).Data(),
560+
TString::Format("#LT n_{1} #GT;#eta_{%s};#varphi_{%s} (radian);#LT n_{1} #GT", tnames[i].c_str(), tnames[i].c_str()).Data(),
561561
etabins, etalow, etaup, phibins, philow, phiup);
562-
fhSum1Pt_vsEtaPhi[i] = new TH2F(TString::Format("sumPt_%s_vsEtaPhi", tname[i].c_str()).Data(),
562+
fhSum1Pt_vsEtaPhi[i] = new TH2F(TString::Format("sumPt_%s_vsEtaPhi", tnames[i].c_str()).Data(),
563563
TString::Format("#LT #Sigma p_{t,%s} #GT;#eta_{%s};#varphi_{%s} (radian);#LT #Sigma p_{t,%s} #GT (GeV/c)",
564-
tname[i].c_str(), tname[i].c_str(), tname[i].c_str(), tname[i].c_str())
564+
tnames[i].c_str(), tnames[i].c_str(), tnames[i].c_str(), tnames[i].c_str())
565565
.Data(),
566566
etabins, etalow, etaup, phibins, philow, phiup);
567-
fhN1_vsC[i] = new TProfile(TString::Format("n1_%s_vsM", tname[i].c_str()).Data(),
567+
fhN1_vsC[i] = new TProfile(TString::Format("n1_%s_vsM", tnames[i].c_str()).Data(),
568568
TString::Format("#LT n_{1} #GT (weighted);Centrality/Multiplicity (%%);#LT n_{1} #GT").Data(),
569569
100, 0.0, 100.0);
570-
fhSum1Pt_vsC[i] = new TProfile(TString::Format("sumPt_%s_vsM", tname[i].c_str()),
571-
TString::Format("#LT #Sigma p_{t,%s} #GT (weighted);Centrality/Multiplicity (%%);#LT #Sigma p_{t,%s} #GT (GeV/c)", tname[i].c_str(), tname[i].c_str()).Data(),
570+
fhSum1Pt_vsC[i] = new TProfile(TString::Format("sumPt_%s_vsM", tnames[i].c_str()),
571+
TString::Format("#LT #Sigma p_{t,%s} #GT (weighted);Centrality/Multiplicity (%%);#LT #Sigma p_{t,%s} #GT (GeV/c)", tnames[i].c_str(), tnames[i].c_str()).Data(),
572572
100, 0.0, 100.0);
573-
fhN1nw_vsC[i] = new TProfile(TString::Format("n1Nw_%s_vsM", tname[i].c_str()).Data(),
573+
fhN1nw_vsC[i] = new TProfile(TString::Format("n1Nw_%s_vsM", tnames[i].c_str()).Data(),
574574
TString::Format("#LT n_{1} #GT;Centrality/Multiplicity (%%);#LT n_{1} #GT").Data(),
575575
100, 0.0, 100.0);
576-
fhSum1Ptnw_vsC[i] = new TProfile(TString::Format("sumPtNw_%s_vsM", tname[i].c_str()).Data(),
577-
TString::Format("#LT #Sigma p_{t,%s} #GT;Centrality/Multiplicity (%%);#LT #Sigma p_{t,%s} #GT (GeV/c)", tname[i].c_str(), tname[i].c_str()).Data(), 100, 0.0, 100.0);
576+
fhSum1Ptnw_vsC[i] = new TProfile(TString::Format("sumPtNw_%s_vsM", tnames[i].c_str()).Data(),
577+
TString::Format("#LT #Sigma p_{t,%s} #GT;Centrality/Multiplicity (%%);#LT #Sigma p_{t,%s} #GT (GeV/c)", tnames[i].c_str(), tnames[i].c_str()).Data(), 100, 0.0, 100.0);
578578
fhNuaNue_vsZEtaPhiPt[i] = nullptr;
579579
fhPtAvg_vsEtaPhi[i] = nullptr;
580580
fOutputList->Add(fhN1_vsEtaPhi[i]);
@@ -675,6 +675,7 @@ struct DptDptCorrelationsTask {
675675
Configurable<float> cfgTwoTrackCut{"twotrackcut", -1, "Two-tracks cut: -1 = off; >0 otherwise distance value (suggested: 0.02"};
676676
Configurable<float> cfgTwoTrackCutMinRadius{"twotrackcutminradius", 0.8f, "Two-tracks cut: radius in m from which two-tracks cut is applied"};
677677

678+
Configurable<std::string> cfgSpecies{"species", "Ha", "The species to analyze: Ha, Pi, Ka, Pr, separated by commas. Default: Ha"};
678679
Configurable<bool> cfgSmallDCE{"smalldce", true, "Use small data collecting engine for singles processing, true = yes. Default = true"};
679680
Configurable<bool> cfgProcessPairs{"processpairs", false, "Process pairs: false = no, just singles, true = yes, process pairs"};
680681
Configurable<bool> cfgProcessME{"processmixedevents", false, "Process mixed events: false = no, just same event, true = yes, also process mixed events"};
@@ -756,7 +757,27 @@ struct DptDptCorrelationsTask {
756757

757758
/* create the data collecting engine instances according to the configured centrality/multiplicity ranges */
758759
{
759-
TObjArray* tokens = TString(cfgCentSpec.value.c_str()).Tokenize(",");
760+
/* configuring the desired species */
761+
TObjArray* tokens = TString(cfgSpecies.value.c_str()).Tokenize(",");
762+
int nspecies = tokens->GetEntries();
763+
for (int isp = 0; isp < nspecies; ++isp) {
764+
poinames.push_back(std::string(tokens->At(isp)->GetName()));
765+
tnames.push_back(std::string(TString::Format("%sP", tokens->At(isp)->GetName()).Data()));
766+
tnames.push_back(std::string(TString::Format("%sM", tokens->At(isp)->GetName()).Data()));
767+
LOGF(info, "Incorporated species %s to the analysis", poinames[isp].c_str());
768+
}
769+
delete tokens;
770+
uint ntracknames = tnames.size();
771+
for (uint isp = 0; isp < ntracknames; ++isp) {
772+
trackPairsNames.push_back(std::vector<std::string>());
773+
for (uint jsp = 0; jsp < ntracknames; ++jsp) {
774+
trackPairsNames[isp].push_back(tnames[isp] + tnames[jsp]);
775+
LOGF(info, "Incorporated the pair %s", (tnames[isp] + tnames[jsp]).c_str());
776+
}
777+
}
778+
779+
/* the centrality/multiplicity ranges */
780+
tokens = TString(cfgCentSpec.value.c_str()).Tokenize(",");
760781
ncmranges = tokens->GetEntries();
761782
fCentMultMin = new float[ncmranges];
762783
fCentMultMax = new float[ncmranges];
@@ -905,13 +926,13 @@ struct DptDptCorrelationsTask {
905926
if (!(ixDCE < 0)) {
906927
if (ccdblst != nullptr && !(dataCE[ixDCE]->isCCDBstored())) {
907928
if constexpr (gen) {
908-
std::vector<TH2*> ptavgs{tname.size(), nullptr};
909-
for (uint isp = 0; isp < tname.size(); ++isp) {
929+
std::vector<TH2*> ptavgs{tnames.size(), nullptr};
930+
for (uint isp = 0; isp < tnames.size(); ++isp) {
910931
ptavgs[isp] = reinterpret_cast<TH2*>(ccdblst->FindObject(
911932
TString::Format("trueptavgetaphi_%02d-%02d_%s",
912933
static_cast<int>(fCentMultMin[ixDCE]),
913934
static_cast<int>(fCentMultMax[ixDCE]),
914-
tname[isp].c_str())
935+
tnames[isp].c_str())
915936
.Data()));
916937
}
917938
if (cfgSmallDCE.value) {
@@ -920,13 +941,13 @@ struct DptDptCorrelationsTask {
920941
dataCE[ixDCE]->storePtAverages(ptavgs);
921942
}
922943
} else {
923-
std::vector<TH3*> corrs{tname.size(), nullptr};
924-
for (uint isp = 0; isp < tname.size(); ++isp) {
944+
std::vector<TH3*> corrs{tnames.size(), nullptr};
945+
for (uint isp = 0; isp < tnames.size(); ++isp) {
925946
corrs[isp] = reinterpret_cast<TH3*>(ccdblst->FindObject(
926947
TString::Format("correction_%02d-%02d_%s",
927948
static_cast<int>(fCentMultMin[ixDCE]),
928949
static_cast<int>(fCentMultMax[ixDCE]),
929-
tname[isp].c_str())
950+
tnames[isp].c_str())
930951
.Data()));
931952
}
932953
if (cfgSmallDCE.value) {
@@ -935,13 +956,13 @@ struct DptDptCorrelationsTask {
935956
dataCE[ixDCE]->storeTrackCorrections(corrs);
936957
}
937958

938-
std::vector<TH2*> ptavgs{tname.size(), nullptr};
939-
for (uint isp = 0; isp < tname.size(); ++isp) {
959+
std::vector<TH2*> ptavgs{tnames.size(), nullptr};
960+
for (uint isp = 0; isp < tnames.size(); ++isp) {
940961
ptavgs[isp] = reinterpret_cast<TH2*>(ccdblst->FindObject(
941962
TString::Format("ptavgetaphi_%02d-%02d_%s",
942963
static_cast<int>(fCentMultMin[ixDCE]),
943964
static_cast<int>(fCentMultMax[ixDCE]),
944-
tname[isp].c_str())
965+
tnames[isp].c_str())
945966
.Data()));
946967
}
947968
if (cfgSmallDCE.value) {
@@ -992,35 +1013,35 @@ struct DptDptCorrelationsTask {
9921013
if (!(ixDCE < 0)) {
9931014
if (ccdblst != nullptr && !(dataCEME[ixDCE]->isCCDBstored())) {
9941015
if constexpr (gen) {
995-
std::vector<TH2*> ptavgs{tname.size(), nullptr};
996-
for (uint isp = 0; isp < tname.size(); ++isp) {
1016+
std::vector<TH2*> ptavgs{tnames.size(), nullptr};
1017+
for (uint isp = 0; isp < tnames.size(); ++isp) {
9971018
ptavgs[isp] = reinterpret_cast<TH2*>(ccdblst->FindObject(
9981019
TString::Format("trueptavgetaphi_%02d-%02d_%s",
9991020
static_cast<int>(fCentMultMin[ixDCE]),
10001021
static_cast<int>(fCentMultMax[ixDCE]),
1001-
tname[isp].c_str())
1022+
tnames[isp].c_str())
10021023
.Data()));
10031024
}
10041025
dataCEME[ixDCE]->storePtAverages(ptavgs);
10051026
} else {
1006-
std::vector<TH3*> corrs{tname.size(), nullptr};
1007-
for (uint isp = 0; isp < tname.size(); ++isp) {
1027+
std::vector<TH3*> corrs{tnames.size(), nullptr};
1028+
for (uint isp = 0; isp < tnames.size(); ++isp) {
10081029
corrs[isp] = reinterpret_cast<TH3*>(ccdblst->FindObject(
10091030
TString::Format("correction_%02d-%02d_%s",
10101031
static_cast<int>(fCentMultMin[ixDCE]),
10111032
static_cast<int>(fCentMultMax[ixDCE]),
1012-
tname[isp].c_str())
1033+
tnames[isp].c_str())
10131034
.Data()));
10141035
}
10151036
dataCEME[ixDCE]->storeTrackCorrections(corrs);
10161037

1017-
std::vector<TH2*> ptavgs{tname.size(), nullptr};
1018-
for (uint isp = 0; isp < tname.size(); ++isp) {
1038+
std::vector<TH2*> ptavgs{tnames.size(), nullptr};
1039+
for (uint isp = 0; isp < tnames.size(); ++isp) {
10191040
ptavgs[isp] = reinterpret_cast<TH2*>(ccdblst->FindObject(
10201041
TString::Format("ptavgetaphi_%02d-%02d_%s",
10211042
static_cast<int>(fCentMultMin[ixDCE]),
10221043
static_cast<int>(fCentMultMax[ixDCE]),
1023-
tname[isp].c_str())
1044+
tnames[isp].c_str())
10241045
.Data()));
10251046
}
10261047
dataCEME[ixDCE]->storePtAverages(ptavgs);

0 commit comments

Comments
 (0)