Skip to content

Commit 55119f5

Browse files
authored
Merge branch 'AliceO2Group:master' into master
2 parents 27f6b66 + 69ab055 commit 55119f5

31 files changed

Lines changed: 2251 additions & 948 deletions

ALICE3/DataModel/OTFRICH.h

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,42 @@ DECLARE_SOA_COLUMN(NSigmaMuonRich, nSigmaMuonRich, float); //! NSigma mu
3131
DECLARE_SOA_COLUMN(NSigmaPionRich, nSigmaPionRich, float); //! NSigma pion BarrelRich
3232
DECLARE_SOA_COLUMN(NSigmaKaonRich, nSigmaKaonRich, float); //! NSigma kaon BarrelRich
3333
DECLARE_SOA_COLUMN(NSigmaProtonRich, nSigmaProtonRich, float); //! NSigma proton BarrelRich
34+
DECLARE_SOA_DYNAMIC_COLUMN(NSigmaRich, nSigmaRich, //! General function to get the nSigma for the RICH
35+
[](const float el,
36+
const float mu,
37+
const float pi,
38+
const float ka,
39+
const float pr,
40+
const int id) -> float {
41+
switch (std::abs(id)) {
42+
case 0:
43+
return el;
44+
case 1:
45+
return mu;
46+
case 2:
47+
return pi;
48+
case 3:
49+
return ka;
50+
case 4:
51+
return pr;
52+
default:
53+
LOG(fatal) << "Unrecognized PDG code for RICH";
54+
return 999.f;
55+
}
56+
});
57+
3458
} // namespace upgrade_rich
3559
DECLARE_SOA_TABLE(UpgradeRichs, "AOD", "UPGRADERICH",
3660
upgrade_rich::NSigmaElectronRich,
3761
upgrade_rich::NSigmaMuonRich,
3862
upgrade_rich::NSigmaPionRich,
3963
upgrade_rich::NSigmaKaonRich,
40-
upgrade_rich::NSigmaProtonRich);
64+
upgrade_rich::NSigmaProtonRich,
65+
upgrade_rich::NSigmaRich<upgrade_rich::NSigmaElectronRich,
66+
upgrade_rich::NSigmaMuonRich,
67+
upgrade_rich::NSigmaPionRich,
68+
upgrade_rich::NSigmaKaonRich,
69+
upgrade_rich::NSigmaProtonRich>);
4170

4271
using UpgradeRich = UpgradeRichs::iterator;
4372

ALICE3/DataModel/OTFTOF.h

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,53 @@ DECLARE_SOA_COLUMN(OuterTOFExpectedTimeMu, outerTOFExpectedTimeMu, float); //! R
6161
DECLARE_SOA_COLUMN(OuterTOFExpectedTimePi, outerTOFExpectedTimePi, float); //! Reconstructed expected time at the OuterTOF for the Pion mass hypotheses
6262
DECLARE_SOA_COLUMN(OuterTOFExpectedTimeKa, outerTOFExpectedTimeKa, float); //! Reconstructed expected time at the OuterTOF for the Kaon mass hypotheses
6363
DECLARE_SOA_COLUMN(OuterTOFExpectedTimePr, outerTOFExpectedTimePr, float); //! Reconstructed expected time at the OuterTOF for the Proton mass hypotheses
64+
DECLARE_SOA_DYNAMIC_COLUMN(NSigmaInnerTOF, nSigmaInnerTOF, //! General function to get the nSigma for the InnerTOF
65+
[](const float el,
66+
const float mu,
67+
const float pi,
68+
const float ka,
69+
const float pr,
70+
const int id) -> float {
71+
switch (std::abs(id)) {
72+
case 0:
73+
return el;
74+
case 1:
75+
return mu;
76+
case 2:
77+
return pi;
78+
case 3:
79+
return ka;
80+
case 4:
81+
return pr;
82+
default:
83+
LOG(fatal) << "Unrecognized PDG code for InnerTOF";
84+
return 999.f;
85+
}
86+
});
87+
DECLARE_SOA_DYNAMIC_COLUMN(NSigmaOuterTOF, nSigmaOuterTOF, //! General function to get the nSigma for the OuterTOF
88+
[](const float el,
89+
const float mu,
90+
const float pi,
91+
const float ka,
92+
const float pr,
93+
const int id) -> float {
94+
switch (std::abs(id)) {
95+
case 0:
96+
return el;
97+
case 1:
98+
return mu;
99+
case 2:
100+
return pi;
101+
case 3:
102+
return ka;
103+
case 4:
104+
return pr;
105+
default:
106+
LOG(fatal) << "Unrecognized PDG code for InnerTOF";
107+
return 999.f;
108+
}
109+
});
110+
64111
} // namespace upgrade_tof
65112

