Project
Loading...
Searching...
No Matches
AlgTrcDbg.h
Go to the documentation of this file.
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
14
15#ifndef ALGTRCDBG_H
16#define ALGTRCDBG_H
17
19#include "Align/AlgPntDbg.h"
22
23namespace o2
24{
25namespace align
26{
27
30 AlgTrcDbg() = default;
31 ~AlgTrcDbg() = default;
32 AlgTrcDbg(const AlgTrcDbg&) = default;
33 AlgTrcDbg& operator=(const AlgTrcDbg&) = default;
34
36 {
37 if (!trc) {
38 return false;
39 }
40 setX(trc->getX());
41 setY(trc->getAlpha());
42 for (int i = 0; i < 5; i++) {
43 setParam(trc->getParam(i), i);
44 }
45 for (int i = 0; i < 15; i++) {
46 setCov(trc->getCov()[i], i);
47 }
48 mPoints.clear();
49 for (int i = 0; i < trc->getNPoints(); i++) {
50 const auto* tpoint = trc->getPoint(i);
51 if (tpoint->containsMeasurement()) {
52 auto& pnt = mPoints.emplace_back(tpoint);
53 pnt.mYRes = trc->getResidual(0, i);
54 pnt.mZRes = trc->getResidual(1, i);
55 }
56 }
57 setX(trc->getX());
58 setY(trc->getAlpha());
59 for (int i = 0; i < 5; i++) {
60 setParam(trc->getParam(i), i);
61 }
62 for (int i = 0; i < 15; i++) {
63 setCov(trc->getCov()[i], i);
64 }
65 for (int i = 0; i < trc->getNPoints(); i++) {
66 const auto* tpoint = trc->getPoint(i);
67 if (tpoint->containsMeasurement()) {
68 auto& pnt = mPoints.emplace_back(tpoint);
69 pnt.mYRes = trc->getResidual(0, i);
70 pnt.mZRes = trc->getResidual(1, i);
71 }
72 }
73 mGID.clear();
74 mGIDCosmUp.clear();
75 return true;
76 }
77
78 auto getNPoints() const { return mPoints.size(); }
79 bool isCosmic() const { return mGIDCosmUp.isSourceSet(); }
80
81 std::vector<AlgPntDbg> mPoints;
83 o2::dataformats::GlobalTrackID mGIDCosmUp{}; // GID of upper leg in case of cosmic
84 //
86};
87
88} // namespace align
89} // namespace o2
90#endif
Track model for the alignment.
Base track model for the Barrel, params only, w/o covariance.
int32_t i
Global index for barrel track: provides provenance (detectors combination), index in respective array...
double getResidual(int dim, int pntID) const
AlignmentPoint * getPoint(int i)
void align(gsl::span< ElinkEncoder< BareFormat, CHARGESUM > > elinks)
TrackParCovF TrackParCov
Definition Track.h:33
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
bool setTrackParam(const AlignmentTrack *trc)
Definition AlgTrcDbg.h:35
auto getNPoints() const
Definition AlgTrcDbg.h:78
std::vector< AlgPntDbg > mPoints
Definition AlgTrcDbg.h:81
bool isCosmic() const
Definition AlgTrcDbg.h:79
AlgTrcDbg & operator=(const AlgTrcDbg &)=default
AlgTrcDbg(const AlgTrcDbg &)=default
AlgTrcDbg(const AlignmentTrack *trc)
Definition AlgTrcDbg.h:29
ClassDefNV(AlgTrcDbg, 1)
o2::dataformats::GlobalTrackID mGID
Definition AlgTrcDbg.h:82
o2::dataformats::GlobalTrackID mGIDCosmUp
Definition AlgTrcDbg.h:83