CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CreateSurveyRcds.cc
Go to the documentation of this file.
7 
11 
16 #include "CLHEP/Random/RandGauss.h"
17 
20  geomDetToken_(esConsumes()),
21  ptpToken_(esConsumes()),
22  ptitpToken_(esConsumes()),
23  aliToken_(esConsumes()),
24  aliErrToken_(esConsumes()) {
25  m_inputGeom = cfg.getUntrackedParameter<std::string>("inputGeom");
26  m_inputSimpleMis = cfg.getUntrackedParameter<double>("simpleMis");
27  m_generatedRandom = cfg.getUntrackedParameter<bool>("generatedRandom");
28  m_generatedSimple = cfg.getUntrackedParameter<bool>("generatedSimple");
29 }
30 
32  //Retrieve tracker topology from geometry
33  const TrackerTopology* const tTopo = &setup.getData(tTopoToken_);
34  const GeometricDet* geom = &setup.getData(geomDetToken_);
35  const PTrackerParameters& ptp = setup.getData(ptpToken_);
37  TrackerGeometry* tracker = TrackerGeomBuilderFromGeometricDet().build(geom, ptitp, ptp, tTopo);
38 
39  //take geometry from DB or randomly generate geometry
40  if (m_inputGeom == "sqlite") {
41  //build the tracker
42  const Alignments* alignments = &setup.getData(aliToken_);
43  const AlignmentErrorsExtended* alignmentErrors = &setup.getData(aliErrToken_);
44 
45  //apply the latest alignments
46  GeometryAligner aligner;
47  aligner.applyAlignments<TrackerGeometry>(&(*tracker), alignments, alignmentErrors, AlignTransform());
48  }
49 
50  addComponent(new AlignableTracker(tracker, tTopo));
51 
52  Alignable* ali = detector();
53  if (m_inputGeom == "generated") {
54  setGeometry(ali);
55  }
56 
57  setSurveyErrors(ali);
58 }
59 
61  const align::Alignables& comp = ali->components();
62  unsigned int nComp = comp.size();
63  //move then do for lower level object
64  //for issue of det vs detunit
65  bool usecomps = true;
66  if ((ali->alignableObjectId() == 2) && (nComp >= 1))
67  usecomps = false;
68  for (unsigned int i = 0; i < nComp; ++i) {
69  if (usecomps)
70  setGeometry(comp[i]);
71  }
72  DetId id(ali->id());
73  int subdetlevel = id.subdetId();
74  int level = ali->alignableObjectId();
75 
76  //for random misalignment
77  if (m_generatedRandom) {
78  if (subdetlevel > 0) {
79  AlgebraicVector value = getStructureErrors(level, subdetlevel);
80 
81  double value0 = CLHEP::RandGauss::shoot(0, value[0]);
82  double value1 = CLHEP::RandGauss::shoot(0, value[1]);
83  double value2 = CLHEP::RandGauss::shoot(0, value[2]);
84  double value3 = CLHEP::RandGauss::shoot(0, value[3]);
85  double value4 = CLHEP::RandGauss::shoot(0, value[4]);
86  double value5 = CLHEP::RandGauss::shoot(0, value[5]);
87 
88  //move/rotate the surface
89  align::LocalVector diffR(value0, value1, value2);
90  align::Scalar diffWx = value3;
91  align::Scalar diffWy = value4;
92  align::Scalar diffWz = value5;
93  ali->move(ali->surface().toGlobal(diffR));
94  ali->rotateAroundLocalX(diffWx);
95  ali->rotateAroundLocalY(diffWy);
96  ali->rotateAroundLocalZ(diffWz);
97  }
98  }
99 
100  // for simple misalignments
101  if (m_generatedSimple) {
102  if ((level == 2) || ((level == 1) && (ali->mother()->alignableObjectId() != 2))) {
103  const double constMis = m_inputSimpleMis;
104  const double dAngle = constMis / ali->surface().length();
105  //std::cout << "Shift: " << constMis << ", Rot: " << dAngle << std::endl;
106  double value0 = CLHEP::RandGauss::shoot(0, constMis);
107  double value1 = CLHEP::RandGauss::shoot(0, constMis);
108  double value2 = CLHEP::RandGauss::shoot(0, constMis);
109  double value3 = CLHEP::RandGauss::shoot(0, dAngle);
110  double value4 = CLHEP::RandGauss::shoot(0, dAngle);
111  double value5 = CLHEP::RandGauss::shoot(0, dAngle);
112 
113  align::LocalVector diffR(value0, value1, value2);
114  ali->move(ali->surface().toGlobal(diffR));
115  align::Scalar diffWx = value3;
116  align::Scalar diffWy = value4;
117  align::Scalar diffWz = value5;
118  ali->rotateAroundLocalX(diffWx);
119  ali->rotateAroundLocalY(diffWy);
120  ali->rotateAroundLocalZ(diffWz);
121  }
122  }
123 }
124 
126  const align::Alignables& comp = ali->components();
127  unsigned int nComp = comp.size();
128  //move then do for lower level object
129  //for issue of det vs detunit
130  for (unsigned int i = 0; i < nComp; ++i) {
131  setSurveyErrors(comp[i]);
132  }
133 
134  DetId id(ali->id());
135  int subdetlevel = id.subdetId();
136  int level = ali->alignableObjectId();
137 
138  AlgebraicVector error = getStructureErrors(level, subdetlevel);
139 
140  double error0 = error[0];
141  double error1 = error[1];
142  double error2 = error[2];
143  double error3 = error[3];
144  double error4 = error[4];
145  double error5 = error[5];
146 
147  // ----------------INFLATING ERRORS----------------------
148  // inflating sensitive coordinates in each subdetector
149  // tib
150  if ((level <= 2) && (subdetlevel == 3)) {
151  error0 = 0.01;
152  error5 = 0.001;
153  if ((level == 2) && (nComp == 2)) {
154  error1 = 0.01;
155  }
156  }
157  // tid
158  if ((level <= 2) && (subdetlevel == 4)) {
159  error0 = 0.01;
160  error1 = 0.01;
161  error2 = 0.01;
162  error3 = 0.001;
163  error4 = 0.001;
164  error5 = 0.001;
165  //error0=0.01; error1=0.002; error2=0.002; error3=0.0002; error4=0.0002; error5=0.001;
166  //if ((level == 2)&&(nComp == 2)){
167  // error1 = 0.01;
168  //}
169  }
170  if ((level == 23) && (subdetlevel == 4)) { //Ring is a Disk
171  error0 = 0.02;
172  error1 = 0.02;
173  error2 = 0.03;
174  error3 = 0.0002;
175  error4 = 0.0002;
176  error5 = 0.0002;
177  }
178  if ((level == 22) && (subdetlevel == 4)) { //Side of a Ring
179  error0 = 0.01;
180  error1 = 0.01;
181  error2 = 0.01;
182  error3 = 0.0002;
183  error4 = 0.0002;
184  error5 = 0.0002;
185  }
186  // tob
187  if ((level <= 2) && (subdetlevel == 5)) {
188  //error0 = 0.015; error1 = 0.015; error2 = 0.05; error3 = 0.001; error4 = 0.001; error5 = 0.001;
189  error0 = 0.015;
190  error1 = 0.003;
191  error2 = 0.003;
192  error3 = 0.0002;
193  error4 = 0.0002;
194  error5 = 0.001;
195  if ((level == 2) && (nComp == 2)) {
196  error1 = 0.015;
197  }
198  }
199  if ((level == 27) && (subdetlevel == 5)) { //Rod in a Layer
200  error0 = 0.02;
201  error1 = 0.02;
202  error2 = 0.03;
203  error3 = 0.001;
204  error4 = 0.001;
205  error5 = 0.001;
206  }
207  // tec
208  if ((level <= 2) && (subdetlevel == 6)) {
209  error0 = 0.02;
210  error5 = 0.0005;
211  if ((level == 2) && (nComp == 2)) {
212  error1 = 0.02;
213  }
214  }
215  if ((level == 34) && (subdetlevel == 6)) { //Side on a Disk
216  error0 = 0.01;
217  error1 = 0.01;
218  error2 = 0.02;
219  error3 = 0.00005;
220  error4 = 0.00005;
221  error5 = 0.00005;
222  }
223  if ((level == 33) && (subdetlevel == 6)) { //Petal on a Side of a Disk
224  error0 = 0.01;
225  error1 = 0.01;
226  error2 = 0.02;
227  error3 = 0.0001;
228  error4 = 0.0001;
229  error5 = 0.0001;
230  }
231  if ((level == 32) && (subdetlevel == 6)) { //Ring on a Petal
232  error0 = 0.007;
233  error1 = 0.007;
234  error2 = 0.015;
235  error3 = 0.00015;
236  error4 = 0.00015;
237  error5 = 0.00015;
238  }
239  // ----------------INFLATING ERRORS----------------------
240 
241  //create the error matrix
242  align::ErrorMatrix error_Matrix;
243  double* errorData = error_Matrix.Array();
244  errorData[0] = error0 * error0;
245  errorData[2] = error1 * error1;
246  errorData[5] = error2 * error2;
247  errorData[9] = error3 * error3;
248  errorData[14] = error4 * error4;
249  errorData[20] = error5 * error5;
250  errorData[1] = 0.0;
251  errorData[3] = 0.0;
252  errorData[4] = 0.0;
253  errorData[6] = 0.0;
254  errorData[7] = 0.0;
255  errorData[8] = 0.0;
256  errorData[10] = 0.0;
257  errorData[11] = 0.0;
258  errorData[12] = 0.0;
259  errorData[13] = 0.0;
260  errorData[15] = 0.0;
261  errorData[16] = 0.0;
262  errorData[17] = 0.0;
263  errorData[18] = 0.0;
264  errorData[19] = 0.0;
265 
266  ali->setSurvey(new SurveyDet(ali->surface(), error_Matrix));
267 }
268 
269 //-------------------------------------------------------
270 // DEFAULT VALUES FOR THE ASSEMBLY PRECISION
271 //-------------------------------------------------------
273  AlgebraicVector deltaRW(6);
274  deltaRW(1) = 0.0;
275  deltaRW(2) = 0.0;
276  deltaRW(3) = 0.0;
277  deltaRW(4) = 0.0;
278  deltaRW(5) = 0.0;
279  deltaRW(6) = 0.0;
280  //PIXEL
281  if ((level == 37) && (subdetlevel == 1)) {
282  deltaRW(1) = 0.3;
283  deltaRW(2) = 0.3;
284  deltaRW(3) = 0.3;
285  deltaRW(4) = 0.0017;
286  deltaRW(5) = 0.0017;
287  deltaRW(6) = 0.0017;
288  }
289  //STRIP
290  if ((level == 38) && (subdetlevel == 3)) {
291  deltaRW(1) = 0.3;
292  deltaRW(2) = 0.3;
293  deltaRW(3) = 0.3;
294  deltaRW(4) = 0.0004;
295  deltaRW(5) = 0.0004;
296  deltaRW(6) = 0.0004;
297  }
298  //TRACKER
299  if ((level == 39) && (subdetlevel == 1)) {
300  deltaRW(1) = 0.0;
301  deltaRW(2) = 0.0;
302  deltaRW(3) = 0.0;
303  deltaRW(4) = 0.0;
304  deltaRW(5) = 0.0;
305  deltaRW(6) = 0.0;
306  }
307  //TPB
308  if ((level == 7) && (subdetlevel == 1)) {
309  deltaRW(1) = 0.2;
310  deltaRW(2) = 0.2;
311  deltaRW(3) = 0.2;
312  deltaRW(4) = 0.003;
313  deltaRW(5) = 0.003;
314  deltaRW(6) = 0.003;
315  }
316  if ((level == 6) && (subdetlevel == 1)) {
317  deltaRW(1) = 0.05;
318  deltaRW(2) = 0.05;
319  deltaRW(3) = 0.05;
320  deltaRW(4) = 0.0008;
321  deltaRW(5) = 0.0008;
322  deltaRW(6) = 0.0008;
323  }
324  if ((level == 5) && (subdetlevel == 1)) {
325  deltaRW(1) = 0.02;
326  deltaRW(2) = 0.02;
327  deltaRW(3) = 0.02;
328  deltaRW(4) = 0.0004;
329  deltaRW(5) = 0.0004;
330  deltaRW(6) = 0.0004;
331  }
332  if ((level == 4) && (subdetlevel == 1)) {
333  deltaRW(1) = 0.01;
334  deltaRW(2) = 0.01;
335  deltaRW(3) = 0.005;
336  deltaRW(4) = 0.0002;
337  deltaRW(5) = 0.0002;
338  deltaRW(6) = 0.0002;
339  }
340  if ((level == 2) && (subdetlevel == 1)) {
341  deltaRW(1) = 0.005;
342  deltaRW(2) = 0.005;
343  deltaRW(3) = 0.003;
344  deltaRW(4) = 0.001;
345  deltaRW(5) = 0.001;
346  deltaRW(6) = 0.001;
347  }
348  if ((level == 1) && (subdetlevel == 1)) {
349  deltaRW(1) = 0.005;
350  deltaRW(2) = 0.005;
351  deltaRW(3) = 0.003;
352  deltaRW(4) = 0.001;
353  deltaRW(5) = 0.001;
354  deltaRW(6) = 0.001;
355  }
356  //TPE
357  if ((level == 13) && (subdetlevel == 2)) {
358  deltaRW(1) = 0.2;
359  deltaRW(2) = 0.2;
360  deltaRW(3) = 0.2;
361  deltaRW(4) = 0.0017;
362  deltaRW(5) = 0.0017;
363  deltaRW(6) = 0.0017;
364  }
365  if ((level == 12) && (subdetlevel == 2)) {
366  deltaRW(1) = 0.05;
367  deltaRW(2) = 0.05;
368  deltaRW(3) = 0.05;
369  deltaRW(4) = 0.0004;
370  deltaRW(5) = 0.0004;
371  deltaRW(6) = 0.0004;
372  }
373  if ((level == 11) && (subdetlevel == 2)) {
374  deltaRW(1) = 0.02;
375  deltaRW(2) = 0.02;
376  deltaRW(3) = 0.02;
377  deltaRW(4) = 0.001;
378  deltaRW(5) = 0.001;
379  deltaRW(6) = 0.001;
380  }
381  if ((level == 10) && (subdetlevel == 2)) {
382  deltaRW(1) = 0.01;
383  deltaRW(2) = 0.01;
384  deltaRW(3) = 0.01;
385  deltaRW(4) = 0.001;
386  deltaRW(5) = 0.001;
387  deltaRW(6) = 0.001;
388  }
389  if ((level == 9) && (subdetlevel == 2)) {
390  deltaRW(1) = 0.01;
391  deltaRW(2) = 0.01;
392  deltaRW(3) = 0.005;
393  deltaRW(4) = 0.002;
394  deltaRW(5) = 0.002;
395  deltaRW(6) = 0.002;
396  }
397  if ((level == 2) && (subdetlevel == 2)) {
398  deltaRW(1) = 0.005;
399  deltaRW(2) = 0.005;
400  deltaRW(3) = 0.003;
401  deltaRW(4) = 0.001;
402  deltaRW(5) = 0.001;
403  deltaRW(6) = 0.001;
404  }
405  if ((level == 1) && (subdetlevel == 2)) {
406  deltaRW(1) = 0.005;
407  deltaRW(2) = 0.005;
408  deltaRW(3) = 0.003;
409  deltaRW(4) = 0.001;
410  deltaRW(5) = 0.001;
411  deltaRW(6) = 0.001;
412  }
413  //TIB
414  if ((level == 20) && (subdetlevel == 3)) {
415  deltaRW(1) = 0.2;
416  deltaRW(2) = 0.2;
417  deltaRW(3) = 0.2;
418  deltaRW(4) = 0.0017;
419  deltaRW(5) = 0.0017;
420  deltaRW(6) = 0.0017;
421  }
422  if ((level == 19) && (subdetlevel == 3)) {
423  deltaRW(1) = 0.1;
424  deltaRW(2) = 0.1;
425  deltaRW(3) = 0.1;
426  deltaRW(4) = 0.0008;
427  deltaRW(5) = 0.0008;
428  deltaRW(6) = 0.0008;
429  }
430  if ((level == 18) && (subdetlevel == 3)) {
431  deltaRW(1) = 0.04;
432  deltaRW(2) = 0.04;
433  deltaRW(3) = 0.02;
434  deltaRW(4) = 0.0006;
435  deltaRW(5) = 0.0006;
436  deltaRW(6) = 0.0006;
437  }
438  if ((level == 17) && (subdetlevel == 3)) {
439  deltaRW(1) = 0.03;
440  deltaRW(2) = 0.03;
441  deltaRW(3) = 0.015;
442  deltaRW(4) = 0.0004;
443  deltaRW(5) = 0.0004;
444  deltaRW(6) = 0.0004;
445  }
446  if ((level == 16) && (subdetlevel == 3)) {
447  deltaRW(1) = 0.01;
448  deltaRW(2) = 0.01;
449  deltaRW(3) = 0.01;
450  deltaRW(4) = 0.0004;
451  deltaRW(5) = 0.0002;
452  deltaRW(6) = 0.0002;
453  }
454  if ((level == 15) && (subdetlevel == 3)) {
455  deltaRW(1) = 0.01;
456  deltaRW(2) = 0.01;
457  deltaRW(3) = 0.01;
458  deltaRW(4) = 0.0004;
459  deltaRW(5) = 0.0002;
460  deltaRW(6) = 0.0002;
461  }
462  if ((level == 2) && (subdetlevel == 3)) {
463  deltaRW(1) = 0.005;
464  deltaRW(2) = 0.005;
465  deltaRW(3) = 0.005;
466  deltaRW(4) = 0.001;
467  deltaRW(5) = 0.0005;
468  deltaRW(6) = 0.0005;
469  }
470  if ((level == 1) && (subdetlevel == 3)) {
471  deltaRW(1) = 0.005;
472  deltaRW(2) = 0.005;
473  deltaRW(3) = 0.005;
474  deltaRW(4) = 0.001;
475  deltaRW(5) = 0.0005;
476  deltaRW(6) = 0.0005;
477  }
478  //TID
479  if ((level == 25) && (subdetlevel == 4)) {
480  deltaRW(1) = 0.2;
481  deltaRW(2) = 0.2;
482  deltaRW(3) = 0.2;
483  deltaRW(4) = 0.0013;
484  deltaRW(5) = 0.0013;
485  deltaRW(6) = 0.0013;
486  }
487  if ((level == 24) && (subdetlevel == 4)) {
488  deltaRW(1) = 0.05;
489  deltaRW(2) = 0.05;
490  deltaRW(3) = 0.05;
491  deltaRW(4) = 0.0004;
492  deltaRW(5) = 0.0004;
493  deltaRW(6) = 0.0004;
494  }
495  if ((level == 23) && (subdetlevel == 4)) {
496  deltaRW(1) = 0.01;
497  deltaRW(2) = 0.01;
498  deltaRW(3) = 0.01;
499  deltaRW(4) = 0.0001;
500  deltaRW(5) = 0.0001;
501  deltaRW(6) = 0.0001;
502  }
503  if ((level == 22) && (subdetlevel == 4)) {
504  deltaRW(1) = 0.005;
505  deltaRW(2) = 0.005;
506  deltaRW(3) = 0.005;
507  deltaRW(4) = 0.0001;
508  deltaRW(5) = 0.0001;
509  deltaRW(6) = 0.0001;
510  }
511  if ((level == 2) && (subdetlevel == 4)) {
512  deltaRW(1) = 0.005;
513  deltaRW(2) = 0.005;
514  deltaRW(3) = 0.005;
515  deltaRW(4) = 0.0005;
516  deltaRW(5) = 0.0005;
517  deltaRW(6) = 0.0005;
518  }
519  if ((level == 1) && (subdetlevel == 4)) {
520  deltaRW(1) = 0.005;
521  deltaRW(2) = 0.005;
522  deltaRW(3) = 0.005;
523  deltaRW(4) = 0.0005;
524  deltaRW(5) = 0.0005;
525  deltaRW(6) = 0.0005;
526  }
527  //TOB
528  if ((level == 30) && (subdetlevel == 5)) {
529  deltaRW(1) = 0.2;
530  deltaRW(2) = 0.2;
531  deltaRW(3) = 0.2;
532  deltaRW(4) = 0.0008;
533  deltaRW(5) = 0.0008;
534  deltaRW(6) = 0.0008;
535  }
536  if ((level == 29) && (subdetlevel == 5)) {
537  deltaRW(1) = 0.014;
538  deltaRW(2) = 0.014;
539  deltaRW(3) = 0.05;
540  deltaRW(4) = 0.0001;
541  deltaRW(5) = 0.0001;
542  deltaRW(6) = 0.0001;
543  }
544  if ((level == 28) && (subdetlevel == 5)) {
545  deltaRW(1) = 0.02;
546  deltaRW(2) = 0.02;
547  deltaRW(3) = 0.02;
548  deltaRW(4) = 0.0001;
549  deltaRW(5) = 0.0001;
550  deltaRW(6) = 0.0001;
551  }
552  if ((level == 27) && (subdetlevel == 5)) {
553  deltaRW(1) = 0.01;
554  deltaRW(2) = 0.01;
555  deltaRW(3) = 0.02;
556  deltaRW(4) = 0.0001;
557  deltaRW(5) = 0.0001;
558  deltaRW(6) = 0.0001;
559  }
560  if ((level == 2) && (subdetlevel == 5)) {
561  deltaRW(1) = 0.003;
562  deltaRW(2) = 0.003;
563  deltaRW(3) = 0.01;
564  deltaRW(4) = 0.0002;
565  deltaRW(5) = 0.0002;
566  deltaRW(6) = 0.0002;
567  }
568  if ((level == 1) && (subdetlevel == 5)) {
569  deltaRW(1) = 0.003;
570  deltaRW(2) = 0.003;
571  deltaRW(3) = 0.01;
572  deltaRW(4) = 0.0002;
573  deltaRW(5) = 0.0002;
574  deltaRW(6) = 0.0002;
575  }
576  //TEC
577  if ((level == 36) && (subdetlevel == 6)) {
578  deltaRW(1) = 0.2;
579  deltaRW(2) = 0.2;
580  deltaRW(3) = 0.2;
581  deltaRW(4) = 0.0008;
582  deltaRW(5) = 0.0008;
583  deltaRW(6) = 0.0008;
584  }
585  if ((level == 35) && (subdetlevel == 6)) {
586  deltaRW(1) = 0.05;
587  deltaRW(2) = 0.05;
588  deltaRW(3) = 0.05;
589  deltaRW(4) = 0.0003;
590  deltaRW(5) = 0.0003;
591  deltaRW(6) = 0.0003;
592  }
593  if ((level == 34) && (subdetlevel == 6)) {
594  deltaRW(1) = 0.01;
595  deltaRW(2) = 0.01;
596  deltaRW(3) = 0.02;
597  deltaRW(4) = 0.00005;
598  deltaRW(5) = 0.00005;
599  deltaRW(6) = 0.00005;
600  }
601  if ((level == 33) && (subdetlevel == 6)) {
602  deltaRW(1) = 0.01;
603  deltaRW(2) = 0.01;
604  deltaRW(3) = 0.02;
605  deltaRW(4) = 0.0001;
606  deltaRW(5) = 0.0001;
607  deltaRW(6) = 0.0001;
608  }
609  if ((level == 32) && (subdetlevel == 6)) {
610  deltaRW(1) = 0.007;
611  deltaRW(2) = 0.007;
612  deltaRW(3) = 0.015;
613  deltaRW(4) = 0.00015;
614  deltaRW(5) = 0.00015;
615  deltaRW(6) = 0.00015;
616  }
617  if ((level == 2) && (subdetlevel == 6)) {
618  deltaRW(1) = 0.002;
619  deltaRW(2) = 0.002;
620  deltaRW(3) = 0.005;
621  deltaRW(4) = 0.0001;
622  deltaRW(5) = 0.0001;
623  deltaRW(6) = 0.0001;
624  }
625  if ((level == 1) && (subdetlevel == 6)) {
626  deltaRW(1) = 0.002;
627  deltaRW(2) = 0.002;
628  deltaRW(3) = 0.005;
629  deltaRW(4) = 0.0001;
630  deltaRW(5) = 0.0001;
631  deltaRW(6) = 0.0001;
632  }
633 
634  return deltaRW;
635 }
636 //-------------------------------------------------------
637 // DEFAULT VALUES FOR THE PRECISION OF THE SURVEY
638 //-------------------------------------------------------
640  AlgebraicVector deltaRW(6);
641  deltaRW(1) = 0.0;
642  deltaRW(2) = 0.0;
643  deltaRW(3) = 0.0;
644  deltaRW(4) = 0.0;
645  deltaRW(5) = 0.0;
646  deltaRW(6) = 0.0;
647  //PIXEL
648  if ((level == 37) && (subdetlevel == 1)) { //Pixel Detector in Tracker
649  deltaRW(1) = 0.2;
650  deltaRW(2) = 0.2;
651  deltaRW(3) = 0.2;
652  deltaRW(4) = 0.0017;
653  deltaRW(5) = 0.0017;
654  deltaRW(6) = 0.0017;
655  }
656  //STRIP
657  if ((level == 38) && (subdetlevel == 3)) { //Strip Tracker in Tracker
658  deltaRW(1) = 0.2;
659  deltaRW(2) = 0.2;
660  deltaRW(3) = 0.2;
661  deltaRW(4) = 0.0004;
662  deltaRW(5) = 0.0004;
663  deltaRW(6) = 0.0004;
664  }
665  //TRACKER
666  if ((level == 39) && (subdetlevel == 1)) { //Tracker
667  deltaRW(1) = 0.0;
668  deltaRW(2) = 0.0;
669  deltaRW(3) = 0.0;
670  deltaRW(4) = 0.0;
671  deltaRW(5) = 0.0;
672  deltaRW(6) = 0.0;
673  }
674  //TPB
675  if ((level == 7) && (subdetlevel == 1)) { //Barrel Pixel in Pixel
676  deltaRW(1) = 0.05;
677  deltaRW(2) = 0.05;
678  deltaRW(3) = 0.1;
679  deltaRW(4) = 0.0008;
680  deltaRW(5) = 0.0008;
681  deltaRW(6) = 0.0008;
682  }
683  if ((level == 6) && (subdetlevel == 1)) { //HalfBarrel in Barrel Pixel
684  deltaRW(1) = 0.015;
685  deltaRW(2) = 0.015;
686  deltaRW(3) = 0.03;
687  deltaRW(4) = 0.0003;
688  deltaRW(5) = 0.0003;
689  deltaRW(6) = 0.0003;
690  }
691  if ((level == 5) && (subdetlevel == 1)) { //HalfShell in HalfBarrel
692  deltaRW(1) = 0.005;
693  deltaRW(2) = 0.005;
694  deltaRW(3) = 0.01;
695  deltaRW(4) = 0.0001;
696  deltaRW(5) = 0.0001;
697  deltaRW(6) = 0.0001;
698  }
699  if ((level == 4) && (subdetlevel == 1)) { //Ladder in HalfShell
700  deltaRW(1) = 0.001;
701  deltaRW(2) = 0.001;
702  deltaRW(3) = 0.002;
703  deltaRW(4) = 0.00005;
704  deltaRW(5) = 0.00005;
705  deltaRW(6) = 0.00005;
706  }
707  if ((level == 2) && (subdetlevel == 1)) { //Det in Ladder
708  deltaRW(1) = 0.0005;
709  deltaRW(2) = 0.001;
710  deltaRW(3) = 0.001;
711  deltaRW(4) = 0.0001;
712  deltaRW(5) = 0.0001;
713  deltaRW(6) = 0.0001;
714  }
715  if ((level == 1) && (subdetlevel == 1)) { //DetUnit in Ladder
716  deltaRW(1) = 0.0005;
717  deltaRW(2) = 0.001;
718  deltaRW(3) = 0.001;
719  deltaRW(4) = 0.0001;
720  deltaRW(5) = 0.0001;
721  deltaRW(6) = 0.0001;
722  }
723  //TPE
724  if ((level == 13) && (subdetlevel == 2)) { //Forward Pixel in Pixel
725  deltaRW(1) = 0.05;
726  deltaRW(2) = 0.05;
727  deltaRW(3) = 0.1;
728  deltaRW(4) = 0.0004;
729  deltaRW(5) = 0.0004;
730  deltaRW(6) = 0.0004;
731  }
732  if ((level == 12) && (subdetlevel == 2)) { //HalfCylinder in Forward Pixel
733  deltaRW(1) = 0.015;
734  deltaRW(2) = 0.015;
735  deltaRW(3) = 0.03;
736  deltaRW(4) = 0.00015;
737  deltaRW(5) = 0.00015;
738  deltaRW(6) = 0.00015;
739  }
740  if ((level == 11) && (subdetlevel == 2)) { //HalfDisk in HalfCylinder
741  deltaRW(1) = 0.005;
742  deltaRW(2) = 0.005;
743  deltaRW(3) = 0.01;
744  deltaRW(4) = 0.0001;
745  deltaRW(5) = 0.0001;
746  deltaRW(6) = 0.0001;
747  }
748  if ((level == 10) && (subdetlevel == 2)) { //Blade in HalfDisk
749  deltaRW(1) = 0.001;
750  deltaRW(2) = 0.001;
751  deltaRW(3) = 0.002;
752  deltaRW(4) = 0.0001;
753  deltaRW(5) = 0.0001;
754  deltaRW(6) = 0.0001;
755  }
756  if ((level == 9) && (subdetlevel == 2)) { //Panel in Blade
757  deltaRW(1) = 0.001;
758  deltaRW(2) = 0.0008;
759  deltaRW(3) = 0.0006;
760  deltaRW(4) = 0.0002;
761  deltaRW(5) = 0.0002;
762  deltaRW(6) = 0.0002;
763  }
764  if ((level == 2) && (subdetlevel == 2)) { //Det in Panel
765  deltaRW(1) = 0.0005;
766  deltaRW(2) = 0.0004;
767  deltaRW(3) = 0.0006;
768  deltaRW(4) = 0.0001;
769  deltaRW(5) = 0.0003;
770  deltaRW(6) = 0.0001;
771  }
772  if ((level == 1) && (subdetlevel == 2)) { //DetUnit in Panel
773  deltaRW(1) = 0.0005;
774  deltaRW(2) = 0.0004;
775  deltaRW(3) = 0.0006;
776  deltaRW(4) = 0.0001;
777  deltaRW(5) = 0.0003;
778  deltaRW(6) = 0.0001;
779  }
780  //TIB
781  if ((level == 20) && (subdetlevel == 3)) { //TIB in Strip Tracker
782  deltaRW(1) = 0.08;
783  deltaRW(2) = 0.08;
784  deltaRW(3) = 0.04;
785  deltaRW(4) = 0.0017;
786  deltaRW(5) = 0.0017;
787  deltaRW(6) = 0.0017;
788  }
789  if ((level == 19) && (subdetlevel == 3)) { //HalfBarrel in TIB
790  deltaRW(1) = 0.04;
791  deltaRW(2) = 0.04;
792  deltaRW(3) = 0.02;
793  deltaRW(4) = 0.0003;
794  deltaRW(5) = 0.0003;
795  deltaRW(6) = 0.0003;
796  }
797  if ((level == 18) && (subdetlevel == 3)) { //Layer in HalfBarrel
798  deltaRW(1) = 0.02;
799  deltaRW(2) = 0.02;
800  deltaRW(3) = 0.01;
801  deltaRW(4) = 0.0006;
802  deltaRW(5) = 0.0006;
803  deltaRW(6) = 0.0006;
804  }
805  if ((level == 17) && (subdetlevel == 3)) { //HalfShell in Layer
806  deltaRW(1) = 0.01;
807  deltaRW(2) = 0.01;
808  deltaRW(3) = 0.005;
809  deltaRW(4) = 0.0002;
810  deltaRW(5) = 0.0002;
811  deltaRW(6) = 0.0002;
812  }
813  if ((level == 16) && (subdetlevel == 3)) { //Surface in a HalfShell
814  deltaRW(1) = 0.004;
815  deltaRW(2) = 0.004;
816  deltaRW(3) = 0.008;
817  deltaRW(4) = 0.0002;
818  deltaRW(5) = 0.0001;
819  deltaRW(6) = 0.0001;
820  }
821  if ((level == 15) && (subdetlevel == 3)) { //String in a Surface
822  deltaRW(1) = 0.004;
823  deltaRW(2) = 0.004;
824  deltaRW(3) = 0.008;
825  deltaRW(4) = 0.0002;
826  deltaRW(5) = 0.0001;
827  deltaRW(6) = 0.0001;
828  }
829  if ((level == 2) && (subdetlevel == 3)) { //Det in a String
830  deltaRW(1) = 0.002;
831  deltaRW(2) = 0.002;
832  deltaRW(3) = 0.004;
833  deltaRW(4) = 0.0004;
834  deltaRW(5) = 0.0002;
835  deltaRW(6) = 0.0002;
836  }
837  if ((level == 1) && (subdetlevel == 3)) { //DetUnit in a String
838  deltaRW(1) = 0.002;
839  deltaRW(2) = 0.002;
840  deltaRW(3) = 0.004;
841  deltaRW(4) = 0.0004;
842  deltaRW(5) = 0.0002;
843  deltaRW(6) = 0.0002;
844  }
845  //TID
846  if ((level == 25) && (subdetlevel == 4)) { //TID in Strip Tracker
847  deltaRW(1) = 0.05;
848  deltaRW(2) = 0.05;
849  deltaRW(3) = 0.1;
850  deltaRW(4) = 0.0003;
851  deltaRW(5) = 0.0003;
852  deltaRW(6) = 0.0003;
853  }
854  if ((level == 24) && (subdetlevel == 4)) { //Disk in a TID
855  deltaRW(1) = 0.01;
856  deltaRW(2) = 0.01;
857  deltaRW(3) = 0.02;
858  deltaRW(4) = 0.0001;
859  deltaRW(5) = 0.0001;
860  deltaRW(6) = 0.0001;
861  }
862  if ((level == 23) && (subdetlevel == 4)) { //Ring is a Disk
863  deltaRW(1) = 0.004;
864  deltaRW(2) = 0.004;
865  deltaRW(3) = 0.005;
866  deltaRW(4) = 0.00004;
867  deltaRW(5) = 0.00004;
868  deltaRW(6) = 0.00004;
869  }
870  if ((level == 22) && (subdetlevel == 4)) { //Side of a Ring
871  deltaRW(1) = 0.002;
872  deltaRW(2) = 0.002;
873  deltaRW(3) = 0.002;
874  deltaRW(4) = 0.00004;
875  deltaRW(5) = 0.00004;
876  deltaRW(6) = 0.00004;
877  }
878  if ((level == 2) && (subdetlevel == 4)) { //Det in a Side
879  deltaRW(1) = 0.002;
880  deltaRW(2) = 0.002;
881  deltaRW(3) = 0.002;
882  deltaRW(4) = 0.0002;
883  deltaRW(5) = 0.0002;
884  deltaRW(6) = 0.0002;
885  }
886  if ((level == 1) && (subdetlevel == 4)) { //DetUnit is a Side
887  deltaRW(1) = 0.002;
888  deltaRW(2) = 0.002;
889  deltaRW(3) = 0.002;
890  deltaRW(4) = 0.0002;
891  deltaRW(5) = 0.0002;
892  deltaRW(6) = 0.0002;
893  }
894  //TOB
895  if ((level == 30) && (subdetlevel == 5)) { // TOB in Strip Tracker
896  deltaRW(1) = 0.06;
897  deltaRW(2) = 0.06;
898  deltaRW(3) = 0.06;
899  deltaRW(4) = 0.00025;
900  deltaRW(5) = 0.00025;
901  deltaRW(6) = 0.00025;
902  }
903  if ((level == 29) && (subdetlevel == 5)) { //HalfBarrel in the TOB
904  deltaRW(1) = 0.014;
905  deltaRW(2) = 0.014;
906  deltaRW(3) = 0.05;
907  deltaRW(4) = 0.0001;
908  deltaRW(5) = 0.0001;
909  deltaRW(6) = 0.0001;
910  }
911  if ((level == 28) && (subdetlevel == 5)) { //Layer in a HalfBarrel
912  deltaRW(1) = 0.02;
913  deltaRW(2) = 0.02;
914  deltaRW(3) = 0.02;
915  deltaRW(4) = 0.0001;
916  deltaRW(5) = 0.0001;
917  deltaRW(6) = 0.0001;
918  }
919  if ((level == 27) && (subdetlevel == 5)) { //Rod in a Layer
920  deltaRW(1) = 0.01;
921  deltaRW(2) = 0.01;
922  deltaRW(3) = 0.02;
923  deltaRW(4) = 0.0001;
924  deltaRW(5) = 0.0001;
925  deltaRW(6) = 0.0001;
926  }
927  if ((level == 2) && (subdetlevel == 5)) { //Det in a Rod
928  deltaRW(1) = 0.003;
929  deltaRW(2) = 0.003;
930  deltaRW(3) = 0.01;
931  deltaRW(4) = 0.0002;
932  deltaRW(5) = 0.0002;
933  deltaRW(6) = 0.0002;
934  }
935  if ((level == 1) && (subdetlevel == 5)) { //DetUnit in a Rod
936  deltaRW(1) = 0.003;
937  deltaRW(2) = 0.003;
938  deltaRW(3) = 0.01;
939  deltaRW(4) = 0.0002;
940  deltaRW(5) = 0.0002;
941  deltaRW(6) = 0.0002;
942  }
943  //TEC
944  if ((level == 36) && (subdetlevel == 6)) { //TEC in the Strip Tracker
945  deltaRW(1) = 0.06;
946  deltaRW(2) = 0.06;
947  deltaRW(3) = 0.1;
948  deltaRW(4) = 0.0003;
949  deltaRW(5) = 0.0003;
950  deltaRW(6) = 0.0003;
951  }
952  if ((level == 35) && (subdetlevel == 6)) { //Disk in the TEC
953  deltaRW(1) = 0.015;
954  deltaRW(2) = 0.015;
955  deltaRW(3) = 0.03;
956  deltaRW(4) = 0.0001;
957  deltaRW(5) = 0.0001;
958  deltaRW(6) = 0.0001;
959  }
960  if ((level == 34) && (subdetlevel == 6)) { //Side on a Disk
961  deltaRW(1) = 0.01;
962  deltaRW(2) = 0.01;
963  deltaRW(3) = 0.02;
964  deltaRW(4) = 0.00005;
965  deltaRW(5) = 0.00005;
966  deltaRW(6) = 0.00005;
967  }
968  if ((level == 33) && (subdetlevel == 6)) { //Petal on a Side of a Disk
969  deltaRW(1) = 0.01;
970  deltaRW(2) = 0.01;
971  deltaRW(3) = 0.02;
972  deltaRW(4) = 0.0001;
973  deltaRW(5) = 0.0001;
974  deltaRW(6) = 0.0001;
975  }
976  if ((level == 32) && (subdetlevel == 6)) { //Ring on a Petal
977  deltaRW(1) = 0.007;
978  deltaRW(2) = 0.007;
979  deltaRW(3) = 0.015;
980  deltaRW(4) = 0.00015;
981  deltaRW(5) = 0.00015;
982  deltaRW(6) = 0.00015;
983  }
984  if ((level == 2) && (subdetlevel == 6)) { //Det on a Ring
985  deltaRW(1) = 0.002;
986  deltaRW(2) = 0.002;
987  deltaRW(3) = 0.005;
988  deltaRW(4) = 0.0001;
989  deltaRW(5) = 0.0001;
990  deltaRW(6) = 0.0001;
991  }
992  if ((level == 1) && (subdetlevel == 6)) { // DetUnit on a Ring
993  deltaRW(1) = 0.002;
994  deltaRW(2) = 0.002;
995  deltaRW(3) = 0.005;
996  deltaRW(4) = 0.0001;
997  deltaRW(5) = 0.0001;
998  deltaRW(6) = 0.0001;
999  }
1000 
1001  return deltaRW;
1002 }
1003 
1004 // Plug in to framework
1005 
1007 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
void setSurveyErrors(Alignable *)
module which creates/inserts the survey errors
void analyze(const edm::Event &, const edm::EventSetup &) override
Do nothing for each event.
align::ID id() const
Return the ID of Alignable, i.e. DetId of &#39;first&#39; component GeomDet(Unit).
Definition: Alignable.h:180
T getUntrackedParameter(std::string const &, T const &) const
tuple cfg
Definition: looper.py:296
uint16_t *__restrict__ id
virtual void rotateAroundLocalZ(Scalar radians)
Rotation around local z-axis.
Definition: Alignable.cc:183
double Scalar
Definition: Definitions.h:25
Class to update a given geometry with a set of alignments.
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
TrackerGeometry * build(const GeometricDet *gd, const PTrackerAdditionalParametersPerDet *ptitp, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
GlobalVector diffR(const GlobalVectors &current, const GlobalVectors &nominal)
Definition: Utilities.cc:158
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
static void addComponent(Alignable *)
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
bool getData(T &iHolder) const
Definition: EventSetup.h:128
void setGeometry(Alignable *)
module which modifies the geometry
AlgebraicVector getStructureErrors(int, int)
default values for survey uncertainty
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
static Alignable * detector()
Get alignable detector as read from input.
virtual const Alignables & components() const =0
Return vector of all direct components.
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:132
std::string m_inputGeom
const edm::ESGetToken< Alignments, TrackerAlignmentRcd > aliToken_
Definition: DetId.h:17
CLHEP::HepVector AlgebraicVector
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd > ptitpToken_
align::Scalar length() const
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
void setSurvey(const SurveyDet *)
Set survey info.
Definition: Alignable.cc:266
virtual void rotateAroundLocalY(Scalar radians)
Rotation around local y-axis.
Definition: Alignable.cc:169
const edm::ESGetToken< AlignmentErrorsExtended, TrackerAlignmentErrorExtendedRcd > aliErrToken_
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
CreateSurveyRcds(const edm::ParameterSet &)
virtual void rotateAroundLocalX(Scalar radians)
Rotation around local x-axis.
Definition: Alignable.cc:155
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
tuple level
Definition: testEve_cfg.py:47
math::Error< 6 >::type ErrorMatrix
Definition: Definitions.h:37
AlgebraicVector getStructurePlacements(int, int)
default values for assembly precision
Alignable * mother() const
Return pointer to container alignable (if any)
Definition: Alignable.h:91
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
tTopoToken_