Skip to content

Commit ec93cae

Browse files
committed
Additional QA
1 parent 8221a3e commit ec93cae

File tree

4 files changed

+106
-4
lines changed

4 files changed

+106
-4
lines changed

Common/DataModel/Centrality.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ DECLARE_SOA_TABLE(CentRun2SPDTrks, "AOD", "CENTRUN2SPDTRK", cent::CentRun2SPDTra
4343
DECLARE_SOA_TABLE(CentRun2SPDClss, "AOD", "CENTRUN2SPDCLS", cent::CentRun2SPDClusters); //! Run 2 SPD clusters centrality table
4444
DECLARE_SOA_TABLE(CentRun2CL0s, "AOD", "CENTRUN2CL0", cent::CentRun2CL0); //! Run 2 CL0 centrality table
4545
DECLARE_SOA_TABLE(CentRun2CL1s, "AOD", "CENTRUN2CL1", cent::CentRun2CL1); //! Run 2 CL1 centrality table
46-
DECLARE_SOA_TABLE(CentRun2RefMult5, "AOD", "CENTRUN2REFMULT5", cent::CentRun2RefMult5); //! Run 2, ref mult |eta| < 0.5
47-
DECLARE_SOA_TABLE(CentRun2RefMult8, "AOD", "CENTRUN2REFMULT8", cent::CentRun2RefMult8); //! Run 2, ref mult |eta| < 0.8
46+
DECLARE_SOA_TABLE(CentRun2RefMult5s, "AOD", "CENTRUN2REFMULT5", cent::CentRun2RefMult5); //! Run 2, ref mult |eta| < 0.5
47+
DECLARE_SOA_TABLE(CentRun2RefMult8s, "AOD", "CENTRUN2REFMULT8", cent::CentRun2RefMult8); //! Run 2, ref mult |eta| < 0.8
4848

4949
// Run 3 tables
5050
DECLARE_SOA_TABLE(CentFV0As, "AOD", "CENTFV0A", cent::CentFV0A); //! Run 3 FV0A centrality table
@@ -63,6 +63,8 @@ using CentRun2SPDTrk = CentRun2SPDTrks::iterator;
6363
using CentRun2SPDCls = CentRun2SPDClss::iterator;
6464
using CentRun2CL0 = CentRun2CL0s::iterator;
6565
using CentRun2CL1 = CentRun2CL1s::iterator;
66+
using CentRun2RefMult5 = CentRun2RefMult5s::iterator;
67+
using CentRun2RefMult8 = CentRun2RefMult8s::iterator;
6668
using CentFV0A = CentFV0As::iterator;
6769
using CentFT0M = CentFT0Ms::iterator;
6870
using CentFT0A = CentFT0As::iterator;

Common/LegacyDataQA/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,9 @@
1212
o2physics_add_dpl_workflow(otfv0qa
1313
SOURCES otfv0qa.cxx
1414
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
15+
COMPONENT_NAME Analysis)
16+
17+
o2physics_add_dpl_workflow(centqa
18+
SOURCES centqa.cxx
19+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
1520
COMPONENT_NAME Analysis)

Common/LegacyDataQA/centqa.cxx

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
//
12+
// This code calculates output histograms for centrality calibration
13+
// as well as vertex-Z dependencies of raw variables (either for calibration
14+
// of vtx-Z dependencies or for the calibration of those).
15+
//
16+
// This task is not strictly necessary in a typical analysis workflow,
17+
// except for centrality calibration! The necessary task is the multiplicity
18+
// tables.
19+
//
20+
// Comments, suggestions, questions? Please write to:
21+
22+
23+
//
24+
25+
#include "Framework/runDataProcessing.h"
26+
#include "Framework/AnalysisTask.h"
27+
#include "Framework/AnalysisDataModel.h"
28+
#include "Common/DataModel/McCollisionExtra.h"
29+
#include "Common/DataModel/Centrality.h"
30+
#include "Common/DataModel/EventSelection.h"
31+
#include "Framework/O2DatabasePDGPlugin.h"
32+
#include "TH1F.h"
33+
#include "TH2F.h"
34+
35+
using namespace o2;
36+
using namespace o2::framework;
37+
38+
struct CentQA {
39+
// Raw multiplicities
40+
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
41+
42+
void init(InitContext&)
43+
{
44+
const AxisSpec axisCentrality{205, 0, 205, "centrality"};
45+
46+
// Base histograms
47+
histos.add("hV0M", "V0M centrality", kTH1F, {axisCentrality});
48+
histos.add("hV0A", "V0A centrality", kTH1F, {axisCentrality});
49+
histos.add("hCL0", "CL0 centrality", kTH1F, {axisCentrality});
50+
histos.add("hCL1", "CL1 centrality", kTH1F, {axisCentrality});
51+
histos.add("hRefMult5", "RefMult5 centrality", kTH1F, {axisCentrality});
52+
histos.add("hRefMult8", "RefMult8 centrality", kTH1F, {axisCentrality});
53+
}
54+
55+
void processV0M(soa::Join<aod::Collision, aod::CentRun2V0Ms>::iterator const& col)
56+
{
57+
histos.fill(HIST("hV0M"), col.centRun2V0M());
58+
}
59+
void processV0A(soa::Join<aod::Collision, aod::CentRun2V0As>::iterator const& col)
60+
{
61+
histos.fill(HIST("hV0A"), col.centRun2V0A());
62+
}
63+
void processCL0(soa::Join<aod::Collision, aod::CentRun2CL0s>::iterator const& col)
64+
{
65+
histos.fill(HIST("hCL0"), col.centRun2CL0());
66+
}
67+
void processCL1(soa::Join<aod::Collision, aod::CentRun2CL1s>::iterator const& col)
68+
{
69+
histos.fill(HIST("hCL1"), col.centRun2CL1());
70+
}
71+
void processRefMult5(soa::Join<aod::Collision, aod::CentRun2RefMult5s>::iterator const& col)
72+
{
73+
histos.fill(HIST("hRefMult5"), col.centRun2RefMult5());
74+
}
75+
void processRefMult8(soa::Join<aod::Collision, aod::CentRun2RefMult8s>::iterator const& col)
76+
{
77+
histos.fill(HIST("hRefMult8"), col.centRun2RefMult8());
78+
}
79+
80+
PROCESS_SWITCH(CentQA, processV0M, "QA V0M centrality", true);
81+
PROCESS_SWITCH(CentQA, processV0A, "QA V0A centrality", false);
82+
PROCESS_SWITCH(CentQA, processCL0, "QA CL0 centrality", false);
83+
PROCESS_SWITCH(CentQA, processCL1, "QA CL1 centrality", false);
84+
PROCESS_SWITCH(CentQA, processRefMult5, "QA RefMult5 centrality", false);
85+
PROCESS_SWITCH(CentQA, processRefMult8, "QA RefMult8 centrality", false);
86+
};
87+
88+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
89+
{
90+
return WorkflowSpec{
91+
adaptAnalysisTask<CentQA>(cfgc)};
92+
}

Common/LegacyDataQA/otfv0qa.cxx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,17 @@ struct OTFV0Qa {
4242
void init(InitContext&)
4343
{
4444
const AxisSpec axisEvent{10, 0, 10, "Event counter"};
45+
const AxisSpec axisNCandidates{500, 0, 500, "Number of OTF v0s"};
4546

4647
// Base histograms
47-
histos.add("hEventCounter", "Event counter", kTH1D, {axisEvent});
48+
histos.add("hEventCounter", "Event counter", kTH1F, {axisEvent});
49+
histos.add("hCandidates", "Number of OTF V0s", kTH1F, {axisNCandidates});
4850
}
4951

50-
void process(aod::Collision const& col)
52+
void process(aod::Collision const& col, aod::OTFV0s const& v0s)
5153
{
5254
histos.fill(HIST("hEventCounter"), 0.5);
55+
histos.fill(HIST("hCandidates"), v0s.size());
5356
}
5457
};
5558

0 commit comments

Comments
 (0)