Skip to content

Commit 8c82a5b

Browse files
author
sjzhu0v0
committed
Merge the local git to latest version of O2Physics
2 parents d1f725c + ca0902a commit 8c82a5b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2519
-399
lines changed

EventFiltering/PWGJE/jetFilter.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <TMath.h>
1515
#include <cmath>
1616
#include <string>
17+
#include <vector>
1718

1819
#include "Framework/ASoA.h"
1920
#include "Framework/ASoAHelpers.h"
@@ -94,13 +95,13 @@ struct jetFilter {
9495

9596
Filter trackFilter = (nabs(aod::jtrack::eta) < static_cast<float>(cfgEtaTPC)) && (aod::jtrack::pt > trackPtMin);
9697
int trackSelection = -1;
97-
int eventSelection = -1;
98+
std::vector<int> eventSelectionBits;
9899

99100
void init(o2::framework::InitContext&)
100101
{
101102
triggerJetR = TMath::Nint(cfgJetR * 100.0f);
102103
trackSelection = jetderiveddatautilities::initialiseTrackSelection(static_cast<std::string>(trackSelections));
103-
eventSelection = jetderiveddatautilities::initialiseEventSelection(static_cast<std::string>(evSel));
104+
eventSelectionBits = jetderiveddatautilities::initialiseEventSelectionBits(static_cast<std::string>(evSel));
104105

105106
spectra.add("fCollZpos", "collision z position", HistType::kTH1F,
106107
{{200, -20., +20., "#it{z}_{vtx} position (cm)"}});
@@ -196,7 +197,7 @@ struct jetFilter {
196197
spectra.fill(HIST("fCollZpos"), collision.posZ());
197198
hProcessedEvents->Fill(static_cast<float>(kBinAllEvents) + 0.1f); // all minimum bias events
198199

199-
if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) {
200+
if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits)) {
200201
tags(keepEvent[kJetChLowPt], keepEvent[kJetChHighPt], keepEvent[kTrackLowPt], keepEvent[kTrackHighPt]);
201202
return;
202203
}

PWGCF/EbyEFluctuations/Tasks/netprotonCumulantsMc.cxx

Lines changed: 957 additions & 54 deletions
Large diffs are not rendered by default.

PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class FemtoUniverseParticleHisto
7979
mHistogramRegistry->add((folderName + folderSuffix + "/hTPCcrossedRows").c_str(), "; TPC crossed rows; Entries", kTH1F, {{163, -0.5, 162.5}});
8080
mHistogramRegistry->add((folderName + folderSuffix + "/hTPCfindableVsCrossed").c_str(), ";TPC findable clusters ; TPC crossed rows;", kTH2F, {{163, -0.5, 162.5}, {163, -0.5, 162.5}});
8181
mHistogramRegistry->add((folderName + folderSuffix + "/hTPCshared").c_str(), "; TPC shared clusters; Entries", kTH1F, {{163, -0.5, 162.5}});
82-
mHistogramRegistry->add((folderName + folderSuffix + "/hTPCsharedFrac").c_str(), "; TPC fraction of shared clusters; Entries", kTH1F, {{100, 0.0, 100.0}});
82+
mHistogramRegistry->add((folderName + folderSuffix + "/hTPCfractionSharedCls").c_str(), "; TPC fraction of shared clusters; Entries", kTH1F, {{100, 0.0, 100.0}});
8383
mHistogramRegistry->add((folderName + folderSuffix + "/hITSclusters").c_str(), "; ITS clusters; Entries", kTH1F, {{10, -0.5, 9.5}});
8484
mHistogramRegistry->add((folderName + folderSuffix + "/hITSclustersIB").c_str(), "; ITS clusters in IB; Entries", kTH1F, {{10, -0.5, 9.5}});
8585
mHistogramRegistry->add((folderName + folderSuffix + "/hDCAz").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{z} (cm)", kTH2F, {{100, 0, 10}, {500, -5, 5}});
@@ -252,7 +252,7 @@ class FemtoUniverseParticleHisto
252252
mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCcrossedRows"), part.tpcNClsCrossedRows());
253253
mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCfindableVsCrossed"), part.tpcNClsFindable(), part.tpcNClsCrossedRows());
254254
mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCshared"), part.tpcNClsShared());
255-
mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCsharedFrac"), part.tpcFractionSharedCls());
255+
mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hTPCfractionSharedCls"), part.tpcFractionSharedCls());
256256
mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hITSclusters"), part.itsNCls());
257257
mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hITSclustersIB"), part.itsNClsInnerBarrel());
258258
mHistogramRegistry->fill(histFolder + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/hDCAz"), part.pt(), part.dcaZ());

PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ void FemtoUniverseTrackSelection::init(HistogramRegistry* registry)
318318
mHistogramRegistry->add((folderName + "/hTPCcrossedRows").c_str(), "; TPC crossed rows; Entries", kTH1F, {{163, 0, 163}});
319319
mHistogramRegistry->add((folderName + "/hTPCfindableVsCrossed").c_str(), ";TPC findable clusters ; TPC crossed rows;", kTH2F, {{163, 0, 163}, {163, 0, 163}});
320320
mHistogramRegistry->add((folderName + "/hTPCshared").c_str(), "; TPC shared clusters; Entries", kTH1F, {{163, -0.5, 162.5}});
321-
mHistogramRegistry->add((folderName + "/hTPCfracshared").c_str(), "; TPC fraction of shared clusters; Entries", kTH1F, {{100, 0.0, 100.0}});
321+
mHistogramRegistry->add((folderName + "/hTPCfractionSharedCls").c_str(), "; TPC fraction of shared clusters; Entries", kTH1F, {{100, 0.0, 100.0}});
322322
mHistogramRegistry->add((folderName + "/hITSclusters").c_str(), "; ITS clusters; Entries", kTH1F, {{10, -0.5, 9.5}});
323323
mHistogramRegistry->add((folderName + "/hITSclustersIB").c_str(), "; ITS clusters in IB; Entries", kTH1F, {{10, -0.5, 9.5}});
324324
mHistogramRegistry->add((folderName + "/hDCAxy").c_str(), "; #it{p}_{T} (GeV/#it{c}); DCA_{xy} (cm)", kTH2F, {{100, 0, 10}, {500, -5, 5}});

PWGDQ/Core/CutsLibrary.cxx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,17 @@ AnalysisCompositeCut* o2::aod::dqcuts::GetCompositeCut(const char* cutName)
834834
return cut;
835835
}
836836

837+
if (!nameStr.compare("protonPIDPV")) {
838+
cut->AddCut(GetAnalysisCut("protonPID_TPCnTOF2"));
839+
cut->AddCut(GetAnalysisCut("protonPVcut"));
840+
return cut;
841+
}
842+
843+
if (!nameStr.compare("protonPIDPV2")) {
844+
cut->AddCut(GetAnalysisCut("protonPID_TPCnTOF2"));
845+
return cut;
846+
}
847+
837848
if (!nameStr.compare("PrimaryTrack_DCAz")) {
838849
cut->AddCut(GetAnalysisCut("PrimaryTrack_DCAz"));
839850
return cut;
@@ -4539,6 +4550,17 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName)
45394550
return cut;
45404551
}
45414552

4553+
if (!nameStr.compare("protonPVcut")) {
4554+
cut->AddCut(VarManager::kTrackDCAxy, -0.1, 0.1);
4555+
cut->AddCut(VarManager::kTrackDCAz, -0.15, 0.15);
4556+
cut->AddCut(VarManager::kPt, 0.4, 3);
4557+
cut->AddCut(VarManager::kEta, -0.9, 0.9);
4558+
cut->AddCut(VarManager::kIsSPDany, 0.5, 1.5);
4559+
cut->AddCut(VarManager::kTPCchi2, 0.0, 4.0);
4560+
cut->AddCut(VarManager::kTPCncls, 80, 161.);
4561+
return cut;
4562+
}
4563+
45424564
if (!nameStr.compare("pidbasic")) {
45434565
cut->AddCut(VarManager::kEta, -0.9, 0.9);
45444566
cut->AddCut(VarManager::kTPCncls, 60, 161.);
@@ -5468,6 +5490,11 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName)
54685490
return cut;
54695491
}
54705492

