Skip to content

Commit df9a1dc

Browse files
clean up comments, add event sel in processTrackSelectionHistograms, fix types of configurables
1 parent c483f3a commit df9a1dc

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

PWGJE/Tasks/trackEfficiency.cxx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ struct TrackEfficiency {
9090
// systematics variation - Run 2 guidelines: https://twiki.cern.ch/twiki/bin/view/ALICE/AliDPGtoolsTrackSystematicUncertainty
9191
TrackSelection customTrackSelection;
9292
Configurable<bool> useCustomTrackSelection{"useCustomTrackSelection", false, "whether to use the custom cuts (used for cut variation for tracking efficiency systematics)"};
93-
Configurable<float> effSystMinNCrossedRowsTPC{"effSystMinNCrossedRowsTPC", 70, "min number of crossed rows TPC"};
93+
Configurable<int> effSystMinNCrossedRowsTPC{"effSystMinNCrossedRowsTPC", 70, "min number of crossed rows TPC"};
9494
Configurable<float> effSystMinNCrossedRowsOverFindableClustersTPC{"effSystMinNCrossedRowsOverFindableClustersTPC", 0.8, "min ratio of crossed rows over findable clusters TPC"};
9595
Configurable<float> effSystMaxChi2PerClusterTPC{"effSystMaxChi2PerClusterTPC", 4.0, "max chi2 per cluster TPC"};
9696
Configurable<float> effSystMaxChi2PerClusterITS{"effSystMaxChi2PerClusterITS", 36.0, "max chi2 per cluster ITS"};
9797
// Configurable<float> effSystMaxDcaXY{"effSystMaxDcaXY", 0.0105 * 0.035 / pT^1.1 ????, "max DCA to vertex xy"}; not including this for now as it's a function with 3 parameters
9898
Configurable<float> effSystMaxDcaZ{"effSystMaxDcaZ", 2.0, "max DCA to vertex z"};
99-
Configurable<float> effSystMinNrequiredHits{"effSystMinNrequiredHits", 1, "minimum number of hits among the 3 innermost layers of the ITS"};
99+
Configurable<int> effSystMinNrequiredHits{"effSystMinNrequiredHits", 1, "minimum number of hits among the 3 innermost layers of the ITS"};
100100

101101
std::vector<int> eventSelectionBits;
102102
int trackSelection = -1;
@@ -200,10 +200,9 @@ struct TrackEfficiency {
200200
LOGP(info, "\trequireITS= true");
201201
LOGP(info, "\trequireTPC= true");
202202

203-
// customTrackSelection = getGlobalTrackSelectionRun3ITSMatch(itsPattern.value); does this need to be setup?
204203
LOGP(info, "Customizing track selection:");
205204
int dcaSetup = 0; // default dca setup
206-
customTrackSelection = getGlobalTrackSelectionRun3ITSMatch(TrackSelection::GlobalTrackRun3ITSMatching::Run3ITSibAny, dcaSetup); // takes global tracks configuration, then edit some cuts
205+
customTrackSelection = getGlobalTrackSelectionRun3ITSMatch(TrackSelection::GlobalTrackRun3ITSMatching::Run3ITSibAny, dcaSetup); // takes global tracks configuration, then some of the cuts are edited in the lines below
207206
customTrackSelection.SetEtaRange(-999, 999);
208207
customTrackSelection.SetPtRange(0, 1e10f);
209208

@@ -358,14 +357,14 @@ struct TrackEfficiency {
358357
registry.add("h_trackselplot_chi2ncls_tpc", "track selection variable: Chi2 / cluster for the TPC track segment", {HistType::kTH1F, {{100, 0.0, 10.0}}});
359358
registry.add("h_trackselplot_chi2ncls_its", "track selection variable: Chi2 / cluster for the ITS track segment", {HistType::kTH1F, {{200, 0.0, 40.0}}});
360359
registry.add("h_trackselplot_dcaxy", "track selection variable: dca XY", {HistType::kTH1F, {{1000, -1.0, 1.0}}});
361-
registry.add("h_trackselplot_dcaz", "track selection variable: dca Z", {HistType::kTH1F, {{1000, -1.0, 1.0}}});
360+
registry.add("h_trackselplot_dcaz", "track selection variable: dca Z", {HistType::kTH1F, {{4000, -4.0, 4.0}}});
362361

363362
registry.add("h2_trackselplot_pt_tpccrossedrows", "track selection variable: pt vs number of tpc crossed rows", {HistType::kTH2F, {{200, 0., 200.}, {165, -0.5, 164.5}}});
364363
registry.add("h2_trackselplot_pt_tpccrossedrowsoverfindable", "track selection variable: pt vs ratio of of tpc crossed rows over number of findable clusters", {HistType::kTH2F, {{200, 0., 200.}, {120, 0.0, 1.2}}});
365364
registry.add("h2_trackselplot_pt_chi2ncls_tpc", "track selection variable: pt vs Chi2 / cluster for the TPC track segment", {HistType::kTH2F, {{200, 0., 200.}, {100, 0.0, 10.0}}});
366365
registry.add("h2_trackselplot_pt_chi2ncls_its", "track selection variable: pt vs Chi2 / cluster for the ITS track segment", {HistType::kTH2F, {{200, 0., 200.}, {200, 0.0, 40.0}}});
367366
registry.add("h2_trackselplot_pt_dcaxy", "track selection variable: pt vs dca XY", {HistType::kTH2F, {{200, 0., 200.}, {1000, -1.0, 1.0}}});
368-
registry.add("h2_trackselplot_pt_dcaz", "track selection variable: pt vs dca Z", {HistType::kTH2F, {{200, 0., 200.}, {1000, -1.0, 1.0}}});
367+
registry.add("h2_trackselplot_pt_dcaz", "track selection variable: pt vs dca Z", {HistType::kTH2F, {{200, 0., 200.}, {4000, -4.0, 4.0}}});
369368
}
370369
}
371370

@@ -387,8 +386,7 @@ struct TrackEfficiency {
387386
// missing:
388387
// * constexpr auto hasCentrality = CollisionMCRecTableCentFT0C::template contains<aod::CentFT0Cs>();
389388
// if constexpr (hasCentrality) {
390-
// * dividing in centrality bins
391-
// I should maybe introduce the sel8 cuts on the collisoins (reco, but what about mccoll? maybe not htat way included in efficiency)
389+
// At the moment, are only counted mc particles from mc collisions that have at least one reconstructed collision that passes the chosen event selection. Thus, the reconstruction efficiency of mccollision is not counted in this tracking efficiency.
392390

393391
registry.fill(HIST("hMcCollCutsCounts"), 0.5); // all mcCollisions
394392

@@ -569,8 +567,7 @@ struct TrackEfficiency {
569567
// missing:
570568
// * constexpr auto hasCentrality = CollisionMCRecTableCentFT0C::template contains<aod::CentFT0Cs>();
571569
// if constexpr (hasCentrality) {
572-
// * dividing in centrality bins
573-
// I should maybe introduce the sel8 cuts on the collisoins (reco, but what about mccoll? maybe not htat way included in efficiency)
570+
// At the moment, are only counted mc particles from mc collisions that have at least one reconstructed collision that passes the chosen event selection. Thus, the reconstruction efficiency of mccollision is not counted in this tracking efficiency.
574571

575572
registry.fill(HIST("hMcCollCutsCounts"), 0.5, mcCollision.weight()); // all mcCollisions
576573

@@ -1110,8 +1107,11 @@ struct TrackEfficiency {
11101107
}
11111108
PROCESS_SWITCH(TrackEfficiency, processMcCollisionsWeighted, "QA for McCollisions in weighted MC", false);
11121109

1113-
void processTrackSelectionHistograms(soa::Join<aod::Tracks, aod::TracksExtra, o2::aod::TracksDCA>::iterator const& track)
1114-
{ // should probably select collisions
1110+
void processTrackSelectionHistograms(soa::Join<aod::Tracks, aod::TracksExtra, o2::aod::TracksDCA>::iterator const& track, aod::JetCollisions const&)
1111+
{
1112+
if (!jetderiveddatautilities::selectCollision(track.collision_as<aod::JetCollisions>(), eventSelectionBits, skipMBGapEvents)) { // Skipping MC events that have not a single selected reconstructed collision ; effect unclear if mcColl is split
1113+
return;
1114+
}
11151115
registry.fill(HIST("h_trackselplot_tpccrossedrows"), track.tpcNClsCrossedRows());
11161116
registry.fill(HIST("h_trackselplot_tpccrossedrowsoverfindable"), track.tpcCrossedRowsOverFindableCls());
11171117
registry.fill(HIST("h_trackselplot_chi2ncls_tpc"), track.tpcChi2NCl());

0 commit comments

Comments
 (0)