Skip to content

Commit 0269662

Browse files
mleschga94pez
andauthored
TPC: Reductor for vdrift (#2153)
* WIP vDriftReductor * Testing --------- Co-authored-by: ga94pez <ga94pez@mytum.de>
1 parent e2cd326 commit 0269662

5 files changed

Lines changed: 168 additions & 1 deletion

File tree

Modules/TPC/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ target_sources(O2QcTPC PRIVATE src/PID.cxx
3535
src/SACs.cxx
3636
src/TPCAggregator.cxx
3737
src/SACZeroScaleReductor.cxx
38-
src/TrackClusters.cxx)
38+
src/TrackClusters.cxx
39+
src/VDriftCalibReductor.cxx)
3940

4041
target_include_directories(
4142
O2QcTPC
@@ -91,6 +92,7 @@ add_root_dictionary(O2QcTPC
9192
include/TPC/TPCAggregator.h
9293
include/TPC/SACZeroScaleReductor.h
9394
include/TPC/TrackClusters.h
95+
include/TPC/VDriftCalibReductor.h
9496
LINKDEF include/TPC/LinkDef.h)
9597

9698
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/TPC
@@ -171,4 +173,5 @@ install(FILES run/tpcQCPID_sampled.json
171173
run/tpcQCSACs.json
172174
run/tpcQCSACScaleTrend.json
173175
run/tpcQCTrackClusters.json
176+
run/tpcQCvDriftTrending.json
174177
DESTINATION etc)

Modules/TPC/include/TPC/LinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#pragma link C++ class o2::quality_control_modules::tpc::TPCAggregator + ;
4141
#pragma link C++ class o2::quality_control_modules::tpc::SACZeroScaleReductor + ;
4242
#pragma link C++ class o2::quality_control_modules::tpc::TrackClusters + ;
43+
#pragma link C++ class o2::quality_control_modules::tpc::VDriftCalibReductor + ;
4344

4445
#pragma link C++ function o2::quality_control_modules::tpc::addAndPublish + ;
4546
#pragma link C++ function o2::quality_control_modules::tpc::toVector + ;
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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 VDriftCalibReductor.h
14+
/// \author Marcel Lesch
15+
///
16+
17+
#ifndef QUALITYCONTROL_VDRIFTCALIBREDUCTOR_H
18+
#define QUALITYCONTROL_VDRIFTCALIBREDUCTOR_H
19+
20+
#include "QualityControl/ReductorConditionAny.h"
21+
22+
namespace o2::quality_control_modules::tpc
23+
{
24+
25+
/// \brief A Reductor for calibration objects of the TPC drift velocity
26+
///
27+
/// A Reductor for calibration objects of the TPC drift velocity.
28+
/// It produces a branch in the format: "vdrift/F:vdrifterror"
29+
30+
class VDriftCalibReductor : public quality_control::postprocessing::ReductorConditionAny
31+
{
32+
public:
33+
VDriftCalibReductor() = default;
34+
~VDriftCalibReductor() = default;
35+
36+
void* getBranchAddress() override;
37+
const char* getBranchLeafList() override;
38+
bool update(ConditionRetriever& retriever) override;
39+
40+
private:
41+
struct {
42+
Float_t vdrift;
43+
Float_t vdrifterror;
44+
} mStats;
45+
};
46+
47+
} // namespace o2::quality_control_modules::tpc
48+
49+
#endif // QUALITYCONTROL_VDRIFTCALIBREDUCTOR_H
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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": "",
13+
"type": "",
14+
"start": "",
15+
"end": ""
16+
},
17+
"monitoring": {
18+
"url": "infologger:///debug?qc"
19+
},
20+
"consul": {
21+
"url": ""
22+
},
23+
"conditionDB": {
24+
"url": "ccdb-test.cern.ch:8080"
25+
},
26+
"postprocessing": {
27+
"periodSeconds": "10"
28+
}
29+
},
30+
"postprocessing": {
31+
"CalibQC": {
32+
"active": "true",
33+
"resumeTrend": "false",
34+
"className": "o2::quality_control::postprocessing::TrendingTask",
35+
"moduleName": "QualityControl",
36+
"detectorName": "TPC",
37+
"producePlotsOnUpdate": "true",
38+
"dataSources": [
39+
{
40+
"type": "condition",
41+
"path": "TPC/Calib/",
42+
"names": [ "VDriftTgl" ],
43+
"reductorName": "o2::quality_control_modules::tpc::VDriftCalibReductor",
44+
"moduleName": "QcTPC"
45+
}
46+
],
47+
"plots": [
48+
{
49+
"name": "vDrift_Trending",
50+
"title": "Trend of vDrift over time",
51+
"varexp": "VDriftTgl.vdrift:time",
52+
"selection": "",
53+
"option": "*L",
54+
"graphAxisLabel": "v_Drift:time"
55+
}
56+
],
57+
"initTrigger": [
58+
"userorcontrol"
59+
],
60+
"updateTrigger": [
61+
"newobject:ccdb:TPC/Calib/VDriftTgl/"
62+
],
63+
"stopTrigger": [
64+
"userorcontrol"
65+
]
66+
}
67+
}
68+
}
69+
}
70+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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 VDriftCalibReductor.cxx
14+
/// \author Marcel Lesch
15+
///
16+
17+
#include "TPC/VDriftCalibReductor.h"
18+
19+
#include <DataFormatsTPC/VDriftCorrFact.h>
20+
21+
namespace o2::quality_control_modules::tpc
22+
{
23+
24+
void* VDriftCalibReductor::getBranchAddress()
25+
{
26+
return &mStats;
27+
}
28+
29+
const char* VDriftCalibReductor::getBranchLeafList()
30+
{
31+
return "vdrift/F:vdrifterror";
32+
}
33+
34+
bool VDriftCalibReductor::update(ConditionRetriever& retriever)
35+
{
36+
if (auto vdriftCalib = retriever.retrieve<o2::tpc::VDriftCorrFact>()) {
37+
mStats.vdrift = vdriftCalib->getVDrift();
38+
mStats.vdrifterror = vdriftCalib->getVDriftError();
39+
return true;
40+
}
41+
return false;
42+
}
43+
44+
} // namespace o2::quality_control_modules::tpc

0 commit comments

Comments
 (0)