Skip to content

Commit ce12bc8

Browse files
authored
[PWGJE,EMCAL-734] Add some QA histograms to correction task (#11415)
1 parent 58ea12d commit ce12bc8

File tree

2 files changed

+47
-30
lines changed

2 files changed

+47
-30
lines changed

PWGJE/TableProducer/emcalCorrectionTask.cxx

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ struct EmcalCorrectionTask {
9797
Configurable<bool> isMC{"isMC", false, "States if run over MC"};
9898
Configurable<bool> applyCellTimeCorrection{"applyCellTimeCorrection", true, "apply a correction to the cell time for data and MC: Shift both average cell times to 0 and smear MC time distribution to fit data better. For MC requires isMC to be true"};
9999
Configurable<float> trackMinPt{"trackMinPt", 0.3, "Minimum pT for tracks to perform track matching, to reduce computing time. Tracks below a certain pT will be loopers anyway."};
100+
Configurable<bool> fillQA{"fillQA", false, "Switch to turn on QA histograms."};
100101

101102
// Require EMCAL cells (CALO type 1)
102103
Filter emccellfilter = aod::calo::caloType == selectedCellType;
@@ -206,22 +207,26 @@ struct EmcalCorrectionTask {
206207
// Setup QA hists.
207208
// NOTE: This is not comprehensive.
208209
using O2HistType = o2::framework::HistType;
209-
o2::framework::AxisSpec energyAxis{200, 0., 100., "E (GeV)"},
210-
timeAxis{300, -100, 200., "t (ns)"},
211-
etaAxis{160, -0.8, 0.8, "#eta"},
212-
phiAxis{72, 0, 2 * 3.14159, "phi"},
213-
nlmAxis{50, -0.5, 49.5, "NLM"};
214-
mHistManager.add("hCellE", "hCellE", O2HistType::kTH1F, {energyAxis});
210+
o2::framework::AxisSpec energyAxis{200, 0., 100., "#it{E} (GeV)"},
211+
timeAxis{300, -100, 200., "#it{t} (ns)"},
212+
etaAxis{160, -0.8, 0.8, "#it{#eta}"},
213+
phiAxis{72, 0, 2 * 3.14159, "#it{#varphi} (rad)"},
214+
nlmAxis{50, -0.5, 49.5, "NLM"},
215+
fCrossAxis{100, 0., 1., "F_{+}"},
216+
sigmaLongAxis{100, 0., 1.0, "#sigma^{2}_{long}"},
217+
sigmaShortAxis{100, 0., 1.0, "#sigma^{2}_{short}"},
218+
nCellAxis{60, -0.5, 59.5, "#it{n}_{cells}"};
219+
mHistManager.add("hCellE", "hCellE", O2HistType::kTH1D, {energyAxis});
215220
mHistManager.add("hCellTowerID", "hCellTowerID", O2HistType::kTH1D, {{20000, 0, 20000}});
216221
mHistManager.add("hCellEtaPhi", "hCellEtaPhi", O2HistType::kTH2F, {etaAxis, phiAxis});
217222
mHistManager.add("hHGCellTimeEnergy", "hCellTime", O2HistType::kTH2F, {{300, -30, 30}, cellEnergyBins}); // Cell time vs energy for high gain cells (low energies)
218223
mHistManager.add("hLGCellTimeEnergy", "hCellTime", O2HistType::kTH2F, {{300, -30, 30}, cellEnergyBins}); // Cell time vs energy for low gain cells (high energies)
219224
// NOTE: Reversed column and row because it's more natural for presentation.
220225
mHistManager.add("hCellRowCol", "hCellRowCol;Column;Row", O2HistType::kTH2D, {{96, -0.5, 95.5}, {208, -0.5, 207.5}});
221-
mHistManager.add("hClusterE", "hClusterE", O2HistType::kTH1F, {energyAxis});
222-
mHistManager.add("hClusterNLM", "hClusterNLM", O2HistType::kTH1F, {nlmAxis});
226+
mHistManager.add("hClusterE", "hClusterE", O2HistType::kTH1D, {energyAxis});
227+
mHistManager.add("hClusterNLM", "hClusterNLM", O2HistType::kTH1D, {nlmAxis});
223228
mHistManager.add("hClusterEtaPhi", "hClusterEtaPhi", O2HistType::kTH2F, {etaAxis, phiAxis});
224-
mHistManager.add("hClusterTime", "hClusterTime", O2HistType::kTH1F, {timeAxis});
229+
mHistManager.add("hClusterTime", "hClusterTime", O2HistType::kTH1D, {timeAxis});
225230
mHistManager.add("hGlobalTrackEtaPhi", "hGlobalTrackEtaPhi", O2HistType::kTH2F, {etaAxis, phiAxis});
226231
mHistManager.add("hGlobalTrackMult", "hGlobalTrackMult", O2HistType::kTH1D, {{200, -0.5, 199.5, "N_{trk}"}});
227232
mHistManager.add("hCollisionType", "hCollisionType;;#it{count}", O2HistType::kTH1D, {{3, -0.5, 2.5}});
@@ -251,9 +256,15 @@ struct EmcalCorrectionTask {
251256
hBC->GetXaxis()->SetBinLabel(6, "no EMCal cells and with collision");
252257
hBC->GetXaxis()->SetBinLabel(7, "no EMCal cells and mult. collisions");
253258
hBC->GetXaxis()->SetBinLabel(8, "all BC");
254-
if (isMC) {
255-
mHistManager.add("hContributors", "hContributors;contributor per cell hit;#it{counts}", O2HistType::kTH1I, {{20, 0, 20}});
256-
mHistManager.add("hMCParticleEnergy", "hMCParticleEnergy;#it{E} (GeV/#it{c});#it{counts}", O2HistType::kTH1F, {energyAxis});
259+
if (isMC.value) {
260+
mHistManager.add("hContributors", "hContributors;contributor per cell hit;#it{counts}", O2HistType::kTH1D, {{20, 0, 20}});
261+
mHistManager.add("hMCParticleEnergy", "hMCParticleEnergy;#it{E} (GeV/#it{c});#it{counts}", O2HistType::kTH1D, {energyAxis});
262+
}
263+
if (fillQA.value) {
264+
mHistManager.add("hClusterNCellE", "hClusterNCellE", O2HistType::kTH2D, {energyAxis, nCellAxis});
265+
mHistManager.add("hClusterFCrossE", "hClusterFCrossE", O2HistType::kTH2D, {energyAxis, fCrossAxis});
266+
mHistManager.add("hClusterFCrossSigmaLongE", "hClusterFCrossSigmaLongE", O2HistType::kTH3F, {energyAxis, fCrossAxis, sigmaLongAxis});
267+
mHistManager.add("hClusterFCrossSigmaShortE", "hClusterFCrossSigmaShortE", O2HistType::kTH3F, {energyAxis, fCrossAxis, sigmaShortAxis});
257268
}
258269

259270
// For some runs, LG cells require an extra time shift of 2 * 8.8ns due to problems in the time calibration
@@ -721,6 +732,12 @@ struct EmcalCorrectionTask {
721732
mHistManager.fill(HIST("hClusterNLM"), cluster.getNExMax());
722733
mHistManager.fill(HIST("hClusterTime"), cluster.getClusterTime());
723734
mHistManager.fill(HIST("hClusterEtaPhi"), pos.Eta(), TVector2::Phi_0_2pi(pos.Phi()));
735+
if (fillQA.value) {
736+
mHistManager.fill(HIST("hClusterNCellE"), cluster.E(), cluster.getNCells());
737+
mHistManager.fill(HIST("hClusterFCrossE"), cluster.E(), cluster.getFCross());
738+
mHistManager.fill(HIST("hClusterFCrossSigmaLongE"), cluster.E(), cluster.getFCross(), cluster.getM02());
739+
mHistManager.fill(HIST("hClusterFCrossSigmaShortE"), cluster.E(), cluster.getFCross(), cluster.getM20());
740+
}
724741
if (indexMapPair && trackGlobalIndex) {
725742
for (unsigned int iTrack = 0; iTrack < std::get<0>(*indexMapPair)[iCluster].size(); iTrack++) {
726743
if (std::get<0>(*indexMapPair)[iCluster][iTrack] >= 0) {

PWGJE/Tasks/emcClusterMonitor.cxx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -100,31 +100,31 @@ struct ClusterMonitor {
100100
const AxisSpec thAxisCellTimeMean{1500, -600, 900, "#LT#it{t}_{cell}#GT (ns)"};
101101

102102
// event properties
103-
mHistManager.add("eventsAll", "Number of events", o2HistType::kTH1F, {{1, 0.5, 1.5}});
104-
mHistManager.add("eventsSelected", "Number of events", o2HistType::kTH1F, {{1, 0.5, 1.5}});
105-
mHistManager.add("eventBCAll", "Bunch crossing ID of event (all events)", o2HistType::kTH1F, {bcAxis});
106-
mHistManager.add("eventBCSelected", "Bunch crossing ID of event (selected events)", o2HistType::kTH1F, {bcAxis});
107-
mHistManager.add("eventVertexZAll", "z-vertex of event (all events)", o2HistType::kTH1F, {{200, -20, 20}});
108-
mHistManager.add("eventVertexZSelected", "z-vertex of event (selected events)", o2HistType::kTH1F, {{200, -20, 20}});
109-
mHistManager.add("numberOfClustersEvents", "number of clusters per event (selected events)", o2HistType::kTH1F, {numberClustersAxis});
110-
mHistManager.add("numberOfClustersBC", "number of clusters per bunch crossing (ambiguous BCs)", o2HistType::kTH1F, {numberClustersAxis});
111-
mHistManager.add("numberOfClustersEventsRejected", "number of clusters per event (rejected events)", o2HistType::kTH1F, {numberClustersAxis});
103+
mHistManager.add("eventsAll", "Number of events", o2HistType::kTH1D, {{1, 0.5, 1.5}});
104+
mHistManager.add("eventsSelected", "Number of events", o2HistType::kTH1D, {{1, 0.5, 1.5}});
105+
mHistManager.add("eventBCAll", "Bunch crossing ID of event (all events)", o2HistType::kTH1D, {bcAxis});
106+
mHistManager.add("eventBCSelected", "Bunch crossing ID of event (selected events)", o2HistType::kTH1D, {bcAxis});
107+
mHistManager.add("eventVertexZAll", "z-vertex of event (all events)", o2HistType::kTH1D, {{200, -20, 20}});
108+
mHistManager.add("eventVertexZSelected", "z-vertex of event (selected events)", o2HistType::kTH1D, {{200, -20, 20}});
109+
mHistManager.add("numberOfClustersEvents", "number of clusters per event (selected events)", o2HistType::kTH1D, {numberClustersAxis});
110+
mHistManager.add("numberOfClustersBC", "number of clusters per bunch crossing (ambiguous BCs)", o2HistType::kTH1D, {numberClustersAxis});
111+
mHistManager.add("numberOfClustersEventsRejected", "number of clusters per event (rejected events)", o2HistType::kTH1D, {numberClustersAxis});
112112
mHistManager.add("numberOfClustersSMEvents", "number of clusters per supermodule per event (selected events)", o2HistType::kTH2F, {numberClustersAxis, {20, -0.5, 19.5, "SupermoduleID"}});
113113
mHistManager.add("numberOfClustersSMBC", "number of clusters per supermodule per bunch crossing (ambiguous BCs)", o2HistType::kTH2F, {numberClustersAxis, {20, -0.5, 19.5, "SupermoduleID"}});
114114

115115
// cluster properties (matched clusters)
116-
mHistManager.add("clusterE", "Energy of cluster", o2HistType::kTH1F, {energyAxis});
117-
mHistManager.add("clusterEMatched", "Energy of cluster (with match)", o2HistType::kTH1F, {energyAxis});
116+
mHistManager.add("clusterE", "Energy of cluster", o2HistType::kTH1D, {energyAxis});
117+
mHistManager.add("clusterEMatched", "Energy of cluster (with match)", o2HistType::kTH1D, {energyAxis});
118118
mHistManager.add("clusterESupermodule", "Energy of the cluster vs. supermoduleID", o2HistType::kTH2F, {energyAxis, supermoduleAxis});
119-
mHistManager.add("clusterE_SimpleBinning", "Energy of cluster", o2HistType::kTH1F, {{2000, 0, 200}});
119+
mHistManager.add("clusterE_SimpleBinning", "Energy of cluster", o2HistType::kTH1D, {{2000, 0, 200}});
120120
mHistManager.add("clusterEtaPhi", "Eta and phi of cluster", o2HistType::kTH2F, {{100, -1, 1}, {100, 0, 2 * TMath::Pi()}});
121-
mHistManager.add("clusterM02", "M02 of cluster", o2HistType::kTH1F, {{400, 0, 5}});
122-
mHistManager.add("clusterM20", "M20 of cluster", o2HistType::kTH1F, {{400, 0, 2.5}});
123-
mHistManager.add("clusterNLM", "Number of local maxima of cluster", o2HistType::kTH1I, {{10, 0, 10}});
124-
mHistManager.add("clusterNCells", "Number of cells in cluster", o2HistType::kTH1I, {{50, 0, 50}});
125-
mHistManager.add("clusterDistanceToBadChannel", "Distance to bad channel", o2HistType::kTH1F, {{100, 0, 100}});
121+
mHistManager.add("clusterM02", "M02 of cluster", o2HistType::kTH1D, {{400, 0, 5}});
122+
mHistManager.add("clusterM20", "M20 of cluster", o2HistType::kTH1D, {{400, 0, 2.5}});
123+
mHistManager.add("clusterNLM", "Number of local maxima of cluster", o2HistType::kTH1D, {{10, 0, 10}});
124+
mHistManager.add("clusterNCells", "Number of cells in cluster", o2HistType::kTH1D, {{50, 0, 50}});
125+
mHistManager.add("clusterDistanceToBadChannel", "Distance to bad channel", o2HistType::kTH1D, {{100, 0, 100}});
126126
mHistManager.add("clusterTimeVsE", "Cluster time vs energy", o2HistType::kTH2F, {timeAxis, energyAxis});
127-
mHistManager.add("clusterAmpFractionLeadingCell", "Fraction of energy in leading cell", o2HistType::kTH1F, {{100, 0, 1}});
127+
mHistManager.add("clusterAmpFractionLeadingCell", "Fraction of energy in leading cell", o2HistType::kTH1D, {{100, 0, 1}});
128128
mHistManager.add("clusterCellTimeDiff", "Cell time difference in clusters", o2HistType::kTH1D, {thAxisCellTimeDiff});
129129
mHistManager.add("clusterCellTimeMean", "Mean cell time per cluster", o2HistType::kTH1D, {thAxisCellTimeMean});
130130

0 commit comments

Comments
 (0)