Skip to content

Commit c7223d4

Browse files
committed
[PWGJE]add event count histogram
1 parent 5a165f1 commit c7223d4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

PWGJE/Tasks/dijetFinderQA.cxx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ struct DijetFinderQATask {
7777
{
7878
eventSelection = jetderiveddatautilities::initialiseEventSelectionBits(static_cast<std::string>(eventSelections));
7979
trackSelection = jetderiveddatautilities::initialiseTrackSelection(static_cast<std::string>(trackSelections));
80+
// Add histogram for event counts
8081

8182
auto dijetMassTemp = 0.0;
8283
while (dijetMassTemp <= 2 * jetPtMax) {
@@ -85,17 +86,21 @@ struct DijetFinderQATask {
8586
}
8687

8788
AxisSpec dijetMassAxis = {dijetMassBins, "M_{jj} (GeV/#it{c}^2)"};
89+
AxisSpec eventCountAxis = {{0.5, 1.5}, "events"};
8890

8991
if (doprocessDijetMCP) {
9092
registry.add("h_part_dijet_mass", "Dijet invariant mass;;entries", {HistType::kTH1F, {dijetMassAxis}});
93+
registry.add("hColCounterFinal_MCP", "Event count;;entries", {HistType::kTH1F, {eventCountAxis}});
9194
}
9295

9396
if (doprocessDijetMCD) {
9497
registry.add("h_detec_dijet_mass", "Dijet invariant mass;;entries", {HistType::kTH1F, {dijetMassAxis}});
98+
registry.add("hColCounterFinal_MCD", "Event count;;entries", {HistType::kTH1F, {eventCountAxis}});
9599
}
96100

97101
if (doprocessDijetData) {
98102
registry.add("h_data_dijet_mass", "Dijet invariant mass;;entries", {HistType::kTH1F, {dijetMassAxis}});
103+
registry.add("hColCounterFinal_Data", "Event count;;entries", {HistType::kTH1F, {eventCountAxis}});
99104
}
100105

101106
if (doprocessDijetMCMatched) {
@@ -177,6 +182,8 @@ struct DijetFinderQATask {
177182

178183
void processDijetMCP(soa::Filtered<aod::JetMcCollisions>::iterator const&, soa::Filtered<aod::ChargedMCParticleLevelJets> const& jets)
179184
{
185+
registry.fill(HIST("hColCounterFinal_MCP"), 1);
186+
180187
std::vector<std::array<double, 3>> jetPtcuts;
181188
for (auto& jet : jets) {
182189
jetPtcuts.push_back({jet.pt(), jet.eta(), jet.phi()});
@@ -209,6 +216,9 @@ struct DijetFinderQATask {
209216
if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) {
210217
return;
211218
}
219+
220+
registry.fill(HIST("hColCounterFinal_MCD"), 1);
221+
212222
std::vector<std::array<double, 3>> jetPtcuts;
213223
for (auto& jet : jets) {
214224
jetPtcuts.push_back({jet.pt(), jet.eta(), jet.phi()});
@@ -242,6 +252,9 @@ struct DijetFinderQATask {
242252
return;
243253
}
244254

255+
// Fill event count histogram
256+
registry.fill(HIST("hColCounterFinal_Data"), 1);
257+
245258
std::vector<std::array<double, 3>> jetPtcuts;
246259
for (auto& jet : jets) {
247260
jetPtcuts.push_back({jet.pt(), jet.eta(), jet.phi()});

0 commit comments

Comments
 (0)