Skip to content

Commit a84c643

Browse files
committed
Fix binning
1 parent 5621318 commit a84c643

1 file changed

Lines changed: 10 additions & 15 deletions

File tree

‎PWGJE/Tasks/trackEfficiency.cxx‎

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,9 @@ struct TrackEfficiency {
6969
Configurable<float> centralityMax{"centralityMax", 999, ""};
7070
Configurable<float> vertexZCut{"vertexZCut", 10.0f, "Accepted z-vertex range"};
7171
Configurable<float> trackDcaZmax{"trackDcaZmax", 99, "additional cut on dcaZ to PV for tracks; uniformTracks in particular don't cut on this at all"};
72-
Configurable<float> ptHighEffMax{"ptHighEffMax", 100., "maximum pT in efficiency histograms for high pT (lower limit set by upper limit for low pT)"};
72+
Configurable<float> ptHighEffMax{"ptHighEffMax", 100., "maximum pT in efficiency histograms for high pT (minimum is set by upper limit of ptLowEffBinning parameter)"};
7373
Configurable<int> ptHighEffNBins{"ptHighEffNBins", 18, "number of pt bins in efficiency histograms for high pT"};
74-
ConfigurableAxis lowPtEffBinning{"lowPtEffBinning", {
75-
200,
76-
0.,
77-
10.,
78-
},
79-
"binning of low pT axis in efficiency histograms"};
74+
ConfigurableAxis ptLowEffBinning{"ptLowEffBinning", {200, 0., 10.}, "binning of low pT axis in efficiency histograms"};
8075

8176
// Track QA process function configurables:
8277
Configurable<float> trackQAEtaMin{"trackQAEtaMin", -0.9, "minimum eta acceptance for tracks in the processTracks QA"};
@@ -86,7 +81,7 @@ struct TrackEfficiency {
8681
Configurable<int> trackOccupancyInTimeRangeMax{"trackOccupancyInTimeRangeMax", 999999, "maximum occupancy of tracks in neighbouring collisions in a given time range; only applied for reconstructed tracks, not mc particles"};
8782
Configurable<int> trackOccupancyInTimeRangeMin{"trackOccupancyInTimeRangeMin", -999999, "minimum occupancy of tracks in neighbouring collisions in a given time range; only applied for reconstructed tracks, not mc particles"};
8883

89-
ConfigurableAxis centBinning{"centBinning", {VARIABLE_WIDTH, 0., 10., 50., 70., 100}, "binning of centrality histograms"};
84+
ConfigurableAxis centralityBinning{"centralityBinning", {VARIABLE_WIDTH, 0., 10., 50., 70., 100}, "binning of centrality histograms"};
9085
ConfigurableAxis intRateBinning{"intRateBinning", {50, 0., 50000.0}, "binning for interaction rate axis"};
9186
ConfigurableAxis phiEffBinning{"phiEffBinning", {200, -1., 7.}, "binning for phi axis in efficiency histograms"};
9287
ConfigurableAxis etaEffBinning{"etaEffBinning", {200, -1., 1.}, "binning for eta axis in efficiency histograms"};
@@ -254,11 +249,11 @@ struct TrackEfficiency {
254249
LOGP(info, "Using standard track selection: %s", trackSelections.value);
255250
}
256251

257-
AxisSpec ptAxisEff = {lowPtEffBinning, "#it{p}_{T} (GeV/#it{c})"};
258-
AxisSpec ptAxisHighEff = {ptHighEffNBins, ptAxisEff.binEdges[-1], ptHighEffMax, "#it{p}_{T} (GeV/#it{c})"};
252+
AxisSpec ptAxisEff = {ptLowEffBinning, "#it{p}_{T} (GeV/#it{c})"};
253+
AxisSpec ptAxisHighEff = {ptHighEffNBins, ptAxisEff.binEdges.back(), ptHighEffMax, "#it{p}_{T} (GeV/#it{c})"};
259254
AxisSpec etaAxisEff{etaEffBinning, "#eta"};
260255
AxisSpec phiAxisEff{phiEffBinning, "#phi"};
261-
AxisSpec centAxis = {centBinning, "centrality (%)"};
256+
AxisSpec centAxis = {centralityBinning, "centrality (%)"};
262257
AxisSpec intRateAxis = {intRateBinning, "int. rate (kHz)"};
263258
AxisSpec occupancyAxis = {140, -0.5, 13999.5, "occupancy"};
264259
AxisSpec nTracksAxis = {16001, -1., 16000, "n tracks"};
@@ -610,7 +605,8 @@ struct TrackEfficiency {
610605
registry.fill(HIST("h3_particle_pt_high_particle_eta_particle_phi_associatedtrack_nonprimary"), jMcParticleFromTrack.pt(), jMcParticleFromTrack.eta(), jMcParticleFromTrack.phi());
611606

612607
if (std::find(seenMcParticlesVector.begin(), seenMcParticlesVector.end(), jMcParticleFromTrack.globalIndex()) != seenMcParticlesVector.end()) {
613-
// particle matches to two tracks so it appears again in this loop over tracks, these histograms keep track of the extra entries from this duplication
608+
// occasionally, one particle can match to two reconstructed tracks
609+
// since this particle will appear again in this loop over tracks, these histograms keep track of the extra entries from this duplication
614610
registry.fill(HIST("h3_track_pt_track_eta_track_phi_associatedtrack_split_nonprimary"), track.pt(), track.eta(), track.phi());
615611
registry.fill(HIST("h3_particle_pt_particle_eta_particle_phi_associatedtrack_split_nonprimary"), jMcParticleFromTrack.pt(), jMcParticleFromTrack.eta(), jMcParticleFromTrack.phi());
616612

@@ -634,9 +630,8 @@ struct TrackEfficiency {
634630
registry.fill(HIST("h2_particle_pt_high_track_pt_high_residual_associatedtrack_primary"), jMcParticleFromTrack.pt(), (jMcParticleFromTrack.pt() - track.pt()) / jMcParticleFromTrack.pt());
635631

636632
if (std::find(seenMcParticlesVector.begin(), seenMcParticlesVector.end(), jMcParticleFromTrack.globalIndex()) != seenMcParticlesVector.end()) {
637-
// particle matches to two tracks so it appears again in this loop over tracks, these histograms keep track of the extra entries from this duplication
638-
// doesn't overlap with the previous std::find call since we looked at non-physical primaries before and now we are only looking at physical primaries
639-
// to get a histogram corrected for the duplication (e.g. for efficiency/resolution studies), you should subtract these histograms below from the corresponding histograms above
633+
// same as above, but doesn't overlap with the previous std::find call since we looked at non-physical primaries before and now we are only looking at physical primaries
634+
// to get a histogram corrected for the duplication (e.g. for efficiency/resolution studies), you should subtract these histograms below from the corresponding histograms right before this if block
640635
registry.fill(HIST("h3_track_pt_track_eta_track_phi_associatedtrack_split_primary"), track.pt(), track.eta(), track.phi());
641636
registry.fill(HIST("h3_particle_pt_particle_eta_particle_phi_associatedtrack_split_primary"), jMcParticleFromTrack.pt(), jMcParticleFromTrack.eta(), jMcParticleFromTrack.phi());
642637

0 commit comments

Comments
 (0)