CMS 3D CMS Logo

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