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 {
33  m_inputGeom = cfg.getUntrackedParameter< std::string > ("inputGeom");
34  m_inputSimpleMis = cfg.getUntrackedParameter< double > ("simpleMis");
35  m_generatedRandom = cfg.getUntrackedParameter< bool > ("generatedRandom");
36  m_generatedSimple = cfg.getUntrackedParameter< bool > ("generatedSimple");
37 }
38 
40 
41  //Retrieve tracker topology from geometry
43  setup.get<TrackerTopologyRcd>().get(tTopoHandle);
44  const TrackerTopology* const tTopo = tTopoHandle.product();
45 
47  setup.get<IdealGeometryRecord>().get(geom);
49  setup.get<PTrackerParametersRcd>().get( ptp );
51 
52  //take geometry from DB or randomly generate geometry
53  if (m_inputGeom == "sqlite"){
54  //build the tracker
57 
58  setup.get<TrackerAlignmentRcd>().get(alignments);
59  setup.get<TrackerAlignmentErrorExtendedRcd>().get(alignmentErrors);
60 
61  //apply the latest alignments
62  GeometryAligner aligner;
63  aligner.applyAlignments<TrackerGeometry>( &(*tracker), &(*alignments), &(*alignmentErrors), AlignTransform() );
64 
65  }
66 
67 
68  addComponent(new AlignableTracker( tracker, tTopo ) );
69 
70  Alignable* ali = detector();
71  if(m_inputGeom == "generated"){
72  setGeometry( ali );
73  }
74 
75  setSurveyErrors( ali );
76 
77 }
78 
80 {
81 
82  const align::Alignables& comp = ali->components();
83  unsigned int nComp = comp.size();
84  //move then do for lower level object
85  //for issue of det vs detunit
86  bool usecomps = true;
87  if ((ali->alignableObjectId()==2)&&(nComp>=1)) usecomps = false;
88  for (unsigned int i = 0; i < nComp; ++i){
89  if (usecomps) setGeometry(comp[i]);
90  }
91  DetId id( ali->id() );
92  int subdetlevel = id.subdetId();
93  int level = ali->alignableObjectId();
94 
95  //for random misalignment
96  if (m_generatedRandom){
97  if (subdetlevel > 0){
98  AlgebraicVector value = getStructureErrors(level, subdetlevel);
99 
100  double value0 = CLHEP::RandGauss::shoot(0,value[0]);
101  double value1 = CLHEP::RandGauss::shoot(0,value[1]);
102  double value2 = CLHEP::RandGauss::shoot(0,value[2]);
103  double value3 = CLHEP::RandGauss::shoot(0,value[3]);
104  double value4 = CLHEP::RandGauss::shoot(0,value[4]);
105  double value5 = CLHEP::RandGauss::shoot(0,value[5]);
106 
107  //move/rotate the surface
108  align::LocalVector diffR(value0,value1,value2);
109  align::Scalar diffWx = value3;
110  align::Scalar diffWy = value4;
111  align::Scalar diffWz = value5;
112  ali->move(ali->surface().toGlobal(diffR));
113  ali->rotateAroundLocalX(diffWx);
114  ali->rotateAroundLocalY(diffWy);
115  ali->rotateAroundLocalZ(diffWz);
116  }
117  }
118 
119  // for simple misalignments
120  if (m_generatedSimple){
121  if ((level == 2)||((level == 1)&&(ali->mother()->alignableObjectId() != 2))){
122 
123  const double constMis = m_inputSimpleMis;
124  const double dAngle = constMis/ali->surface().length();
125  //std::cout << "Shift: " << constMis << ", Rot: " << dAngle << std::endl;
126  double value0 = CLHEP::RandGauss::shoot(0, constMis);
127  double value1 = CLHEP::RandGauss::shoot(0, constMis);
128  double value2 = CLHEP::RandGauss::shoot(0, constMis);
129  double value3 = CLHEP::RandGauss::shoot(0, dAngle);
130  double value4 = CLHEP::RandGauss::shoot(0, dAngle);
131  double value5 = CLHEP::RandGauss::shoot(0, dAngle);
132 
133  align::LocalVector diffR(value0,value1,value2);
134  ali->move(ali->surface().toGlobal(diffR));
135  align::Scalar diffWx = value3;
136  align::Scalar diffWy = value4;
137  align::Scalar diffWz = value5;
138  ali->rotateAroundLocalX(diffWx);
139  ali->rotateAroundLocalY(diffWy);
140  ali->rotateAroundLocalZ(diffWz);
141  }
142  }
143 
144 }
145 
147 
148  const align::Alignables& comp = ali->components();
149  unsigned int nComp = comp.size();
150  //move then do for lower level object
151  //for issue of det vs detunit
152  for (unsigned int i = 0; i < nComp; ++i){
153  setSurveyErrors(comp[i]);
154  }
155 
156  DetId id( ali->id() );
157  int subdetlevel = id.subdetId();
158  int level = ali->alignableObjectId();
159 
160  AlgebraicVector error = getStructureErrors(level, subdetlevel);
161 
162  double error0 = error[0];
163  double error1 = error[1];
164  double error2 = error[2];
165  double error3 = error[3];
166  double error4 = error[4];
167  double error5 = error[5];
168 
169  // ----------------INFLATING ERRORS----------------------
170  // inflating sensitive coordinates in each subdetector
171  // tib
172  if ((level <= 2)&&(subdetlevel == 3)){
173  error0 = 0.01; error5 = 0.001;
174  if ((level==2)&&(nComp == 2)){
175  error1 = 0.01;
176  }
177  }
178  // tid
179  if ((level <= 2)&&(subdetlevel == 4)){
180  error0=0.01; error1=0.01; error2=0.01; error3=0.001; error4=0.001; error5=0.001;
181  //error0=0.01; error1=0.002; error2=0.002; error3=0.0002; error4=0.0002; error5=0.001;
182  //if ((level == 2)&&(nComp == 2)){
183  // error1 = 0.01;
184  //}
185  }
186  if ((level == 23)&&(subdetlevel == 4)){ //Ring is a Disk
187  error0=0.02; error1=0.02; error2=0.03; error3=0.0002; error4=0.0002; error5=0.0002;
188  }
189  if ((level == 22)&&(subdetlevel == 4)){ //Side of a Ring
190  error0=0.01; error1=0.01; error2=0.01; error3=0.0002; error4=0.0002; error5=0.0002;
191  }
192  // tob
193  if ((level <= 2)&&(subdetlevel == 5)){
194  //error0 = 0.015; error1 = 0.015; error2 = 0.05; error3 = 0.001; error4 = 0.001; error5 = 0.001;
195  error0 = 0.015; error1 = 0.003; error2 = 0.003; error3 = 0.0002; error4 = 0.0002; error5 = 0.001;
196  if ((level == 2)&&(nComp == 2)){
197  error1 = 0.015;
198  }
199  }
200  if ((level == 27)&&(subdetlevel == 5)){ //Rod in a Layer
201  error0=0.02; error1=0.02; error2=0.03; error3=0.001; error4=0.001; error5=0.001;
202  }
203  // tec
204  if ((level <= 2)&&(subdetlevel == 6)){
205  error0 = 0.02; error5 = 0.0005;
206  if ((level==2)&&(nComp == 2)){
207  error1 = 0.02;
208  }
209  }
210  if ((level == 34)&&(subdetlevel == 6)){ //Side on a Disk
211  error0=0.01; error1=0.01; error2=0.02; error3=0.00005; error4=0.00005; error5=0.00005;
212  }
213  if ((level == 33)&&(subdetlevel == 6)){ //Petal on a Side of a Disk
214  error0=0.01; error1=0.01; error2=0.02; error3=0.0001; error4=0.0001; error5=0.0001;
215  }
216  if ((level == 32)&&(subdetlevel == 6)){ //Ring on a Petal
217  error0=0.007; error1=0.007; error2=0.015; error3=0.00015; error4=0.00015; error5=0.00015;
218  }
219  // ----------------INFLATING ERRORS----------------------
220 
221  //create the error matrix
222  align::ErrorMatrix error_Matrix;
223  double * errorData = error_Matrix.Array();
224  errorData[0] = error0*error0; errorData[2] = error1*error1; errorData[5] = error2*error2;
225  errorData[9] = error3*error3; errorData[14] = error4*error4; errorData[20] = error5*error5;
226  errorData[1] = 0.0;
227  errorData[3] = 0.0; errorData[4] = 0.0;
228  errorData[6] = 0.0; errorData[7] = 0.0; errorData[8] = 0.0;
229  errorData[10] = 0.0; errorData[11] = 0.0; errorData[12] = 0.0; errorData[13] = 0.0;
230  errorData[15] = 0.0; errorData[16] = 0.0; errorData[17] = 0.0; errorData[18] = 0.0; errorData[19] = 0.0;
231 
232 
233  ali->setSurvey( new SurveyDet(ali->surface(), error_Matrix ) );
234 
235 }
236 
237 //-------------------------------------------------------
238 // DEFAULT VALUES FOR THE ASSEMBLY PRECISION
239 //-------------------------------------------------------
241 {
242  AlgebraicVector deltaRW(6);
243  deltaRW(1)=0.0; deltaRW(2)=0.0; deltaRW(3)=0.0; deltaRW(4)=0.0; deltaRW(5)=0.0; deltaRW(6)=0.0;
244  //PIXEL
245  if ((level == 37)&&(subdetlevel == 1)){
246  deltaRW(1)=0.3; deltaRW(2)=0.3; deltaRW(3)=0.3; deltaRW(4)=0.0017; deltaRW(5)=0.0017; deltaRW(6)=0.0017;
247  }
248  //STRIP
249  if ((level == 38)&&(subdetlevel == 3)){
250  deltaRW(1)=0.3; deltaRW(2)=0.3; deltaRW(3)=0.3; deltaRW(4)=0.0004; deltaRW(5)=0.0004; deltaRW(6)=0.0004;
251  }
252  //TRACKER
253  if ((level == 39)&&(subdetlevel == 1)){
254  deltaRW(1)=0.0; deltaRW(2)=0.0; deltaRW(3)=0.0; deltaRW(4)=0.0; deltaRW(5)=0.0; deltaRW(6)=0.0;
255  }
256  //TPB
257  if ((level == 7)&&(subdetlevel == 1)){
258  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.003; deltaRW(5)=0.003; deltaRW(6)=0.003;
259  }
260  if ((level == 6)&&(subdetlevel == 1)){
261  deltaRW(1)=0.05; deltaRW(2)=0.05; deltaRW(3)=0.05; deltaRW(4)=0.0008; deltaRW(5)=0.0008; deltaRW(6)=0.0008;
262  }
263  if ((level == 5)&&(subdetlevel == 1)){
264  deltaRW(1)=0.02; deltaRW(2)=0.02; deltaRW(3)=0.02; deltaRW(4)=0.0004; deltaRW(5)=0.0004; deltaRW(6)=0.0004;
265  }
266  if ((level == 4)&&(subdetlevel == 1)){
267  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.005; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
268  }
269  if ((level == 2)&&(subdetlevel == 1)){
270  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.003; deltaRW(4)=0.001; deltaRW(5)=0.001; deltaRW(6)=0.001;
271  }
272  if ((level == 1)&&(subdetlevel == 1)){
273  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.003; deltaRW(4)=0.001; deltaRW(5)=0.001; deltaRW(6)=0.001;
274  }
275  //TPE
276  if ((level == 13)&&(subdetlevel == 2)){
277  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.0017; deltaRW(5)=0.0017; deltaRW(6)=0.0017;
278  }
279  if ((level == 12)&&(subdetlevel == 2)){
280  deltaRW(1)=0.05; deltaRW(2)=0.05; deltaRW(3)=0.05; deltaRW(4)=0.0004; deltaRW(5)=0.0004; deltaRW(6)=0.0004;
281  }
282  if ((level == 11)&&(subdetlevel == 2)){
283  deltaRW(1)=0.02; deltaRW(2)=0.02; deltaRW(3)=0.02; deltaRW(4)=0.001; deltaRW(5)=0.001; deltaRW(6)=0.001;
284  }
285  if ((level == 10)&&(subdetlevel == 2)){
286  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.01; deltaRW(4)=0.001; deltaRW(5)=0.001; deltaRW(6)=0.001;
287  }
288  if ((level == 9)&&(subdetlevel == 2)){
289  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.005; deltaRW(4)=0.002; deltaRW(5)=0.002; deltaRW(6)=0.002;
290  }
291  if ((level == 2)&&(subdetlevel == 2)){
292  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.003; deltaRW(4)=0.001; deltaRW(5)=0.001; deltaRW(6)=0.001;
293  }
294  if ((level == 1)&&(subdetlevel == 2)){
295  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.003; deltaRW(4)=0.001; deltaRW(5)=0.001; deltaRW(6)=0.001;
296  }
297  //TIB
298  if ((level == 20)&&(subdetlevel == 3)){
299  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.0017; deltaRW(5)=0.0017; deltaRW(6)=0.0017;
300  }
301  if ((level == 19)&&(subdetlevel == 3)){
302  deltaRW(1)=0.1; deltaRW(2)=0.1; deltaRW(3)=0.1; deltaRW(4)=0.0008; deltaRW(5)=0.0008; deltaRW(6)=0.0008;
303  }
304  if ((level == 18)&&(subdetlevel == 3)){
305  deltaRW(1)=0.04; deltaRW(2)=0.04; deltaRW(3)=0.02; deltaRW(4)=0.0006; deltaRW(5)=0.0006; deltaRW(6)=0.0006;
306  }
307  if ((level == 17)&&(subdetlevel == 3)){
308  deltaRW(1)=0.03; deltaRW(2)=0.03; deltaRW(3)=0.015; deltaRW(4)=0.0004; deltaRW(5)=0.0004; deltaRW(6)=0.0004;
309  }
310  if ((level == 16)&&(subdetlevel == 3)){
311  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.01; deltaRW(4)=0.0004; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
312  }
313  if ((level == 15)&&(subdetlevel == 3)){
314  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.01; deltaRW(4)=0.0004; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
315  }
316  if ((level == 2)&&(subdetlevel == 3)){
317  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.005; deltaRW(4)=0.001; deltaRW(5)=0.0005; deltaRW(6)=0.0005;
318  }
319  if ((level == 1)&&(subdetlevel == 3)){
320  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.005; deltaRW(4)=0.001; deltaRW(5)=0.0005; deltaRW(6)=0.0005;
321  }
322  //TID
323  if ((level == 25)&&(subdetlevel == 4)){
324  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.0013; deltaRW(5)=0.0013; deltaRW(6)=0.0013;
325  }
326  if ((level == 24)&&(subdetlevel == 4)){
327  deltaRW(1)=0.05; deltaRW(2)=0.05; deltaRW(3)=0.05; deltaRW(4)=0.0004; deltaRW(5)=0.0004; deltaRW(6)=0.0004;
328  }
329  if ((level == 23)&&(subdetlevel == 4)){
330  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.01; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
331  }
332  if ((level == 22)&&(subdetlevel == 4)){
333  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.005; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
334  }
335  if ((level == 2)&&(subdetlevel == 4)){
336  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.005; deltaRW(4)=0.0005; deltaRW(5)=0.0005; deltaRW(6)=0.0005;
337  }
338  if ((level == 1)&&(subdetlevel == 4)){
339  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.005; deltaRW(4)=0.0005; deltaRW(5)=0.0005; deltaRW(6)=0.0005;
340  }
341  //TOB
342  if ((level == 30)&&(subdetlevel == 5)){
343  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.0008; deltaRW(5)=0.0008; deltaRW(6)=0.0008;
344  }
345  if ((level == 29)&&(subdetlevel == 5)){
346  deltaRW(1)=0.014; deltaRW(2)=0.014; deltaRW(3)=0.05; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
347  }
348  if ((level == 28)&&(subdetlevel == 5)){
349  deltaRW(1)=0.02; deltaRW(2)=0.02; deltaRW(3)=0.02; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
350  }
351  if ((level == 27)&&(subdetlevel == 5)){
352  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.02; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
353  }
354  if ((level == 2)&&(subdetlevel == 5)){
355  deltaRW(1)=0.003; deltaRW(2)=0.003; deltaRW(3)=0.01; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
356  }
357  if ((level == 1)&&(subdetlevel == 5)){
358  deltaRW(1)=0.003; deltaRW(2)=0.003; deltaRW(3)=0.01; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
359  }
360  //TEC
361  if ((level == 36)&&(subdetlevel == 6)){
362  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.0008; deltaRW(5)=0.0008; deltaRW(6)=0.0008;
363  }
364  if ((level == 35)&&(subdetlevel == 6)){
365  deltaRW(1)=0.05; deltaRW(2)=0.05; deltaRW(3)=0.05; deltaRW(4)=0.0003; deltaRW(5)=0.0003; deltaRW(6)=0.0003;
366  }
367  if ((level == 34)&&(subdetlevel == 6)){
368  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.02; deltaRW(4)=0.00005; deltaRW(5)=0.00005; deltaRW(6)=0.00005;
369  }
370  if ((level == 33)&&(subdetlevel == 6)){
371  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.02; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
372  }
373  if ((level == 32)&&(subdetlevel == 6)){
374  deltaRW(1)=0.007; deltaRW(2)=0.007; deltaRW(3)=0.015; deltaRW(4)=0.00015; deltaRW(5)=0.00015; deltaRW(6)=0.00015;
375  }
376  if ((level == 2)&&(subdetlevel == 6)){
377  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.005; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
378  }
379  if ((level == 1)&&(subdetlevel == 6)){
380  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.005; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
381  }
382 
383  return deltaRW;
384 }
385 //-------------------------------------------------------
386 // DEFAULT VALUES FOR THE PRECISION OF THE SURVEY
387 //-------------------------------------------------------
389 {
390  AlgebraicVector deltaRW(6);
391  deltaRW(1)=0.0; deltaRW(2)=0.0; deltaRW(3)=0.0; deltaRW(4)=0.0; deltaRW(5)=0.0; deltaRW(6)=0.0;
392  //PIXEL
393  if ((level == 37)&&(subdetlevel == 1)){ //Pixel Detector in Tracker
394  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.0017; deltaRW(5)=0.0017; deltaRW(6)=0.0017;
395  }
396  //STRIP
397  if ((level == 38)&&(subdetlevel == 3)){ //Strip Tracker in Tracker
398  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.0004; deltaRW(5)=0.0004; deltaRW(6)=0.0004;
399  }
400  //TRACKER
401  if ((level == 39)&&(subdetlevel == 1)){ //Tracker
402  deltaRW(1)=0.0; deltaRW(2)=0.0; deltaRW(3)=0.0; deltaRW(4)=0.0; deltaRW(5)=0.0; deltaRW(6)=0.0;
403  }
404  //TPB
405  if ((level == 7)&&(subdetlevel == 1)){ //Barrel Pixel in Pixel
406  deltaRW(1)=0.05; deltaRW(2)=0.05; deltaRW(3)=0.1; deltaRW(4)=0.0008; deltaRW(5)=0.0008; deltaRW(6)=0.0008;
407  }
408  if ((level == 6)&&(subdetlevel == 1)){ //HalfBarrel in Barrel Pixel
409  deltaRW(1)=0.015; deltaRW(2)=0.015; deltaRW(3)=0.03; deltaRW(4)=0.0003; deltaRW(5)=0.0003; deltaRW(6)=0.0003;
410  }
411  if ((level == 5)&&(subdetlevel == 1)){ //HalfShell in HalfBarrel
412  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.01; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
413  }
414  if ((level == 4)&&(subdetlevel == 1)){ //Ladder in HalfShell
415  deltaRW(1)=0.001; deltaRW(2)=0.001; deltaRW(3)=0.002; deltaRW(4)=0.00005; deltaRW(5)=0.00005; deltaRW(6)=0.00005;
416  }
417  if ((level == 2)&&(subdetlevel == 1)){ //Det in Ladder
418  deltaRW(1)=0.0005; deltaRW(2)=0.001; deltaRW(3)=0.001; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
419  }
420  if ((level == 1)&&(subdetlevel == 1)){ //DetUnit in Ladder
421  deltaRW(1)=0.0005; deltaRW(2)=0.001; deltaRW(3)=0.001; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
422  }
423  //TPE
424  if ((level == 13)&&(subdetlevel == 2)){ //Forward Pixel in Pixel
425  deltaRW(1)=0.05; deltaRW(2)=0.05; deltaRW(3)=0.1; deltaRW(4)=0.0004; deltaRW(5)=0.0004; deltaRW(6)=0.0004;
426  }
427  if ((level == 12)&&(subdetlevel == 2)){ //HalfCylinder in Forward Pixel
428  deltaRW(1)=0.015; deltaRW(2)=0.015; deltaRW(3)=0.03; deltaRW(4)=0.00015; deltaRW(5)=0.00015; deltaRW(6)=0.00015;
429  }
430  if ((level == 11)&&(subdetlevel == 2)){ //HalfDisk in HalfCylinder
431  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.01; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
432  }
433  if ((level == 10)&&(subdetlevel == 2)){ //Blade in HalfDisk
434  deltaRW(1)=0.001; deltaRW(2)=0.001; deltaRW(3)=0.002; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
435  }
436  if ((level == 9)&&(subdetlevel == 2)){ //Panel in Blade
437  deltaRW(1)=0.001; deltaRW(2)=0.0008; deltaRW(3)=0.0006; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
438  }
439  if ((level == 2)&&(subdetlevel == 2)){ //Det in Panel
440  deltaRW(1)=0.0005; deltaRW(2)=0.0004; deltaRW(3)=0.0006; deltaRW(4)=0.0001; deltaRW(5)=0.0003; deltaRW(6)=0.0001;
441  }
442  if ((level == 1)&&(subdetlevel == 2)){ //DetUnit in Panel
443  deltaRW(1)=0.0005; deltaRW(2)=0.0004; deltaRW(3)=0.0006; deltaRW(4)=0.0001; deltaRW(5)=0.0003; deltaRW(6)=0.0001;
444  }
445  //TIB
446  if ((level == 20)&&(subdetlevel == 3)){ //TIB in Strip Tracker
447  deltaRW(1)=0.08; deltaRW(2)=0.08; deltaRW(3)=0.04; deltaRW(4)=0.0017; deltaRW(5)=0.0017; deltaRW(6)=0.0017;
448  }
449  if ((level == 19)&&(subdetlevel == 3)){ //HalfBarrel in TIB
450  deltaRW(1)=0.04; deltaRW(2)=0.04; deltaRW(3)=0.02; deltaRW(4)=0.0003; deltaRW(5)=0.0003; deltaRW(6)=0.0003;
451  }
452  if ((level == 18)&&(subdetlevel == 3)){ //Layer in HalfBarrel
453  deltaRW(1)=0.02; deltaRW(2)=0.02; deltaRW(3)=0.01; deltaRW(4)=0.0006; deltaRW(5)=0.0006; deltaRW(6)=0.0006;
454  }
455  if ((level == 17)&&(subdetlevel == 3)){ //HalfShell in Layer
456  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.005; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
457  }
458  if ((level == 16)&&(subdetlevel == 3)){ //Surface in a HalfShell
459  deltaRW(1)=0.004; deltaRW(2)=0.004; deltaRW(3)=0.008; deltaRW(4)=0.0002; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
460  }
461  if ((level == 15)&&(subdetlevel == 3)){ //String in a Surface
462  deltaRW(1)=0.004; deltaRW(2)=0.004; deltaRW(3)=0.008; deltaRW(4)=0.0002; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
463  }
464  if ((level == 2)&&(subdetlevel == 3)){ //Det in a String
465  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.004; deltaRW(4)=0.0004; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
466  }
467  if ((level == 1)&&(subdetlevel == 3)){ //DetUnit in a String
468  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.004; deltaRW(4)=0.0004; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
469  }
470  //TID
471  if ((level == 25)&&(subdetlevel == 4)){ //TID in Strip Tracker
472  deltaRW(1)=0.05; deltaRW(2)=0.05; deltaRW(3)=0.1; deltaRW(4)=0.0003; deltaRW(5)=0.0003; deltaRW(6)=0.0003;
473  }
474  if ((level == 24)&&(subdetlevel == 4)){ //Disk in a TID
475  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.02; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
476  }
477  if ((level == 23)&&(subdetlevel == 4)){ //Ring is a Disk
478  deltaRW(1)=0.004; deltaRW(2)=0.004; deltaRW(3)=0.005; deltaRW(4)=0.00004; deltaRW(5)=0.00004; deltaRW(6)=0.00004;
479  }
480  if ((level == 22)&&(subdetlevel == 4)){ //Side of a Ring
481  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.002; deltaRW(4)=0.00004; deltaRW(5)=0.00004; deltaRW(6)=0.00004;
482  }
483  if ((level == 2)&&(subdetlevel == 4)){ //Det in a Side
484  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.002; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
485  }
486  if ((level == 1)&&(subdetlevel == 4)){ //DetUnit is a Side
487  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.002; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
488  }
489  //TOB
490  if ((level == 30)&&(subdetlevel == 5)){ // TOB in Strip Tracker
491  deltaRW(1)=0.06; deltaRW(2)=0.06; deltaRW(3)=0.06; deltaRW(4)=0.00025; deltaRW(5)=0.00025; deltaRW(6)=0.00025;
492  }
493  if ((level == 29)&&(subdetlevel == 5)){ //HalfBarrel in the TOB
494  deltaRW(1)=0.014; deltaRW(2)=0.014; deltaRW(3)=0.05; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
495  }
496  if ((level == 28)&&(subdetlevel == 5)){ //Layer in a HalfBarrel
497  deltaRW(1)=0.02; deltaRW(2)=0.02; deltaRW(3)=0.02; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
498  }
499  if ((level == 27)&&(subdetlevel == 5)){ //Rod in a Layer
500  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.02; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
501  }
502  if ((level == 2)&&(subdetlevel == 5)){ //Det in a Rod
503  deltaRW(1)=0.003; deltaRW(2)=0.003; deltaRW(3)=0.01; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
504  }
505  if ((level == 1)&&(subdetlevel == 5)){ //DetUnit in a Rod
506  deltaRW(1)=0.003; deltaRW(2)=0.003; deltaRW(3)=0.01; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
507  }
508  //TEC
509  if ((level == 36)&&(subdetlevel == 6)){ //TEC in the Strip Tracker
510  deltaRW(1)=0.06; deltaRW(2)=0.06; deltaRW(3)=0.1; deltaRW(4)=0.0003; deltaRW(5)=0.0003; deltaRW(6)=0.0003;
511  }
512  if ((level == 35)&&(subdetlevel == 6)){ //Disk in the TEC
513  deltaRW(1)=0.015; deltaRW(2)=0.015; deltaRW(3)=0.03; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
514  }
515  if ((level == 34)&&(subdetlevel == 6)){ //Side on a Disk
516  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.02; deltaRW(4)=0.00005; deltaRW(5)=0.00005; deltaRW(6)=0.00005;
517  }
518  if ((level == 33)&&(subdetlevel == 6)){ //Petal on a Side of a Disk
519  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.02; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
520  }
521  if ((level == 32)&&(subdetlevel == 6)){ //Ring on a Petal
522  deltaRW(1)=0.007; deltaRW(2)=0.007; deltaRW(3)=0.015; deltaRW(4)=0.00015; deltaRW(5)=0.00015; deltaRW(6)=0.00015;
523  }
524  if ((level == 2)&&(subdetlevel == 6)){ //Det on a Ring
525  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.005; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
526  }
527  if ((level == 1)&&(subdetlevel == 6)){ // DetUnit on a Ring
528  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.005; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
529  }
530 
531  return deltaRW;
532 
533 
534 }
535 
536 // Plug in to framework
537 
539 
void setSurveyErrors(Alignable *)
module which creates/inserts the survey errors
align::ID id() const
Return the ID of Alignable, i.e. DetId of &#39;first&#39; component GeomDet(Unit).
Definition: Alignable.h:189
T getUntrackedParameter(std::string const &, T const &) const
virtual void rotateAroundLocalZ(Scalar radians)
Rotation around local z-axis.
Definition: Alignable.cc:235
double Scalar
Definition: Definitions.h:27
Class to update a given geometry with a set of alignments.
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
GlobalVector diffR(const GlobalVectors &current, const GlobalVectors &nominal)
Definition: Utilities.cc:168
TrackerGeometry * build(const GeometricDet *gd, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
static void addComponent(Alignable *)
edm::ESHandle< Alignments > alignments
void setGeometry(Alignable *)
module which modifies the geometry
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
virtual Alignables components() const =0
Return vector of all direct components.
AlgebraicVector getStructureErrors(int, int)
default values for survey uncertainty
Definition: value.py:1
static Alignable * detector()
Get alignable detector as read from input.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:135
std::string m_inputGeom
Definition: DetId.h:18
void applyAlignments(C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
CLHEP::HepVector AlgebraicVector
align::Scalar length() const
void setSurvey(const SurveyDet *)
Set survey info.
Definition: Alignable.cc:356
const T & get() const
Definition: EventSetup.h:56
virtual void rotateAroundLocalY(Scalar radians)
Rotation around local y-axis.
Definition: Alignable.cc:209
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Do nothing for each event.
CreateSurveyRcds(const edm::ParameterSet &)
virtual void rotateAroundLocalX(Scalar radians)
Rotation around local x-axis.
Definition: Alignable.cc:183
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
math::Error< 6 >::type ErrorMatrix
Definition: Definitions.h:39
AlgebraicVector getStructurePlacements(int, int)
default values for assembly precision
T const * product() const
Definition: ESHandle.h:86
Alignable * mother() const
Return pointer to container alignable (if any)
Definition: Alignable.h:94
Definition: event.py:1