Skip to content

Commit 59d6211

Browse files
authored
CPV: add physics check (#1753)
1 parent 2ca8353 commit 59d6211

5 files changed

Lines changed: 592 additions & 1 deletion

File tree

Modules/CPV/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
add_library(O2QcCPV)
44

5-
target_sources(O2QcCPV PRIVATE src/PhysicsTask.cxx src/PedestalCheck.cxx src/PedestalTask.cxx )
5+
target_sources(O2QcCPV PRIVATE src/PhysicsTask.cxx src/PhysicsCheck.cxx src/PedestalCheck.cxx src/PedestalTask.cxx)
66

77
target_include_directories(
88
O2QcCPV
@@ -20,6 +20,7 @@ install(TARGETS O2QcCPV
2020
add_root_dictionary(O2QcCPV
2121
HEADERS
2222
include/CPV/PhysicsTask.h
23+
include/CPV/PhysicsCheck.h
2324
include/CPV/PedestalCheck.h
2425
include/CPV/PedestalTask.h
2526
LINKDEF include/CPV/LinkDef.h)
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
{
2+
"qc": {
3+
"config": {
4+
"database": {
5+
"implementation": "CCDB",
6+
"host": "ccdb-test.cern.ch:8080",
7+
"username": "not_applicable",
8+
"password": "not_applicable",
9+
"name": "not_applicable"
10+
},
11+
"Activity": {
12+
"number": "42",
13+
"type": "2"
14+
},
15+
"monitoring": {
16+
"url": "infologger:///debug?qc"
17+
},
18+
"consul": {
19+
"url": ""
20+
},
21+
"conditionDB": {
22+
"url": "ccdb-test.cern.ch:8080"
23+
}
24+
},
25+
"tasks": {
26+
"CPVPhysicsTask": {
27+
"active": "true",
28+
"className": "o2::quality_control_modules::cpv::PhysicsTask",
29+
"moduleName": "QcCPV",
30+
"detectorName": "CPV",
31+
"cycleDurationSeconds": "10",
32+
"maxNumberCycles": "100",
33+
"": "The other type of dataSource is \"direct\", see basic-no-sampling.json.",
34+
"dataSource": {
35+
"type": "direct",
36+
"query": "digits:CPV/DIGITS/0;dtrigrec:CPV/DIGITTRIGREC/0;clusters:CPV/CLUSTERS/0;ctrigrec:CPV/CLUSTERTRIGRECS/0;calibdigits:CPV/CALIBDIGITS/0;rawerrors:CPV/RAWHWERRORS/0;peds:CPV/CPV_Pedestals;badmap:CPV/CPV_BadMap;gains:CPV/CPV_Gains"
37+
},
38+
"taskParameters": {
39+
"ccdbCheckInterval": "1000",
40+
"isAsyncMode": "1"
41+
},
42+
"location": "remote",
43+
"saveObjectsToFile": "MOs.root", "": "For debugging, path to the file where to save. If empty or missing it won't save."
44+
}
45+
},
46+
"checks": {
47+
"PhysicsCheck": {
48+
"active": "true",
49+
"className": "o2::quality_control_modules::cpv::PhysicsCheck",
50+
"moduleName": "QcCPV",
51+
"policy": "OnAny",
52+
"detectorName": "CPV",
53+
"dataSource": [{
54+
"type": "Task",
55+
"name": "CPVPhysicsTask",
56+
"MOs": [ ]
57+
}],
58+
"checkParameters": {
59+
"mAmplitudeRangeL2": "20",
60+
"mAmplitudeRangeL3": "20",
61+
"mAmplitudeRangeL4": "20",
62+
"mAmplitudeRangeR2": "1000",
63+
"mAmplitudeRangeR3": "1000",
64+
"mAmplitudeRangeR4": "1000",
65+
"mMinEventsToFit2": "1000",
66+
"mMinEventsToFit3": "1000",
67+
"mMinEventsToFit4": "1000",
68+
"mMinAmplification2": "5",
69+
"mMinAmplification3": "5",
70+
"mMinAmplification4": "5",
71+
"mMaxAmplification2": "500",
72+
"mMaxAmplification3": "500",
73+
"mMaxAmplification4": "500",
74+
"mMinClusterSize2": "2",
75+
"mMinClusterSize3": "2",
76+
"mMinClusterSize4": "2",
77+
"mMaxClusterSize2": "5",
78+
"mMaxClusterSize3": "5",
79+
"mMaxClusterSize4": "5",
80+
"mMinEventsToCheckDigitMap2": "10000",
81+
"mMinEventsToCheckDigitMap3": "10000",
82+
"mMinEventsToCheckDigitMap4": "10000",
83+
"mStripPopulationDeviationAllowed2": "1.2",
84+
"mStripPopulationDeviationAllowed3": "30",
85+
"mStripPopulationDeviationAllowed4": "30",
86+
"mNBadStripsPerQuarterAllowed2": "5",
87+
"mNBadStripsPerQuarterAllowed3": "10",
88+
"mNBadStripsPerQuarterAllowed4": "10",
89+
"mNCold3GassiplexAllowed2": "1",
90+
"mNCold3GassiplexAllowed3": "10",
91+
"mNCold3GassiplexAllowed4": "10",
92+
"mNHot3GassiplexAllowed2": "1",
93+
"mNHot3GassiplexAllowed3": "10",
94+
"mNHot3GassiplexAllowed4": "10",
95+
"mHot3GassiplexCriterium2": "1",
96+
"mHot3GassiplexCriterium3": "10",
97+
"mHot3GassiplexCriterium4": "10",
98+
"mCold3GassiplexCriterium2": "0.9",
99+
"mCold3GassiplexCriterium3": "0.1",
100+
"mCold3GassiplexCriterium4": "0.1"
101+
}
102+
}
103+
}
104+
},
105+
"dataSamplingPolicies": [
106+
107+
]
108+
}

Modules/CPV/include/CPV/LinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#pragma link C++ class o2::quality_control_modules::cpv::PedestalTask + ;
77
#pragma link C++ class o2::quality_control_modules::cpv::PedestalCheck + ;
88
#pragma link C++ class o2::quality_control_modules::cpv::PhysicsTask + ;
9+
#pragma link C++ class o2::quality_control_modules::cpv::PhysicsCheck + ;
910
#pragma link C++ class o2::quality_control_modules::cpv::IntensiveTH2F + ;
1011

1112
#endif
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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+
///
13+
/// \file PhysicsCheck.h
14+
/// \author Sergey Evdokimov
15+
///
16+
17+
#ifndef QC_MODULE_CPV_CPVPHYSICSCHECK_H
18+
#define QC_MODULE_CPV_CPVPHYSICSCHECK_H
19+
20+
#include "QualityControl/CheckInterface.h"
21+
22+
namespace o2::quality_control_modules::cpv
23+
{
24+
25+
/// \brief CPV PhysicsCheck
26+
/// \author Sergey Evdokimov
27+
///
28+
class PhysicsCheck : public o2::quality_control::checker::CheckInterface
29+
{
30+
public:
31+
/// Default constructor
32+
PhysicsCheck() = default;
33+
/// Destructor
34+
~PhysicsCheck() override = default;
35+
36+
// Override interface
37+
void configure() override;
38+
Quality check(std::map<std::string, std::shared_ptr<MonitorObject>>* moMap) override;
39+
void beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult = Quality::Null) override;
40+
std::string getAcceptedType() override { return "TH1"; }
41+
42+
private:
43+
int getRunNumberFromMO(std::shared_ptr<MonitorObject> mo);
44+
45+
// configurable parameters and their default values
46+
// see config example in Modules/CPV/etc/Physics-task-no-sampling.json
47+
float mAmplitudeRangeL[3] = { 20., 20., 20. };
48+
float mAmplitudeRangeR[3] = { 1000., 1000., 1000. };
49+
float mMinEventsToFit[3] = { 100, 100, 100 };
50+
float mMinAmplification[3] = { 5., 5., 5. };
51+
float mMaxAmplification[3] = { 200., 200., 200. };
52+
float mMinClusterSize[3] = { 2., 2., 2. };
53+
float mMaxClusterSize[3] = { 5., 5., 5. };
54+
int mMinEventsToCheckDigitMap[3] = { 10000, 10000, 10000 };
55+
float mStripPopulationDeviationAllowed[3] = { 10., 10., 10. };
56+
int mNBadStripsPerQuarterAllowed[3] = { 10, 10, 10 };
57+
int mNCold3GassiplexAllowed[3] = { 10, 10, 10 };
58+
int mNHot3GassiplexAllowed[3] = { 10, 10, 10 };
59+
float mHot3GassiplexCriterium[3] = { 10., 10., 10. };
60+
float mCold3GassiplexCriterium[3] = { 0.1, 0.1, 0.1 };
61+
62+
bool mIsConfigured = false; // had configure() been called already?
63+
64+
ClassDefOverride(PhysicsCheck, 1);
65+
};
66+
67+
} // namespace o2::quality_control_modules::cpv
68+
69+
#endif // QC_MODULE_CPV_CPVPHYSICSCHECK_H

0 commit comments

Comments
 (0)