forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcentralityQa.cxx
More file actions
39 lines (35 loc) · 1.23 KB
/
Copy pathcentralityQa.cxx
File metadata and controls
39 lines (35 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright CERN and copyright holders of ALICE O2. This software is
// distributed under the terms of the GNU General Public License v3 (GPL
// Version 3), copied verbatim in the file "COPYING".
//
// See http://alice-o2.web.cern.ch/license for full licensing information.
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"
#include "Analysis/EventSelection.h"
#include "Analysis/Centrality.h"
#include "TH1F.h"
using namespace o2;
using namespace o2::framework;
struct CentralityQaTask {
OutputObj<TH1F> hCentV0M{TH1F("hCentV0M", "", 21, 0, 105.)};
void process(soa::Join<aod::Collisions, aod::EvSels, aod::Cents>::iterator const& col)
{
if (!col.alias()[kINT7])
return;
if (!col.sel7())
return;
LOGF(debug, "centV0M=%.0f", col.centV0M());
// fill centrality histos
hCentV0M->Fill(col.centV0M());
}
};
WorkflowSpec defineDataProcessing(ConfigContext const&)
{
return WorkflowSpec{
adaptAnalysisTask<CentralityQaTask>("centrality-qa")};
}