CMS 3D CMS Logo

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