Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions DPG/Tasks/AOTTrack/qaImpPar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
Configurable<int> nCustomMinITShits{"n_customMinITShits", 0, "Minimum number of layers crossed by a track among those in \"customITShitmap\""};
Configurable<bool> customForceITSTPCmatching{"custom_forceITSTPCmatching", false, "Consider or not only ITS-TPC macthed tracks when using custom ITS hitmap"};
Configurable<float> downsamplingFraction{"downsamplingFraction", 1.1, "Fraction of tracks to be used to fill the output objects"};
Configurable<int> eventGeneratorHF{"eventGeneratorHF", -1, "If positive, enable event selection using subGeneratorId information (HF). The value indicates which events to keep (0 = MB, 4 = charm triggered, 5 = beauty triggered)"};

/// Custom cut selection objects
TrackSelection selector_ITShitmap;
Expand All @@ -128,11 +129,11 @@
// with Run 3 Reco/MC enable '--isRun3 1' option
Filter trackFilter = (trackSelection.node() == 0) ||
((trackSelection.node() == 1) && requireGlobalTrackInFilter()) || /// filterbit 4 track selections + tight DCA cuts
((trackSelection.node() == 2) && requireGlobalTrackWoPtEtaInFilter()) ||

Check failure on line 132 in DPG/Tasks/AOTTrack/qaImpPar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
((trackSelection.node() == 3) && requireGlobalTrackWoDCAInFilter()) ||

Check failure on line 133 in DPG/Tasks/AOTTrack/qaImpPar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
((trackSelection.node() == 4) && requireQualityTracksInFilter()) ||

Check failure on line 134 in DPG/Tasks/AOTTrack/qaImpPar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
((trackSelection.node() == 5) && requireTrackCutInFilter(TrackSelectionFlags::kInAcceptanceTracks)) ||

Check failure on line 135 in DPG/Tasks/AOTTrack/qaImpPar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
((trackSelection.node() == 6) && requireTrackCutInFilter(TrackSelectionFlags::kGlobalTrackWoDCAxy));

Check failure on line 136 in DPG/Tasks/AOTTrack/qaImpPar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
// Pt selection
Filter ptMinFilter = o2::aod::track::pt > ptMin;

Expand Down Expand Up @@ -201,6 +202,12 @@
const o2::aod::McCollisions&,
o2::aod::BCsWithTimestamps const&)
{
/// SubgeneratorID check for HF MC
/// Useful to select MB gap events in HF-dedicated MC productions
if (eventGeneratorHF >= 0 && collision.mcCollision().getSubGeneratorId() != eventGeneratorHF) {
return;
}

/// here call the template processReco function
auto bc = collision.bc_as<o2::aod::BCsWithTimestamps>();
processReco<true, false>(collision, tracksUnfiltered, tracks, tracksIU, mcParticles, bc);
Expand All @@ -216,6 +223,12 @@
const o2::aod::McCollisions&,
o2::aod::BCsWithTimestamps const&)
{
/// SubgeneratorID check for HF MC
/// Useful to select MB gap events in HF-dedicated MC productions
if (eventGeneratorHF >= 0 && collision.mcCollision().getSubGeneratorId() != eventGeneratorHF) {
return;
}

/// here call the template processReco function
auto bc = collision.bc_as<o2::aod::BCsWithTimestamps>();
processReco<true, true>(collision, tracksUnfiltered, tracks, tracksIU, mcParticles, bc);
Expand Down Expand Up @@ -341,8 +354,8 @@
const AxisSpec trackNSigmaTOFProtonAxis{20, -10.f, 10.f, "Number of #sigma TOF proton"};
AxisSpec trackPDGAxis{5, -1.5f, 3.5f, "species (-1: not matched, 0: unknown, 1: pi, 2: K, 3: p)"};
if (fEnableNuclei) {
trackPDGAxis.nBins = 9;

Check failure on line 357 in DPG/Tasks/AOTTrack/qaImpPar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
trackPDGAxis.binEdges[1] = 7.5;

Check failure on line 358 in DPG/Tasks/AOTTrack/qaImpPar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
trackPDGAxis.title = "species (-1: not matched, 0: unknown, 1: pi, 2: K, 3: p, 4: d, 5: t, 6: he3, 7: alpha)";
}

Expand Down Expand Up @@ -372,7 +385,7 @@
histograms.add("Reco/h4ImpParPulls", "", kTHnSparseD, {trackPtAxis, trackImpParRPhiPullsAxis, trackEtaAxis, trackPhiAxis, trackPDGAxis, trackChargeAxis, axisVertexNumContrib, trackIsPvContrib});
histograms.add("Reco/h4ImpParZPulls", "", kTHnSparseD, {trackPtAxis, trackImpParZPullsAxis, trackEtaAxis, trackPhiAxis, trackPDGAxis, trackChargeAxis, axisVertexNumContrib, trackIsPvContrib});
}
isPIDPionApplied = ((nSigmaTPCPionMin > -10.001 && nSigmaTPCPionMax < 10.001) || (nSigmaTOFPionMin > -10.001 && nSigmaTOFPionMax < 10.001));

