Skip to content

Commit d2f6d7b

Browse files
wiechulashahor02
authored andcommitted
TPC: move laser track calibration data to DataFormatsTPC
1 parent e893251 commit d2f6d7b

6 files changed

Lines changed: 64 additions & 36 deletions

File tree

DataFormats/Detectors/TPC/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ o2_target_root_dictionary(
5252
include/DataFormatsTPC/IDC.h
5353
include/DataFormatsTPC/ZeroSuppression.h
5454
include/DataFormatsTPC/ZeroSuppressionLinkBased.h
55-
include/DataFormatsTPC/TrackCuts.h)
55+
include/DataFormatsTPC/TrackCuts.h
56+
include/DataFormatsTPC/LtrCalibData.h)
5657

5758
o2_add_test(
5859
ClusterNative
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
/// \file LtrCalibData.h
13+
/// \brief calibration data from laser track calibration
14+
///
15+
/// This class holds the calibration output data of CalibLaserTracks
16+
///
17+
/// \author Jens Wiechula, Jens.Wiechula@ikf.uni-frankfurt.de
18+
19+
#ifndef AliceO2_TPC_LtrCalibData_H_
20+
#define AliceO2_TPC_LtrCalibData_H_
21+
22+
namespace o2::tpc
23+
{
24+
25+
struct LtrCalibData {
26+
size_t processedTFs{}; ///< number of processed TFs with laser track candidates
27+
uint64_t firstTime{}; ///< first time stamp of processed TFs
28+
uint64_t lastTime{}; ///< last time stamp of processed TFs
29+
float dvCorrectionA{}; ///< drift velocity correction factor A-Side
30+
float dvCorrectionC{}; ///< drift velocity correction factor C-Side
31+
float dvOffsetA{}; ///< drift velocity trigger offset A-Side
32+
float dvOffsetC{}; ///< drift velocity trigger offset C-Side
33+
uint16_t nTracksA{}; ///< number of tracks used for A-Side fit
34+
uint16_t nTracksC{}; ///< number of tracks used for C-Side fit
35+
std::vector<uint16_t> matchedLtrIDs; ///< list of matched laser track IDs
36+
37+
float getDriftVCorrection() const { return 0.5f * (dvCorrectionA + dvCorrectionC); }
38+
39+
void reset()
40+
{
41+
processedTFs = 0;
42+
firstTime = 0;
43+
lastTime = 0;
44+
dvCorrectionA = 0;
45+
dvCorrectionC = 0;
46+
dvOffsetA = 0;
47+
dvOffsetC = 0;
48+
nTracksA = 0;
49+
nTracksC = 0;
50+
51+
matchedLtrIDs.clear();
52+
}
53+
54+
ClassDefNV(LtrCalibData, 1);
55+
};
56+
57+
} // namespace o2::tpc
58+
#endif

DataFormats/Detectors/TPC/src/DataFormatsTPCLinkDef.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,7 @@
5353
#pragma link C++ class o2::tpc::TrackCuts + ;
5454
#pragma link C++ class o2::tpc::KrCluster + ;
5555
#pragma link C++ class std::vector<o2::tpc::KrCluster> + ;
56+
#pragma link C++ class o2::tpc::LtrCalibData +;
57+
#pragma link C++ class std::vector<o2::tpc::LtrCalibData> +;
5658

5759
#endif

Detectors/TPC/calibration/include/TPCCalibration/CalibLaserTracks.h

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "CommonUtils/TreeStreamRedirector.h"
2929
#include "DataFormatsTPC/TrackTPC.h"
3030
#include "DataFormatsTPC/LaserTrack.h"
31+
#include "DataFormatsTPC/LtrCalibData.h"
3132

3233
namespace o2::tpc
3334
{
@@ -41,38 +42,6 @@ struct TimePair {
4142
uint64_t time{0};
4243
};
4344

44-
struct LtrCalibData {
45-
size_t processedTFs{}; ///< number of processed TFs with laser track candidates
46-
uint64_t firstTime{}; ///< first time stamp of processed TFs
47-
uint64_t lastTime{}; ///< last time stamp of processed TFs
48-
float dvCorrectionA{}; ///< drift velocity correction factor A-Side
49-
float dvCorrectionC{}; ///< drift velocity correction factor C-Side
50-
float dvOffsetA{}; ///< drift velocity trigger offset A-Side
51-
float dvOffsetC{}; ///< drift velocity trigger offset C-Side
52-
uint16_t nTracksA{}; ///< number of tracks used for A-Side fit
53-
uint16_t nTracksC{}; ///< number of tracks used for C-Side fit
54-
std::vector<uint16_t> matchedLtrIDs; ///< list of matched laser track IDs
55-
56-
float getDriftVCorrection() const { return 0.5f * (dvCorrectionA + dvCorrectionC); }
57-
58-
void reset()
59-
{
60-
processedTFs = 0;
61-
firstTime = 0;
62-
lastTime = 0;
63-
dvCorrectionA = 0;
64-
dvCorrectionC = 0;
65-
dvOffsetA = 0;
66-
dvOffsetC = 0;
67-
nTracksA = 0;
68-
nTracksC = 0;
69-
70-
matchedLtrIDs.clear();
71-
}
72-
73-
ClassDefNV(LtrCalibData, 1);
74-
};
75-
7645
class CalibLaserTracks
7746
{
7847
public:

Detectors/TPC/calibration/src/TPCCalibrationLinkDef.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
#pragma link C++ class o2::calibration::TimeSlot<o2::tpc::CalibLaserTracks> +;
3535
#pragma link C++ class o2::calibration::TimeSlotCalibration<o2::tpc::TrackTPC, o2::tpc::CalibLaserTracks> +;
3636
#pragma link C++ class o2::tpc::TimePair +;
37-
#pragma link C++ class o2::tpc::LtrCalibData +;
3837
#pragma link C++ class std::vector<o2::tpc::TimePair> +;
39-
#pragma link C++ class std::vector<o2::tpc::LtrCalibData> +;
4038
#pragma link C++ class o2::tpc::IDCGroup +;
4139
#pragma link C++ class o2::tpc::IDCGroupHelperRegion +;
4240
#pragma link C++ class o2::tpc::IDCGroupHelperSector +;

Detectors/TPC/workflow/src/ApplyCCDBCalibSpec.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "Framework/Logger.h"
1818

1919
#include "TPCBase/ParameterGas.h"
20-
#include "TPCCalibration/CalibLaserTracks.h"
20+
#include "DataFormatsTPC/LtrCalibData.h"
2121
#include "TPCWorkflow/ApplyCCDBCalibSpec.h"
2222

2323
using namespace o2::framework;

0 commit comments

Comments
 (0)