GEAR  1.9.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
Util.cc
1 
2 #include "gearimpl/Util.h"
3 
4 #include "gear/PadRowLayout2D.h"
5 #include "gear/ZPlanarLayerLayout.h"
6 #include "gear/FTDLayerLayout.h"
7 #include "gear/TrackerPlanesLayerLayout.h"
8 #include "gear/SiPlanesLayerLayout.h"
9 #include "gear/LayerLayout.h"
10 #include "gear/SimpleMaterial.h"
11 
12 #include <cstdio>
13 #include <iostream>
14 #include <iomanip>
15 
16 namespace gear{
17 
18  std::ostream& operator<< ( std::ostream& s, const GearMgr& m ) {
19 
20 
21  s << " ----------------------------------------------------- " << std::endl
22  << " GearMgr : " << std::endl
23  << " ----------------------------------------------------- " << std::endl ;
24 
25 
26  try{
27 
28  s << " ---- DetectorName ---- " << std::endl << std::endl
29  << " " << m.getDetectorName()
30  << std::endl
31  << std::endl ;
32 
33  } catch(UnknownParameterException &e){
34 
35  s << " WARNING: NOT FOUND ! " << std::endl
36  << " please add it to the <gear> element of your gear file: "
37  << std::endl
38  << std::endl
39  << " <gear> " << std::endl
40  << " <global detectorName=\"MyDetectorModle007\" /> "
41  << std::endl
42  << " <detectors> ... <detectors/>" << std::endl
43  << " <gear/> " << std::endl
44  << std::endl ;
45  }
46 
47  try{
48  s << m.getBField() << std::endl ;
49  } catch(UnknownParameterException &e){
50 
51  s << " ---- BField ---- " << std::endl
52  << " WARNING: NOT FOUND ! " << std::endl
53  << " please add it to the <gear> element of your gear file, e.g.: "
54  << std::endl
55  << " <gear> " << std::endl
56  << " <BField type=\"ConstantBField\" x=\"0.0\" y=\"0.0\" z=\"4.0\"/> "
57  << std::endl
58  << " <detectors> ... <detectors/>" << std::endl
59  << " <gear/> " << std::endl
60  << std::endl ;
61  }
62 
63 
64  try{
65  // VXD parameters
66  s << " ---- VXD ---- " << std::endl
67  << m.getVXDParameters() << std::endl ;
68  } catch(UnknownParameterException &e){}
69 
70  try{
71  // FTD parameters
72  s << m.getFTDParameters() << std::endl ;
73  } catch(UnknownParameterException &e){}
74 
75  try{
76  // SIT parameters
77  s << " ---- SIT ---- " << std::endl
78  << m.getSITParameters() << std::endl ;
79  } catch(UnknownParameterException &e){}
80 
81 
82  try{
83  // SET parameters
84  s << " ---- SET ---- " << std::endl
85  << m.getSETParameters() << std::endl ;
86  } catch(UnknownParameterException &e){}
87 
88 
89  try{
90  // SIT parameters
91  s << m.getSITParameters() << std::endl ;
92  } catch(UnknownParameterException &e){}
93 
94 
95  try{
96  // SET parameters
97  s << m.getSETParameters() << std::endl ;
98  } catch(UnknownParameterException &e){}
99 
100  try{
101  // TPC parameters
102  s << m.getTPCParameters() << std::endl ;
103  } catch(UnknownParameterException &e){}
104 
105  // Calorimeter parameters
106  try{
107  s << " ---- Ecal barrel ---- " << std::endl
108  << m.getEcalBarrelParameters() << std::endl ;
109  } catch(UnknownParameterException &e){}
110 
111  try{
112  s << " ---- Ecal endcap ---- " << std::endl
113  << m.getEcalEndcapParameters() << std::endl ;
114  } catch(UnknownParameterException &e){}
115 
116  try{
117  s << " ---- Ecal plug ---- " << std::endl
118  << m.getEcalPlugParameters() << std::endl ;
119  } catch(UnknownParameterException &e){}
120 
121  try{
122  s << " ---- Yoke barrel ---- " << std::endl
123  << m.getYokeBarrelParameters() << std::endl ;
124  } catch(UnknownParameterException &e){}
125 
126  try{
127  s << " ---- Yoke endcap ---- " << std::endl
128  << m.getYokeEndcapParameters() << std::endl ;
129  } catch(UnknownParameterException &e){}
130 
131  try{
132  s << " ---- Yoke plug ---- " << std::endl
133  << m.getYokePlugParameters() << std::endl ;
134  } catch(UnknownParameterException &e){}
135 
136  try{
137  s << " ---- Hcal barrel ---- " << std::endl
138  << m.getHcalBarrelParameters() << std::endl ;
139  } catch(UnknownParameterException &e){}
140 
141  try{
142  s << " ---- Hcal endcap ---- " << std::endl
143  << m.getHcalEndcapParameters() << std::endl ;
144  } catch(UnknownParameterException &e){}
145 
146  try{
147  s << " ---- Hcal ring ---- " << std::endl
148  << m.getHcalRingParameters() << std::endl ;
149  } catch(UnknownParameterException &e){}
150 
151  try{
152  s << " ---- Lcal ---- " << std::endl
153  << m.getLcalParameters() << std::endl ;
154  } catch(UnknownParameterException &e){ }
155 
156  try{
157  s << " ---- LHcal ---- " << std::endl
158  << m.getLHcalParameters() << std::endl ;
159  } catch(UnknownParameterException &e){}
160 
161  try{
162  s << " ---- BeamCal ---- " << std::endl
163  << m.getBeamCalParameters() << std::endl ;
164  } catch(UnknownParameterException &e){}
165 
166  try{
167  s << " ---- TrackerPlanes ---- " << std::endl
168  << m.getTrackerPlanesParameters() << std::endl ;
169  } catch(UnknownParameterException &e){}
170 
171  try{
172  s << " ---- SiPlanes ---- " << std::endl
173  << m.getSiPlanesParameters() << std::endl ;
174  } catch(UnknownParameterException &e){}
175 
176  //------------------------------------------------------------------
177 
178  s << std::endl
179  << " parameter sections (detectors) : "
180  << std::endl ;
181 
182  const StringVec& keys = m.getGearParameterKeys() ;
183 
184  for(unsigned int i=0 ; i < keys.size() ; ++i ) {
185 
186  s << std::endl
187  << " ------ name : " << keys[i] << " ------- " << std::endl ;
188 
189  const GearParameters& p = m.getGearParameters( keys[i] ) ;
190 
191  s << p << std::endl ;
192 
193  }
194 
195  //------------------------------------------------------------------
196 
197  s << " ------------------------------------------------------------------ " << std::endl
198  << " materials : " << std::endl ;
199 
200 
201  const StringVec& mNames = m.getMaterialNames() ;
202 
203  for(unsigned int i=0 ; i < mNames.size() ; ++i ) {
204 
205  const SimpleMaterial& sm = m.getSimpleMaterial( mNames[i] ) ;
206 
207  s << sm << std::endl ;
208 
209  }
210 
211  s << " ------------------------------------------------------------------ " << std::endl ;
212 
213  //------------------------------------------------------------------
214 
215  return s ;
216  }
217 
218 
219 
220  std::ostream& operator<< ( std::ostream& s, const SimpleMaterial& m ) {
221 
222  const std::streamsize old_precision = s.precision(); // save current
223 
224  s << " " << m.getName()
225  << std::showpos << std::scientific << std::setprecision(8)
226  << ", A= " << m.getA()
227  << ", Z= " << m.getZ()
228  << ", density [kg/m3]= " << m.getDensity()
229  << ", radiation length [mm]= " << m.getRadLength()
230  << ", interaction length [mm]= " << m.getIntLength()
231  << std::noshowpos << std::fixed << std::setprecision(old_precision) << std::dec
232  << std::endl ;
233 
234  return s ;
235  }
236 
237  std::ostream& operator<< ( std::ostream& s, const GearParameters& p ) {
238 
239  const StringVec& iKeys = p.getIntKeys() ;
240 
241  for(unsigned int i=0 ; i < iKeys.size() ; ++i ) {
242 
243  s << std::endl << " [int] " << iKeys[i] << " \t " << p.getIntVal( iKeys[i] ) << std::endl ;
244  }
245 
246  const StringVec& dKeys = p.getDoubleKeys() ;
247 
248  for(unsigned int i=0 ; i < dKeys.size() ; ++i ) {
249 
250  s << std::endl << " [double] " << dKeys[i] << " \t " << p.getDoubleVal( dKeys[i] ) << std::endl ;
251  }
252  const StringVec& sKeys = p.getStringKeys() ;
253 
254  for(unsigned int i=0 ; i < sKeys.size() ; ++i ) {
255 
256  s << std::endl << " [string] " << sKeys[i] << " \t " << p.getStringVal( sKeys[i] ) << std::endl ;
257  }
258 
259  const StringVec& iVKeys = p.getIntVecKeys() ;
260 
261  for(unsigned int i=0 ; i < iVKeys.size() ; ++i ) {
262 
263  s << std::endl << " [IntVec] " << iVKeys[i] << " \t " ;
264 
265  const IntVec v = p.getIntVals( iVKeys[i] ) ;
266  for(unsigned int j=0 ; j < v.size() ; ++j ) {
267  s << v[j] << " , " ;
268  }
269 
270  s << std::endl ;
271  }
272 
273 
274  const StringVec& dVKeys = p.getDoubleVecKeys() ;
275 
276  for(unsigned int i=0 ; i < dVKeys.size() ; ++i ) {
277 
278  s << std::endl << " [DoubleVec] " << dVKeys[i] << " \t " ;
279 
280  const DoubleVec v = p.getDoubleVals( dVKeys[i] ) ;
281  for(unsigned int j=0 ; j < v.size() ; ++j ) {
282  s << v[j] << " , " ;
283  }
284 
285  s << std::endl ;
286  }
287 
288  const StringVec& sVKeys = p.getStringVecKeys() ;
289 
290  for(unsigned int i=0 ; i < sVKeys.size() ; ++i ) {
291 
292  s << std::endl << " [StringVec] " << sVKeys[i] << " \t " ;
293 
294  const StringVec v = p.getStringVals( sVKeys[i] ) ;
295  for(unsigned int j=0 ; j < v.size() ; ++j ) {
296  s << v[j] << " , " ;
297  }
298 
299  s << std::endl ;
300  }
301 
302  return s ;
303  }
304 
305  std::ostream& operator<< ( std::ostream& s, const BField& b ) {
306 
307  s << std::endl
308  << " ----------- BField ------- " << std::endl << std::endl ;
309 
310  Vector3D bv = b.at( Vector3D ( 0., 0., 0. ) ) ;
311 
312  s << " field vector at origin : Bx = " << bv.x() << " , By = " << bv.y() << " , Bz = " << bv.z() << " [Tesla] " << std::endl ;
313 
314  s << dynamic_cast<const GearParameters&>( b ) ;
315 
316  return s ;
317 
318  }
319 
320 
321 
322 
323  std::ostream& operator<< ( std::ostream& s, const TPCParameters& p ) {
324 
325  s << std::endl
326  << " ----------- TPCParameters ------- " << std::endl ;
327 
328  s << dynamic_cast<const GearParameters&>( p ) ;
329 
330  s << std::endl << " maxDriftLength : " << p.getMaxDriftLength() ;
331  s << std::endl << " coordinateType : ";
332  switch( p.getCoordinateType() )
333  {
334  case PadRowLayout2D::CARTESIAN : s << "cartesian"; break;
335  case PadRowLayout2D::POLAR : s << "polar"; break;
336  default : s << "unknown";
337  }
338 
339  s << std::endl << " Number of modules : " << p.getNModules() << std::endl ;
340 
341  std::vector<TPCModule *> moduleVec= p.getModules();
342  for (std::vector<TPCModule *>::iterator moduleIter = moduleVec.begin();
343  moduleIter < moduleVec.end(); moduleIter++)
344  {
345  s << **moduleIter;
346  }
347 
348  s << std::endl ;
349  s << std::endl ;
350 
351  return s ;
352  }
353 
354  std::ostream& operator<< ( std::ostream& s, const TPCModule& m ) {
355 
356  s << std::endl
357  << " ----------- TPCModule ------- " << std::endl ;
358 
359  s << dynamic_cast<const GearParameters&>( m ) ;
360 
361  s << std::endl << " Readout frequency : " << m.getReadoutFrequency() ;
362  s << std::endl << " Type : ";
363 
364  switch( m.getLocalPadLayout().getCoordinateType() )
365  {
366  case PadRowLayout2D::CARTESIAN : s << "cartesian"; break;
367  case PadRowLayout2D::POLAR : s << "polar"; break;
368  default : s << "unknown";
369  }
370 
371  s << std::endl << " Number of pads : " << m.getNPads() ;
372  s << std::endl << " Number of Rows : " << m.getNRows() ;
373  s << std::endl << " Offset : " << m.getOffset()[0] << " ; "
374  << m.getOffset()[1] ;
375  try
376  {
377  s << std::endl << " zPosition : " << m.getZPosition();
378  }
379  catch ( TPCModule::NoZPositionException & e )
380  {
381  s << " no z Position set ";
382  }
383 
384  s << std::endl << " Angle : " << m.getAngle();
385  s << std::endl;
386 
387  const DoubleVec& ext = m.getPlaneExtent() ;
388  s << " extent (global): [" << ext[0] << ","<< ext[1] << ","<< ext[2] << ","<< ext[3] << "]" << std::endl ;
389 
390  s << std::endl ;
391  s << std::endl ;
392 
393  return s ;
394  }
395 
396  std::ostream& operator<< ( std::ostream& s, const CalorimeterParameters& p ) {
397 
398 
399  s << dynamic_cast<const GearParameters&>( p ) ;
400 
401  if( p.getLayoutType() == CalorimeterParameters::BARREL ) {
402 
403  s << std::endl << " calorimeter type: barrel " << std::endl ;
404 
405  } else {
406 
407  s << std::endl << " calorimeter type: endcap " << std::endl ;
408  }
409 
410  s << " symmetry order: " << p.getSymmetryOrder() << std::endl ;
411  s << " phi0: " << p.getPhi0() << std::endl ;
412 
413 
414  const DoubleVec& ext = p.getExtent() ;
415 
416  double rMin = ext[0] ;
417  double rMax = ext[1] ;
418  double zMin = ext[2] ;
419  double zMax = ext[3] ;
420 
421  s << std::endl
422  << " dimensions : " << std::endl
423  << " rMin: " << rMin << std::endl
424  << " rMax: " << rMax << std::endl
425  << " zMin: " << zMin << std::endl
426  << " zMax: " << zMax << std::endl
427  << std::endl ;
428 
429  const LayerLayout& l = p.getLayerLayout() ;
430 
431  int nLayer = l.getNLayers() ;
432 
433  s << std::endl
434  << " layers : #total " << nLayer << std::endl ;
435 
436  double lastThickness = 0. ;
437  double lastAbsorber = 0. ;
438 
439  for( int i=0 ; i < nLayer ; ++i ) {
440 
441  double thisThickness = l.getThickness(i) ;
442  double thisAbsorber = l.getAbsorberThickness(i) ;
443 
444  if( (thisThickness != lastThickness || thisAbsorber != lastAbsorber ) ||
445  ( i == nLayer-1 ) ) {
446 
447  s << " id: " << i << " thickness: " << thisThickness
448  << " absorber thickness: " << thisAbsorber
449  << " distance: " << l.getDistance(i)
450  << " cellsize-0: " << l.getCellSize0(i)
451  << " cellsize-1: " << l.getCellSize1(i)
452  << std::endl ;
453  }
454 
455  lastThickness = thisThickness ;
456  lastAbsorber = thisAbsorber ;
457  }
458 
459 
460  return s ;
461  }
462 
463 
464  std::ostream& operator<< ( std::ostream& s, const ZPlanarParameters& p ) {
465 
466  s << " --- ZPlanarParameters: " << std::endl ;
467 
468  s << dynamic_cast<const GearParameters&>( p ) ;
469 
470  const ZPlanarLayerLayout & l = p.getZPlanarLayerLayout() ;
471 
472  int type = p.getVXDType() ;
473 
474  s << std::endl << " type : " ;
475 
476  switch( type ) {
477 
478  case ZPlanarParameters::CCD :
479 
480  s << " CCD " << std::endl ; break ;
481  case ZPlanarParameters::CMOS :
482 
483  s << " CMOS " << std::endl ; break ;
484  case ZPlanarParameters::HYBRID :
485 
486  s << " HYBRID " << std::endl ; break ;
487  default :
488 
489  s << " unknown " << std::endl ;
490  }
491 
492  s << " Shell innerR : " << p.getShellInnerRadius() << " outerR : " << p.getShellOuterRadius() << std::endl
493  << " length : " << p.getShellHalfLength() << " gap " << p.getShellGap() << std::endl ;
494 
495 
496  // layers
497 
498  s << " Layers : " << l.getNLayers()
499  << std::endl << std::endl ;
500 
501 
502  s << " layer parameters (note: ladder length (l) are half lengths ! )"
503  << std::endl ;
504 
505  char buffer[1024] ;
506 
507  sprintf(buffer," |------------------------------------------------------------------------------------|\n") ;
508  s << buffer ;
509 
510  sprintf(buffer," | | ladder: | sensitive part: |\n") ;
511  s << buffer ;
512 
513  sprintf(buffer," | # | d | w | l | t | d | w | l | t | \n") ;
514  s << buffer ;
515 
516  sprintf(buffer," |------------------------------------------------------------------------------------|\n") ;
517  s << buffer ;
518 
519  for( int i = 0 ; i < l.getNLayers() ; i++ ) {
520 
521  char buffer1[1024] ;
522  sprintf(buffer1," | %3d | %4.2f | %4.2f | %4.2f | %4.2f | %4.2f | %4.2f | %4.2f | %4.2f |\n"
523  , l.getNLadders(i)
524  , l.getLadderDistance(i)
525  , l.getLadderWidth(i)
526  , l.getLadderLength(i)
527  , l.getLadderThickness(i)
528  , l.getSensitiveDistance(i)
529  , l.getSensitiveWidth(i)
530  , l.getSensitiveLength(i)
531  , l.getSensitiveThickness(i) ) ;
532 
533  s << buffer1 ;
534 
535  }
536 
537  sprintf(buffer," |------------------------------------------------------------------------------------|\n") ;
538  s << buffer ;
539 
540  return s ;
541 
542 
543  }
544 
545  std::ostream& operator<< ( std::ostream& s, const FTDParameters& p )
546  {
547  s << std::endl
548  << " ----------- FTDParameters ------- " << std::endl ;
549 
550 
551  s << dynamic_cast<const GearParameters&>( p ) ;
552 
553  const FTDLayerLayout & l = p.getFTDLayerLayout() ;
554 
555 
556  // layers
557 
558  s << " Layers : " << l.getNLayers()
559  << std::endl << std::endl ;
560 
561 
562  s << " layer parameters (note: ladder length (l) are half lengths ! )"
563  << std::endl ;
564 
565  std::string buffer;
566  buffer = " |------------------------------------------------------------------------------------|\n" ;
567  s << buffer ;
568 
569  buffer = " | | support: | sensitive part: |\n" ;
570  s << buffer ;
571 
572  buffer = " | # | x | X | y | t | x | X | y | t | \n" ;
573  s << buffer ;
574 
575  buffer = " |------------------------------------------------------------------------------------|\n" ;
576  s << buffer ;
577 
578  for( int i = 0 ; i < l.getNLayers() ; i++ )
579  {
580  char buffer1[1024] ;
581  sprintf(buffer1," | %3d | %4.2f | %4.2f | %4.2f | %4.2f | %4.2f | %4.2f | %4.2f | %4.2f |\n"
582  , l.getNPetals(i)
583  , l.getSupportLengthMin(i)
584  , l.getSupportLengthMax(i)
585  , l.getSupportWidth(i)
586  , l.getSupportThickness(i)
587  , l.getSensitiveLengthMin(i)
588  , l.getSensitiveLengthMax(i)
589  , l.getSensitiveWidth(i)
590  , l.getSensitiveThickness(i) ) ;
591 
592  s << buffer1 ;
593 
594  }
595 
596  buffer = " |------------------------------------------------------------------------------------|\n" ;
597  s << buffer ;
598  return s ;
599 
600  }
601 
602  std::ostream& operator<< ( std::ostream& s, const SiPlanesParameters& p ) {
603 
604  s << std::endl
605  << " ----------- SiPlanesParameters ------- " << std::endl ;
606 
607  s << dynamic_cast<const GearParameters&>( p ) ;
608 
609  const SiPlanesLayerLayout & l = p.getSiPlanesLayerLayout() ;
610 
611 
612  s << std::endl << " Setup ID : " << p.getSiPlanesID() << std::endl;
613 
614  int type = p.getSiPlanesType() ;
615 
616  s << " Telescope type : " ;
617  std::string strType ;
618 
619  switch( type ) {
620 
621  case SiPlanesParameters::TelescopeWithDUT :
622  strType = "TelescopeWithDUT" ;
623  s << " TelescopeWithDUT" << std::endl ;
624  break ;
625  case SiPlanesParameters::TelescopeWithoutDUT :
626  strType = "TelescopeWithoutDUT" ;
627  s << " TelescopeWithoutDUT " << std::endl ;
628  break ;
629 
630  default :
631 
632  s << " unknown " << std::endl ;
633  }
634 
635  s << " Number of telescope planes : " << p.getSiPlanesNumber() << std::endl;
636 
637 
638  // layers
639 
640 
641  s << " Number of layers : " << l.getNLayers() << std::endl << std::endl ;
642 
643  s << " layer parameters : " << std::endl ;
644 
645  char buffer[1024] ;
646 
647  sprintf(buffer," |----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n") ;
648  s << buffer ;
649 
650  sprintf(buffer," | ladder: | sensitive part: |\n") ;
651  s << buffer ;
652 
653  sprintf(buffer," | ID | pozX| pozY| pozZ |rotXY|rotZX|rotZY| sizeX| sizeY| Thick| ID | pozX| pozY| pozZ |sizeX|sizeY| Thick|NpixX|NpixY|PitchX|PitchY| Resol| Rot1| Rot2| Rot3| Rot4| \n") ;
654 
655  s << buffer ;
656 
657  sprintf(buffer," |----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n") ;
658  s << buffer ;
659 
660  for( int i = 0 ; i < l.getNLayers() ; i++ ) {
661 
662  char buffer1[1024] ;
663  sprintf(buffer1," |%5d|%5.2f|%5.2f|%7.2f|%5.2f|%5.2f|%5.2f|%6.2f|%6.2f|%6.3f|%5d|%5.2f|%5.2f|%7.2f|%5.2f|%5.2f|%6.3f|%5d|%5d|%6.2f|%6.2f|%6.4f|%5.2f|%5.2f|%5.2f|%5.2f|\n"
664  , l.getID(i)
665  , l.getLayerPositionX(i)
666  , l.getLayerPositionY(i)
667  , l.getLayerPositionZ(i)
668  , l.getLayerRotationXY(i)
669  , l.getLayerRotationZX(i)
670  , l.getLayerRotationZY(i)
671  , l.getLayerSizeX(i)
672  , l.getLayerSizeY(i)
673  , l.getLayerThickness(i)
674  , l.getSensitiveID(i)
675  , l.getSensitivePositionX(i)
676  , l.getSensitivePositionY(i)
677  , l.getSensitivePositionZ(i)
678  , l.getSensitiveSizeX(i)
679  , l.getSensitiveSizeY(i)
680  , l.getSensitiveThickness(i)
681  , l.getSensitiveNpixelX(i)
682  , l.getSensitiveNpixelY(i)
683  , l.getSensitivePitchX(i)
684  , l.getSensitivePitchY(i)
685  , l.getSensitiveResolution(i)
686  , l.getSensitiveRotation1(i)
687  , l.getSensitiveRotation2(i)
688  , l.getSensitiveRotation3(i)
689  , l.getSensitiveRotation4(i) ) ;
690 
691  s << buffer1 ;
692 
693  }
694 
695  sprintf(buffer," |----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n") ;
696  s << buffer ;
697 
698  // DUT
699 
700  if (strType == "TelescopeWithDUT"){
701 
702  s << " DUT parameters : " << std::endl ;
703 
704  s << buffer ;
705 
706  sprintf(buffer," | ladder: | sensitive part: |\n") ;
707  s << buffer ;
708 
709  sprintf(buffer," |----------------------------------------------------------------------------------------------------------------------------------------------|\n") ;
710  s << buffer ;
711 
712  sprintf(buffer," | ID | pozX| pozY| pozZ | sizeX| sizeY| Thick| ID | pozX| pozY| pozZ |sizeX|sizeY| Thick|NpixX|NpixY|PitchX|PitchY| Rot1| Rot2| Rot3| Rot4| \n") ;
713  s << buffer ;
714 
715  sprintf(buffer," |----------------------------------------------------------------------------------------------------------------------------------------------|\n") ;
716  s << buffer ;
717 
718  char buffer1[1024] ;
719  sprintf(buffer1," |%5d|%5.2f|%5.2f|%7.2f|%6.2f|%6.2f|%6.3f|%5d|%5.2f|%5.2f|%7.2f|%5.2f|%5.2f|%6.3f|%5d|%5d|%6.2f|%6.2f|%5.2f|%5.2f|%5.2f|%5.2f|\n"
720  , l.getDUTID()
721  , l.getDUTPositionX()
722  , l.getDUTPositionY()
723  , l.getDUTPositionZ()
724  , l.getDUTSizeX()
725  , l.getDUTSizeY()
726  , l.getDUTThickness()
727  , l.getDUTSensitiveID()
728  , l.getDUTSensitivePositionX()
729  , l.getDUTSensitivePositionY()
730  , l.getDUTSensitivePositionZ()
731  , l.getDUTSensitiveSizeX()
732  , l.getDUTSensitiveSizeY()
733  , l.getDUTSensitiveThickness()
734  , l.getDUTSensitiveNpixelX()
735  , l.getDUTSensitiveNpixelY()
736  , l.getDUTSensitivePitchX()
737  , l.getDUTSensitivePitchY()
738  , l.getDUTSensitiveRotation1()
739  , l.getDUTSensitiveRotation2()
740  , l.getDUTSensitiveRotation3()
741  , l.getDUTSensitiveRotation4() ) ;
742 
743  s << buffer1 ;
744 
745  sprintf(buffer," |----------------------------------------------------------------------------------------------------------------------------------------------|\n") ;
746  s << buffer ;
747 
748  }
749  return s ;
750 
751 
752  }
753 
754  std::ostream& operator<< ( std::ostream& s, const TrackerPlanesParameters& p ) {
755 
756  s << std::endl
757  << " ----------- TrackerPlanesParameters ------- " << std::endl ;
758 
759  s << dynamic_cast<const GearParameters&>( p ) ;
760 
761  const TrackerPlanesLayerLayout & l = p.getTrackerPlanesLayerLayout() ;
762 
763 
764  s << std::endl << " Setup ID : " << p.getLayoutID() << std::endl;
765 
766 
767  s << " Number of telescope planes : " << p.getLayoutNumberOfLayers() << std::endl;
768 
769  l.PrintHeader(s);
770  l.PrintLayers(s);
771  l.PrintFooter(s);
772 
773  return s ;
774 
775 
776  }
777 
778 
779 }