66113
DECLARE_SOA_TABLE(UpgradeTofMCs, "AOD", "UPGRADETOFMC",
@@ -85,7 +132,17 @@ DECLARE_SOA_TABLE(UpgradeTofs, "AOD", "UPGRADETOF",
85132
upgrade_tof::NSigmaKaonOuterTOF,
86133
upgrade_tof::NSigmaProtonOuterTOF,
87134
upgrade_tof::OuterTOFTrackTimeReco,
88-
upgrade_tof::OuterTOFTrackLengthReco);
135+
upgrade_tof::OuterTOFTrackLengthReco,
136+
upgrade_tof::NSigmaInnerTOF<upgrade_tof::NSigmaElectronInnerTOF,
137+
upgrade_tof::NSigmaMuonInnerTOF,
138+
upgrade_tof::NSigmaPionInnerTOF,
139+
upgrade_tof::NSigmaKaonInnerTOF,
140+
upgrade_tof::NSigmaProtonInnerTOF>,
141+
upgrade_tof::NSigmaOuterTOF<upgrade_tof::NSigmaElectronOuterTOF,
142+
upgrade_tof::NSigmaMuonOuterTOF,
143+
upgrade_tof::NSigmaPionOuterTOF,
144+
upgrade_tof::NSigmaKaonOuterTOF,
145+
upgrade_tof::NSigmaProtonOuterTOF>);
89146

90147
DECLARE_SOA_TABLE(UpgradeTofExpectedTimes, "AOD", "UPGRADETOFEXPT",
91148
upgrade_tof::InnerTOFExpectedTimeEl,

ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ struct OnTheFlyRichPid {
325325
if (lut.value != "inherit") {
326326
return;
327327
}
328-
if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut.name, lut.value, true)) {
328+
if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut, false)) {
329329
LOG(fatal) << "Could not get " << lut.name << " from on-the-fly-tracker task";
330330
}
331331
};

ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ struct OnTheFlyTofPid {
145145
if (lut.value != "inherit") {
146146
return;
147147
}
148-
if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut.name, lut.value, true)) {
148+
if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut, false)) {
149149
LOG(fatal) << "Could not get " << lut.name << " from on-the-fly-tracker task";
150150
}
151151
};

