Project
Loading...
Searching...
No Matches
AlgPntDbg.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
16
21#ifndef ALGPNTDBG_H
22#define ALGPNTDBG_H
23
25
26namespace o2
27{
28namespace align
29{
30
31struct AlgPntDbg {
32 public:
34 //
35 enum {
36 UpperLeg = 0
37 };
38 //
39 AlgPntDbg() = default;
40 AlgPntDbg(const AlgPntDbg&) = default;
41 ~AlgPntDbg() = default;
42 AlgPntDbg& operator=(const AlgPntDbg& other) = default;
43 AlgPntDbg(const AlignmentPoint* point) : mDetID(point->getDetID()), mSID(point->getSID()), mAlpha(point->getAlphaSens()), mX(point->getXTracking()), mY(point->getYTracking()), mZ(point->getZTracking()), mErrYY(point->getYZErrTracking()[0]), mErrZZ(point->getYZErrTracking()[2]), mErrYZ(point->getYZErrTracking()[1])
44 {
45 mSinAlp = std::sin(mAlpha);
46 mCosAlp = std::cos(mAlpha);
47 mSnp = point->getTrParamWSA()[2]; // track Snp at the sensor
48 if (point->isInvDir()) {
50 }
51 }
52
53 float getR() const { return std::sqrt(mX * mX + mY * mY); }
54 float getYTrack() const { return mY + mYRes; }
55 float getZTrack() const { return mZ + mZRes; }
56 float getXTrack() const { return mX; }
57 float getXLab() const { return mX * mCosAlp - mY * mSinAlp; }
58 float getYLab() const { return mX * mSinAlp + mY * mCosAlp; }
59 float getZLap() const { return mZ; }
60 float getXTrackLab() const { return mX * mCosAlp - getYTrack() * mSinAlp; }
61 float getYTrackLab() const { return mX * mSinAlp + getYTrack() * mCosAlp; }
62 float getZTrackLab() const { return getZTrack(); }
63 float getPhi() const { return std::atan2(getYLab(), getXLab()); }
64 void setFlag(int i) { mFlags |= 0x1 << i; }
65 bool getFlag(int i) const { return (mFlags & (0x1 << i)) != 0; }
66
67 void setUpperLeg() { setFlag(int(UpperLeg)); }
68 bool isUpperLeg() const { return getFlag(int(UpperLeg)); }
69
70 int mDetID{}; // DetectorID
71 int16_t mSID = -1; // sensor ID in the detector
72 uint16_t mFlags = 0; // flags
73 float mAlpha = 0.f; // Alpha of tracking frame
74 float mSinAlp = 0.f;
75 float mCosAlp = 0.f;
76 float mX = 0.f; // tracking X
77 float mY = 0.f; // tracking Y
78 float mZ = 0.f; // Z
79 float mYRes = 0.f; // tracking Y residual (track - point)
80 float mZRes = 0.f; // Z residual
81 float mErrYY = 0.f;
82 float mErrZZ = 0.f;
83 float mErrYZ = 0.f;
84 float mSnp = 0.f;
85
87};
88
89} // namespace align
90} // namespace o2
91#endif
Meausered point in the sensor.
int32_t i
double * getTrParamWSA() const
Static class with identifiers, bitmasks and names for ALICE detectors.
Definition DetID.h:58
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
AlgPntDbg & operator=(const AlgPntDbg &other)=default
AlgPntDbg(const AlignmentPoint *point)
Definition AlgPntDbg.h:43
float getYTrack() const
Definition AlgPntDbg.h:54
AlgPntDbg(const AlgPntDbg &)=default
void setFlag(int i)
Definition AlgPntDbg.h:64
float getYTrackLab() const
Definition AlgPntDbg.h:61
float getPhi() const
Definition AlgPntDbg.h:63
float getXLab() const
Definition AlgPntDbg.h:57
float getR() const
Definition AlgPntDbg.h:53
ClassDefNV(AlgPntDbg, 1)
float getXTrack() const
Definition AlgPntDbg.h:56
float getZTrackLab() const
Definition AlgPntDbg.h:62
float getXTrackLab() const
Definition AlgPntDbg.h:60
bool isUpperLeg() const
Definition AlgPntDbg.h:68
float getZLap() const
Definition AlgPntDbg.h:59
float getYLab() const
Definition AlgPntDbg.h:58
float getZTrack() const
Definition AlgPntDbg.h:55
bool getFlag(int i) const
Definition AlgPntDbg.h:65
VectorOfTObjectPtrs other