001 #include "MuonGeoModel/Station.h"
002 #include "MuonGeoModel/MYSQL.h"
003 #include "MuonGeoModel/MDT_Technology.h"
004 #include "MuonGeoModel/StandardComponent.h"
005 #include "MuonGeoModel/SupComponent.h"
006 #include "MuonGeoModel/TgcComponent.h"
007 #include "CLHEP/Vector/ThreeVector.h"
008 #include "CLHEP/Units/SystemOfUnits.h"
009 #include "GaudiKernel/MsgStream.h"
010 #include "AthenaKernel/getMessageSvc.h"
011 #include <iostream>
012 #include <algorithm>
013 #include <cassert>
014
015 namespace MuonGM {
016
017 Station::Station(std::string s):name(s)
018 {
019 m_msgSvc = Athena::getMessageSvc();
020 MsgStream log(m_msgSvc, "MuonGeoModel");
021
022 thickness=width1=width2=length=0;
023 amdbOrigine_along_length = 0;
024 amdbOrigine_along_thickness = 0;
025 MYSQL *mysql=MYSQL::GetPointer();
026 m_hasMdts = false;
027 mysql->StoreStation(this);
028
029 }
030
031 Station::Station()
032 {
033 m_msgSvc = Athena::getMessageSvc();
034 thickness=width1=width2=length=0;
035 amdbOrigine_along_length = 0;
036 amdbOrigine_along_thickness = 0;
037 name = "unknown";
038 m_hasMdts = false;
039 MsgStream log(m_msgSvc, "MuonGeoModel");
040 log << MSG::DEBUG << "Creating a Station..." << endreq;
041 }
042
043 Station::Station(const Station& s)
044 {
045 m_msgSvc = Athena::getMessageSvc();
046 MsgStream log(m_msgSvc, "MuonGeoModel");
047 log << MSG::DEBUG << "Creating a Station..." << endreq;
048 thickness=width1=width2=length=0;
049 amdbOrigine_along_length = 0;
050 amdbOrigine_along_thickness = 0;
051 m_hasMdts = s.m_hasMdts;
052 name=s.name;
053 for (unsigned int i=0;i<s.components.size();i++)
054 components.push_back(s.components[i]);
055 for (unsigned int i=0;i<s.cutouts.size();i++)
056 cutouts.push_back(s.cutouts[i]);
057 }
058
059
060 Station::~Station()
061 {
062 for (unsigned int i=0;i<components.size();i++)
063 {
064 delete components[i];
065 }
066 for (unsigned int i=0;i<cutouts.size();i++)
067 {
068 delete cutouts[i];
069 }
070 }
071
072 void Station::SetAlignPos(const AlignPos& p)
073 {
074 MsgStream log(m_msgSvc, "MuonGeoModel");
075 if (FindAlignPos(p.zindex, p.phiindex) != alignpositions.end()) {
076 log << MSG::WARNING <<" this alignposition already exists !!!"<<endreq;
077 log << MSG::WARNING<<" for station named "<<name
078 <<" setting alignposition at z,phi, key "
079 <<p.zindex<<" "
080 <<p.phiindex<<" "
081 <<p.zindex*100+p.phiindex<<endreq;
082 assert(0);
083 }
084 alignpositions[p.zindex*100+p.phiindex]=p;
085
086
087
088
089
090 }
091
092 AlignPosIterator Station::FindAlignPos(int iz, int iphi) const
093 {
094
095 int key = iz*100+iphi;
096
097 return alignpositions.find(key);
098 }
099
100 AlignPosIterator Station::abegin() const
101 {
102 return alignpositions.begin();
103 }
104 AlignPosIterator Station::aend() const
105 {
106 return alignpositions.end();
107 }
108
109
110 void Station::SetComponent(Component* c)
111 {
112 components.push_back(c);
113 }
114
115 void Station::SetCutout(Cutout* c)
116 {
117 cutouts.push_back(c);
118 }
119
120 Component* Station::GetComponent(int i) const
121 {
122 return components[i];
123 }
124
125 Cutout* Station::GetCutout(int i) const
126 {
127 return cutouts[i];
128 }
129
130 void Station::SetPosition(Position p)
131 {
132 MsgStream log(m_msgSvc, "MuonGeoModel");
133 if (FindPosition(p.zindex, p.phiindex) != end()) {
134 log << MSG::WARNING <<" this position already exists !!!"<<endreq;
135 log << MSG::WARNING
136 <<" for station named "<<name<<" setting position at z,phi, key "
137 <<p.zindex<<" "
138 <<p.phiindex<<" "
139 <<p.zindex*100+p.phiindex<<endreq;
140 assert(0);
141 }
142 else
143 {
144 p.isAssigned = true;
145 positions[p.zindex*100+p.phiindex]=p;
146
147
148
149 }
150
151 }
152
153 PositionIterator Station::FindPosition(int iz, int iphi) const
154 {
155 int key = iz*100+iphi;
156
157 return positions.find(key);
158 }
159 int Station::Npositions() const
160 {
161 return positions.size();
162 }
163
164 PositionIterator Station::begin() const
165 {
166 return positions.begin();
167 }
168 PositionIterator Station::end() const
169 {
170 return positions.end();
171 }
172 std::string Station::GetName() const
173 {
174
175 return name;
176 }
177 double Station::GetThickness() const
178 {
179 MsgStream log(m_msgSvc, "MuonGeoModel");
180 std::string geov = MYSQL::GetPointer()->getGeometryVersion();
181
182
183 if (thickness) {
184
185 return thickness;
186 }
187
188 else
189 {
190
191 double thick=0;
192 if (name[0]=='T')
193 {
194 for (unsigned int i=0;i<components.size();i++)
195 {
196
197
198
199 TgcComponent *t=(TgcComponent *)components[i];
200 thick=thick > t->GetThickness()+t->posz ? thick : t->GetThickness()+t->posz;
201 }
202 }
203 else
204 {
205 double zstart = 999999999.;
206 for (unsigned int i=0;i<components.size();i++)
207 {
208 StandardComponent *s=(StandardComponent *)components[i];
209 thick = thick > s->GetThickness()+s->posz ? thick : s->GetThickness()+s->posz;
210 if (i==0 || s->posz < zstart) zstart = s->posz;
211 log<<MSG::VERBOSE<<"Station "<<name<<" calculating Thinkness = "<<thick<<" and zstart = "<<zstart<<endreq;
212
213 }
214 if (fabs(zstart) > 0.001)
215 {
216
217
218
219
220 if (geov.substr(0,3) != "P03" ) {
221
222 thick = thick - zstart;
223 amdbOrigine_along_thickness = -zstart;
224 log<<MSG::VERBOSE<<"Station "<<name<<" redefining Thinkness = "<<thick<<" because zstart = "<<zstart
225 <<"; then amdbOrigine_along_thickness = "<<amdbOrigine_along_thickness<<endreq;
226 }
227 }
228 }
229 thickness=thick;
230 return thick;
231 }
232 }
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250 double Station::GetExtraTopThickness() const
251 {
252 MsgStream log(m_msgSvc, "MuonGeoModel");
253
254 if (name[0] != 'B') return 0.;
255
256 return 0.;
257 double xupsup = 0.;
258 double deltaup = 0.;
259 int nsup=0;
260 for (unsigned int i=0;i<components.size();i++)
261 {
262 std::string n=components[i]->name.substr(0,3);
263 if (n=="SUP")
264 {
265 ++nsup;
266 SupComponent *s=(SupComponent *)components[i];
267 deltaup = s->posz + s->topsizewrtAMDB0();
268
269
270
271 double pos = -thickness/2. + deltaup;
272
273
274
275 if (xupsup <= pos) xupsup=pos;
276
277
278 }
279 }
280 double dtop=xupsup - thickness/2.;
281
282 if (dtop > 0.) {
283 log << MSG::VERBOSE<<" GetExtraTopThickness for stat = "
284 <<name<<" with "<<nsup<<" SUPs is "<<dtop<<endreq;
285 return dtop;
286 }
287
288 return 0.;
289 }
290 double Station::GetExtraBottomThickness() const
291 {
292 MsgStream log(m_msgSvc, "MuonGeoModel");
293
294 if (name[0] != 'B') return 0.;
295
296 return 0.;
297 double xdownsup = 0.;
298 double deltadown = 0.;
299 int nsup =0;
300 for (unsigned int i=0;i<components.size();i++)
301 {
302 std::string n=components[i]->name.substr(0,3);
303 if (n=="SUP")
304 {
305 ++nsup;
306 SupComponent *s=(SupComponent *)components[i];
307 deltadown = s->posz - s->bottomsizewrtAMDB0();
308
309
310
311 double pos = -thickness/2. + deltadown;
312
313
314
315 if (xdownsup >=pos ) xdownsup=pos;
316
317
318 }
319 }
320 double dbottom = - xdownsup - thickness/2.;
321 if (dbottom > 0.) {
322 log << MSG::VERBOSE <<" GetExtraBottomThickness for stat = "
323 <<name<<" with "<<nsup<<" SUPs is "<<dbottom<<endreq;
324 return dbottom;
325 }
326 return 0.;
327 }
328 double Station::GetLength() const
329 {
330 MsgStream log(m_msgSvc, "MuonGeoModel-GetLength");
331 MYSQL *mysql=MYSQL::GetPointer();
332 if (length) {
333 return length;
334 }
335 else
336 {
337 double len=0;
338 if (name[0] == 'T')
339 {
340 double innerrad = 99999.;
341 double outerrad = 0.;
342 for (unsigned int i=0;i<components.size();i++)
343 {
344 TgcComponent *tg=(TgcComponent *)components[i];
345 if (tg->posy < innerrad) {
346 innerrad = tg->posy;
347 }
348 if (tg->posy+tg->dy > outerrad) {
349 outerrad = tg->posy+tg->dy;
350 }
351 }
352 len = outerrad - innerrad;
353 }
354 else
355 {
356 double ystart = 999999.;
357 for (unsigned int i=0;i<components.size();i++)
358 {
359 StandardComponent *sc=(StandardComponent *)components[i];
360
361 log<<MSG::VERBOSE<<"Station "<<name<<" *** comp "<<i<<" named "<<sc->name
362 <<" posy "<<sc->posy<<" dy "<<sc->dy<<" len "<<len<<" ystart "<<ystart<<endreq;
363
364
365 if ((sc->dy + sc->posy) > len) len = sc->dy+sc->posy;
366 if (i==0 || sc->posy < ystart ) ystart = sc->posy;
367
368 log<<MSG::VERBOSE<<" now len = "<<len<<" ystart = "<<ystart<<endreq;
369
370 }
371 if (fabs(ystart) > 0.001)
372 {
373
374
375
376
377 if (mysql->getGeometryVersion().substr(0,3) != "P03" ) {
378
379 len = len - ystart;
380 amdbOrigine_along_length = -ystart;
381
382 log<<MSG::VERBOSE<<"Station "<<name<<" redefining len = "<<len<<" because ystart = "
383 <<ystart<<"; then amdbOrigine_along_length = "<<amdbOrigine_along_length<<endreq;
384 }
385 }
386 }
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431 length = len;
432
433 return len;
434 }
435 }
436 double Station::GetWidth1() const
437 {
438 MsgStream log(m_msgSvc, "MuonGeoModel");
439 if (width1) return width1;
440 else
441 {
442 double maxdxmin = -99999.;
443 double ymin= -getAmdbOrigine_along_length();
444
445
446 double w=0;
447 for (unsigned int i=0;i<components.size();i++)
448 {
449 std::string n=components[i]->name.substr(0,3);
450 if (n=="TGC")
451 {
452 double dw = 20.;
453 std::string typetgc = components[i]->name.substr(3,2);
454
455 if (typetgc == "01" || typetgc == "06" ||
456 typetgc == "12" || typetgc == "18" ||
457 typetgc == "19" || typetgc == "20" ||
458 typetgc == "21" ) {
459 dw = 0.;
460 }
461 if (w==0)
462 {
463 w=components[i]->dx1+dw;
464 }
465 else {
466 if (w>components[i]->dx1+dw)
467 {
468 w=components[i]->dx1+dw;
469 }
470 }
471 }
472 else
473 {
474 double dxmin = 0.;
475 if (fabs(components[i]->dy)<1.e-10) dxmin = components[i]->dx1;
476 else
477 {
478 double num = (components[i]->dx2-components[i]->dx1)/2.;
479 double tantheta = num != 0 ? num / components[i]->dy : 0;
480 double y = ((StandardComponent*)components[i])->posy;
481 dxmin = components[i]->dx1 + 2.*tantheta * (ymin-y);
482 }
483
484 if ( maxdxmin < dxmin && (n.substr(0,2) != "LB" || name[0]=='B') ) maxdxmin = dxmin;
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510 }
511 }
512
513
514
515
516
517 if (name.substr(0,1)=="T")width1=w;
518 else width1=maxdxmin;
519
520 return width1;
521 }
522 }
523 double Station::GetWidth2() const
524 {
525 MsgStream log(m_msgSvc, "MuonGeoModel");
526 if (width2) return width2;
527 else
528 {
529
530 double ymax= GetLength()-getAmdbOrigine_along_length();
531 double maxdxmax = -99999.;
532 double w=0;
533 for (unsigned int i=0;i<components.size();i++)
534 {
535 if (w< components[i]->dx2)
536 {
537 w=components[i]->dx2;
538
539 }
540 std::string n=components[i]->name.substr(0,3);
541 if (n == "TGC") {
542 double dw = 20.;
543 std::string typetgc = components[i]->name.substr(3,2);
544
545 if (typetgc == "01" || typetgc == "06" ||
546 typetgc == "12" || typetgc == "18" ||
547 typetgc == "19" || typetgc == "20" ||
548 typetgc == "21" ) {
549 dw = 0.;
550 }
551 w += dw;
552 }
553 else
554 {
555
556
557
558
559
560
561 double dxmax = 0.;
562 if (fabs(components[i]->dy)<1.e-10) dxmax = components[i]->dx2;
563 else
564 {
565 double num = (components[i]->dx2-components[i]->dx1)/2.;
566 double tantheta = num != 0 ? num / components[i]->dy : 0;
567 double y = ((StandardComponent*)components[i])->posy;
568 dxmax = components[i]->dx1 + 2.*tantheta * (ymax-y);
569 }
570
571
572
573 if (maxdxmax < dxmax ) maxdxmax = dxmax;
574
575 }
576 }
577
578
579
580
581
582 if (name.substr(0,1)=="T") width2=w;
583 else width2=maxdxmax;
584
585
586 return width2;
587 }
588 }
589
590 int Station::GetNrOfComponents() const
591 {
592 return components.size();
593 }
594
595 int Station::GetNrOfCutouts() const
596 {
597 return cutouts.size();
598 }
599
600 std::ostream& operator<<(std::ostream& os,const Station& s)
601 {
602 os<<"Station name: "<<s.name<<" "<<s.components.size()<<std::endl;
603 for (unsigned int i=0;i<s.components.size();i++)
604 os<<"\t"<<s.components[i]<<std::endl;
605 PositionIterator k;
606 for (k=s.begin();k!=s.end();k++)
607 os<<"\t\t"<<(*k).second<<std::endl;
608 AlignPosIterator ak;
609 for (ak=s.abegin();ak!=s.aend();ak++)
610 os<<"\t\t"<<(*ak).second<<std::endl;
611 os<<"--------------------------------------------------"<<std::endl;
612 return os;
613 }
614
615
616
617
618
619 HepTransform3D Station::native_to_tsz_frame( const Position & p ) const {
620
621 MsgStream log(m_msgSvc, "MGM-native_to_tsz");
622 std::string geov = MYSQL::GetPointer()->getGeometryVersion();
623 int amdbVersion = MYSQL::GetPointer()->getNovaReadVersion();
624 if (amdbVersion > 0 && amdbVersion < 7 && name[0]!='B')
625 log << MSG::DEBUG << "For AMDB version " << amdbVersion
626 << " a left-handed chamber coordinate system was used "
627 << " for endcap side A so be very careful."
628 << endreq;
629
630 HepTransform3D nominalTransf;
631
632
633 HepTransform3D mirrsym=HepTransform3D::Identity;
634 if (p.isMirrored)
635 {
636 if (name[0]=='B' )
637 {
638 mirrsym = HepRotateX3D(180.*deg);
639 }
640 }
641
642
643 HepTranslate3D AMDBorgTranslation;
644 if ( (name[0]=='B' || p.isBarrelLike) && p.zindex<0 && (!p.isMirrored) && hasMdts())
645 {
646 MYSQL* mysql=MYSQL::GetPointer();
647 MDT *m= (MDT *)mysql->GetATechnology("MDT0");
648 double halfpitch = (m->pitch)/2.;
649
650 AMDBorgTranslation =
651 HepTranslate3D(GetThickness()/2.-getAmdbOrigine_along_thickness(),
652 0.,
653
654 GetLength()/2.-(halfpitch));
655 log<<MSG::VERBOSE<<" GetThickness / getAmdbO_thick / GetLength() / getAmdbO_length "
656 <<GetThickness()<<" "
657 <<getAmdbOrigine_along_thickness()<<" "
658 <<GetLength()<<" "
659 <<getAmdbOrigine_along_length()+halfpitch<<endreq;
660 }
661 else
662 {
663 AMDBorgTranslation =
664 HepTranslate3D(GetThickness()/2.-getAmdbOrigine_along_thickness(),
665 0.,
666 GetLength()/2.-getAmdbOrigine_along_length());
667 log<<MSG::VERBOSE<<" GetThickness / getAmdbO_thick / GetLength() / getAmdbO_length "
668 <<GetThickness()<<" "
669 <<getAmdbOrigine_along_thickness()<<" "
670 <<GetLength()<<" "
671 <<getAmdbOrigine_along_length()<<endreq;
672 }
673
674
675 HepRotate3D ralpha = HepRotateX3D(p.alpha*deg);
676 HepRotate3D rbeta = HepRotateZ3D(p.beta*deg);
677 HepRotate3D rgamma;
678 if (name[0]=='B' || p.isBarrelLike || geov != "CTB2004")
679 {
680 rgamma = HepRotateY3D(p.gamma*deg);
681 log<<MSG::VERBOSE<<" gamma is not changing sign - original "<<p.gamma<<" new one "<<p.gamma<<endreq;
682 }
683 else
684 {
685 log<<MSG::VERBOSE<<" gamma is changing sign - original "<<p.gamma<<" new one "<<-p.gamma<<endreq;
686 rgamma = HepRotateY3D(-p.gamma*deg);
687 }
688 log<<MSG::VERBOSE<<" alpha / beta "<<p.alpha<<" "<<p.beta<<endreq;
689
690
691
692
693 HepTransform3D to_tsz = rgamma*rbeta*ralpha*AMDBorgTranslation*mirrsym;
694
695 return to_tsz;
696 }
697 HepTransform3D Station::tsz_to_native_frame( const Position & p ) const {
698
699 return (native_to_tsz_frame( p )).inverse();
700 }
701
702 HepTransform3D Station::tsz_to_global_frame( const Position & p ) const {
703
704 MsgStream log(m_msgSvc, "MGM tsz_to_global_frame");
705
706 HepTransform3D nominalTransf= HepTransform3D::Identity;
707
708 std::string geov = MYSQL::GetPointer()->getGeometryVersion();
709 Hep3Vector vec;
710 double rad;
711 if (geov != "CTB2004" && name[0]=='T')
712 rad=((TgcComponent *)GetComponent(0))->posy;
713 else
714 rad=p.radius;
715 vec.setX(rad*cos(p.phi*deg));
716 vec.setX(vec.x()-p.shift*sin((p.phi)*deg));
717 vec.setY(rad*sin(p.phi*deg));
718 vec.setY(vec.y()+p.shift*cos((p.phi)*deg));
719
720 if (p.isMirrored)
721 if ( (p.isBarrelLike) || (name[0]=='B') )
722 {
723
724 if (geov.substr(0,1) != "P")
725 {
726 vec.setZ(p.z + getAmdbOrigine_along_length());
727 }
728 else vec.setZ(p.z);
729
730
731 }
732 else
733 {
734 vec.setZ(p.z + GetThickness());
735 }
736 else
737 {
738 if ( (p.isBarrelLike) || (name[0]=='B' && p.zindex<0 && hasMdts()) )
739 {
740 MYSQL* mysql=MYSQL::GetPointer();
741 MDT *m= (MDT *)mysql->GetATechnology("MDT0");
742 double halfpitch = (m->pitch)/2.;
743 vec.setZ(p.z + (-getAmdbOrigine_along_length()+halfpitch));
744 }
745 else
746 vec.setZ(p.z);
747 }
748
749
750 log<<MSG::VERBOSE<<" translation according to "<<vec.x()<<" "<<vec.y()<<" "<<vec.z()<<endreq;
751
752 if ( name[0]=='B' || p.isBarrelLike )
753 {
754
755 nominalTransf = HepRotateZ3D(p.phi*deg);
756 }
757 else
758 {
759
760
761
762
763
764
765
766
767
768
769
770 if ( p.z>=0 ){
771 nominalTransf = HepTransform3D(HepRotateY3D(-90*deg)*
772 HepRotateX3D(p.phi*deg-180*deg));
773 }
774 else if ( p.z<0 ){
775 nominalTransf = HepTransform3D(HepRotateY3D(-90*deg)*
776 HepRotateX3D(p.phi*deg-180*deg)*
777 HepRotateZ3D(180*deg));
778 }
779 else log << MSG::WARNING<<" AAAAAA problem here p.z, mirrored "
780 <<p.z<<" "<<p.isMirrored<<endreq;
781 }
782 return HepTranslate3D(vec)*nominalTransf;
783 }
784
785 HepTransform3D Station::global_to_tsz_frame( const Position & p ) const {
786
787 return (tsz_to_global_frame( p )).inverse();
788 }
789 HepTransform3D Station::getNominalTransform(const Position & p) const
790 {
791
792
793 return tsz_to_global_frame( p ) * native_to_tsz_frame( p );
794 }
795 HepTransform3D Station::getAlignedTransform(const AlignPos & ap, const Position & p) const
796 {
797 return tsz_to_global_frame( p ) * getDeltaTransform_tszFrame( ap ) * native_to_tsz_frame( p );
798 }
799 HepTransform3D Station::getDeltaTransform_tszFrame(const AlignPos & ap) const
800 {
801 MsgStream log(m_msgSvc, "MGM getDeltaTransform_tszFrame");
802 int amdbVersion = MYSQL::GetPointer()->getNovaReadVersion();
803 std::string geov = MYSQL::GetPointer()->getGeometryVersion();
804 if (ap.tras!=0 ||ap.trat!= 0 ||ap.traz!=0 ||
805 ap.rots!=0 || ap.rott!=0||ap.rotz!=0)
806 {
807 log << MSG::VERBOSE << "Setting corrections." << endreq;
808 log << MSG::VERBOSE << "For station " << name <<
809 " corrections sent are " << ap.tras << " " <<
810 ap.traz << " " << ap.trat << " " << ap.rots << " " << ap.rotz <<
811 " " << ap.rott << " isBarrel=" << ap.isBarrel << endreq;
812 log << MSG::VERBOSE << "length="<< GetLength()<<" thickness="
813 <<GetThickness()<<endreq;
814 }
815
816 HepRotate3D rott = HepRotateX3D(ap.rott);
817 HepRotate3D rotz = HepRotateZ3D(ap.rotz);
818 HepRotate3D rots = HepRotateY3D(ap.rots);
819 HepTransform3D trans = HepTranslateY3D(ap.tras)*
820 HepTranslateZ3D(ap.traz)*HepTranslateX3D(ap.trat);
821
822
823
824 if (geov=="CTB2004")
825 {
826 if (amdbVersion > 0 && amdbVersion < 7 && !ap.isBarrel)
827 {
828 log << MSG::DEBUG << "For AMDB version " << amdbVersion
829 << " a left-handed chamber coordinate system was used "
830 << " for endcap side A, so s-axis flipped for corrections."
831 << endreq;
832 rots = HepRotateY3D(-(ap.rots));
833 trans = HepTranslateY3D(-(ap.tras))*
834 HepTranslateZ3D(ap.traz)*HepTranslateX3D(ap.trat);
835 }
836 }
837
838 HepTransform3D delta = trans*rots*rotz*rott;
839 log << MSG::VERBOSE<<" delta transform in the tsz frame --------------"<<endreq
840 <<
841 (delta)[0][0] << " " <<
842 (delta)[0][1] << " " <<
843 (delta)[0][2] << " " <<
844 (delta)[0][3] << " " << endreq <<
845 (delta)[1][0] << " " <<
846 (delta)[1][1] << " " <<
847 (delta)[1][2] << " " <<
848 (delta)[1][3] << " " << endreq <<
849 (delta)[2][0] << " " <<
850 (delta)[2][1] << " " <<
851 (delta)[2][2] << " " <<
852 (delta)[2][3] << " " << endreq;
853
854
855 return delta;
856 }
857 HepTransform3D Station::getDeltaTransform(const AlignPos & ap, const Position & p) const
858 {
859
860 HepTransform3D deltaGM = tsz_to_native_frame(p) *
861 getDeltaTransform_tszFrame( ap ) * native_to_tsz_frame(p);
862 return deltaGM;
863 }
864
865
866 double Station::getAmdbOrigine_along_length() const
867 {
868 if (length)
869 return amdbOrigine_along_length;
870 else {
871 length = GetLength();
872 return amdbOrigine_along_length;
873 }
874
875
876 }
877 double Station::getAmdbOrigine_along_thickness() const
878 {
879 if (thickness) return amdbOrigine_along_thickness;
880 else
881 {
882 thickness = GetThickness();
883 return amdbOrigine_along_thickness;
884 }
885
886
887 }
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206 }
1207
| Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems |
|
This page was automatically generated by the
LXR engine.
|
|