5493+
if (!nameStr.compare("protonPID_TPCnTOF2")) {
5494+
cut->AddCut(VarManager::kTPCnSigmaPr, -2.5, 2.5);
5495+
return cut;
5496+
}
5497+
54715498
if (!nameStr.compare("tpc_pion_rejection")) {
54725499
TF1* f1maxPi = new TF1("f1maxPi", "[0]+[1]*x", 0, 10);
54735500
f1maxPi->SetParameters(85, -50);

PWGDQ/Tasks/tableReader_withAssoc.cxx

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,6 +1991,7 @@ struct AnalysisAsymmetricPairing {
19911991
Configurable<uint32_t> fConfigLegCFilterMask{"cfgLegCFilterMask", 0, "Filter mask corresponding to cuts in track-selection"};
19921992
Configurable<string> fConfigCommonTrackCuts{"cfgCommonTrackCuts", "", "Comma separated list of cuts to be applied to all legs"};
19931993
Configurable<string> fConfigPairCuts{"cfgPairCuts", "", "Comma separated list of pair cuts"};
1994+
Configurable<string> fConfigPairCutsJSON{"cfgPairCutsJSON", "", "Additional list of pair cuts in JSON format"};
19941995
Configurable<bool> fConfigSkipAmbiguousIdCombinations{"cfgSkipAmbiguousIdCombinations", true, "Choose whether to skip pairs/triples which pass a stricter combination of cuts, e.g. KKPi triplets for D+ -> KPiPi"};
19951996

19961997
Configurable<std::string> fConfigHistogramSubgroups{"cfgAsymmetricPairingHistogramsSubgroups", "barrel,vertexing", "Comma separated list of asymmetric-pairing histogram subgroups"};
@@ -2013,7 +2014,7 @@ struct AnalysisAsymmetricPairing {
20132014
HistogramManager* fHistMan;
20142015

20152016
std::map<int, std::vector<TString>> fTrackHistNames;
2016-
std::vector<AnalysisCompositeCut> fPairCuts;
2017+
std::vector<AnalysisCompositeCut*> fPairCuts;
20172018

20182019
// Filter masks to find legs in BarrelTrackCuts table
20192020
uint32_t fLegAFilterMask;
@@ -2058,13 +2059,31 @@ struct AnalysisAsymmetricPairing {
20582059
if (!cutNamesStr.IsNull()) {
20592060
std::unique_ptr<TObjArray> objArray(cutNamesStr.Tokenize(","));
20602061
for (int icut = 0; icut < objArray->GetEntries(); ++icut) {
2061-
fPairCuts.push_back(*dqcuts::GetCompositeCut(objArray->At(icut)->GetName()));
2062+
fPairCuts.push_back(dqcuts::GetCompositeCut(objArray->At(icut)->GetName()));
2063+
}
2064+
}
2065+
// Extra pair cuts via JSON
2066+
TString addPairCutsStr = fConfigPairCutsJSON.value;
2067+
if (addPairCutsStr != "") {
2068+
std::vector<AnalysisCut*> addPairCuts = dqcuts::GetCutsFromJSON(addPairCutsStr.Data());
2069+
for (auto& t : addPairCuts) {
2070+
fPairCuts.push_back((AnalysisCompositeCut*)t);
2071+
cutNamesStr += Form(",%s", t->GetName());
20622072
}
20632073
}
20642074
// Get the barrel track selection cuts
20652075
string tempCuts;
20662076
getTaskOptionValue<string>(context, "analysis-track-selection", "cfgTrackCuts", tempCuts, false);
20672077
TString tempCutsStr = tempCuts;
2078+
// check also the cuts added via JSON and add them to the string of cuts
2079+
getTaskOptionValue<string>(context, "analysis-track-selection", "cfgBarrelTrackCutsJSON", tempCuts, false);
2080+
TString addTrackCutsStr = tempCuts;
2081+
if (addTrackCutsStr != "") {
2082+
std::vector<AnalysisCut*> addTrackCuts = dqcuts::GetCutsFromJSON(addTrackCutsStr.Data());
2083+
for (auto& t : addTrackCuts) {
2084+
tempCutsStr += Form(",%s", t->GetName());
2085+
}
2086+
}
20682087
std::unique_ptr<TObjArray> objArray(tempCutsStr.Tokenize(","));
20692088
// Get the common leg cuts
20702089
int commonCutIdx;
@@ -2164,7 +2183,6 @@ struct AnalysisAsymmetricPairing {
21642183
fTrackHistNames[fNLegCuts + icut * fNCommonTrackCuts + iCommonCut] = names;
21652184
}
21662185

2167-
TString cutNamesStr = fConfigPairCuts.value;
21682186
if (!cutNamesStr.IsNull()) { // if pair cuts
21692187
std::unique_ptr<TObjArray> objArrayPair(cutNamesStr.Tokenize(","));
21702188
fNPairCuts = objArrayPair->GetEntries();
@@ -2431,9 +2449,9 @@ struct AnalysisAsymmetricPairing {
24312449
}
24322450
}
24332451
} // end loop (common cuts)
2434-
for (unsigned int iPairCut = 0; iPairCut < fPairCuts.size(); iPairCut++) {
2435-
AnalysisCompositeCut cut = fPairCuts.at(iPairCut);
2436-
if (!(cut.IsSelected(VarManager::fgValues))) // apply pair cuts
2452+
int iPairCut = 0;
2453+
for (auto cut = fPairCuts.begin(); cut != fPairCuts.end(); cut++, iPairCut++) {
2454+
if (!((*cut)->IsSelected(VarManager::fgValues))) // apply pair cuts
24372455
continue;
24382456
pairFilter |= (static_cast<uint32_t>(1) << iPairCut);
24392457
// Histograms with pair cuts
@@ -2607,11 +2625,10 @@ struct AnalysisAsymmetricPairing {
26072625
fHistMan->FillHistClass(histNames[fNLegCuts + icut * fNCommonTrackCuts + iCommonCut][0].Data(), VarManager::fgValues);
26082626
}
26092627
} // end loop (common cuts)
2610-
for (unsigned int iPairCut = 0; iPairCut < fPairCuts.size(); iPairCut++) {
2611-
AnalysisCompositeCut cut = fPairCuts.at(iPairCut);
2612-
if (!(cut.IsSelected(VarManager::fgValues))) { // apply pair cuts
2628+
int iPairCut = 0;
2629+
for (auto cut = fPairCuts.begin(); cut != fPairCuts.end(); cut++, iPairCut++) {
2630+
if (!((*cut)->IsSelected(VarManager::fgValues))) // apply pair cuts
26132631
continue;
2614-
}
26152632
// Histograms with pair cuts
26162633
fHistMan->FillHistClass(histNames[fNLegCuts * (fNCommonTrackCuts + 1) + icut * fNPairCuts + iPairCut][0].Data(), VarManager::fgValues);
26172634
// Histograms with pair cuts and common track cuts

0 commit comments

Comments
 (0)