Project
Loading...
Searching...
No Matches
AlignPointHelper.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
15
16#ifndef ALICEO2_MFT_ALIGN_POINT_HELPER_H
17#define ALICEO2_MFT_ALIGN_POINT_HELPER_H
18
19#include <gsl/gsl>
20
22#include "MathUtils/Cartesian.h"
23#include "MFTBase/Geometry.h"
24#include "MFTBase/GeometryTGeo.h"
29#include "MFTBase/GeometryTGeo.h"
30
31namespace o2
32{
33namespace mft
34{
35
36class TrackMFT;
37
41{
42 friend class AlignPointHelper;
43
44 public:
46 GlobalDerivative() = default;
47
49 virtual ~GlobalDerivative() = default;
50
52 void reset()
53 {
54 mdDeltaX = 0.;
55 mdDeltaY = 0.;
56 mdDeltaZ = 0.;
57 mdDeltaRz = 0.;
58 }
59
60 // simple getters
61
62 double dDeltaX() const { return mdDeltaX; }
63 double dDeltaY() const { return mdDeltaY; }
64 double dDeltaZ() const { return mdDeltaZ; }
65 double dDeltaRz() const { return mdDeltaRz; }
66
67 protected:
68 double mdDeltaX = 0.;
69 double mdDeltaY = 0.;
70 double mdDeltaZ = 0.;
71 double mdDeltaRz = 0.;
72};
73
77{
78 friend class AlignPointHelper;
79
80 public:
82 LocalDerivative() = default;
83
85 virtual ~LocalDerivative() = default;
86
87 // simple getters
88
89 double dX0() const { return mdX0; }
90 double dTx() const { return mdTx; }
91 double dY0() const { return mdY0; }
92 double dTy() const { return mdTy; }
93
95 void reset()
96 {
97 mdX0 = 0.;
98 mdTx = 0.;
99 mdY0 = 0.;
100 mdTy = 0.;
101 }
102
103 protected:
104 double mdX0 = 0.;
105 double mdTx = 0.;
106 double mdY0 = 0.;
107 double mdTy = 0.;
108};
109
118{
119 public:
122
124 virtual ~AlignPointHelper() = default;
125
127 struct TrackParam {
128 Double_t X0, Y0, Z0, Tx, Ty;
129 };
130
133
136
137 // simple getters
138
139 UShort_t getSensorId() const;
140 UShort_t half() const;
141 UShort_t disk() const;
142 UShort_t layer() const;
143
144 // simple getters
145
146 bool isAlignPointSet() const { return mIsAlignPointSet; }
149 bool isClusterOk() const { return mIsClusterOk; }
150
151 // simple getters
152
159
160 // simple getters
161
191
193 void resetAlignPoint();
194
197
199 void convertCompactClusters(gsl::span<const itsmft::CompClusterExt> clusters,
200 gsl::span<const unsigned char>::iterator& pattIt,
201 std::vector<o2::BaseCluster<double>>& outputLocalClusters,
202 std::vector<o2::BaseCluster<double>>& outputGlobalClusters);
203
205 void convertCompactClusters(const std::vector<o2::itsmft::CompClusterExt>& clusters,
206 std::vector<unsigned char>::iterator& pattIt,
207 std::vector<o2::BaseCluster<double>>& outputLocalClusters,
208 std::vector<o2::BaseCluster<double>>& outputGlobalClusters);
209
212
215
216 // setters
217
219 void setMeasuredPosition(const o2::BaseCluster<double>& localCluster,
220 const o2::BaseCluster<double>& globalCluster);
221 void setLocalResidual();
222 void setGlobalResidual();
223
224 protected:
230
233 std::unique_ptr<o2::mft::AlignSensorHelper> mChipHelper;
234
238
242
244
247
251
254
255 protected:
258
261
264
267
270
273
276
279
281};
282
283} // namespace mft
284} // namespace o2
285#endif
Helper class to access to the global coordinates of the center each MFT sensor.
Definition of the ITSMFT compact cluster.
Definition of the ClusterTopology class.
Class handling both virtual segmentation and real volumes.
Container of a single alignment point and methods to fill it.
o2::math_utils::Point3D< double > getLocalMeasuredPositionSigma() const
LocalDerivative mLocalDerivativeX
first (X) component of the local derivatives
bool computeGlobalDerivativeY()
compute second (Y) component of the global derivatives
const o2::itsmft::TopologyDictionary * mDictionary
cluster patterns dictionary
bool mIsTrackInitialParamSet
boolean to indicate if the initial track parameters are recorded
GlobalDerivative globalDerivativeX() const
void recordTrackInitialParam(o2::mft::TrackMFT &mftTrack)
store the track parameters at the initial z0 plane
GlobalDerivative mGlobalDerivativeZ
last (Z) component of the global derivatives
ClassDef(AlignPointHelper, 0)
GlobalDerivative globalDerivativeZ() const
LocalDerivative mLocalDerivativeZ
last (Z) component of the local derivatives
LocalDerivative mLocalDerivativeY
second (Y) component of the local derivatives
bool computeGlobalDerivativeZ()
compute last (Z) component of the global derivatives
bool computeLocalDerivativeY()
compute second (Y) component of the local derivatives
o2::math_utils::Point3D< double > getLocalResidual() const
o2::math_utils::Point3D< double > getGlobalResidual() const
o2::math_utils::Point3D< double > mLocalMeasuredPositionSigma
Estimated error on local position measurement.
void setClusterDictionary(const o2::itsmft::TopologyDictionary *d)
set cluster pattern dictionary (needed to compute cluster coordinates)
bool computeLocalDerivativeZ()
compute last (Z) component of the local derivatives
o2::mft::GeometryTGeo * mGeometry
MFT geometry.
o2::math_utils::Point3D< double > mGlobalRecoPosition
Current cartesian position (cm, in Global ref. system) of the reconstructed track analytically propag...
bool mIsGlobalDerivativeDone
boolean to indicate if the global derivatives computaion is done
TrackParam getTrackInitialParam() const
bool mIsClusterOk
boolean to check if cluster was exploitable to get coordinates
o2::math_utils::Point3D< double > getLocalMeasuredPosition() const
o2::math_utils::Point3D< double > getGlobalRecoPosition() const
LocalDerivative localDerivativeY() const
void resetGlobalDerivatives()
reset all elements to zero for the global derivatives
bool computeGlobalDerivativeX()
compute first (X) component of the global derivatives
void setGlobalRecoPosition(o2::mft::TrackMFT &mftTrack)
LocalDerivative localDerivativeZ() const
void convertCompactClusters(gsl::span< const itsmft::CompClusterExt > clusters, gsl::span< const unsigned char >::iterator &pattIt, std::vector< o2::BaseCluster< double > > &outputLocalClusters, std::vector< o2::BaseCluster< double > > &outputGlobalClusters)
convert compact clusters (pixel coordinates in row, col) from workflow to base clusters with 3D posit...
void setMeasuredPosition(const o2::BaseCluster< double > &localCluster, const o2::BaseCluster< double > &globalCluster)
std::unique_ptr< o2::mft::AlignSensorHelper > mChipHelper
utility to access the sensor transform used in the computation of the derivatives
o2::math_utils::Point3D< double > mGlobalResidual
residual between track x-ing point and cluster in global ref. system
TrackParam mTrackInitialParam
Track parameters at the initial reference plane z = z0.
void computeGlobalDerivatives()
method to call the computation of all three components of the global derivative
void resetAlignPoint()
reset all quantities that define an alignment point to their default value
virtual ~AlignPointHelper()=default
destructor
void computeLocalDerivatives()
method to call the computation of all three compnonents of the local derivative
o2::math_utils::Point3D< double > getGlobalMeasuredPosition() const
GlobalDerivative mGlobalDerivativeY
second (Y) component of the global derivatives
bool mIsLocalDerivativeDone
boolean to indicate if the local derivatives computation is done
o2::math_utils::Point3D< double > mLocalResidual
residual between track x-ing point and cluster in local ref. system
void resetLocalDerivatives()
reset all elements to zero for the local derivatives
LocalDerivative localDerivativeX() const
void resetTrackInitialParam()
reset all track parameters to their default value (zero)
o2::math_utils::Point3D< double > getLocalRecoPosition() const
o2::math_utils::Point3D< double > mLocalMeasuredPosition
Current cartesian position (cm, in Local ref. system) of the cluster.
bool computeLocalDerivativeX()
compute first (X) component of the local derivatives
GlobalDerivative mGlobalDerivativeX
first (X) component of the global derivatives
GlobalDerivative globalDerivativeY() const
o2::math_utils::Point3D< double > mLocalRecoPosition
Current cartesian position (cm, in Local ref. system) of the reconstructed track analytically propaga...
bool mIsAlignPointSet
boolean to indicate if mGlobalRecoPosition and mLocalMeasuredPosition are set
o2::math_utils::Point3D< double > mGlobalMeasuredPosition
Current cartesian position (cm, in Global ref. system) of the cluster.
Simple container of global derivatives.
void reset()
reset all data members to default value (zero)
virtual ~GlobalDerivative()=default
destructor
GlobalDerivative()=default
constructor
double mdDeltaY
derivative w.r.t. delta translation along global y-axis
double mdDeltaRz
derivative w.r.t. delta rotation angle around global z-axis
double mdDeltaZ
derivative w.r.t. delta translation along global z-axis
double mdDeltaX
derivative w.r.t. delta translation along global x-axis
Simple container of local derivatives.
double mdY0
derivative w.r.t. track param. y0
LocalDerivative()=default
constructor
double mdTy
derivative w.r.t. track param. ty
void reset()
reset all data members to default value (zero)
double mdTx
derivative w.r.t. track param. tx
double mdX0
derivative w.r.t. track param. x0
virtual ~LocalDerivative()=default
destructor
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
simple structure to organise the storage of track parameters at inital z0 plane
std::vector< Cluster > clusters