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
132 changes: 61 additions & 71 deletions PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
Configurable<int> minNclusterMft{"minNclusterMft", 5,
"minimum number of MFT clusters"};
Configurable<double> minPt{"minPt", 0., "minimum pT of the MFT tracks"};
Configurable<bool> requireCA{

Check warning on line 97 in PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"requireCA", false, "Use Cellular Automaton track-finding algorithm"};
Configurable<float> maxDCAxy{"maxDCAxy", 2.0f, "Cut on dcaXY"};
} trackCuts;
Expand All @@ -103,24 +103,24 @@
Configurable<float> maxZvtx{"maxZvtx", 10.0f, "Cut on z-vtx"};
Configurable<bool> useZDiffCut{"useZDiffCut", false,
"use Zvtx reco-mc diff. cut"};
Configurable<float> maxZvtxDiff{

Check warning on line 106 in PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"maxZvtxDiff", 1.0f,
"max allowed Z vtx difference for reconstruced collisions (cm)"};
Configurable<bool> requireNoCollInTimeRangeStd{

Check warning on line 109 in PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"requireNoCollInTimeRangeStd", false,
"reject collisions corrupted by the cannibalism, with other collisions "
"within +/- 10 microseconds"};
Configurable<bool> requireNoCollInTimeRangeNarrow{

Check warning on line 113 in PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"requireNoCollInTimeRangeNarrow", false,
"reject collisions corrupted by the cannibalism, with other collisions "
"within +/- 10 microseconds"};
Configurable<uint> occupancyEstimator{

Check warning on line 117 in PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"occupancyEstimator", 1,
"Occupancy estimator: 1 = trackOccupancyInTimeRange, 2 = "
"ft0cOccupancyInTimeRange"};
Configurable<float> minOccupancy{

Check warning on line 121 in PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"minOccupancy", -1, "minimum occupancy from neighbouring collisions"};
Configurable<float> maxOccupancy{

Check warning on line 123 in PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"maxOccupancy", -1, "maximum occupancy from neighbouring collisions"};
Configurable<float> minIR{"minIR", -1, "minimum IR (kHz) collisions"};
Configurable<float> maxIR{"maxIR", -1, "maximum IR (kHz) collisions"};
Expand All @@ -131,7 +131,7 @@
1000.0f, 1500.0f, 2000.0f, 3000.0f, 4500.0f,
6000.0f, 8000.0f, 10000.0f, 50000.0f},
"Occupancy"};
ConfigurableAxis centralityBins{

Check warning on line 134 in PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"centralityBins",
{VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100},
"Centrality"};
Expand Down Expand Up @@ -522,15 +522,19 @@
"; p_{T} (GeV/c); #eta; occupancy",
{HistType::kTHnSparseF,
{ptAxis, etaAxis, occupancyAxis}}});
qaregistry.add({"Tracks/hPtEtaEffRec",
qaregistry.add({"Tracks/hPtEtaEffPrim",
"; p_{T} (GeV/c); #eta; occupancy",
{HistType::kTHnSparseF,
{ptAxis, etaAxis, occupancyAxis}}});
qaregistry.add({"Tracks/hPtEtaEffDuplicates",
qaregistry.add({"Tracks/hPtEtaEffSec",
"; p_{T} (GeV/c); #eta; occupancy",
{HistType::kTHnSparseF,
{ptAxis, etaAxis, occupancyAxis}}});
qaregistry.add({"Tracks/hPtEtaEffGenDuplicates",
qaregistry.add({"Tracks/hPtEtaEffGenDupl",
"; p_{T} (GeV/c); #eta; occupancy",
{HistType::kTHnSparseF,
{ptAxis, etaAxis, occupancyAxis}}});
qaregistry.add({"Tracks/hPtEtaEffDupl",
"; p_{T} (GeV/c); #eta; occupancy",
{HistType::kTHnSparseF,
{ptAxis, etaAxis, occupancyAxis}}});
Expand All @@ -547,19 +551,25 @@
{HistType::kTHnSparseF,
{ptAxis, etaAxis, centralityAxis, occupancyAxis}}});
qaregistry.add(
{"Tracks/Centrality/hPtEtaEffRec",
{"Tracks/Centrality/hPtEtaEffPrim",
"; p_{T} (GeV/c); #eta; centrality; "
"occupancy",
{HistType::kTHnSparseF,
{ptAxis, etaAxis, centralityAxis, occupancyAxis}}});
qaregistry.add(
{"Tracks/Centrality/hPtEtaEffDuplicates",
{"Tracks/Centrality/hPtEtaEffSec",
"; p_{T} (GeV/c); #eta; Z_{vtx} (cm); centrality; "
"occupancy",
{HistType::kTHnSparseF,
{ptAxis, etaAxis, centralityAxis, occupancyAxis}}});
qaregistry.add(
{"Tracks/Centrality/hPtEtaEffGenDuplicates",
{"Tracks/Centrality/hPtEtaEffGenDupl",
"; p_{T} (GeV/c); #eta; centrality; "
"occupancy",
{HistType::kTHnSparseF,
{ptAxis, etaAxis, centralityAxis, occupancyAxis}}});
qaregistry.add(
{"Tracks/Centrality/hPtEtaEffDupl",
"; p_{T} (GeV/c); #eta; centrality; "
"occupancy",
{HistType::kTHnSparseF,
Expand Down Expand Up @@ -1298,7 +1308,7 @@

float cgen = -1;
if constexpr (has_reco_cent<C>) {
float crec_min = 105.f;

Check warning on line 1311 in PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

Use lowerCamelCase for names of functions and variables.
for (const auto& collision : collisions) {
if (isGoodEvent<false>(collision)) {
float c = getRecoCent(collision);
Expand Down Expand Up @@ -1501,7 +1511,7 @@
bool gtZeroColl = false;
float cgen = -1;
if constexpr (has_reco_cent<C>) {
float crec_min = 105.f;

Check warning on line 1514 in PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

Use lowerCamelCase for names of functions and variables.
for (const auto& collision : collisions) {
if (isGoodEvent<false>(collision)) {
float c = getRecoCent(collision);
Expand Down Expand Up @@ -1702,31 +1712,6 @@
auto occrec = getOccupancy(collision, eventCuts.occupancyEstimator);
auto mcCollision = collision.mcCollision();

float cgen = -1;
if constexpr (has_reco_cent<C>) {
float crec_min = 105.f;
for (const auto& collision : collisions) {
if (isGoodEvent<false>(collision)) {
float c = getRecoCent(collision);
if (c < crec_min) {
crec_min = c;
}
}
}
if (cgen < 0)
cgen = crec_min;
}

float occgen = -1.;
for (const auto& collision : collisions) {
if (isGoodEvent<false>(collision)) {
float o = getOccupancy(collision, eventCuts.occupancyEstimator);
if (o > occgen) {
occgen = o;
}
}
}

auto partsPerCol = primariesI->sliceByCached(
aod::mcparticle::mcCollisionId, mcCollision.globalIndex(), cache);
partsPerCol.bindExternalIndices(&tracks);
Expand All @@ -1738,68 +1723,73 @@

// MC gen
if constexpr (has_reco_cent<C>) {
qaregistry.fill(HIST("Tracks/Centrality/hPtEtaEffGen"),
particle.pt(), particle.eta(),
cgen, occgen);
if (particle.eta() > trackCuts.minEta && particle.eta() < trackCuts.maxEta) {
if (std::abs(mcCollision.posZ()) < eventCuts.maxZvtx) {
qaregistry.fill(HIST("Tracks/Centrality/hPtEtaEffGen"), particle.pt(), particle.eta(), crec, occrec);
}
}
} else {
qaregistry.fill(HIST("Tracks/hPtEtaEffGen"), particle.pt(),
particle.eta(),
occgen);
if (particle.eta() > trackCuts.minEta && particle.eta() < trackCuts.maxEta) {
if (std::abs(mcCollision.posZ()) < eventCuts.maxZvtx) {
qaregistry.fill(HIST("Tracks/hPtEtaEffGen"), particle.pt(), particle.eta(), occrec);
}
}
}
// MC rec
if (particle.has_mfttracks()) {
auto iscounted = false;
auto ncnt = 0;
auto relatedTracks =
particle.template mfttracks_as<MFTTracksLabeled>();
auto relatedTracks = particle.template mfttracks_as<MFTTracksLabeled>();
for (auto const& track : relatedTracks) {
if (!isTrackSelected(track)) {
continue;
}
++ncnt;
if constexpr (has_reco_cent<C>) {
if (!iscounted) { // primaries
qaregistry.fill(HIST("Tracks/Centrality/hPtEtaEffRec"),
particle.pt(), particle.eta(),
crec, occrec);
iscounted = true;
if (track.eta() > trackCuts.minEta && track.eta() < trackCuts.maxEta) {
if (!iscounted) { // primaries
if (std::abs(mcCollision.posZ()) < eventCuts.maxZvtx) {
qaregistry.fill(HIST("Tracks/Centrality/hPtEtaEffPrim"), particle.pt(), particle.eta(), crec, occrec);
}
iscounted = true;
}
}
if (ncnt > 1) { // duplicates
qaregistry.fill(
HIST("Tracks/Centrality/hPtEtaEffDuplicates"),
particle.pt(), particle.eta(),
crec, occrec);
if (ncnt > 1) { // secondaries
if (track.eta() > trackCuts.minEta && track.eta() < trackCuts.maxEta) {
qaregistry.fill(HIST("Tracks/Centrality/hPtEtaEffSec"), particle.pt(), particle.eta(), crec, occrec);
}
}
} else {
if (!iscounted) { // primaries
qaregistry.fill(HIST("Tracks/hPtEtaEffRec"),
particle.pt(), particle.eta(),
occrec);
iscounted = true;
if (track.eta() > trackCuts.minEta && track.eta() < trackCuts.maxEta) {
if (!iscounted) { // primaries
if (std::abs(mcCollision.posZ()) < eventCuts.maxZvtx) {
qaregistry.fill(HIST("Tracks/hPtEtaEffPrim"), particle.pt(), particle.eta(), occrec);
}
iscounted = true;
}
}
if (ncnt > 1) { // duplicates
qaregistry.fill(HIST("Tracks/hPtEtaEffDuplicates"),
particle.pt(), particle.eta(),
occrec);
if (ncnt > 1) { // secondaries
if (track.eta() > trackCuts.minEta && track.eta() < trackCuts.maxEta) {
qaregistry.fill(HIST("Tracks/hPtEtaEffSec"), particle.pt(), particle.eta(), occrec);
}
}
}
}

if constexpr (has_reco_cent<C>) {
qaregistry.fill(HIST("Tracks/Centrality/NmftTrkPerPart"), ncnt,
crec, occrec);
qaregistry.fill(HIST("Tracks/Centrality/NmftTrkPerPart"), ncnt, crec, occrec);
} else {
qaregistry.fill(HIST("Tracks/NmftTrkPerPart"), ncnt, occrec);
}
if (relatedTracks.size() > 1) {

if (relatedTracks.size() > 1) { // duplicates
if constexpr (has_reco_cent<C>) {
qaregistry.fill(
HIST("Tracks/Centrality/hPtEtaEffGenDuplicates"),
particle.pt(), particle.eta(),
crec, occrec);
qaregistry.fill(HIST("Tracks/Centrality/hPtEtaEffGenDupl"), particle.pt(), particle.eta(), crec, occrec);
for (auto const& track : relatedTracks) {
qaregistry.fill(HIST("Tracks/Centrality/hPtEtaEffDupl"), track.pt(), track.eta(), crec, occrec);
}
} else {
qaregistry.fill(HIST("Tracks/hPtEtaEffGenDuplicates"),
particle.pt(), particle.eta(),
occrec);
qaregistry.fill(HIST("Tracks/hPtEtaEffGenDupl"), particle.pt(), particle.eta(), occrec);
for (auto const& track : relatedTracks) {
qaregistry.fill(HIST("Tracks/hPtEtaEffDupl"), track.pt(), track.eta(), occrec);
}
}
}
}
Expand Down
Loading