Skip to content

Commit e22a573

Browse files
authored
[EMCAL-670] emcalCorrectionTask - add time resolution histogram (AliceO2Group#8137)
1 parent 0f02029 commit e22a573

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

PWGJE/TableProducer/emcalCorrectionTask.cxx

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ struct EmcalCorrectionTask {
7575
Configurable<int> selectedCellType{"selectedCellType", 1, "EMCAL Cell type"};
7676
Configurable<std::string> clusterDefinitions{"clusterDefinition", "kV3Default", "cluster definition to be selected, e.g. V3Default. Multiple definitions can be specified separated by comma"};
7777
Configurable<float> maxMatchingDistance{"maxMatchingDistance", 0.4f, "Max matching distance track-cluster"};
78-
Configurable<bool> hasPropagatedTracks{"hasPropagatedTracks", false, "temporary flag, only set to true when running over data which has the tracks propagated to EMCal/PHOS!"};
7978
Configurable<std::string> nonlinearityFunction{"nonlinearityFunction", "DATA_TestbeamFinal", "Nonlinearity correction at cluster level"};
8079
Configurable<bool> disableNonLin{"disableNonLin", false, "Disable NonLin correction if set to true"};
8180
Configurable<bool> hasShaperCorrection{"hasShaperCorrection", true, "Apply correction for shaper saturation"};
@@ -179,26 +178,27 @@ struct EmcalCorrectionTask {
179178
etaAxis{160, -0.8, 0.8, "#eta"},
180179
phiAxis{72, 0, 2 * 3.14159, "phi"};
181180
mHistManager.add("hCellE", "hCellE", o2HistType::kTH1F, {energyAxis});
182-
mHistManager.add("hCellTowerID", "hCellTowerID", o2HistType::kTH1I, {{20000, 0, 20000}});
181+
mHistManager.add("hCellTowerID", "hCellTowerID", o2HistType::kTH1D, {{20000, 0, 20000}});
183182
mHistManager.add("hCellEtaPhi", "hCellEtaPhi", o2HistType::kTH2F, {etaAxis, phiAxis});
184183
// NOTE: Reversed column and row because it's more natural for presentation.
185-
mHistManager.add("hCellRowCol", "hCellRowCol;Column;Row", o2HistType::kTH2I, {{97, 0, 97}, {600, 0, 600}});
184+
mHistManager.add("hCellRowCol", "hCellRowCol;Column;Row", o2HistType::kTH2D, {{97, 0, 97}, {600, 0, 600}});
186185
mHistManager.add("hClusterE", "hClusterE", o2HistType::kTH1F, {energyAxis});
187186
mHistManager.add("hClusterEtaPhi", "hClusterEtaPhi", o2HistType::kTH2F, {etaAxis, phiAxis});
188187
mHistManager.add("hGlobalTrackEtaPhi", "hGlobalTrackEtaPhi", o2HistType::kTH2F, {etaAxis, phiAxis});
189-
mHistManager.add("hGlobalTrackMult", "hGlobalTrackMult", o2HistType::kTH1I, {{200, -0.5, 199.5, "N_{trk}"}});
190-
mHistManager.add("hCollisionType", "hCollisionType;;#it{count}", o2HistType::kTH1I, {{3, -0.5, 2.5}});
188+
mHistManager.add("hGlobalTrackMult", "hGlobalTrackMult", o2HistType::kTH1D, {{200, -0.5, 199.5, "N_{trk}"}});
189+
mHistManager.add("hCollisionType", "hCollisionType;;#it{count}", o2HistType::kTH1D, {{3, -0.5, 2.5}});
191190
auto hCollisionType = mHistManager.get<TH1>(HIST("hCollisionType"));
192191
hCollisionType->GetXaxis()->SetBinLabel(1, "no collision");
193192
hCollisionType->GetXaxis()->SetBinLabel(2, "normal collision");
194193
hCollisionType->GetXaxis()->SetBinLabel(3, "mult. collisions");
195-
mHistManager.add("hClusterType", "hClusterType;;#it{count}", o2HistType::kTH1I, {{3, -0.5, 2.5}});
194+
mHistManager.add("hClusterType", "hClusterType;;#it{count}", o2HistType::kTH1D, {{3, -0.5, 2.5}});
196195
auto hClusterType = mHistManager.get<TH1>(HIST("hClusterType"));
197196
hClusterType->GetXaxis()->SetBinLabel(1, "no collision");
198197
hClusterType->GetXaxis()->SetBinLabel(2, "normal collision");
199198
hClusterType->GetXaxis()->SetBinLabel(3, "mult. collisions");
200-
mHistManager.add("hCollPerBC", "hCollPerBC;#it{N}_{coll.};#it{count}", o2HistType::kTH1I, {{100, -0.5, 99.5}});
199+
mHistManager.add("hCollPerBC", "hCollPerBC;#it{N}_{coll.};#it{count}", o2HistType::kTH1D, {{100, -0.5, 99.5}});
201200
mHistManager.add("hBC", "hBC;;#it{count}", o2HistType::kTH1D, {{8, -0.5, 7.5}});
201+
mHistManager.add("hCollisionTimeReso", "hCollisionTimeReso;#Delta t_{coll};#it{count}", o2HistType::kTH1D, {{2000, 0, 2000}});
202202
auto hBC = mHistManager.get<TH1>(HIST("hBC"));
203203
hBC->GetXaxis()->SetBinLabel(1, "with EMCal cells");
204204
hBC->GetXaxis()->SetBinLabel(2, "with EMCal cells but no collision");
@@ -284,6 +284,7 @@ struct EmcalCorrectionTask {
284284
// dummy loop to get the first collision
285285
for (const auto& col : collisionsInFoundBC) {
286286
if (col.foundBCId() == bc.globalIndex()) {
287+
mHistManager.fill(HIST("hCollisionTimeReso"), col.collisionTimeRes());
287288
mHistManager.fill(HIST("hCollPerBC"), 1);
288289
mHistManager.fill(HIST("hCollisionType"), 1);
289290
math_utils::Point3D<float> vertex_pos = {col.posX(), col.posY(), col.posZ()};
@@ -719,18 +720,10 @@ struct EmcalCorrectionTask {
719720
continue;
720721
}
721722
NTrack++;
722-
if (hasPropagatedTracks) { // only temporarily while not every data
723-
// has the tracks propagated to EMCal/PHOS
724-
trackPhi.emplace_back(TVector2::Phi_0_2pi(track.trackPhiEmcal()));
725-
trackEta.emplace_back(track.trackEtaEmcal());
726-
mHistManager.fill(HIST("hGlobalTrackEtaPhi"), track.trackEtaEmcal(),
727-
TVector2::Phi_0_2pi(track.trackPhiEmcal()));
728-
} else {
729-
trackPhi.emplace_back(TVector2::Phi_0_2pi(track.phi()));
730-
trackEta.emplace_back(track.eta());
731-
mHistManager.fill(HIST("hGlobalTrackEtaPhi"), track.eta(),
732-
TVector2::Phi_0_2pi(track.phi()));
733-
}
723+
trackPhi.emplace_back(TVector2::Phi_0_2pi(track.trackPhiEmcal()));
724+
trackEta.emplace_back(track.trackEtaEmcal());
725+
mHistManager.fill(HIST("hGlobalTrackEtaPhi"), track.trackEtaEmcal(),
726+
TVector2::Phi_0_2pi(track.trackPhiEmcal()));
734727
trackGlobalIndex.emplace_back(track.globalIndex());
735728
}
736729
mHistManager.fill(HIST("hGlobalTrackMult"), NTrack);

0 commit comments

Comments
 (0)