CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RingMaker.cc
Go to the documentation of this file.
1 //
2 // Package: RecoTracker/RingMakerESProducer
3 // Class: RingMaker
4 //
5 // Description: The RingMaker object creates and povides
6 // all Rings in the detector.
7 //
8 // Original Author: Oliver Gutsche, gutsche@fnal.gov
9 // Created: Tue Oct 3 23:51:34 UTC 2006
10 //
11 // $Author: burkett $
12 // $Date: 2008/03/19 15:54:19 $
13 // $Revision: 1.5 $
14 //
15 
16 #include <iostream>
17 #include <algorithm>
18 #include <map>
19 #include <utility>
20 #include <fstream>
21 #include <sstream>
22 
24 
26 
33 
36 
41 
43  std::string configuration)
44  : tracker_(tracker), configuration_(configuration)
45 {
46 
47  rings_ = new Rings();
48 
55 
57 
58 }
59 
61 
62 }
63 
65 
66  unsigned int index = 0;
67 
68  if ( configuration_ == "TIF") {
69  index = 52;
70  constructTIBRings(index);
71  constructTIDRings(index);
72  constructTOBRings(index);
73  constructTECRings(index);
74  } else if ( configuration_ == "TIFTOB") {
75  index = 118;
76  constructTOBRings(index);
77  } else if ( configuration_ == "TIFTIB") {
78  index = 52;
79  constructTIBRings(index);
80  constructTIDRings(index);
81  } else if ( configuration_ == "TIFTIBTOB") {
82  index = 52;
83  constructTIBRings(index);
84  constructTIDRings(index);
85  index = 118;
86  constructTOBRings(index);
87  } else if ( configuration_ == "TIFTOBTEC") {
88  index = 118;
89  constructTOBRings(index);
90  index = 190;
91  constructTECRings(index);
92  } else {
93  constructPXBRings(index);
94  constructPXFRings(index);
95  constructTIBRings(index);
96  constructTIDRings(index);
97  constructTOBRings(index);
98  constructTECRings(index);
99  }
100 
101  edm::LogInfo("RoadSearch") << "Constructed " << index << " rings.";
102 
103 }
104 
105 void RingMaker::constructTIBRings(unsigned int &index) {
106 
107  unsigned int counter = 0;
108 
109  unsigned int layer_max = 5;
110  unsigned int fw_bw_max = 3;
111  unsigned int ext_int_max = 3;
112  unsigned int detector_max = 4;
113 
114  for ( unsigned int layer = 0; layer < layer_max; ++layer ) {
115  for ( unsigned int fw_bw = 0; fw_bw < fw_bw_max; ++fw_bw ) {
116  for ( unsigned int ext_int = 0; ext_int < ext_int_max; ++ext_int ) {
117  for ( unsigned int detector = 0; detector < detector_max; ++detector ) {
118  Ring ring = constructTIBRing(layer,fw_bw,ext_int,detector);
119  if ( ring.getNumDetIds() > 0 ) {
120  ring.setindex(++index);
121  double center_z = ring.getzmin() + ((ring.getzmax()-ring.getzmin())/2);
122  rings_->insert(center_z,ring);
123  ++counter;
124  LogDebug("RoadSearch") << "constructed TIB ring with index: " << ring.getindex()
125  << " consisting of " << ring.getNumDetIds() << " DetIds";
126  }
127  }
128  }
129  }
130  }
131  LogDebug("RoadSearch") << "constructed " << counter << " TIB rings";
132 
133 }
134 
136  unsigned int fw_bw,
137  unsigned int ext_int,
138  unsigned int detector) {
139 
140  // variables for determinaton of rmin, rmax, zmin, zmax
141  float rmin = 1200.;
142  float rmax = 0.;
143  float zmin = 2800.;
144  float zmax = -2800.;
145 
146  unsigned int string_max = 57;
147 
149 
150  for ( unsigned int string = 0; string < string_max; ++string) {
151  // only fill r/phi sensor id's
152  // first try r/phi of double sided layer (stereo = 2)
153  // then try r/phi of single sided layer (stereo = 0)
154  if ( tib_[layer][fw_bw][ext_int][string][detector][2] > 0 ) {
155  DetId id = constructTIBDetId(layer,fw_bw,ext_int,string,detector,2);
156  double phi = determineExtensions(id,rmin,rmax,zmin,zmax,Ring::TIBRing);
157  ring.addId(phi,id);
158  } else if ( tib_[layer][fw_bw][ext_int][string][detector][0] > 0 ) {
159  DetId id = constructTIBDetId(layer,fw_bw,ext_int,string,detector,0);
160  double phi = determineExtensions(id,rmin,rmax,zmin,zmax,Ring::TIBRing);
161  ring.addId(phi,id);
162  }
163  }
164 
165  LogDebug("RoadSearch") << "TIB ring initialized rmin/rmax/zmin/zmax: " << rmin
166  << "/" << rmax
167  << "/" << zmin
168  << "/" << zmax;
169 
170  ring.initialize(rmin,rmax,zmin,zmax);
171 
172  return ring;
173 }
174 
176  unsigned int fw_bw,
177  unsigned int ext_int,
178  unsigned int string,
179  unsigned int detector,
180  unsigned int stereo) {
181 
182  TIBDetId id(layer+1,fw_bw,ext_int,string+1,detector+1,stereo);
183  LogDebug("RoadSearch") << "constructed TIB ring DetId for layer: " << id.layer()
184  << " fw(0)/bw(1): " << id.string()[0]
185  << " ext(0)/int(1): " << id.string()[1]
186  << " string: " << id.string()[2]
187  << " module: " << id.module()
188  << " stereo: " << id.stereo();
189 
190  return DetId(id.rawId());
191 }
192 
193 
194 void RingMaker::constructTOBRings(unsigned int &index) {
195 
196  unsigned int counter = 0;
197 
198  unsigned int layer_max = 7;
199  unsigned int rod_fw_bw_max = 3;
200  unsigned int module_max = 7;
201 
202  for ( unsigned int layer = 0; layer < layer_max; ++layer ) {
203  for ( unsigned int rod_fw_bw = 0; rod_fw_bw < rod_fw_bw_max; ++rod_fw_bw ) {
204  for ( unsigned int module = 0; module < module_max; ++module ) {
205  Ring ring = constructTOBRing(layer,rod_fw_bw,module);
206  if ( ring.getNumDetIds() > 0 ) {
207  ring.setindex(++index);
208  double center_z = ring.getzmin() + ((ring.getzmax()-ring.getzmin())/2);
209  rings_->insert(center_z,ring);
210  ++counter;
211  LogDebug("RoadSearch") << "constructed TOB ring with index: " << ring.getindex()
212  << " consisting of " << ring.getNumDetIds() << " DetIds";
213  }
214  }
215  }
216  }
217 
218  LogDebug("RoadSearch") << "constructed " << counter << " TOB rings";
219 
220 }
221 
223  unsigned int rod_fw_bw,
224  unsigned int module) {
225 
226  // variables for determinaton of rmin, rmax, zmin, zmax
227  float rmin = 1200.;
228  float rmax = 0.;
229  float zmin = 2800.;
230  float zmax = -2800.;
231 
232  unsigned int rod_max = 75;
234 
235  for ( unsigned int rod = 0; rod < rod_max; ++rod ) {
236  // only fill r/phi sensor id's
237  // first try r/phi of double sided layer (stereo = 2)
238  // then try r/phi of single sided layer (stereo = 0)
239  if ( tob_[layer][rod_fw_bw][rod][module][2] > 0 ) {
240  DetId id = constructTOBDetId(layer,rod_fw_bw,rod,module,2);
241  double phi = determineExtensions(id,rmin,rmax,zmin,zmax,Ring::TOBRing);
242  ring.addId(phi,id);
243  } else if ( tob_[layer][rod_fw_bw][rod][module][0] > 0 ) {
244  DetId id = constructTOBDetId(layer,rod_fw_bw,rod,module,0);
245  double phi = determineExtensions(id,rmin,rmax,zmin,zmax,Ring::TOBRing);
246  ring.addId(phi,id);
247  }
248  }
249 
250 
251  LogDebug("RoadSearch") << "TOB ring initialized rmin/rmax/zmin/zmax: " << rmin
252  << "/" << rmax
253  << "/" << zmin
254  << "/" << zmax;
255 
256  ring.initialize(rmin,rmax,zmin,zmax);
257 
258  return ring;
259 }
260 
262  unsigned int rod_fw_bw,
263  unsigned int rod,
264  unsigned int detector,
265  unsigned int stereo) {
266 
267  TOBDetId id(layer+1,rod_fw_bw,rod+1,detector+1,stereo);
268 
269  LogDebug("RoadSearch") << "constructed TOB ring DetId for layer: " << id.layer()
270  << " rod fw(0)/bw(1): " << id.rod()[0]
271  << " rod: " << id.rod()[1]
272  << " module: " << id.module()
273  << " stereo: " << id.stereo() << std::endl;
274 
275  return DetId(id.rawId());
276 }
277 
278 void RingMaker::constructTIDRings(unsigned int &index) {
279 
280  unsigned int counter = 0;
281 
282  unsigned int fw_bw_max = 3;
283  unsigned int wheel_max = 4;
284  unsigned int ring_max = 4;
285 
286  for ( unsigned int fw_bw = 0; fw_bw < fw_bw_max; ++fw_bw ) {
287  for ( unsigned int wheel = 0; wheel < wheel_max; ++wheel ) {
288  for ( unsigned int ring = 0; ring < ring_max; ++ring ) {
289  Ring tempring = constructTIDRing(fw_bw,wheel,ring);
290  if ( tempring.getNumDetIds() > 0 ) {
291  tempring.setindex(++index);
292  double center_z = tempring.getzmin() + ((tempring.getzmax()-tempring.getzmin())/2);
293  rings_->insert(center_z,tempring);
294  ++counter;
295  LogDebug("RoadSearch") << "constructed TID ring with index: " << tempring.getindex()
296  << " consisting of " << tempring.getNumDetIds() << " DetIds";
297  }
298  }
299  }
300  }
301 
302  LogDebug("RoadSearch") << "constructed " << counter << " TID rings";
303 
304 }
305 
307  unsigned int wheel,
308  unsigned int ring) {
309 
310  // variables for determinaton of rmin, rmax, zmin, zmax
311  float rmin = 1200.;
312  float rmax = 0.;
313  float zmin = 2800.;
314  float zmax = -2800.;
315 
316  unsigned int detector_fw_bw_max = 3;
317  unsigned int detector_max = 21;
318 
319  Ring tempring(Ring::TIDRing);
320 
321  for ( unsigned int detector_fw_bw = 0; detector_fw_bw < detector_fw_bw_max; ++detector_fw_bw ) {
322  for ( unsigned int detector = 0; detector < detector_max; ++detector ) {
323  if ( tid_[fw_bw][wheel][ring][detector_fw_bw][detector][2] > 0 ) {
324  DetId id = constructTIDDetId(fw_bw,wheel,ring,detector_fw_bw,detector,2);
325  double phi = determineExtensions(id,rmin,rmax,zmin,zmax,Ring::TIDRing);
326  tempring.addId(phi,id);
327  } else if ( tid_[fw_bw][wheel][ring][detector_fw_bw][detector][0] > 0 ) {
328  DetId id = constructTIDDetId(fw_bw,wheel,ring,detector_fw_bw,detector,0);
329  double phi = determineExtensions(id,rmin,rmax,zmin,zmax,Ring::TIDRing);
330  tempring.addId(phi,id);
331  }
332  }
333  }
334 
335  LogDebug("RoadSearch") << "TID ring initialized rmin/rmax/zmin/zmax: " << rmin
336  << "/" << rmax
337  << "/" << zmin
338  << "/" << zmax;
339 
340  tempring.initialize(rmin,rmax,zmin,zmax);
341 
342  return tempring;
343 }
344 
346  unsigned int wheel,
347  unsigned int ring,
348  unsigned int module_fw_bw,
349  unsigned int module,
350  unsigned int stereo) {
351 
352  TIDDetId id(fw_bw+1,wheel+1,ring+1,module_fw_bw,module+1,stereo);
353 
354  LogDebug("RoadSearch") << "constructed TID ring DetId for side: " << id.side()
355  << " wheel: " << id.wheel()
356  << " ring: " << id.ring()
357  << " module_fw_bw: " << id.module()[0]
358  << " module: " << id.module()[1]
359  << " stereo: " << id.stereo();
360 
361  return DetId(id.rawId());
362 }
363 
364 void RingMaker::constructTECRings(unsigned int &index) {
365 
366  unsigned int counter = 0;
367 
368  unsigned int fw_bw_max = 3;
369  unsigned int wheel_max = 10;
370  unsigned int ring_max = 8;
371 
372  for ( unsigned int fw_bw = 0; fw_bw < fw_bw_max; ++fw_bw ) {
373  for ( unsigned int wheel = 0; wheel < wheel_max; ++wheel ) {
374  for ( unsigned int ring = 0; ring < ring_max; ++ring ) {
375  if ( tec2_[fw_bw][wheel][ring] > 0 ) {
376  Ring tempring = constructTECRing(fw_bw,wheel,ring);
377  if ( tempring.getNumDetIds() > 0 ) {
378  tempring.setindex(++index);
379  double center_z = tempring.getzmin() + ((tempring.getzmax()-tempring.getzmin())/2);
380  rings_->insert(center_z,tempring);
381  ++counter;
382  LogDebug("RoadSearch") << "constructed TEC ring with index: " << tempring.getindex()
383  << " consisting of " << tempring.getNumDetIds() << " DetIds";
384  }
385  }
386  }
387  }
388  }
389 
390  LogDebug("RoadSearch") << "constructed " << counter << " TEC rings";
391 
392 }
393 
395  unsigned int wheel,
396  unsigned int ring) {
397 
398  // variables for determinaton of rmin, rmax, zmin, zmax
399  float rmin = 1200.;
400  float rmax = 0.;
401  float zmin = 2800.;
402  float zmax = -2800.;
403 
404  unsigned int petal_max = 9;
405  unsigned int petal_fw_bw_max = 3;
406  unsigned int module_max = 21;
407 
408  Ring tempring(Ring::TECRing);
409 
410  for ( unsigned int petal = 0; petal < petal_max; ++petal ) {
411  for ( unsigned int petal_fw_bw = 0; petal_fw_bw < petal_fw_bw_max; ++petal_fw_bw ) {
412  for ( unsigned int module = 0; module < module_max; ++module ) {
413  // only fill r/phi sensor id's
414  // first try r/phi of double sided layer (stereo = 2)
415  // then try r/phi of single sided layer (stereo = 0)
416  if ( tec_[fw_bw][wheel][petal_fw_bw][petal][ring][module][2] > 0 ) {
417  DetId id = constructTECDetId(fw_bw,wheel,petal_fw_bw,petal,ring,module,2);
418  double phi = determineExtensions(id,rmin,rmax,zmin,zmax,Ring::TECRing);
419  tempring.addId(phi,id);
420  } else if ( tec_[fw_bw][wheel][petal_fw_bw][petal][ring][module][0] > 0 ) {
421  DetId id = constructTECDetId(fw_bw,wheel,petal_fw_bw,petal,ring,module,0);
422  double phi = determineExtensions(id,rmin,rmax,zmin,zmax,Ring::TECRing);
423  tempring.addId(phi,id);
424  }
425  }
426  }
427  }
428 
429  LogDebug("RoadSearch") << "TEC ring initialized rmin/rmax/zmin/zmax: " << rmin
430  << "/" << rmax
431  << "/" << zmin
432  << "/" << zmax;
433 
434  tempring.initialize(rmin,rmax,zmin,zmax);
435 
436  return tempring;
437 }
438 
440  unsigned int wheel,
441  unsigned int petal_fw_bw,
442  unsigned int petal,
443  unsigned int ring,
444  unsigned int module,
445  unsigned int stereo) {
446 
447  TECDetId id(fw_bw+1,wheel+1,petal_fw_bw,petal+1,ring+1,module+1,stereo);
448 
449  LogDebug("RoadSearch") << "constructed TEC ring DetId for side: " << id.side()
450  << " wheel: " << id.wheel()
451  << " ring: " << id.ring()
452  << " petal fw(0)/bw(0): " << id.petal()[0]
453  << " petal: " << id.petal()[1]
454  << " module: " << id.module()
455  << " stereo: " << id.stereo();
456 
457  return DetId(id.rawId());
458 }
459 
460 void RingMaker::constructPXBRings(unsigned int &index) {
461 
462  unsigned int counter = 0;
463 
464  unsigned int layer_max = 3;
465  unsigned int module_max = 8;
466 
467  for ( unsigned int layer = 0; layer < layer_max; ++layer ) {
468  for ( unsigned int module = 0; module < module_max; ++module ) {
469  Ring ring = constructPXBRing(layer,module);
470  if ( ring.getNumDetIds() > 0 ) {
471  ring.setindex(++index);
472  double center_z = ring.getzmin() + ((ring.getzmax()-ring.getzmin())/2);
473  rings_->insert(center_z,ring);
474  ++counter;
475  LogDebug("RoadSearch") << "constructed PXB ring with index: " << ring.getindex()
476  << " consisting of " << ring.getNumDetIds() << " DetIds";
477  }
478  }
479  }
480 
481  LogDebug("RoadSearch") << "constructed " << counter << " PXB rings";
482 
483 }
484 
486  unsigned int module) {
487 
488  // variables for determinaton of rmin, rmax, zmin, zmax
489  float rmin = 1200.;
490  float rmax = 0.;
491  float zmin = 2800.;
492  float zmax = -2800.;
493 
494  unsigned int ladder_max = 44;
495 
497 
498  for ( unsigned int ladder = 0; ladder < ladder_max; ++ladder ) {
499  if ( pxb_[layer][ladder][module] > 0 ) {
500  DetId id = constructPXBDetId(layer,ladder,module);
501  double phi = determineExtensions(id,rmin,rmax,zmin,zmax,Ring::PXBRing);
502  ring.addId(phi,id);
503  }
504  }
505 
506  LogDebug("RoadSearch") << "PXB ring initialized rmin/rmax/zmin/zmax: " << rmin
507  << "/" << rmax
508  << "/" << zmin
509  << "/" << zmax;
510 
511  ring.initialize(rmin,rmax,zmin,zmax);
512 
513  return ring;
514 }
515 
517  unsigned int ladder,
518  unsigned int module) {
519  PXBDetId id(layer+1,ladder+1,module+1);
520 
521  LogDebug("RoadSearch") << "constructed PXB ring DetId for layer: " << id.layer()
522  << " ladder: " << id.ladder()
523  << " module: " << id.det();
524 
525  return DetId(id.rawId());
526 }
527 
528 void RingMaker::constructPXFRings(unsigned int &index) {
529 
530  unsigned int counter = 0;
531 
532  unsigned int fw_bw_max = 2;
533  unsigned int disk_max = 2; // 2 disks
534  unsigned int panel_max = 2; // 2 sided panel on each blade
535  unsigned int module_max = 4; // 3-4 sensor arrays on each panel
536 
537  for ( unsigned int fw_bw = 0; fw_bw < fw_bw_max; ++fw_bw ) {
538  for ( unsigned int disk = 0; disk < disk_max; ++disk ) {
539  for ( unsigned int panel = 0; panel < panel_max; ++panel ) {
540  for ( unsigned int module = 0; module < module_max; ++module ) {
541  if ( pxf2_[fw_bw][disk][panel][module] > 0 ) {
542  Ring ring = constructPXFRing(fw_bw,disk,panel,module);
543  if ( ring.getNumDetIds() > 0 ) {
544  ring.setindex(++index);
545  double center_z = ring.getzmin() + ((ring.getzmax()-ring.getzmin())/2);
546  rings_->insert(center_z,ring);
547  ++counter;
548  }
549  }
550  }
551  }
552  }
553  }
554 
555  LogDebug("RoadSearch") << "constructed " << counter << " PXF rings";
556 
557 }
558 
560  unsigned int disk,
561  unsigned int panel,
562  unsigned int module) {
563 
564  // variables for determinaton of rmin, rmax, zmin, zmax
565  float rmin = 1200.;
566  float rmax = 0.;
567  float zmin = 2800.;
568  float zmax = -2800.;
569 
570  unsigned int blade_max = 24;
571 
573 
574  for ( unsigned int blade = 0; blade < blade_max; ++blade ) {
575  if ( pxf_[fw_bw][disk][blade][panel][module] > 0 ) {
576  DetId id = constructPXFDetId(fw_bw,disk,blade,panel,module);
577  double phi = determineExtensions(id,rmin,rmax,zmin,zmax,Ring::PXFRing);
578  ring.addId(phi,id);
579  }
580  }
581 
582  LogDebug("RoadSearch") << "PXF ring initialized rmin/rmax/zmin/zmax: " << rmin
583  << "/" << rmax
584  << "/" << zmin
585  << "/" << zmax;
586 
587  ring.initialize(rmin,rmax,zmin,zmax);
588 
589  return ring;
590 }
591 
593  unsigned int disk,
594  unsigned int blade,
595  unsigned int panel,
596  unsigned int module) {
597 
598  PXFDetId id(fw_bw+1,disk+1,blade+1,panel+1,module+1);
599 
600  LogDebug("RoadSearch") << "constructed PXF ring DetId for fw_bw: " << id.side()
601  << " disk: " << id.disk()
602  << " blade: " << id.blade()
603  << " panel: " << id.panel()
604  << " module: " << id.module();
605 
606  return DetId(id.rawId());
607 }
608 
609 double RingMaker::determineExtensions(DetId id, float &rmin, float &rmax, float &zmin, float& zmax, Ring::type type) {
610 
611  //solution for double modules: loop over r-phi and stereo sensors is required
612  std::vector<unsigned int> UseRingIds;
613 
614  if ( type == Ring::TOBRing ) {
615  TOBDetId tob_axial(id.rawId());
616  UseRingIds.push_back(tob_axial.rawId());
617  if ( tob_axial.partnerDetId() != 0 ) {
618  TOBDetId tob_stereo(tob_axial.partnerDetId());
619  UseRingIds.push_back(tob_stereo.rawId());
620  }
621  }
622  if ( type == Ring::TIDRing ) {
623  TIDDetId tid_axial(id.rawId());
624  UseRingIds.push_back(tid_axial.rawId());
625  if ( tid_axial.partnerDetId() != 0 ) {
626  TIDDetId tid_stereo(tid_axial.partnerDetId());
627  UseRingIds.push_back(tid_stereo.rawId());
628  }
629  }
630  if ( type == Ring::TECRing ) {
631  TECDetId tec_axial(id.rawId());
632  UseRingIds.push_back(tec_axial.rawId());
633  if ( tec_axial.partnerDetId() != 0 ) {
634  TECDetId tec_stereo(tec_axial.partnerDetId());
635  UseRingIds.push_back(tec_stereo.rawId());
636  }
637  }
638  if ( type == Ring::PXBRing ) {
639  PXBDetId pxb_axial(id.rawId());
640  UseRingIds.push_back(pxb_axial.rawId());
641  }
642  if ( type == Ring::PXFRing ) {
643  PXFDetId pxf_axial(id.rawId());
644  UseRingIds.push_back(pxf_axial.rawId());
645  }
646 
647 
648  if ( type == Ring::TIBRing ) {
649  TIBDetId tib_axial(id.rawId());
650  UseRingIds.push_back(tib_axial.rawId());
651  if ( tib_axial.partnerDetId() != 0 ) {
652  TIBDetId tib_stereo(tib_axial.partnerDetId());
653  UseRingIds.push_back(tib_stereo.rawId());
654  }
655  }
656  double phi = 0.;
657  for ( std::vector<unsigned int>::iterator it = UseRingIds.begin(); it != UseRingIds.end(); ++it) {
658 
659  const GeomDetUnit *det = tracker_->idToDetUnit(DetId(*it));
660 
661  if ( det != 0 ) {
662 
663  GlobalPoint p[8];
664  float r[8],z[8];
665  float local_rmin = 1200.;
666  float local_rmax = 0.;
667  float local_zmin = 2800.;
668  float local_zmax = -2800.;
669 
670  // calculate global position of center
671  GlobalPoint center = det->surface().toGlobal(LocalPoint(0,0,0));
672  phi = center.phi();
673 
674  if ( (type == Ring::TIBRing) || (type == Ring::TOBRing) || (type == Ring::PXBRing) || (type == Ring::PXFRing) ) {
675 
676  float length = det->surface().bounds().length();
677  float width = det->surface().bounds().width();
678  float thickness = det->surface().bounds().thickness();
679 
680  p[0] = det->surface().toGlobal(LocalPoint(width/2,length/2,thickness/2));
681  p[1] = det->surface().toGlobal(LocalPoint(width/2,-length/2,thickness/2));
682  p[2] = det->surface().toGlobal(LocalPoint(-width/2,length/2,thickness/2));
683  p[3] = det->surface().toGlobal(LocalPoint(-width/2,-length/2,thickness/2));
684  p[4] = det->surface().toGlobal(LocalPoint(width/2,length/2,-thickness/2));
685  p[5] = det->surface().toGlobal(LocalPoint(width/2,-length/2,-thickness/2));
686  p[6] = det->surface().toGlobal(LocalPoint(-width/2,length/2,-thickness/2));
687  p[7] = det->surface().toGlobal(LocalPoint(-width/2,-length/2,-thickness/2));
688 
689  } else if ( (type == Ring::TIDRing) || (type == Ring::TECRing) ) {
690 
691  std::vector<float> parameters = ((TrapezoidalPlaneBounds&)(det->surface().bounds())).parameters();
692 
693  p[0] = det->surface().toGlobal(LocalPoint(parameters[0],-parameters[3],parameters[2]));
694  p[1] = det->surface().toGlobal(LocalPoint(-parameters[0],-parameters[3],parameters[2]));
695  p[2] = det->surface().toGlobal(LocalPoint(parameters[1],parameters[3],parameters[2]));
696  p[3] = det->surface().toGlobal(LocalPoint(-parameters[1],parameters[3],parameters[2]));
697  p[4] = det->surface().toGlobal(LocalPoint(parameters[0],-parameters[3],-parameters[2]));
698  p[5] = det->surface().toGlobal(LocalPoint(-parameters[0],-parameters[3],-parameters[2]));
699  p[6] = det->surface().toGlobal(LocalPoint(parameters[1],parameters[3],-parameters[2]));
700  p[7] = det->surface().toGlobal(LocalPoint(-parameters[1],parameters[3],-parameters[2]));
701 
702  }
703 
704  for ( int i = 0; i < 8; ++i ) {
705  r[i] = sqrt(p[i].x()*p[i].x() + p[i].y()*p[i].y());
706  z[i] = p[i].z();
707  if ( r[i] < local_rmin ) local_rmin = r[i];
708  if ( r[i] > local_rmax ) local_rmax = r[i];
709  if ( z[i] < local_zmin ) local_zmin = z[i];
710  if ( z[i] > local_zmax ) local_zmax = z[i];
711  }
712 
713  if ( local_rmin < rmin ) rmin = local_rmin;
714  if ( local_rmax > rmax ) rmax = local_rmax;
715  if ( local_zmin < zmin ) zmin = local_zmin;
716  if ( local_zmax > zmax ) zmax = local_zmax;
717 
718  } else {
719 
720  if ( type == Ring::TIBRing ) {
721  TIBDetId tibid(id.rawId());
722  edm::LogError("RoadSearch") << "problem resolving DetUnit for TIB ring Detid: " << id.rawId()
723  << " layer: " << tibid.layer()
724  << " fw(0)/bw(1): " << tibid.string()[0]
725  << " ext(0)/int(0): " << tibid.string()[1]
726  << " string: " << tibid.string()[2]
727  << " module: " << tibid.module()
728  << " not stereo(0)/stereo(1): " << tibid.stereo()
729  << " not glued(0)/glued(1): " << tibid.glued();
730  } else if ( type == Ring::TOBRing ) {
731  TOBDetId tobid(id.rawId());
732  edm::LogError("RoadSearch") << "problem resolving DetUnit for TOB ring Detid: " << id.rawId()
733  << " layer: " << tobid.layer()
734  << " fw(0)/bw(1): " << tobid.rod()[0]
735  << " rod: " << tobid.rod()[1]
736  << " detector: " << tobid.det()
737  << " not stereo(0)/stereo(1): " << tobid.stereo()
738  << " not glued(0)/glued(1): " << tobid.glued();
739  } else if ( type == Ring::TIDRing ) {
740  TIDDetId tidid(id.rawId());
741  edm::LogError("RoadSearch") << "problem resolving DetUnit for TID ring Detid: " << id.rawId()
742  << " side neg(1)/pos(2): " << tidid.side()
743  << " wheel: " << tidid.wheel()
744  << " ring: " << tidid.ring()
745  << " module fw(0)/bw(1): " << tidid.module()[0]
746  << " module: " << tidid.module()[1]
747  << " not stereo(0)/stereo(1): " << tidid.stereo()
748  << " not glued(0)/glued(1): " << tidid.glued();
749  } else if ( type == Ring::TECRing ) {
750  TECDetId tecid(id.rawId());
751  edm::LogError("RoadSearch") << "problem resolving DetUnit for TEC ring DetId: " << id.rawId()
752  << " side neg(1)/pos(2): " << tecid.side()
753  << " wheel: " << tecid.wheel()
754  << " petal fw(0)/bw(1): " << tecid.petal()[0]
755  << " petal: " << tecid.petal()[1]
756  << " ring: " << tecid.ring()
757  << " module: " << tecid.module()
758  << " not stereo(0)/stereo(1): " << tecid.stereo()
759  << " not glued(0)/glued(1): " << tecid.glued();
760  } else if ( type == Ring::PXBRing ) {
761  PXBDetId pxbid(id.rawId());
762  edm::LogError("RoadSearch") << "problem resolving DetUnit for PXB ring DetId: " << id.rawId()
763  << " layer: " << pxbid.layer()
764  << " ladder: " << pxbid.ladder()
765  << " module: " << pxbid.module();
766  } else if ( type == Ring::PXFRing ) {
767  PXFDetId pxfid(id.rawId());
768  edm::LogError("RoadSearch") << "problem resolving DetUnit for PXF ring DetId: " << id.rawId()
769  << " side: " << pxfid.side()
770  << " disk: " << pxfid.disk()
771  << " blade: " << pxfid.blade()
772  << " panel: " << pxfid.panel()
773  << " module: " << pxfid.module();
774  }
775  }
776  }
777  LogDebug("RoadSearch") << "id/rmin/rmax/zmin/zmax " << id.rawId() << "/" << rmin <<"/"<<rmax<<"/"<<zmin<<"/"<<zmax;
778  return phi;
779 }
780 
782  // fill hardcoded TIB geometry array
783  // tib[layer][str_fw_bw][str_int_ext][str][module][stereo]
784  for (int i = 0; i < 5; ++i) {
785  for (int j = 0; j < 3; ++j) {
786  for (int k = 0; k < 3; ++k) {
787  for (int l = 0; l < 57; ++l) {
788  for (int m = 0; m < 4; ++m) {
789  for (int n =0; n < 3; ++n) {
790  tib_[i][j][k][l][m][n] = 0;
791  }
792  }
793  }
794  }
795  }
796  }
797 
798  std::vector<DetId> detIds = tracker_->detUnitIds();
799 
800  for ( std::vector<DetId>::iterator detiterator = detIds.begin(); detiterator != detIds.end(); ++detiterator ) {
801  DetId id = *detiterator;
802 
803  if ( (unsigned int)id.subdetId() == StripSubdetector::TIB ) {
804  TIBDetId tibid(id.rawId());
805 
806  if( (int)tibid.rawId()-(int)tibid.glued() == (int)tibid.rawId()) {
807  //single sided: r-phi
808  //double sided: matched
809  tib_[tibid.layer()-1][tibid.string()[0]][tibid.string()[1]][tibid.string()[2]-1][tibid.module()-1][0] += 1;
810  } else if ( (int)tibid.rawId()-(int)tibid.glued() == 1) {
811  //double sided: stereo
812  tib_[tibid.layer()-1][tibid.string()[0]][tibid.string()[1]][tibid.string()[2]-1][tibid.module()-1][1] += 1;
813  } else if ( (int)tibid.rawId()-(int)tibid.glued() == 2) {
814  //double sided: r-phi
815  tib_[tibid.layer()-1][tibid.string()[0]][tibid.string()[1]][tibid.string()[2]-1][tibid.module()-1][2] += 1;
816  } else {
817  edm::LogError("RoadSearch") << "stereo of TIBId: " << id.rawId() << " could not be determined." << (int)tibid.glued();
818  }
819 
820  }
821  }
822 }
823 
825  // fills hardcoded TID geometry array
826  // tid[side][wheel][ring][module_fw_bw][module][stereo]
827  // where stereo gives the int of the last constructor parameter
828  // the content inidicates if detector with combination exists (>0) or not (==0)
829 
830  for (int i = 0; i < 3; ++i ) {
831  for (int j = 0; j < 4; ++j ) {
832  for (int k = 0; k < 4; ++k ) {
833  for (int l = 0; l < 3; ++l ) {
834  for (int m = 0; m < 21; ++m ) {
835  for (int n = 0; n < 3; ++n ) {
836  tid_[i][j][k][l][m][n] = 0;
837  }
838  }
839  }
840  }
841  }
842  }
843 
844  std::vector<DetId> detIds = tracker_->detUnitIds();
845 
846  for ( std::vector<DetId>::iterator detiterator = detIds.begin(); detiterator != detIds.end(); ++detiterator ) {
847  DetId id = *detiterator;
848 
849  if ( (unsigned int)id.subdetId() == StripSubdetector::TID ) {
850  TIDDetId tidid(id.rawId());
851 
852  if( (int)tidid.rawId()-(int)tidid.glued() == (int)tidid.rawId()) {
853  //single sided: r-phi
854  //double sided: matched
855  tid_[tidid.side()-1][tidid.wheel()-1][tidid.ring()-1][tidid.module()[0]][tidid.module()[1]-1][0] += 1;
856  } else if ( (int)tidid.rawId()-(int)tidid.glued() == 1) {
857  //double sided: stereo
858  tid_[tidid.side()-1][tidid.wheel()-1][tidid.ring()-1][tidid.module()[0]][tidid.module()[1]-1][1] += 1;
859  } else if ( (int)tidid.rawId()-(int)tidid.glued() == 2) {
860  //double sided: r-phi
861  tid_[tidid.side()-1][tidid.wheel()-1][tidid.ring()-1][tidid.module()[0]][tidid.module()[1]-1][2] += 1;
862  } else {
863  edm::LogError("RoadSearch") << "stereo of TIDId: " << id.rawId() << " could not be determined.";
864  }
865 
866  }
867  }
868 }
869 
871  // fills hardcoded TOB geometry array
872  // tob[layer][rod_fw_bw][rod][module][stereo]
873  for (int i = 0; i < 7; ++i) {
874  for (int j = 0; j < 3; ++j) {
875  for (int k = 0; k < 75; ++k) {
876  for (int l = 0; l < 7; ++l) {
877  for (int m = 0; m < 3; ++m) {
878  tob_[i][j][k][l][m] = 0;
879  }
880  }
881  }
882  }
883  }
884 
885  std::vector<DetId> detIds = tracker_->detUnitIds();
886 
887  for ( std::vector<DetId>::iterator detiterator = detIds.begin(); detiterator != detIds.end(); ++detiterator ) {
888  DetId id = *detiterator;
889 
890  if ( (unsigned int)id.subdetId() == StripSubdetector::TOB ) {
891  TOBDetId tobid(id.rawId());
892 
893  if( (int)tobid.rawId()-(int)tobid.glued() == (int)tobid.rawId()) {
894  //single sided: r-phi
895  //double sided: matched
896  tob_[tobid.layer()-1][tobid.rod()[0]][tobid.rod()[1]-1][tobid.module()-1][0] += 1;
897  } else if ( (int)tobid.rawId()-(int)tobid.glued() == 1) {
898  //double sided: stereo
899  tob_[tobid.layer()-1][tobid.rod()[0]][tobid.rod()[1]-1][tobid.module()-1][1] += 1;
900  } else if ( (int)tobid.rawId()-(int)tobid.glued() == 2) {
901  //double sided: r-phi
902  tob_[tobid.layer()-1][tobid.rod()[0]][tobid.rod()[1]-1][tobid.module()-1][2] += 1;
903  } else {
904  edm::LogError("RoadSearch") << "stereo of TOBId: " << id.rawId() << " could not be determined.";
905  }
906 
907  }
908  }
909 }
910 
912  // fills hardcoded TEC geometry array
913  // tec[side][wheel][petal_fw_bw][petal][ring][module][stereo]
914  // where stereo gives the int of the last constructor parameter
915  // the content inidicates if detector with combination exists (>0) or not (==0)
916 
917  // fill two arrays to restrict first loop (number of rings dependent on wheel)
918 
919  for (int i = 0; i < 3; ++i ) {
920  for (int j = 0; j < 10; ++j ) {
921  for (int k = 0; k < 3; ++k ) {
922  for (int l = 0; l < 9; ++l ) {
923  for (int m = 0; m < 8; ++m ) {
924  for (int n = 0; n < 21; ++n ) {
925  for (int o = 0; o < 3; ++o ) {
926  tec_[i][j][k][l][m][n][o] = 0;
927  }
928  }
929  }
930  }
931  }
932  }
933  }
934 
935  for (int i = 0; i < 3; ++i ) {
936  for (int j = 0; j < 10; ++j ) {
937  for (int k = 0; k < 8; ++k ) {
938  tec2_[i][j][k] = 0;
939  }
940  }
941  }
942 
943  std::vector<DetId> detIds = tracker_->detUnitIds();
944 
945  for ( std::vector<DetId>::iterator detiterator = detIds.begin(); detiterator != detIds.end(); ++detiterator ) {
946  DetId id = *detiterator;
947 
948  if ( (unsigned int)id.subdetId() == StripSubdetector::TEC ) {
949  TECDetId tecid(id.rawId());
950 
951  if( (int)tecid.rawId()-(int)tecid.glued() == (int)tecid.rawId()) {
952  //single sided: r-phi
953  //double sided: matched
954  tec_[tecid.side()-1][tecid.wheel()-1][tecid.petal()[0]][tecid.petal()[1]-1][tecid.ring()-1][tecid.module()-1][0] += 1;
955  tec2_[tecid.side()-1][tecid.wheel()-1][tecid.ring()-1] += 1;
956  } else if ( (int)tecid.rawId()-(int)tecid.glued() == 1) {
957  //double sided: stereo
958  tec_[tecid.side()-1][tecid.wheel()-1][tecid.petal()[0]][tecid.petal()[1]-1][tecid.ring()-1][tecid.module()-1][1] += 1;
959  tec2_[tecid.side()-1][tecid.wheel()-1][tecid.ring()-1] += 1;
960  } else if ( (int)tecid.rawId()-(int)tecid.glued() == 2) {
961  //double sided: r-phi
962  tec_[tecid.side()-1][tecid.wheel()-1][tecid.petal()[0]][tecid.petal()[1]-1][tecid.ring()-1][tecid.module()-1][2] += 1;
963  tec2_[tecid.side()-1][tecid.wheel()-1][tecid.ring()-1] += 1;
964  } else {
965  edm::LogError("RoadSearch") << "stereo of TECId: " << id.rawId() << " could not be determined.";
966  }
967 
968  }
969  }
970 }
971 
973  // fills hardcoded PXB geometry array: pxb[layer][ladder][module]
974  // module gives the int of the last constructor parameter
975  // content of [module] indicates if module with combination exists (>0) or not (==0)
976 
977  for (int i = 0; i < 3; ++i ) {
978  for (int j = 0; j < 44; ++j ) {
979  for (int k = 0; k < 8; ++k ) {
980  pxb_[i][j][k] = 0;
981  }
982  }
983  }
984 
985  std::vector<DetId> detIds = tracker_->detUnitIds();
986 
987  for ( std::vector<DetId>::iterator detiterator = detIds.begin(); detiterator != detIds.end(); ++detiterator ) {
988  DetId id = *detiterator;
989 
990  if ( (unsigned int)id.subdetId() == PixelSubdetector::PixelBarrel ) {
991  PXBDetId pxbid(id.rawId());
992 
993  //sanity check with partner ID not possible
994  pxb_[pxbid.layer()-1][pxbid.ladder()-1][pxbid.module()-1] += 1;
995 
996  }
997  }
998 }
999 
1001  // fills hardcoded PXF geometry array: pxf[side][disk][blade][panel][module]
1002  // module gives the int of the last constructor parameter
1003  // content of [module] indicates if module with combination exists (>0) or not (==0)
1004 
1005  for (int i = 0; i < 2; ++i ) {
1006  for (int j = 0; j < 2; ++j ) {
1007  for (int k = 0; k < 24; ++k ) {
1008  for (int l = 0; l < 2; ++l ) {
1009  for (int m = 0; m < 4; ++m ) {
1010  pxf_[i][j][k][l][m] = 0;
1011  }
1012  }
1013  }
1014  }
1015  }
1016 
1017  for (int i = 0; i < 2; ++i ) {
1018  for (int j = 0; j < 2; ++j ) {
1019  for (int k = 0; k < 2; ++k ) {
1020  for (int l = 0; l < 4; ++l ) {
1021  pxf2_[i][j][k][l] = 0;
1022  }
1023  }
1024  }
1025  }
1026 
1027  std::vector<DetId> detIds = tracker_->detUnitIds();
1028 
1029  for ( std::vector<DetId>::iterator detiterator = detIds.begin(); detiterator != detIds.end(); ++detiterator ) {
1030  DetId id = *detiterator;
1031 
1032  if ( (unsigned int)id.subdetId() == PixelSubdetector::PixelEndcap ) {
1033  PXFDetId pxfid(id.rawId());
1034 
1035  //sanity check with partner ID not possible
1036  pxf_[pxfid.side()-1][pxfid.disk()-1][pxfid.blade()-1][pxfid.panel()-1][pxfid.module()-1] += 1;
1037  pxf2_[pxfid.side()-1][pxfid.disk()-1][pxfid.panel()-1][pxfid.module()-1] += 1;
1038 
1039  }
1040  }
1041 }
1042 
1044  //
1045  // dumps all tracker detids in geometry
1046  //
1047 
1048  // return value
1049  bool result = true;
1050 
1051  std::ofstream output(filename.c_str());
1052 
1053  output << dumpDetIds();
1054 
1055  return result;
1056 
1057 }
1058 
1059 std::string RingMaker::dumpDetIds() {
1060  //
1061  // dumps all tracker detids in geometry
1062  //
1063 
1064  std::ostringstream output;
1065 
1066  std::vector<DetId> detIds = tracker_->detUnitIds();
1067 
1068  output << std::endl << "[RoadMaker] Total number of DETECTOR = " << detIds.size() << std::endl;
1069 
1070  for ( std::vector<DetId>::iterator detiterator = detIds.begin(); detiterator != detIds.end(); ++detiterator ) {
1071  DetId id = *detiterator;
1072 
1073  if ( (unsigned int)id.subdetId() == StripSubdetector::TIB ) {
1074  TIBDetId tibid(id.rawId());
1075  output << "[RoadMaker] DetUnit for TIB ring Detid: " << id.rawId()
1076  << " layer: " << tibid.layer()
1077  << " fw(0)/bw(1): " << tibid.string()[0]
1078  << " ext(0)/int(0): " << tibid.string()[1]
1079  << " string: " << tibid.string()[2]
1080  << " detector: " << tibid.module()
1081  << " not stereo(0)/stereo(1): " << tibid.stereo()
1082  << " not glued(0)/glued(1): " << tibid.glued()
1083  << std::endl;
1084  } else if ( (unsigned int)id.subdetId() == StripSubdetector::TOB ) {
1085  TOBDetId tobid(id.rawId());
1086  output << "[RoadMaker] DetUnit for TOB ring Detid: " << id.rawId()
1087  << " layer: " << tobid.layer()
1088  << " fw(0)/bw(1): " << tobid.rod()[0]
1089  << " rod: " << tobid.rod()[1]
1090  << " detector: " << tobid.module()
1091  << " not stereo(0)/stereo(1): " << tobid.stereo()
1092  << " not glued(0)/glued(1): " << tobid.glued()
1093  << std::endl;
1094  } else if ( (unsigned int)id.subdetId() == StripSubdetector::TID ) {
1095  TIDDetId tidid(id.rawId());
1096  output << "[RoadMaker] DetUnit for TID ring Detid: " << id.rawId()
1097  << " side neg(1)/pos(2): " << tidid.side()
1098  << " wheel: " << tidid.wheel()
1099  << " ring: " << tidid.ring()
1100  << " detector fw(0)/bw(1): " << tidid.module()[0]
1101  << " detector: " << tidid.module()[1]
1102  << " not stereo(0)/stereo(1): " << tidid.stereo()
1103  << " not glued(0)/glued(1): " << tidid.glued()
1104  << std::endl;
1105  } else if ( (unsigned int)id.subdetId() == StripSubdetector::TEC ) {
1106  TECDetId tecid(id.rawId());
1107  output << "[RoadMaker] DetUnit for TEC ring DetId: " << id.rawId()
1108  << " side neg(1)/pos(2): " << tecid.side()
1109  << " wheel: " << tecid.wheel()
1110  << " petal fw(0)/bw(1): " << tecid.petal()[0]
1111  << " petal: " << tecid.petal()[1]
1112  << " ring: " << tecid.ring()
1113  << " module: " << tecid.module();
1114  if ( ((int)tecid.partnerDetId()-(int)id.rawId()) == 1 ) {
1115  output << " stereo: 1";
1116  } else if ( ((int)tecid.partnerDetId()-(int)id.rawId()) == -1 ) {
1117  output << " stereo: 2";
1118  } else if ( tecid.partnerDetId() == 0 ) {
1119  output << " stereo: 0";
1120  } else {
1121  output << " stereo: problem";
1122  }
1123  output << std::endl;
1124  } else if ( (unsigned int)id.subdetId() == PixelSubdetector::PixelBarrel ) {
1125  PXBDetId pxbid(id.rawId());
1126  output << "[RoadMaker] DetUnit for PXB ring DetId: " << id.rawId()
1127  << " layer: " << pxbid.layer()
1128  << " ladder: " << pxbid.ladder()
1129  << " detector: " << pxbid.module()
1130  << std::endl;
1131  } else if ( (unsigned int)id.subdetId() == PixelSubdetector::PixelEndcap ) {
1132  PXFDetId pxfid(id.rawId());
1133  output << "[RoadMaker] DetUnit for PXF ring DetId: " << id.rawId()
1134  << " side: " << pxfid.side()
1135  << " disk: " << pxfid.disk()
1136  << " blade: " << pxfid.blade()
1137  << " detector: " << pxfid.module()
1138  << std::endl;
1139  } else {
1140  output << "[RoadMaker] DetUnit for unknown subdetector: " << id.rawId() << std::endl;
1141  }
1142 
1143  }
1144 
1145  return output.str();
1146 
1147 }
#define LogDebug(id)
type
Definition: HCALResponse.h:22
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
void constructPXBRings(unsigned int &index)
Definition: RingMaker.cc:460
int i
Definition: DBlmapReader.cc:9
dictionary parameters
Definition: Parameters.py:2
void fillTECGeometryArray()
Definition: RingMaker.cc:911
unsigned int panel() const
panel id
Definition: PXFDetId.h:52
DetId constructTIDDetId(unsigned int fw_bw, unsigned int wheel, unsigned int ring, unsigned int detector_fw_bw, unsigned int detector, unsigned int stereo)
Definition: RingMaker.cc:345
static const char tracker_[]
void constructTIBRings(unsigned int &index)
Definition: RingMaker.cc:105
virtual float length() const =0
void constructTOBRings(unsigned int &index)
Definition: RingMaker.cc:194
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
unsigned int getindex() const
Definition: Ring.h:185
void fillPXFGeometryArray()
Definition: RingMaker.cc:1000
uint32_t stereo() const
Definition: SiStripDetId.h:162
int pxb_[3][44][8]
Definition: RingMaker.h:137
Geom::Phi< T > phi() const
Definition: PV3DBase.h:68
void fillTOBGeometryArray()
Definition: RingMaker.cc:870
std::string dumpDetIds()
Definition: RingMaker.cc:1059
unsigned int ladder() const
ladder id
Definition: PXBDetId.h:39
RingMaker(const TrackerGeometry *tracker, std::string configuration)
Definition: RingMaker.cc:42
void constructTECRings(unsigned int &index)
Definition: RingMaker.cc:364
std::vector< unsigned int > string() const
string id
Definition: TIBDetId.h:53
unsigned int module() const
det id
Definition: TECDetId.h:75
Ring constructPXBRing(unsigned int layer, unsigned int module)
Definition: RingMaker.cc:485
double double double z
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
Ring constructTIDRing(unsigned int fw_bw, unsigned int wheel, unsigned int ring)
Definition: RingMaker.cc:306
unsigned int side() const
positive or negative id
Definition: TECDetId.h:47
std::vector< unsigned int > rod() const
rod id
Definition: TOBDetId.h:49
unsigned int blade() const
blade id
Definition: PXFDetId.h:48
DetId constructPXFDetId(unsigned int fw_bw, unsigned int disk, unsigned int blade, unsigned int panel, unsigned int module)
Definition: RingMaker.cc:592
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
virtual float thickness() const =0
void setindex(unsigned int input)
Definition: Ring.h:183
std::string configuration_
Definition: RingMaker.h:141
Ring constructTECRing(unsigned int fw_bw, unsigned int wheel, unsigned int ring)
Definition: RingMaker.cc:394
float getzmax() const
Definition: Ring.h:158
std::vector< unsigned int > petal() const
petal id
Definition: TECDetId.h:61
int tib_[5][3][3][57][4][3]
Definition: RingMaker.h:132
void fillPXBGeometryArray()
Definition: RingMaker.cc:972
Definition: Ring.h:31
T sqrt(T t)
Definition: SSEVec.h:46
void fillTIDGeometryArray()
Definition: RingMaker.cc:824
int tec_[3][10][3][9][8][21][3]
Definition: RingMaker.h:136
T z() const
Definition: PV3DBase.h:63
tuple result
Definition: query.py:137
uint32_t partnerDetId() const
Definition: SiStripDetId.h:168
int pxf_[2][2][24][2][4]
Definition: RingMaker.h:138
unsigned int ring() const
ring id
Definition: TIDDetId.h:55
unsigned int module() const
det id
Definition: PXBDetId.h:43
DetId constructTIBDetId(unsigned int layer, unsigned int fw_bw, unsigned int ext_int, unsigned int string, unsigned int detector, unsigned int stereo)
Definition: RingMaker.cc:175
int j
Definition: DBlmapReader.cc:9
Definition: Rings.h:27
DetId constructTECDetId(unsigned int fw_bw, unsigned int wheel, unsigned int petal_fw_bw, unsigned int petal, unsigned int ring, unsigned int module, unsigned int stereo)
Definition: RingMaker.cc:439
unsigned int module() const
det id
Definition: PXFDetId.h:56
std::vector< unsigned int > module() const
det id
Definition: TIDDetId.h:64
unsigned int disk() const
disk id
Definition: PXFDetId.h:43
int pxf2_[2][2][2][4]
Definition: RingMaker.h:139
int tid_[3][4][4][3][21][3]
Definition: RingMaker.h:134
int k[5][pyjets_maxn]
float getzmin() const
Definition: Ring.h:157
void fillTIBGeometryArray()
Definition: RingMaker.cc:781
Definition: DetId.h:20
uint32_t glued() const
Definition: SiStripDetId.h:154
const Bounds & bounds() const
Definition: BoundSurface.h:89
void constructPXFRings(unsigned int &index)
Definition: RingMaker.cc:528
void initialize(float rmin, float rmax, float zmin, float zmax)
Definition: Ring.h:167
const TrackerGeometry * tracker_
Definition: RingMaker.h:128
bool dumpDetIdsIntoFile(std::string fileName)
Definition: RingMaker.cc:1043
unsigned int module() const
detector id
Definition: TIBDetId.h:61
int getNumDetIds() const
Definition: Ring.h:108
unsigned int side() const
positive or negative id
Definition: TIDDetId.h:45
Ring constructTIBRing(unsigned int layer, unsigned int fw_bw, unsigned int ext_int, unsigned int detector)
Definition: RingMaker.cc:135
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
Rings * rings_
Definition: RingMaker.h:130
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
~RingMaker()
Definition: RingMaker.cc:60
Ring constructPXFRing(unsigned int fw_bw, unsigned int disk, unsigned int panel, unsigned int module)
Definition: RingMaker.cc:559
void insert(double z, Ring &ring)
Definition: Rings.h:40
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
double determineExtensions(DetId id, float &rmin, float &rmax, float &zmin, float &zmax, Ring::type type)
Definition: RingMaker.cc:609
Ring constructTOBRing(unsigned int layer, unsigned int rod_fw_bw, unsigned int detector)
Definition: RingMaker.cc:222
tuple filename
Definition: lut2db_cfg.py:20
virtual const DetIdContainer & detUnitIds() const
Returm a vector of all GeomDetUnit DetIds.
DetId constructTOBDetId(unsigned int layer, unsigned int rod_fw_bw, unsigned int rod, unsigned int detector, unsigned int stereo)
Definition: RingMaker.cc:261
unsigned int ring() const
ring id
Definition: TECDetId.h:71
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
unsigned int side() const
positive or negative id
Definition: PXFDetId.h:38
void constructRings()
Definition: RingMaker.cc:64
unsigned int module() const
detector id
Definition: TOBDetId.h:58
int tob_[7][3][75][7][3]
Definition: RingMaker.h:133
Definition: DDAxes.h:10
type
Definition: Ring.h:41
int tec2_[3][10][8]
Definition: RingMaker.h:135
Detector det() const
get the detector field from this detid
Definition: DetId.h:37
virtual float width() const =0
Definition: vlib.h:209
void constructTIDRings(unsigned int &index)
Definition: RingMaker.cc:278
void addId(double phi, DetId id)
Definition: Ring.h:106
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
DetId constructPXBDetId(unsigned int layer, unsigned int ladder, unsigned int module)
Definition: RingMaker.cc:516
Definition: DDAxes.h:10