Check failure on line 388 in DPG/Tasks/AOTTrack/qaImpPar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (isPIDPionApplied) {
if (addTrackIUinfo) {
histograms.add("Reco/h4ClusterSizeIU_Pion", "", kTHnSparseD, {trackPaxis, trackImpParRPhiAxis, trackIUposXaxis, trackIUposYaxis, trackIUposZaxis, trackIUclusterSize});
Expand All @@ -380,7 +393,7 @@
histograms.add("Reco/h4ImpPar_Pion", "", kTHnSparseD, {trackPtAxis, trackImpParRPhiAxis, trackEtaAxis, trackPhiAxis, trackPDGAxis, trackChargeAxis, axisVertexNumContrib, trackIsPvContrib});
histograms.add("Reco/h4ImpParZ_Pion", "", kTHnSparseD, {trackPtAxis, trackImpParZAxis, trackEtaAxis, trackPhiAxis, trackPDGAxis, trackChargeAxis, axisVertexNumContrib, trackIsPvContrib});
}
isPIDKaonApplied = ((nSigmaTPCKaonMin > -10.001 && nSigmaTPCKaonMax < 10.001) || (nSigmaTOFKaonMin > -10.001 && nSigmaTOFKaonMax < 10.001));

Check failure on line 396 in DPG/Tasks/AOTTrack/qaImpPar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (isPIDKaonApplied) {
if (addTrackIUinfo) {
histograms.add("Reco/h4ClusterSizeIU_Kaon", "", kTHnSparseD, {trackPaxis, trackImpParRPhiAxis, trackIUposXaxis, trackIUposYaxis, trackIUposZaxis, trackIUclusterSize});
Expand All @@ -388,7 +401,7 @@
histograms.add("Reco/h4ImpPar_Kaon", "", kTHnSparseD, {trackPtAxis, trackImpParRPhiAxis, trackEtaAxis, trackPhiAxis, trackPDGAxis, trackChargeAxis, axisVertexNumContrib, trackIsPvContrib});
histograms.add("Reco/h4ImpParZ_Kaon", "", kTHnSparseD, {trackPtAxis, trackImpParZAxis, trackEtaAxis, trackPhiAxis, trackPDGAxis, trackChargeAxis, axisVertexNumContrib, trackIsPvContrib});
}
isPIDProtonApplied = ((nSigmaTPCProtonMin > -10.001 && nSigmaTPCProtonMax < 10.001) || (nSigmaTOFProtonMin > -10.001 && nSigmaTOFProtonMax < 10.001));

Check failure on line 404 in DPG/Tasks/AOTTrack/qaImpPar.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (isPIDProtonApplied) {
if (addTrackIUinfo) {
histograms.add("Reco/h4ClusterSizeIU_Proton", "", kTHnSparseD, {trackPaxis, trackImpParRPhiAxis, trackIUposXaxis, trackIUposYaxis, trackIUposZaxis, trackIUclusterSize});
Expand Down
Loading