DPG/Tasks/AOTTrack/qaEfficiency.cxx

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ struct QaEfficiency {
231231
Configurable<bool> doPtEta{"doPtEta", false, "Flag to produce the efficiency vs pT and Eta"};
232232
Configurable<bool> doPtRadius{"doPtRadius", false, "Flag to produce the efficiency vs pT and Radius"};
233233
Configurable<int> applyEvSel{"applyEvSel", 0, "Flag to apply event selection: 0 -> no event selection, 1 -> Run 2 event selection, 2 -> Run 3 event selection"};
234+
Configurable<bool> applyTimeFrameBorderCut{"applyTimeFrameBorderCut", false, "Flag to apply the TF border cut"};
234235
// Custom track cuts for debug purposes
235236
TrackSelection customTrackCuts;
236237
struct : ConfigurableGroup {
@@ -264,6 +265,7 @@ struct QaEfficiency {
264265
using CollisionCandidatesMC = o2::soa::Join<CollisionCandidates, o2::aod::McCollisionLabels>;
265266
using TrackCandidates = o2::soa::Join<o2::aod::Tracks, o2::aod::TracksExtra, o2::aod::TrackSelection, o2::aod::TrackSelectionExtension, o2::aod::TracksDCA>;
266267
using TrackCandidatesMC = o2::soa::Join<TrackCandidates, o2::aod::McTrackLabels>;
268+
using BCsInfo = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels>;
267269

268270
// Histograms
269271
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
@@ -972,6 +974,7 @@ struct QaEfficiency {
972974

973975
histos.get<TH1>(HIST("eventSelection"))->GetXaxis()->SetBinLabel(3, "Passed Contrib.");
974976
histos.get<TH1>(HIST("eventSelection"))->GetXaxis()->SetBinLabel(4, "Passed Position");
977+
histos.get<TH1>(HIST("eventSelection"))->GetXaxis()->SetBinLabel(5, "Passed Time Frame border cut");
975978

976979
if (doprocessMC) {
977980
histos.add("MC/generatedCollisions", "Generated Collisions", kTH1D, {{10, 0.5, 10.5, "Generated collisions"}});
@@ -1265,7 +1268,7 @@ struct QaEfficiency {
12651268
for (const auto& mother : mothers) {
12661269
for (const auto& pdgToCheck : mothersPDGs.value) {
12671270
if (mother.pdgCode() == pdgToCheck) {
1268-
motherIsAccepted = true; // Mother matches the list of specified PDGs
1271+
motherIsAccepted = true; // Mother matches the list of specified PDGs
12691272
hPtmotherGenerated[histogramIndex]->Fill(mother.pt()); // Fill generated pT for mother
12701273
break;
12711274
}
@@ -1454,6 +1457,12 @@ struct QaEfficiency {
14541457
if constexpr (doFillHistograms) {
14551458
histos.fill(HIST("eventSelection"), 4);
14561459
}
1460+
if (applyTimeFrameBorderCut && !collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) {
1461+
return false;
1462+
}
1463+
if constexpr (doFillHistograms) {
1464+
histos.fill(HIST("eventSelection"), 5);
1465+
}
14571466
return true;
14581467
}
14591468

@@ -1743,7 +1752,8 @@ struct QaEfficiency {
17431752
// o2::soa::SmallGroups<CollisionCandidatesMC> const& collisions,
17441753
CollisionCandidatesMC const& collisions,
17451754
TrackCandidatesMC const& tracks,
1746-
o2::aod::McParticles const& mcParticles)
1755+
o2::aod::McParticles const& mcParticles,
1756+
BCsInfo const&)
17471757
{
17481758

17491759
/// loop over generated collisions
@@ -1874,6 +1884,13 @@ struct QaEfficiency {
18741884
continue;
18751885
}
18761886
}
1887+
// apply time-frame border cut also to the generated collision
1888+
if (applyTimeFrameBorderCut) {
1889+
auto bc = mcCollision.bc_as<BCsInfo>();
1890+
if (!bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) {
1891+
continue;
1892+
}
1893+
}
18771894
}
18781895

18791896
/// only to fill denominator of ITS-TPC matched primary tracks only in MC events with at least 1 reco. vtx
@@ -1922,6 +1939,13 @@ struct QaEfficiency {
19221939
continue;
19231940
}
19241941
}
1942+
// apply time-frame border cut also to the generated collision
1943+
if (applyTimeFrameBorderCut) {
1944+
auto bc = mcCollision.bc_as<BCsInfo>();
1945+
if (!bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) {
1946+
continue;
1947+
}
1948+
}
19251949

19261950
// Loop on particles to fill the denominator
19271951
float dNdEta = 0; // Multiplicity
@@ -1976,7 +2000,8 @@ struct QaEfficiency {
19762000
void processMCWithoutCollisions(TrackCandidatesMC const& tracks,
19772001
o2::aod::Collisions const&,
19782002
o2::aod::McParticles const& mcParticles,
1979-
o2::aod::McCollisions const&)
2003+
o2::aod::McCollisions const&,
2004+
BCsInfo const&)
19802005
{
19812006
// Track loop
19822007
for (const auto& track : tracks) {
@@ -2028,6 +2053,14 @@ struct QaEfficiency {
20282053
continue;
20292054
}
20302055
}
2056+
// apply time-frame border cut also to the generated collision
2057+
if (applyTimeFrameBorderCut) {
2058+
const auto mcCollision = mcParticle.mcCollision();
2059+
auto bc = mcCollision.bc_as<BCsInfo>();
2060+
if (!bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) {
2061+
continue;
2062+
}
2063+
}
20312064

20322065
// search for particles from HF decays
20332066
if (keepOnlyHfParticles && !RecoDecay::getCharmHadronOrigin(mcParticles, mcParticle, /*searchUpToQuark*/ true)) {

PWGDQ/Core/HistogramsLibrary.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
524524
hm->AddHistogram(histClass, "TPCnSigPi_pIN", "TPC n-#sigma(#pi) vs pIN", false, nbins_pIN, pIN_bins, VarManager::kPin, nbins_nSigma, nSigma_bins, VarManager::kTPCnSigmaPi);
525525
hm->AddHistogram(histClass, "TPCnSigKa_pIN", "TPC n-#sigma(K) vs pIN", false, nbins_pIN, pIN_bins, VarManager::kPin, nbins_nSigma, nSigma_bins, VarManager::kTPCnSigmaKa);
526526
hm->AddHistogram(histClass, "TPCnSigPr_pIN", "TPC n-#sigma(p) vs pIN", false, nbins_pIN, pIN_bins, VarManager::kPin, nbins_nSigma, nSigma_bins, VarManager::kTPCnSigmaPr);
527-
if (subGroupStr.Contains("tpcpid_fine_Corr")) {
527+
if (subGroupStr.Contains("tpcpid_fine_corr")) {
528528
hm->AddHistogram(histClass, "TPCnSigEl_Corr_pIN", "TPC n-#sigma(e) Corr. vs pIN", false, nbins_pIN, pIN_bins, VarManager::kPin, nbins_nSigma, nSigma_bins, VarManager::kTPCnSigmaEl_Corr);
529529
hm->AddHistogram(histClass, "TPCnSigPi_Corr_pIN", "TPC n-#sigma(#pi) Corr. vs pIN", false, nbins_pIN, pIN_bins, VarManager::kPin, nbins_nSigma, nSigma_bins, VarManager::kTPCnSigmaPi_Corr);
530530
hm->AddHistogram(histClass, "TPCnSigPr_Corr_pIN", "TPC n-#sigma(p) Corr. vs pIN", false, nbins_pIN, pIN_bins, VarManager::kPin, nbins_nSigma, nSigma_bins, VarManager::kTPCnSigmaPr_Corr);
@@ -559,13 +559,13 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
559559
hm->AddHistogram(histClass, "TPCnSigPr_pIN", "TPC n-#sigma(p) vs pIN", false, 100, 0.0, 10.0, VarManager::kPin, 100, -5.0, 5.0, VarManager::kTPCnSigmaPr);
560560
hm->AddHistogram(histClass, "TPCnSigPr_timeFromSOR", "TPC n-#sigma(p) vs time from SOR", true, 10000, 0.0, 1000.0, VarManager::kTimeFromSOR, 10, -5.0, 5.0, VarManager::kTPCnSigmaPr);
561561
hm->AddHistogram(histClass, "TPCnSigPr_occupancy", "TPC n-#sigma(p) vs. occupancy", false, 200, 0., 20000., VarManager::kTrackOccupancyInTimeRange, 100, -5.0, 5.0, VarManager::kTPCnSigmaPr);
562-
if (subGroupStr.Contains("tpcpid_Corr")) {
562+
if (subGroupStr.Contains("tpcpid_corr")) {
563563
hm->AddHistogram(histClass, "TPCnSigEl_Corr_pIN", "TPC n-#sigma(e) Corr. vs pIN", false, 100, 0.0, 10.0, VarManager::kPin, 100, -5.0, 5.0, VarManager::kTPCnSigmaEl_Corr);
564564
hm->AddHistogram(histClass, "TPCnSigPi_Corr_pIN", "TPC n-#sigma(#pi) Corr. vs pIN", false, 100, 0.0, 10.0, VarManager::kPin, 100, -5.0, 5.0, VarManager::kTPCnSigmaPi_Corr);
565565
hm->AddHistogram(histClass, "TPCnSigKa_Corr_pIN", "TPC n-#sigma(K) Corr. vs pIN", false, 100, 0.0, 10.0, VarManager::kPin, 100, -5.0, 5.0, VarManager::kTPCnSigmaKa_Corr);
566566
hm->AddHistogram(histClass, "TPCnSigPr_Corr_pIN", "TPC n-#sigma(p) Corr. vs pIN", false, 100, 0.0, 10.0, VarManager::kPin, 100, -5.0, 5.0, VarManager::kTPCnSigmaPr_Corr);
567567
}
568-
if (subGroupStr.Contains("tpcpid_nSigEl")) {
568+
if (subGroupStr.Contains("tpcpid_nsigel")) {
569569
hm->AddHistogram(histClass, "TPCnSigEl_TPCnSigPi", "TPC n-#sigma(e) . vs TPC n-#sigma(#pi)", false, 100, -5.0, 5.0, VarManager::kTPCnSigmaEl, 100, -5.0, 5.0, VarManager::kTPCnSigmaPi);
570570
hm->AddHistogram(histClass, "TPCnSigEl_TPCnSigKa", "TPC n-#sigma(e) . vs TPC n-#sigma(K)", false, 100, -5.0, 5.0, VarManager::kTPCnSigmaEl, 100, -5.0, 5.0, VarManager::kTPCnSigmaKa);
571571
hm->AddHistogram(histClass, "TPCnSigEl_TPCnSigPr", "TPC n-#sigma(e) . vs TPC n-#sigma(p)", false, 100, -5.0, 5.0, VarManager::kTPCnSigmaEl, 100, -5.0, 5.0, VarManager::kTPCnSigmaPr);

0 commit comments

Comments
 (0)