Skip to content

Commit c647c1f

Browse files
[Common] [FIT] Add output histos to FT0 QA task (AFIT-8)
Add the following to ft0Qa.cxx: - FT0 time res vs. Ncontributors - FT0 time res vs. FT0AC multiplicity - FT0 vertex - PV vs. Ncontributors - FT0 vertex - PV vs. FT0AC multiplicity
1 parent fb2d3c9 commit c647c1f

File tree

1 file changed

+33
-9
lines changed

1 file changed

+33
-9
lines changed

Common/Tasks/ft0Qa.cxx

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12+
/// \file ft0Qa.cxx
13+
/// \brief FT0 QA task
14+
///
15+
/// \author Uliana Dmitrieva <uliana.dmitrieva@cern.ch>, Andreas Molander <andreas.molander@cern.ch>
16+
1217
#include "Common/DataModel/EventSelection.h"
1318
#include "Common/DataModel/FT0Corrected.h"
1419
#include "Common/DataModel/Multiplicity.h"
@@ -32,7 +37,14 @@ using namespace o2::framework;
3237
using BCsWithRun3Matchings = soa::Join<aod::BCs, aod::BcSels, aod::Timestamps,
3338
aod::Run3MatchedToBCSparse>;
3439

35-
struct ft0QaTask {
40+
struct FT0QaTask {
41+
/// Event selection options
42+
enum Sel {
43+
kNoSel = 0,
44+
kSel8 = 8
45+
};
46+
47+
static constexpr int sNCONTRIB_LIMIT_20 = 20; ///< Limit on number of contributors for some histos
3648

3749
// Configurable<bool> isMC{"isMC", 0, "0 - data, 1 - MC"};
3850
Configurable<int> selection{"selection", 0, "trigger: 0 - no sel, 8 - sel8"};
@@ -84,6 +96,10 @@ struct ft0QaTask {
8496
histos.add("hT0AC", "T0AC;T0AC time (ns);counts", kTH1F, {axisTime});
8597
histos.add("hT0res", "FT0 resolution", kTH1F, {axisColTimeRes});
8698
histos.add("hColTime", "", kTH1F, {axisTime});
99+
histos.add("hT0res_nContrib", "FT0 resolution vs. Ncontributors", kTH2F,
100+
{axisColTimeRes, axisNcontrib});
101+
histos.add("hT0res_MultT0AC", "FT0 resolution vs. T0AC multiplicity", kTH2F,
102+
{axisColTimeRes, axisMultT0AC});
87103

88104
// FT0 vertex
89105
histos.add("hT0vertex", "FT0 vertex;FT0 vertex (cm);counts", kTH1F,
@@ -109,6 +125,11 @@ struct ft0QaTask {
109125
histos.add("hPV_nContrib",
110126
"PV vs. Ncontributers;primary vertex (cm);(# contrubutors)",
111127
kTH2F, {axisVertex, axisNcontrib});
128+
histos.add("hT0vertexDiff_vs_nContrib", "FT0V - PV vs. Ncontributors;FT0 vertex - PV (cm);# contrubutors",
129+
kTH2F, {axisVertex, axisNcontrib});
130+
histos.add("hT0vertexDiff_vs_MultT0AC",
131+
"FT0V - PV vs. T0AC multiplicity;FT0 vertex - PV (cm);T0AC multiplicity (# ADC channels)",
132+
kTH2F, {axisVertex, axisMultT0AC});
112133

113134
// FT0 amplitude and multiplicity
114135
histos.add("hAmpT0A", "amplitude T0A;#ADC channels;counts", kTH1F,
@@ -240,8 +261,7 @@ struct ft0QaTask {
240261
aod::FT0sCorrected>::iterator const& collision,
241262
aod::FT0s const&, aod::FV0As const&)
242263
{
243-
244-
if (selection == 8 && !collision.sel8()) {
264+
if (selection == kSel8 && !collision.sel8()) {
245265
return;
246266
}
247267

@@ -369,9 +389,13 @@ struct ft0QaTask {
369389
histos.fill(HIST("hVertex_T0_PV"), ft0.posZ(), collision.posZ());
370390
histos.fill(HIST("hPV"), collision.posZ());
371391
histos.fill(HIST("hT0res"), collision.t0resolution());
392+
histos.fill(HIST("hT0res_nContrib"), collision.t0resolution(), nContrib);
393+
histos.fill(HIST("hT0res_MultT0AC"), collision.t0resolution(), multFT0M);
372394
histos.fill(HIST("hT0vertexDiff"), ft0.posZ() - collision.posZ());
395+
histos.fill(HIST("hT0vertexDiff_vs_nContrib"), ft0.posZ() - collision.posZ(), nContrib);
396+
histos.fill(HIST("hT0vertexDiff_vs_MultT0AC"), ft0.posZ() - collision.posZ(), multFT0M);
373397

374-
if (nContrib > 20) {
398+
if (nContrib > sNCONTRIB_LIMIT_20) {
375399

376400
histos.fill(HIST("hVertex_T0_PV_nC20"), ft0.posZ(), collision.posZ());
377401
histos.fill(HIST("hT0vertexDiff_nC20"),
@@ -400,7 +424,7 @@ struct ft0QaTask {
400424

401425
} // end of processCollsions()
402426

403-
PROCESS_SWITCH(ft0QaTask, processCollisions, "per-collision analysis", true);
427+
PROCESS_SWITCH(FT0QaTask, processCollisions, "per-collision analysis", true);
404428

405429
// soa::Join<aod::BCs, aod::BcSels, aod::Mults >::iterator const &collision,
406430
// aod::FT0s const &ft0s, aod::FV0As const &fv0s
@@ -439,11 +463,11 @@ struct ft0QaTask {
439463
cent = triggers[o2::ft0::Triggers::bitCen];
440464
semicent = triggers[o2::ft0::Triggers::bitSCen];
441465

442-
for (auto amplitude : ft0.amplitudeA()) {
466+
for (const auto amplitude : ft0.amplitudeA()) {
443467
multFT0A += amplitude;
444468
histos.fill(HIST("hBcAmpT0A"), amplitude);
445469
}
446-
for (auto amplitude : ft0.amplitudeC()) {
470+
for (const auto amplitude : ft0.amplitudeC()) {
447471
multFT0C += amplitude;
448472
histos.fill(HIST("hBcAmpT0C"), amplitude);
449473
}
@@ -516,11 +540,11 @@ struct ft0QaTask {
516540
// }
517541
// }
518542
}
519-
PROCESS_SWITCH(ft0QaTask, processBCs, "per-BC analysis", true);
543+
PROCESS_SWITCH(FT0QaTask, processBCs, "per-BC analysis", true);
520544

521545
}; // end of struct
522546

523547
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
524548
{
525-
return WorkflowSpec{adaptAnalysisTask<ft0QaTask>(cfgc, TaskName{"ft0-qa"})};
549+
return WorkflowSpec{adaptAnalysisTask<FT0QaTask>(cfgc)};
526550
}

0 commit comments

Comments
 (0)