forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTrackingInterface.cxx
More file actions
85 lines (79 loc) · 3.58 KB
/
TrackingInterface.cxx
File metadata and controls
85 lines (79 loc) · 3.58 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// 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 "ITS3Reconstruction/TrackingInterface.h"
#include "ITS3Reconstruction/IOUtils.h"
#include "ITSBase/GeometryTGeo.h"
#include "ITStracking/TrackingConfigParam.h"
#include "ITSMFTBase/DPLAlpideParam.h"
#include "DetectorsBase/GRPGeomHelper.h"
#include "Framework/DeviceSpec.h"
namespace o2::its3
{
void ITS3TrackingInterface::updateTimeDependentParams(framework::ProcessingContext& pc)
{
o2::base::GRPGeomHelper::instance().checkUpdates(pc);
static bool initOnceDone = false;
if (!initOnceDone) { // this params need to be queried only once
initOnceDone = true;
pc.inputs().get<o2::its3::TopologyDictionary*>("cldict"); // just to trigger the finaliseCCDB
pc.inputs().get<o2::itsmft::DPLAlpideParam<o2::detectors::DetID::ITS>*>("alppar");
if (pc.inputs().getPos("itsTGeo") >= 0) {
pc.inputs().get<o2::its::GeometryTGeo*>("itsTGeo");
}
auto geom = its::GeometryTGeo::Instance();
geom->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::T2L, o2::math_utils::TransformType::T2GRot, o2::math_utils::TransformType::T2G));
initialise();
if (pc.services().get<const o2::framework::DeviceSpec>().inputTimesliceId == 0) { // print settings only for the 1st pipeling
o2::its::VertexerParamConfig::Instance().printKeyValues();
o2::its::TrackerParamConfig::Instance().printKeyValues();
const auto& trParams = getTracker()->getParameters();
for (size_t it = 0; it < trParams.size(); it++) {
const auto& par = trParams[it];
LOGP(info, "recoIter#{} : {}", it, par.asString());
}
}
}
}
void ITS3TrackingInterface::finaliseCCDB(framework::ConcreteDataMatcher& matcher, void* obj)
{
if (o2::base::GRPGeomHelper::instance().finaliseCCDB(matcher, obj)) {
return;
}
if (matcher == framework::ConcreteDataMatcher("IT3", "CLUSDICT", 0)) {
LOG(info) << "cluster dictionary updated";
setClusterDictionary((const o2::its3::TopologyDictionary*)obj);
return;
}
if (matcher == framework::ConcreteDataMatcher("ITS", "ALPIDEPARAM", 0)) {
LOG(info) << "Alpide param updated";
const auto& par = o2::itsmft::DPLAlpideParam<o2::detectors::DetID::ITS>::Instance();
par.printKeyValues();
return;
}
if (matcher == framework::ConcreteDataMatcher("GLO", "MEANVERTEX", 0)) {
LOGP(info, "Mean vertex acquired");
setMeanVertex((const o2::dataformats::MeanVertexObject*)obj);
return;
}
if (matcher == framework::ConcreteDataMatcher("ITS", "GEOMTGEO", 0)) {
LOG(info) << "ITS GeometryTGeo loaded from ccdb";
o2::its::GeometryTGeo::adopt((o2::its::GeometryTGeo*)obj);
return;
}
}
void ITS3TrackingInterface::loadROF(gsl::span<const itsmft::ROFRecord>& trackROFspan,
gsl::span<const itsmft::CompClusterExt> clusters,
gsl::span<const unsigned char>::iterator& pattIt,
const dataformats::MCTruthContainer<MCCompLabel>* mcLabels)
{
ioutils::loadROFrameDataITS3(mTimeFrame, trackROFspan, clusters, pattIt, mDict, mcLabels);
}
} // namespace o2::its3