@@ -1540,18 +1540,37 @@ struct tofSpectra {
15401540
15411541 if (!mcParticle.isPhysicalPrimary ()) {
15421542 if (mcParticle.getProcess () == 4 ) {
1543- histos.fill (HIST (hpt_num_str[i]), track.pt (), multiplicity, track.dcaXY ());
1543+ if (includeCentralityMC) {
1544+ histos.fill (HIST (hpt_num_str[i]), track.pt (), multiplicity, track.dcaXY ());
1545+ } else {
1546+ histos.fill (HIST (hpt_num_str[i]), track.pt (), multiplicity);
1547+ }
15441548 if (track.hasTOF ()) {
1545- histos.fill (HIST (hpt_numtof_str[i]), track.pt (), multiplicity, track.dcaXY ());
1549+ if (includeCentralityMC) {
1550+ histos.fill (HIST (hpt_numtof_str[i]), track.pt (), multiplicity, track.dcaXY ());
1551+ } else {
1552+ histos.fill (HIST (hpt_numtof_str[i]), track.pt (), multiplicity);
1553+ }
15461554 }
15471555 } else {
1548- histos.fill (HIST (hpt_num_mat[i]), track.pt (), multiplicity, track.dcaXY ());
1549- if (track.hasTOF ()) {
1550- histos.fill (HIST (hpt_numtof_mat[i]), track.pt (), multiplicity, track.dcaXY ());
1556+ if (includeCentralityMC) {
1557+ histos.fill (HIST (hpt_num_mat[i]), track.pt (), multiplicity, track.dcaXY ());
1558+ if (track.hasTOF ()) {
1559+ histos.fill (HIST (hpt_numtof_mat[i]), track.pt (), multiplicity, track.dcaXY ());
1560+ }
1561+ } else {
1562+ histos.fill (HIST (hpt_num_mat[i]), track.pt (), multiplicity);
1563+ if (track.hasTOF ()) {
1564+ histos.fill (HIST (hpt_numtof_mat[i]), track.pt (), multiplicity);
1565+ }
15511566 }
15521567 }
15531568 } else {
1554- histos.fill (HIST (hpt_num_prm[i]), track.pt (), multiplicity, track.dcaXY ());
1569+ if (includeCentralityMC) {
1570+ histos.fill (HIST (hpt_num_prm[i]), track.pt (), multiplicity, track.dcaXY ());
1571+ } else {
1572+ histos.fill (HIST (hpt_num_prm[i]), track.pt (), multiplicity);
1573+ }
15551574 if (track.hasTRD () && trkselOptions.lastRequiredTrdCluster > 0 ) {
15561575 int lastLayer = 0 ;
15571576 for (int l = 7 ; l >= 0 ; l--) {
@@ -1565,7 +1584,11 @@ struct tofSpectra {
15651584 }
15661585 }
15671586 if (track.hasTOF ()) {
1568- histos.fill (HIST (hpt_numtof_prm[i]), track.pt (), multiplicity, track.dcaXY ());
1587+ if (includeCentralityMC) {
1588+ histos.fill (HIST (hpt_numtof_prm[i]), track.pt (), multiplicity, track.dcaXY ());
1589+ } else {
1590+ histos.fill (HIST (hpt_numtof_prm[i]), track.pt (), multiplicity);
1591+ }
15691592 if (!(track.mcMask () & (1 << 11 ))) {
15701593 if (includeCentralityMC) {
15711594 histos.fill (HIST (hpt_numtofgoodmatch_prm[i]), track.pt (), multiplicity, track.eta ()); // RD
0 commit comments