Skip to content

Commit f87d5ff

Browse files
authored
Update aQCMFTTracks.cxx
1 parent f02fe25 commit f87d5ff

File tree

1 file changed

+30
-16
lines changed

1 file changed

+30
-16
lines changed

DPG/Tasks/MFT/aQCMFTTracks.cxx

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,37 @@ using namespace o2::framework;
3838
using namespace o2::aod;
3939

4040
struct CheckMFT {
41-
HistogramRegistry registry{"registry",
42-
{// 2d histograms
43-
{"mMFTTrackEtaPhi_5_MinClusters", "Track #eta , #phi (NCls >= 5); #eta; #phi", {HistType::kTH2F, {{50, -4, -2}, {100, -3.2, 3.2}}}},
44-
{"mMFTTrackXY_5_MinClusters", "Track Position (NCls >= 5); x; y", {HistType::kTH2F, {{320, -16, 16}, {320, -16, 16}}}},
45-
{"mMFTTrackEtaPhi_7_MinClusters", "Track #eta , #phi (NCls >= 7); #eta; #phi", {HistType::kTH2F, {{50, -4, -2}, {100, -3.2, 3.2}}}},
46-
{"mMFTTrackXY_7_MinClusters", "Track Position (NCls >= 7); x; y", {HistType::kTH2F, {{320, -16, 16}, {320, -16, 16}}}},
47-
{"mMFTTrackEtaPhi_8_MinClusters", "Track #eta , #phi (NCls >= 8); #eta; #phi", {HistType::kTH2F, {{50, -4, -2}, {100, -3.2, 3.2}}}},
48-
{"mMFTTrackXY_8_MinClusters", "Track Position (NCls >= 8); x; y", {HistType::kTH2F, {{320, -16, 16}, {320, -16, 16}}}},
49-
// 1d histograms
50-
{"mMFTTrackEta", "Track #eta; #eta; # entries", {HistType::kTH1F, {{50, -4, -2}}}},
51-
{"mMFTTrackNumberOfClusters", "Number Of Clusters Per Track; # clusters; # entries", {HistType::kTH1F, {{10, 0.5, 10.5}}}},
52-
{"mMFTTrackPhi", "Track #phi; #phi; # entries", {HistType::kTH1F, {{100, -3.2, 3.2}}}},
53-
{"mMFTTrackTanl", "Track tan #lambda; tan #lambda; # entries", {HistType::kTH1F, {{100, -25, 0}}}},
54-
{"mMFTTrackInvQPt", "Track q/p_{T}; q/p_{T} [1/GeV]; # entries", {HistType::kTH1F, {{250, -10, 10}}}}}};
41+
HistogramRegistry registry{"registry"};
5542
Configurable<bool> avClsPlots{"avClsPlots", false, "Enable average cluster plots"};
5643

5744
void init(o2::framework::InitContext&)
5845
{
46+
47+
const AxisSpec etaAxis{50, -4, -2, "eta"};
48+
const AxisSpec phiAxis{320, -16, 16, "phi"};
49+
const AxisSpec xAxis{320, -16, 16, "x"};
50+
const AxisSpec clsAxis{10, 0.5, 10.5, "# clusters"};
51+
const AxisSpec yAxis{320, -16, 16, "y"};
52+
const AxisSpec tanLamAxis{100, -25, 0, "tan #lambda"};
53+
const AxisSpec invQPtAxis{250, -10, 10, "q/p_{T} [1/GeV]"};
54+
55+
registry.add("mMFTTrackPhi", "Track #phi", {HistType::kTH1F, {phiAxis}});
56+
registry.add("mMFTTrackTanl", "Track tan #lambda", {HistType::kTH1F, {tanLamAxis}});
57+
registry.add("mMFTTrackInvQPt", "Track q/p_{T}", {HistType::kTH1F, {invQPtAxis}});
58+
registry.add("mMFTTrackEta", "Track #eta", {HistType::kTH1F, {etaAxis}});
59+
60+
registry.add("mMFTTrackEtaPhi_5_MinClusters", "Track Position (NCls >= 5)", {HistType::kTH2F, {etaAxis, phiAxis}});
61+
registry.add("mMFTTrackEtaPhi_6_MinClusters", "Track Position (NCls >= 6)", {HistType::kTH2F, {etaAxis, phiAxis}});
62+
registry.add("mMFTTrackEtaPhi_7_MinClusters", "Track Position (NCls >= 7)", {HistType::kTH2F, {etaAxis, phiAxis}});
63+
registry.add("mMFTTrackEtaPhi_8_MinClusters", "Track Position (NCls >= 8)", {HistType::kTH2F, {etaAxis, phiAxis}});
64+
65+
registry.add("mMFTTrackXY_5_MinClusters", "Track Position (NCls >= 5)", {HistType::kTH2F, {xAxis, yAxis}});
66+
registry.add("mMFTTrackXY_6_MinClusters", "Track Position (NCls >= 6)", {HistType::kTH2F, {xAxis, yAxis}});
67+
registry.add("mMFTTrackXY_7_MinClusters", "Track Position (NCls >= 7)", {HistType::kTH2F, {xAxis, yAxis}});
68+
registry.add("mMFTTrackXY_8_MinClusters", "Track Position (NCls >= 8)", {HistType::kTH2F, {xAxis, yAxis}});
69+
70+
registry.add("mMFTTrackNumberOfClusters", "Number Of Clusters Per Track", {HistType::kTH1F, {clsAxis}});
71+
5972
if (avClsPlots) {
6073
registry.add("mMFTTrackAvgClusters", "Average number of clusters per track; p;# clusters; # entries", {HistType::kTH2F, {{100, 0, 100}, {100, 0, 100}}});
6174
registry.add("mMFTTrackAvgClustersTru", "Average number of clusters per track; p;# clusters; # entries", {HistType::kTH2F, {{100, 0, 100}, {100, 0, 100}}});
@@ -67,7 +80,7 @@ struct CheckMFT {
6780
}
6881
void process(aod::MFTTracks const& mfttracks)
6982
{
70-
for (auto& track : mfttracks) {
83+
for (const auto& track : mfttracks) {
7184
// 2d histograms
7285
float x = track.x();
7386
float y = track.y();
@@ -127,8 +140,9 @@ struct CheckMFT {
127140
void processMC(soa::Join<aod::MFTTracks, aod::McMFTTrackLabels> const& mfttracks,
128141
aod::McParticles const&)
129142
{
130-
for (auto& track : mfttracks) {
143+
for (const auto& track : mfttracks) {
131144
if (avClsPlots) {
145+
static constexpr int kNcls = 10;
132146
std::array<float, 10> clsSize;
133147
for (unsigned int layer = 0; layer < 10; layer++) {
134148
clsSize[layer] = (track.mftClusterSizesAndTrackFlags() >> (layer * 6)) & 0x3f;

0 commit comments

Comments
 (0)