Project
Loading...
Searching...
No Matches
GeometryMisAligner.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
17
18#ifndef ALICEO2_MFT_GEOMETRYMISALIGNER_H
19#define ALICEO2_MFT_GEOMETRYMISALIGNER_H
20
21#include <TObject.h>
22
23class TGeoCombiTrans;
24class TClonesArray;
25
26namespace o2
27{
28namespace mft
29{
30class GeometryTGeo;
31}
32} // namespace o2
33
34namespace o2
35{
36namespace mft
37{
39{
40 public:
41 GeometryMisAligner(Double_t cartXMisAligM, Double_t cartXMisAligW, Double_t cartYMisAligM, Double_t cartYMisAligW, Double_t angMisAligM, Double_t angMisAligW);
42 GeometryMisAligner(Double_t cartMisAligM, Double_t cartMisAligW, Double_t angMisAligM, Double_t angMisAligW);
43 GeometryMisAligner(Double_t cartMisAligW, Double_t angMisAligW);
46
51
52 //_________________________________________________________________
53 // methods
54
56
57 bool matrixToAngles(const double* rot, double& psi, double& theta, double& phi);
58
59 // return a misaligned geometry obtained from the existing one.
60 void MisAlign(bool verbose = false, const std::string& ccdbHost = "http://ccdb-test.cern.ch:8080", long tmin = 0, long tmax = -1, const std::string& objectPath = "", const std::string& fileName = "MFTAlignment.root");
61
63 void SetSensorCartMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
64 {
65 fSensorMisAlig[0][0] = xmean;
66 fSensorMisAlig[0][1] = xwidth;
67 fSensorMisAlig[1][0] = ymean;
68 fSensorMisAlig[1][1] = ywidth;
69 fSensorMisAlig[2][0] = zmean;
70 fSensorMisAlig[2][1] = zwidth;
71 }
72
74 void SetSensorCartMisAlig(Double_t mean, Double_t width)
75 {
76 fSensorMisAlig[0][0] = mean;
77 fSensorMisAlig[0][1] = width;
78 fSensorMisAlig[1][0] = mean;
79 fSensorMisAlig[1][1] = width;
80 }
81
83 void SetSensorAngMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
84 {
85 fSensorMisAlig[3][0] = xmean;
86 fSensorMisAlig[3][1] = xwidth;
87 fSensorMisAlig[4][0] = ymean;
88 fSensorMisAlig[4][1] = ywidth;
89 fSensorMisAlig[5][0] = zmean;
90 fSensorMisAlig[5][1] = zwidth;
91 }
92
95 {
96 fSensorMisAlig[0][0] = 0.0;
97 fSensorMisAlig[0][1] = width;
98 fSensorMisAlig[1][0] = 0.0;
99 fSensorMisAlig[1][1] = width;
100 }
101
104 {
105 fSensorMisAlig[5][0] = 0.0;
106 fSensorMisAlig[5][1] = width;
107 }
108
110 void SetLadderCartMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
111 {
112 fLadderMisAlig[0][0] = xmean;
113 fLadderMisAlig[0][1] = xwidth;
114 fLadderMisAlig[1][0] = ymean;
115 fLadderMisAlig[1][1] = ywidth;
116 fLadderMisAlig[2][0] = zmean;
117 fLadderMisAlig[2][1] = zwidth;
118 }
119
121 void SetLadderCartMisAlig(Double_t mean, Double_t width)
122 {
123 fLadderMisAlig[0][0] = mean;
124 fLadderMisAlig[0][1] = width;
125 fLadderMisAlig[1][0] = mean;
126 fLadderMisAlig[1][1] = width;
127 }
128
130 void SetLadderAngMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
131 {
132 fLadderMisAlig[3][0] = xmean;
133 fLadderMisAlig[3][1] = xwidth;
134 fLadderMisAlig[4][0] = ymean;
135 fLadderMisAlig[4][1] = ywidth;
136 fLadderMisAlig[5][0] = zmean;
137 fLadderMisAlig[5][1] = zwidth;
138 }
139
142 {
143 fLadderMisAlig[0][0] = 0.0;
144 fLadderMisAlig[0][1] = width;
145 fLadderMisAlig[1][0] = 0.0;
146 fLadderMisAlig[1][1] = width;
147 }
148
151 {
152 fLadderMisAlig[5][0] = 0.0;
153 fLadderMisAlig[5][1] = width;
154 }
155
156 void SetXYAngMisAligFactor(Double_t factor);
157
158 void SetZCartMisAligFactor(Double_t factor);
159
161 void SetUseGaus(Bool_t usegaus)
162 {
163 fUseGaus = usegaus;
164 fUseUni = !usegaus;
165 }
166
168 void SetUseUni(Bool_t useuni)
169 {
170 fUseGaus = !useuni;
171 fUseUni = useuni;
172 }
173
175 void SetHalfCartMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
176 {
177 fHalfMisAlig[0][0] = xmean;
178 fHalfMisAlig[0][1] = xwidth;
179 fHalfMisAlig[1][0] = ymean;
180 fHalfMisAlig[1][1] = ywidth;
181 fHalfMisAlig[2][0] = zmean;
182 fHalfMisAlig[2][1] = zwidth;
183 }
184
186 void SetHalfAngMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
187 {
188 fHalfMisAlig[3][0] = xmean;
189 fHalfMisAlig[3][1] = xwidth;
190 fHalfMisAlig[4][0] = ymean;
191 fHalfMisAlig[4][1] = ywidth;
192 fHalfMisAlig[5][0] = zmean;
193 fHalfMisAlig[5][1] = zwidth;
194 }
195
197 void SetDiskCartMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
198 {
199 fDiskMisAlig[0][0] = xmean;
200 fDiskMisAlig[0][1] = xwidth;
201 fDiskMisAlig[1][0] = ymean;
202 fDiskMisAlig[1][1] = ywidth;
203 fDiskMisAlig[2][0] = zmean;
204 fDiskMisAlig[2][1] = zwidth;
205 }
206
208 void SetDiskAngMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
209 {
210 fDiskMisAlig[3][0] = xmean;
211 fDiskMisAlig[3][1] = xwidth;
212 fDiskMisAlig[4][0] = ymean;
213 fDiskMisAlig[4][1] = ywidth;
214 fDiskMisAlig[5][0] = zmean;
215 fDiskMisAlig[5][1] = zwidth;
216 }
217
219 void SetAlignmentResolution(const TClonesArray* misAlignArray, Int_t chId = -1, Double_t chResX = -1., Double_t chResY = -1., Double_t deResX = -1., Double_t deResY = -1.);
220
221 protected:
222 private:
223 // return a misaligned transformation
224 TGeoCombiTrans MisAlignLadder() const;
225 TGeoCombiTrans MisAlignDisk() const;
226 TGeoCombiTrans MisAlignSensor() const;
227 TGeoCombiTrans MisAlignHalf() const;
228
229 void GetUniMisAlign(Double_t cartMisAlig[3], Double_t angMisAlig[3], const Double_t lParMisAlig[6][2]) const;
230 void GetGausMisAlign(Double_t cartMisAlig[3], Double_t angMisAlig[3], const Double_t lParMisAlig[6][2]) const;
231
232 Bool_t fUseUni;
233 Bool_t fUseGaus;
234
235 Double_t fSensorMisAlig[6][2];
236 Double_t fLadderMisAlig[6][2];
237 Double_t fDiskMisAlig[6][2];
238 Double_t fHalfMisAlig[6][2];
239
240 Double_t fXYAngMisAligFactor;
241 Double_t fZCartMisAligFactor;
242
243 ClassDefNV(GeometryMisAligner, 0) // Geometry parametrisation
244};
245
246} // namespace mft
247} // namespace o2
248
249#endif //ALICEO2_MFT_GEOMETRYMISALIGNER_H
void SetLadderAngMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
Set ladder angular displacement.
void SetDiskAngMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
Set disk cartesian displacement parameters.
void SetAlignmentResolution(const TClonesArray *misAlignArray, Int_t chId=-1, Double_t chResX=-1., Double_t chResY=-1., Double_t deResX=-1., Double_t deResY=-1.)
Set alignment resolution to misalign objects to be stored in CCDB.
void SetUseUni(Bool_t useuni)
Set option for uniform distribution.
void SetSensorCartMisAlig(Double_t mean, Double_t width)
Set sensor cartesian displacement parameters, the same along x, y.
void SetHalfAngMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
Set half cartesian displacement parameters.
void SetLadderCartMisAlig(Double_t mean, Double_t width)
Set ladder cartesian displacement parameters, the same along x, y.
void SetMaxSensorAngMisAlig(Double_t width)
Set sensor angular displacement (Kept for backward compatibility)
void SetHalfCartMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
Set half cartesian displacement parameters.
void SetSensorAngMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
Set sensor angular displacement.
void SetXYAngMisAligFactor(Double_t factor)
void SetMaxSensorCartMisAlig(Double_t width)
Set sensor cartesian displacement (Kept for backward compatibility)
void SetUseGaus(Bool_t usegaus)
Set option for gaussian distribution.
void MisAlign(bool verbose=false, const std::string &ccdbHost="http://ccdb-test.cern.ch:8080", long tmin=0, long tmax=-1, const std::string &objectPath="", const std::string &fileName="MFTAlignment.root")
void SetMaxLadderCartMisAlig(Double_t width)
Set cartesian displacement for ladder (Kept for backward compatibility)
GeometryMisAligner(const GeometryMisAligner &right)
Not implemented.
void SetLadderCartMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
Set sensor cartesian displacement parameters different along x, y.
void SetMaxLadderAngMisAlig(Double_t width)
Set angular displacement for ladder (Kept for backward compatibility)
bool matrixToAngles(const double *rot, double &psi, double &theta, double &phi)
access to geometry details
GeometryMisAligner & operator=(const GeometryMisAligner &right)
Not implemented.
void SetZCartMisAligFactor(Double_t factor)
void SetSensorCartMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
Set sensor cartesian displacement parameters different along x, y.
void SetDiskCartMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
Set disk cartesian displacement parameters.
GLdouble GLdouble right
Definition glcorearb.h:4077
GLint GLsizei width
Definition glcorearb.h:270
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...