ATLAS Offline Software
Loading...
Searching...
No Matches
ALFA_DetectorFactory Class Reference

#include <ALFA_DetectorFactory.h>

Inheritance diagram for ALFA_DetectorFactory:
Collaboration diagram for ALFA_DetectorFactory:

Public Member Functions

 ALFA_DetectorFactory (StoreGateSvc *pDetStore, IRDBAccessSvc *pAccess, const PCONFIGURATION pConfig)
 ~ALFA_DetectorFactory ()
virtual void create (GeoPhysVol *pWorld)
virtual const ALFA_DetectorManagergetDetectorManager () const
void UpdateTransforms (PALIGNPARAMETERS pAlignParams)
bool ReadGeometry (bool bAlignCorrections=false)

Private Member Functions

const ALFA_DetectorFactoryoperator= (const ALFA_DetectorFactory &right)
 ALFA_DetectorFactory (const ALFA_DetectorFactory &right)
void SaveGeometry ()
void DefineMaterials (StoredMaterialManager *pMaterialManager)
void ConstructUFiberCladdings (const eRPotName eRPName, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, GeoAlignableTransform *pDetTransform)
void ConstructVFiberCladdings (const eRPotName eRPName, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, GeoAlignableTransform *pDetTransform)
void ConstructODFiberCladdings (const eRPotName eRPName, GeoFullPhysVol *pPhysMotherVolume, const HepGeom::Transform3D &MotherTransform, GeoAlignableTransform *pDetTransform)
void ConstructODFibers00 (const eRPotName eRPName, const int iODPlate, eFiberType eFType, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, const HepGeom::Transform3D &TransODCladding)
void ConstructODFibers01 (const eRPotName eRPName, const int iODPlate, eFiberType eFType, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, const HepGeom::Transform3D &TransODCladding)
void SelectRPots ()
void CreateAxes (GeoPhysVol *pMotherVolume)
void ConstructAlfaStations (std::map< eAStationName, ALFAPHYSVOLUME > *pmapActiveStations, GeoPhysVol *pWorld)
void ConstructBeampipe (GeoPhysVol *pWorld)
void AddBeamPipeInStation (GeoFullPhysVol *pPhysStation, const char *pszStationLabel)
void AddGlobalVacuumSensorInStation (GeoFullPhysVol *pPhysStation, eAStationName eStatName)
GeoShape * CreateSolidRP ()
GeoShape * CreateSolidAir ()
GeoShape * CreateSolidTrigger ()
GeoShape * CreateSolidRPSupport ()
GeoShape * CreateSolidG10Shapes ()
std::map< int, GeoShape * > * CreateSolidTiPlates ()
std::map< int, GeoShape * > * CreateSolidODPlates ()
HepGeom::Transform3D UserTransformInDetector (eRPotName eRPName)
HepGeom::Transform3D UserTransformInStation (eRPotName eRPName)
HepGeom::Point3D< double > Point3DInDetector (eRPotName eRPName)

Private Attributes

ALFA_DetectorManagerm_pDetectorManager {}
StoreGateSvcm_pDetectorStore {}
IRDBAccessSvcm_pIRDBAccess {}
eMetrologyType m_eRequestedMetrologyType {eMetrologyType::EMT_UNDEFINED}
CONFIGURATION m_Config
std::unique_ptr< ALFA_GeometryReaderm_pGeoReader
std::list< eRPotNamem_ListExistingRPots
std::map< std::string, const GeoMaterial * > m_MapMaterials

Detailed Description

Definition at line 75 of file ALFA_DetectorFactory.h.

Constructor & Destructor Documentation

◆ ALFA_DetectorFactory() [1/2]

ALFA_DetectorFactory::ALFA_DetectorFactory ( StoreGateSvc * pDetStore,
IRDBAccessSvc * pAccess,
const PCONFIGURATION pConfig )

Definition at line 90 of file ALFA_DetectorFactory.cxx.

91 :m_pDetectorManager(NULL),
92 m_pDetectorStore(pDetStore),
93 m_pIRDBAccess(pAccess),
95 m_Config(*pConfig),
96 m_pGeoReader(std::make_unique<ALFA_GeometryReader>())
97{
98
99}
eMetrologyType m_eRequestedMetrologyType
ALFA_DetectorManager * m_pDetectorManager
StoreGateSvc * m_pDetectorStore
std::unique_ptr< ALFA_GeometryReader > m_pGeoReader
IRDBAccessSvc * m_pIRDBAccess
GEOMETRYCONFIGURATION GeometryConfig

◆ ~ALFA_DetectorFactory()

ALFA_DetectorFactory::~ALFA_DetectorFactory ( )

Definition at line 101 of file ALFA_DetectorFactory.cxx.

102{
103}

◆ ALFA_DetectorFactory() [2/2]

ALFA_DetectorFactory::ALFA_DetectorFactory ( const ALFA_DetectorFactory & right)
private

Member Function Documentation

◆ AddBeamPipeInStation()

void ALFA_DetectorFactory::AddBeamPipeInStation ( GeoFullPhysVol * pPhysStation,
const char * pszStationLabel )
private

Definition at line 413 of file ALFA_DetectorFactory.cxx.

414{
415 char szLabel[32]{};
416
417 double fzs=2*ALFASTATIONHSIZEZ;
418 double fzd=INNERDETZSPACE;
419 double fZLength=0.5*(fzs-fzd);
420 double fZPos=0.5*fzd+0.5*fZLength;
421
422 sprintf(szLabel,"%s_LogIBP",pszStationLabel);
423 GeoTube* pTube = new GeoTube(BEAMPIPEINNERRADIUS,BEAMPIPEOUTERRADIUS,0.5*fZLength);
424 GeoLogVol* pLogTube=new GeoLogVol(szLabel,pTube,m_MapMaterials[string("Steel")]);
425 GeoFullPhysVol* pPhysTube=new GeoFullPhysVol(pLogTube);
426
427 sprintf(szLabel,"%s_IBP01",pszStationLabel);
428 pPhysStation->add(new GeoNameTag(szLabel));
429 pPhysStation->add(new GeoTransform(GeoTrf::TranslateZ3D(fZPos)));
430 pPhysStation->add(pPhysTube);
431
432 sprintf(szLabel,"%s_IBP02",pszStationLabel);
433 pPhysStation->add(new GeoNameTag(szLabel));
434 pPhysStation->add(new GeoTransform(GeoTrf::TranslateZ3D(-fZPos)));
435 pPhysStation->add(pPhysTube);
436}
#define BEAMPIPEOUTERRADIUS
#define BEAMPIPEINNERRADIUS
#define INNERDETZSPACE
#define ALFASTATIONHSIZEZ
std::map< std::string, const GeoMaterial * > m_MapMaterials

◆ AddGlobalVacuumSensorInStation()

void ALFA_DetectorFactory::AddGlobalVacuumSensorInStation ( GeoFullPhysVol * pPhysStation,
eAStationName eStatName )
private

Definition at line 438 of file ALFA_DetectorFactory.cxx.

439{
440 char szLabel[32]{};
441 double fZOffset=0.0*CLHEP::mm;
442
443 if(eStatName==EASN_B7L1 || eStatName==EASN_A7L1) fZOffset=-ALFASTATIONHSIZEZ+0.5*ALFA_GVSTHICKNESS+100.0*CLHEP::mm;
444 else if(eStatName==EASN_A7R1 || eStatName==EASN_B7R1) fZOffset=+ALFASTATIONHSIZEZ-0.5*ALFA_GVSTHICKNESS-100.0*CLHEP::mm;
445
446 sprintf(szLabel,"%s_GVS",m_pGeoReader->GetAStationLabel(eStatName));
447
448 GeoBox* pSolGVS=new GeoBox(0.5*200.0*CLHEP::mm,0.5*200.0*CLHEP::mm,0.5*ALFA_GVSTHICKNESS);
449 GeoLogVol* pLogGVS=new GeoLogVol(szLabel,pSolGVS,m_MapMaterials[string("std::Vacuum")]);
450 GeoFullPhysVol* pPhysGVS=new GeoFullPhysVol(pLogGVS);
451
452 GeoTrf::TranslateZ3D TransGVS(fZOffset);
453 pPhysStation->add(new GeoNameTag(szLabel));
454 pPhysStation->add(new GeoTransform(TransGVS));
455 pPhysStation->add(pPhysGVS);
456}
@ EASN_A7L1
@ EASN_B7L1
@ EASN_A7R1
@ EASN_B7R1
#define ALFA_GVSTHICKNESS

◆ ConstructAlfaStations()

void ALFA_DetectorFactory::ConstructAlfaStations ( std::map< eAStationName, ALFAPHYSVOLUME > * pmapActiveStations,
GeoPhysVol * pWorld )
private

Definition at line 458 of file ALFA_DetectorFactory.cxx.

459{
460 char szLabel[32]{};
462 ASPOSPARAMS AStationParams;
463 ALFAPHYSVOLUME APhysVolume;
464
465 MsgStream LogStream(Athena::getMessageSvc(), "ConstructAlfaStations");
466
467 GeoFullPhysVol* pPhysAlfaBox=NULL;
468 //HepGeom::Transform3D TransAlfaBox;
469 GeoBox* pSolidAlfaBox=new GeoBox(500.0*CLHEP::mm,1000.0*CLHEP::mm,ALFASTATIONHSIZEZ);
470 GeoLogVol* pLogAlfaBox=new GeoLogVol("ALFA",pSolidAlfaBox,m_MapMaterials[string("std::Vacuum")]);
471
472 //B7L1
473 eAStation=EASN_B7L1;
474 m_pGeoReader->GetASPosParams(&AStationParams,eAStation);
475 sprintf(szLabel,"ALFA_%s",AStationParams.szLabel);
476 LogStream<<MSG::INFO<<"Create ALFA station "<<szLabel<<endmsg;
477 pPhysAlfaBox=new GeoFullPhysVol(pLogAlfaBox);
478 //TransAlfaBox=HepGeom::Translate3D(AStationParams.IdealMainPoint[0], AStationParams.IdealMainPoint[1], AStationParams.IdealMainPoint[2]);
479 pWorld->add(new GeoNameTag(szLabel));
480 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(AStationParams.ASTransformInATLAS)));
481 pWorld->add(pPhysAlfaBox);
482 m_pDetectorManager->addTreeTop(pPhysAlfaBox);
483 if(m_Config.bAddIBP) AddBeamPipeInStation(pPhysAlfaBox,AStationParams.szLabel);
484 AddGlobalVacuumSensorInStation(pPhysAlfaBox,eAStation);
485
486 APhysVolume.pPhysVolume=pPhysAlfaBox;
487 APhysVolume.Transform=AStationParams.ASTransformInATLAS;
488 pmapActiveStations->insert(pair<eAStationName,ALFAPHYSVOLUME>(eAStation,APhysVolume));
489
490 //A7L1
491 eAStation=EASN_A7L1;
492 m_pGeoReader->GetASPosParams(&AStationParams,eAStation);
493 sprintf(szLabel,"ALFA_%s",AStationParams.szLabel);
494 LogStream<<MSG::INFO<<"Create ALFA station "<<szLabel<<endmsg;
495 pPhysAlfaBox=new GeoFullPhysVol(pLogAlfaBox);
496 //TransAlfaBox=HepGeom::Translate3D(AStationParams.IdealMainPoint[0], AStationParams.IdealMainPoint[1], AStationParams.IdealMainPoint[2]);
497 pWorld->add(new GeoNameTag(szLabel));
498 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(AStationParams.ASTransformInATLAS)));
499 pWorld->add(pPhysAlfaBox);
500 m_pDetectorManager->addTreeTop(pPhysAlfaBox);
501 if(m_Config.bAddIBP) AddBeamPipeInStation(pPhysAlfaBox,AStationParams.szLabel);
502 AddGlobalVacuumSensorInStation(pPhysAlfaBox,eAStation);
503
504 APhysVolume.pPhysVolume=pPhysAlfaBox;
505 APhysVolume.Transform=AStationParams.ASTransformInATLAS;
506 pmapActiveStations->insert(pair<eAStationName,ALFAPHYSVOLUME>(eAStation,APhysVolume));
507
508 //A7R1
509 eAStation=EASN_A7R1;
510 m_pGeoReader->GetASPosParams(&AStationParams,eAStation);
511 sprintf(szLabel,"ALFA_%s",AStationParams.szLabel);
512 LogStream<<MSG::INFO<<"Create ALFA station "<<szLabel<<endmsg;
513 pPhysAlfaBox=new GeoFullPhysVol(pLogAlfaBox);
514 //TransAlfaBox=HepGeom::Translate3D(AStationParams.IdealMainPoint[0], AStationParams.IdealMainPoint[1], AStationParams.IdealMainPoint[2]);
515 pWorld->add(new GeoNameTag(szLabel));
516 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(AStationParams.ASTransformInATLAS)));
517 pWorld->add(pPhysAlfaBox);
518 m_pDetectorManager->addTreeTop(pPhysAlfaBox);
519 if(m_Config.bAddIBP) AddBeamPipeInStation(pPhysAlfaBox,AStationParams.szLabel);
520 AddGlobalVacuumSensorInStation(pPhysAlfaBox,eAStation);
521
522 APhysVolume.pPhysVolume=pPhysAlfaBox;
523 APhysVolume.Transform=AStationParams.ASTransformInATLAS;
524 pmapActiveStations->insert(pair<eAStationName,ALFAPHYSVOLUME>(eAStation,APhysVolume));
525
526 //B7R1
527 eAStation=EASN_B7R1;
528 m_pGeoReader->GetASPosParams(&AStationParams,eAStation);
529 sprintf(szLabel,"ALFA_%s",AStationParams.szLabel);
530 LogStream<<MSG::INFO<<"Create ALFA station "<<szLabel<<endmsg;
531 pPhysAlfaBox=new GeoFullPhysVol(pLogAlfaBox);
532 //TransAlfaBox=HepGeom::Translate3D(AStationParams.IdealMainPoint[0], AStationParams.IdealMainPoint[1], AStationParams.IdealMainPoint[2]);
533 pWorld->add(new GeoNameTag(szLabel));
534 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(AStationParams.ASTransformInATLAS)));
535 pWorld->add(pPhysAlfaBox);
536 m_pDetectorManager->addTreeTop(pPhysAlfaBox);
537 if(m_Config.bAddIBP) AddBeamPipeInStation(pPhysAlfaBox,AStationParams.szLabel);
538 AddGlobalVacuumSensorInStation(pPhysAlfaBox,eAStation);
539
540 APhysVolume.pPhysVolume=pPhysAlfaBox;
541 APhysVolume.Transform=AStationParams.ASTransformInATLAS;
542 pmapActiveStations->insert(pair<eAStationName,ALFAPHYSVOLUME>(eAStation,APhysVolume));
543}
struct _ALFAPHYSVOLUME ALFAPHYSVOLUME
@ EASN_UNDEFINED
#define endmsg
void AddGlobalVacuumSensorInStation(GeoFullPhysVol *pPhysStation, eAStationName eStatName)
void AddBeamPipeInStation(GeoFullPhysVol *pPhysStation, const char *pszStationLabel)
Amg::Transform3D CLHEPTransformToEigen(const HepGeom::Transform3D &CLHEPtransf)
Converts a CLHEP-based HepGeom::Transform3D into an Eigen Amg::Transform3D.
IMessageSvc * getMessageSvc(bool quiet=false)
HepGeom::Transform3D ASTransformInATLAS
HepGeom::Transform3D Transform
GeoFullPhysVol * pPhysVolume

◆ ConstructBeampipe()

void ALFA_DetectorFactory::ConstructBeampipe ( GeoPhysVol * pWorld)
private

Definition at line 545 of file ALFA_DetectorFactory.cxx.

546{
547 char szLabel[32]{}, szLabel2[32]{};
548 double fInnerTubeHLength;
549 GeoTube* pTube, *pTube2;
550 GeoLogVol* pLogTube, *pLogTube2;
551 GeoFullPhysVol* pPhysTube, *pPhysTube2;
552 ASPOSPARAMS AStationParams01, AStationParams02;
553 HepGeom::Transform3D TransTube;
554
555 MsgStream LogStream(Athena::getMessageSvc(), "ALFA_DetectorFactory::create");
556
557 strcpy(szLabel,"ALFA_Beampipe01");
558 strcpy(szLabel2,"ALFA_Beampipe01Fill");
559 m_pGeoReader->GetASPosParams(&AStationParams01,EASN_B7L1);
561 pTube2=new GeoTube(0*CLHEP::mm,BEAMPIPEINNERRADIUS,ALFAEDGEBEAMPIPEHLENGTH);
562 pLogTube=new GeoLogVol(szLabel,pTube,m_MapMaterials[string("Steel")]);
563 pLogTube2=new GeoLogVol(szLabel2,pTube2,m_MapMaterials[string("std::Vacuum")]);
564 pPhysTube=new GeoFullPhysVol(pLogTube);
565 pPhysTube2=new GeoFullPhysVol(pLogTube2);
566 //TransTube=HepGeom::Translate3D(0.0*CLHEP::mm, 0.0*CLHEP::mm, AStationParams01.IdealMainPoint[2]+ALFASTATIONHSIZEZ+ALFAEDGEBEAMPIPEHLENGTH);
567 TransTube=HepGeom::TranslateZ3D(ALFASTATIONHSIZEZ+ALFAEDGEBEAMPIPEHLENGTH)*AStationParams01.ASTransformInATLAS;
568 pWorld->add(new GeoNameTag(szLabel));
569 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube)));
570 pWorld->add(pPhysTube);
571 m_pDetectorManager->addTreeTop(pPhysTube);
572 pWorld->add(new GeoNameTag(szLabel2));
573 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube)));
574 pWorld->add(pPhysTube2);
575 m_pDetectorManager->addTreeTop(pPhysTube2);
576 LogStream<<MSG::INFO<<"ALFA_Beampipe01: hlength="<<ALFAEDGEBEAMPIPEHLENGTH<<", z="<<AStationParams01.IdealMainPoint[2]+ALFASTATIONHSIZEZ+ALFAEDGEBEAMPIPEHLENGTH<<endmsg;
577
578 strcpy(szLabel,"ALFA_Beampipe02");
579 strcpy(szLabel2,"ALFA_Beampipe02Fill");
580 m_pGeoReader->GetASPosParams(&AStationParams01,EASN_B7L1);
581 m_pGeoReader->GetASPosParams(&AStationParams02,EASN_A7L1);
582 fInnerTubeHLength=0.5*((AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ)-(AStationParams02.IdealMainPoint[2]+ALFASTATIONHSIZEZ));
583 pTube = new GeoTube(BEAMPIPEINNERRADIUS,BEAMPIPEOUTERRADIUS,fInnerTubeHLength);
584 pTube2 = new GeoTube(0*CLHEP::mm,BEAMPIPEINNERRADIUS,fInnerTubeHLength);
585 pLogTube=new GeoLogVol(szLabel,pTube,m_MapMaterials[string("Steel")]);
586 pLogTube2=new GeoLogVol(szLabel2,pTube2,m_MapMaterials[string("std::Vacuum")]);
587 pPhysTube=new GeoFullPhysVol(pLogTube);
588 pPhysTube2=new GeoFullPhysVol(pLogTube2);
589 //TransTube=HepGeom::Translate3D(0.0*CLHEP::mm, 0.0*CLHEP::mm, AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-fInnerTubeHLength);
590 TransTube=HepGeom::TranslateZ3D(-ALFASTATIONHSIZEZ-fInnerTubeHLength)*AStationParams01.ASTransformInATLAS;
591 pWorld->add(new GeoNameTag(szLabel));
592 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube)));
593 pWorld->add(pPhysTube);
594 m_pDetectorManager->addTreeTop(pPhysTube);
595 pWorld->add(new GeoNameTag(szLabel2));
596 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube)));
597 pWorld->add(pPhysTube2);
598 m_pDetectorManager->addTreeTop(pPhysTube2);
599 LogStream<<MSG::INFO<<"ALFA_Beampipe02: hlength="<<fInnerTubeHLength<<", z="<<AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-fInnerTubeHLength<<endmsg;
600
601 strcpy(szLabel,"ALFA_Beampipe03");
602 strcpy(szLabel2,"ALFA_Beampipe03Fill");
603 m_pGeoReader->GetASPosParams(&AStationParams01,EASN_A7L1);
605 pTube2 = new GeoTube(0*CLHEP::mm,BEAMPIPEINNERRADIUS,ALFAEDGEBEAMPIPEHLENGTH);
606 pLogTube=new GeoLogVol(szLabel,pTube,m_MapMaterials[string("Steel")]);
607 pLogTube2=new GeoLogVol(szLabel2,pTube2,m_MapMaterials[string("std::Vacuum")]);
608 pPhysTube=new GeoFullPhysVol(pLogTube);
609 pPhysTube2=new GeoFullPhysVol(pLogTube2);
610 //TransTube=HepGeom::Translate3D(0.0*CLHEP::mm, 0.0*CLHEP::mm, AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-ALFAEDGEBEAMPIPEHLENGTH);
611 TransTube=HepGeom::TranslateZ3D(-ALFASTATIONHSIZEZ-ALFAEDGEBEAMPIPEHLENGTH)*AStationParams01.ASTransformInATLAS;
612 pWorld->add(new GeoNameTag(szLabel));
613 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube)));
614 pWorld->add(pPhysTube);
615 m_pDetectorManager->addTreeTop(pPhysTube);
616 pWorld->add(new GeoNameTag(szLabel2));
617 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube)));
618 pWorld->add(pPhysTube2);
619 m_pDetectorManager->addTreeTop(pPhysTube2);
620 LogStream<<MSG::INFO<<"ALFA_Beampipe03: hlength="<<ALFAEDGEBEAMPIPEHLENGTH<<", z="<<AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-ALFAEDGEBEAMPIPEHLENGTH<<endmsg;
621
622 strcpy(szLabel,"ALFA_Beampipe04");
623 strcpy(szLabel2,"ALFA_Beampipe04Fill");
624 m_pGeoReader->GetASPosParams(&AStationParams01,EASN_A7R1);
626 pTube2 = new GeoTube(0*CLHEP::mm,BEAMPIPEINNERRADIUS,ALFAEDGEBEAMPIPEHLENGTH);
627 pLogTube=new GeoLogVol(szLabel,pTube,m_MapMaterials[string("Steel")]);
628 pLogTube2=new GeoLogVol(szLabel2,pTube2,m_MapMaterials[string("std::Vacuum")]);
629 pPhysTube=new GeoFullPhysVol(pLogTube);
630 pPhysTube2=new GeoFullPhysVol(pLogTube2);
631 //TransTube=HepGeom::Translate3D(0.0*CLHEP::mm, 0.0*CLHEP::mm, AStationParams01.IdealMainPoint[2]+ALFASTATIONHSIZEZ+ALFAEDGEBEAMPIPEHLENGTH);
632 TransTube=HepGeom::TranslateZ3D(+ALFASTATIONHSIZEZ+ALFAEDGEBEAMPIPEHLENGTH)*AStationParams01.ASTransformInATLAS;
633 pWorld->add(new GeoNameTag(szLabel));
634 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube)));
635 pWorld->add(pPhysTube);
636 m_pDetectorManager->addTreeTop(pPhysTube);
637 pWorld->add(new GeoNameTag(szLabel2));
638 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube)));
639 pWorld->add(pPhysTube2);
640 m_pDetectorManager->addTreeTop(pPhysTube2);
641 LogStream<<MSG::INFO<<"ALFA_Beampipe04: hlength="<<ALFAEDGEBEAMPIPEHLENGTH<<", z="<<AStationParams01.IdealMainPoint[2]+ALFASTATIONHSIZEZ+ALFAEDGEBEAMPIPEHLENGTH<<endmsg;
642
643 strcpy(szLabel,"ALFA_Beampipe05");
644 strcpy(szLabel2,"ALFA_Beampipe05Fill");
645 m_pGeoReader->GetASPosParams(&AStationParams01,EASN_A7R1);
646 m_pGeoReader->GetASPosParams(&AStationParams02,EASN_B7R1);
647 fInnerTubeHLength=0.5*((AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ)-(AStationParams02.IdealMainPoint[2]+ALFASTATIONHSIZEZ));
648 pTube = new GeoTube(BEAMPIPEINNERRADIUS,BEAMPIPEOUTERRADIUS,fInnerTubeHLength);
649 pTube2 = new GeoTube(0*CLHEP::mm,BEAMPIPEINNERRADIUS,fInnerTubeHLength);
650 pLogTube=new GeoLogVol(szLabel,pTube,m_MapMaterials[string("Steel")]);
651 pLogTube2=new GeoLogVol(szLabel2,pTube2,m_MapMaterials[string("std::Vacuum")]);
652 pPhysTube=new GeoFullPhysVol(pLogTube);
653 pPhysTube2=new GeoFullPhysVol(pLogTube2);
654 //TransTube=HepGeom::Translate3D(0.0*CLHEP::mm, 0.0*CLHEP::mm, AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-fInnerTubeHLength);
655 TransTube=HepGeom::TranslateZ3D(-ALFASTATIONHSIZEZ-fInnerTubeHLength)*AStationParams01.ASTransformInATLAS;
656 pWorld->add(new GeoNameTag(szLabel));
657 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube)));
658 pWorld->add(pPhysTube);
659 m_pDetectorManager->addTreeTop(pPhysTube);
660 pWorld->add(new GeoNameTag(szLabel2));
661 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube)));
662 pWorld->add(pPhysTube2);
663 m_pDetectorManager->addTreeTop(pPhysTube2);
664 LogStream<<MSG::INFO<<"ALFA_Beampipe02: hlength="<<fInnerTubeHLength<<", z="<<AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-fInnerTubeHLength<<endmsg;
665
666 strcpy(szLabel,"ALFA_Beampipe06");
667 strcpy(szLabel2,"ALFA_Beampipe06Fill");
668 m_pGeoReader->GetASPosParams(&AStationParams01,EASN_B7R1);
670 pTube2 = new GeoTube(0*CLHEP::mm,BEAMPIPEINNERRADIUS,ALFAEDGEBEAMPIPEHLENGTH);
671 pLogTube=new GeoLogVol(szLabel,pTube,m_MapMaterials[string("Steel")]);
672 pLogTube2=new GeoLogVol(szLabel2,pTube2,m_MapMaterials[string("std::Vacuum")]);
673 pPhysTube=new GeoFullPhysVol(pLogTube);
674 pPhysTube2=new GeoFullPhysVol(pLogTube2);
675 //TransTube=HepGeom::Translate3D(0.0*CLHEP::mm, 0.0*CLHEP::mm, AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-ALFAEDGEBEAMPIPEHLENGTH);
676 TransTube=HepGeom::TranslateZ3D(-ALFASTATIONHSIZEZ-ALFAEDGEBEAMPIPEHLENGTH)*AStationParams01.ASTransformInATLAS;
677 pWorld->add(new GeoNameTag(szLabel));
678 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube)));
679 pWorld->add(pPhysTube);
680 m_pDetectorManager->addTreeTop(pPhysTube);
681 pWorld->add(new GeoNameTag(szLabel2));
682 pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube)));
683 pWorld->add(pPhysTube2);
684 m_pDetectorManager->addTreeTop(pPhysTube2);
685 LogStream<<MSG::INFO<<"ALFA_Beampipe06: hlength="<<ALFAEDGEBEAMPIPEHLENGTH<<", z="<<AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-ALFAEDGEBEAMPIPEHLENGTH<<endmsg;
686}
#define ALFAEDGEBEAMPIPEHLENGTH
HepGeom::Point3D< double > IdealMainPoint

◆ ConstructODFiberCladdings()

void ALFA_DetectorFactory::ConstructODFiberCladdings ( const eRPotName eRPName,
GeoFullPhysVol * pPhysMotherVolume,
const HepGeom::Transform3D & MotherTransform,
GeoAlignableTransform * pDetTransform )
private

Definition at line 1156 of file ALFA_DetectorFactory.cxx.

1157{
1158 int i;
1159 char szLabel[32]{};
1160
1161 GeoBox* OD_Cladbox1 = new GeoBox(4.*CLHEP::mm,3.75*CLHEP::mm,.25*CLHEP::mm);
1162 GeoBox* OD_Cladbox2 = new GeoBox(3.75*CLHEP::mm,15*CLHEP::mm,.25*CLHEP::mm);
1163
1164 GeoTube* OD_Cladtube1 = new GeoTube(22.5*CLHEP::mm,30.0*CLHEP::mm,0.25*CLHEP::mm);
1165 GeoBox* OD_Cladbox3 = new GeoBox(30*CLHEP::mm,50*CLHEP::mm,1*CLHEP::mm);
1166 GeoBox* OD_Cladbox4 = new GeoBox(50*CLHEP::mm,30*CLHEP::mm,1*CLHEP::mm);
1167
1168 GeoTrf::Transform3D OD_CladMove1 = GeoTrf::Translate3D(30*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm);
1169 GeoShapeShift * mowe1 = new GeoShapeShift(OD_Cladbox3, OD_CladMove1);
1170 GeoShapeSubtraction * OD_Cladsemi1 = new GeoShapeSubtraction(OD_Cladtube1, mowe1);
1171
1172 GeoTrf::Transform3D OD_CladMove2 = GeoTrf::Translate3D(0*CLHEP::mm, 30*CLHEP::mm, 0*CLHEP::mm);
1173 GeoShapeShift * mowe2 = new GeoShapeShift(OD_Cladbox4, OD_CladMove2);
1174 GeoShapeSubtraction * OD_Cladsemi2 = new GeoShapeSubtraction(OD_Cladsemi1, mowe2);
1175
1176 GeoTrf::Transform3D OD_CladMov3= GeoTrf::Translate3D(4*CLHEP::mm, -26.25*CLHEP::mm, 0);
1177 GeoShapeShift * mowe3 = new GeoShapeShift(OD_Cladbox1, OD_CladMov3);
1178 GeoShapeUnion * OD_Cladsemi3 = new GeoShapeUnion(OD_Cladsemi2, mowe3);
1179
1180 GeoTrf::Transform3D OD_CladMov4= GeoTrf::Translate3D(-26.25*CLHEP::mm, 15*CLHEP::mm, 0);
1181 GeoShapeShift * mowe4 = new GeoShapeShift(OD_Cladbox2, OD_CladMov4);
1182 GeoShapeUnion * shapeOD_Cladding = new GeoShapeUnion(OD_Cladsemi3, mowe4);
1183
1184 // OD_Cladding - logical volume
1185 GeoLogVol* logOD_Cladding = new GeoLogVol("logOD_Cladding", shapeOD_Cladding, m_MapMaterials[string("PMMA")]);
1186
1187 GeoFullPhysVol* physOD_CladdingU_0=NULL;
1188 GeoFullPhysVol* physOD_CladdingU_1=NULL;
1189 GeoFullPhysVol* physOD_CladdingV_0=NULL;
1190 GeoFullPhysVol* physOD_CladdingV_1=NULL;
1191
1192 //RPPOSPARAMS RPosParams;
1193 //m_pGeoReader->GetRPPosParams(&RPosParams,eRPName);
1194
1195 for(i=0; i<ODPLATESCNT; i++)
1196 {
1197 //physOD_CladdingU_0
1198 physOD_CladdingU_0 = new GeoFullPhysVol(logOD_Cladding);
1199 HepGeom::Transform3D TransODCladdingU0 = HepGeom::Translate3D(-27.*CLHEP::mm,(-0.858+OD_stagger[i])*CLHEP::mm,(14.3500000000+i*2)*CLHEP::mm);
1200 ConstructODFibers00(eRPName, i, EFT_ODFIBERU0, physOD_CladdingU_0, MotherTransform, TransODCladdingU0);
1201
1202 pPhysMotherVolume->add(pDetTransform);
1203 pPhysMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransODCladdingU0)));
1204 sprintf(szLabel,"physODclad[%d][0][%d]",eRPName,i);
1205 pPhysMotherVolume->add(new GeoNameTag(szLabel));
1206 pPhysMotherVolume->add(physOD_CladdingU_0);
1207
1208 //physOD_CladdingU_1
1209 physOD_CladdingU_1 = new GeoFullPhysVol(logOD_Cladding);
1210 HepGeom::Transform3D TransODCladdingU1 = HepGeom::Translate3D( 27.*CLHEP::mm,(-0.858+OD_stagger[i])*CLHEP::mm,(14.3500000000+i*2)*CLHEP::mm)*HepGeom::RotateY3D(-180*CLHEP::deg);
1211 ConstructODFibers01(eRPName, i, EFT_ODFIBERU1, physOD_CladdingU_1, MotherTransform, TransODCladdingU1);
1212
1213 pPhysMotherVolume->add(pDetTransform);
1214 pPhysMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransODCladdingU1)));
1215 sprintf(szLabel,"physODclad[%d][1][%d]",eRPName,i);
1216 pPhysMotherVolume->add(new GeoNameTag(szLabel));
1217 pPhysMotherVolume->add(physOD_CladdingU_1);
1218
1219 //physOD_CladdingV_0
1220 physOD_CladdingV_0 = new GeoFullPhysVol(logOD_Cladding);
1221 HepGeom::Transform3D TransODCladdingV0=HepGeom::Translate3D(-27.*CLHEP::mm,(-8.358+OD_stagger[i])*CLHEP::mm,(15.6500000000+i*2)*CLHEP::mm);
1222 ConstructODFibers00(eRPName, i, EFT_ODFIBERV0, physOD_CladdingV_0, MotherTransform, TransODCladdingV0);
1223
1224 pPhysMotherVolume->add(pDetTransform);
1225 pPhysMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransODCladdingV0)));
1226 sprintf(szLabel,"physODclad[%d][2][%d]",eRPName,i);
1227 pPhysMotherVolume->add(new GeoNameTag(szLabel));
1228 pPhysMotherVolume->add(physOD_CladdingV_0);
1229
1230 //physOD_CladdingV_1
1231 physOD_CladdingV_1 = new GeoFullPhysVol(logOD_Cladding);
1232 HepGeom::Transform3D TransODCladdingV1 = HepGeom::Translate3D( 27.*CLHEP::mm,(-8.358+OD_stagger[i])*CLHEP::mm,(15.6500000000+i*2)*CLHEP::mm)*HepGeom::RotateY3D(-180*CLHEP::deg);
1233 ConstructODFibers01(eRPName, i, EFT_ODFIBERV1, physOD_CladdingV_1, MotherTransform, TransODCladdingV1);
1234
1235 pPhysMotherVolume->add(pDetTransform);
1236 pPhysMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransODCladdingV1)));
1237 sprintf(szLabel,"physODclad[%d][3][%d]",eRPName,i);
1238 pPhysMotherVolume->add(new GeoNameTag(szLabel));
1239 pPhysMotherVolume->add(physOD_CladdingV_1);
1240 }
1241}
#define ODPLATESCNT
@ EFT_ODFIBERV0
@ EFT_ODFIBERV1
@ EFT_ODFIBERU0
@ EFT_ODFIBERU1
void ConstructODFibers00(const eRPotName eRPName, const int iODPlate, eFiberType eFType, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, const HepGeom::Transform3D &TransODCladding)
void ConstructODFibers01(const eRPotName eRPName, const int iODPlate, eFiberType eFType, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, const HepGeom::Transform3D &TransODCladding)

◆ ConstructODFibers00()

void ALFA_DetectorFactory::ConstructODFibers00 ( const eRPotName eRPName,
const int iODPlate,
eFiberType eFType,
GeoFullPhysVol * pMotherVolume,
const HepGeom::Transform3D & MotherTransform,
const HepGeom::Transform3D & TransODCladding )
private

Definition at line 1243 of file ALFA_DetectorFactory.cxx.

1244{
1245 MsgStream LogStream(Athena::getMessageSvc(), "ALFA_GeoModel::ALFA_DetectorFactory");
1246
1247 int i{};
1248 char szLabel[180]{};
1249 HepGeom::Transform3D TransODFiber;
1250
1251 GeoBox* OD_Fiberbox1 = new GeoBox(4.*CLHEP::mm,.24*CLHEP::mm,.24*CLHEP::mm);
1252 GeoBox* OD_Fiberbox2 = new GeoBox(.24*CLHEP::mm,15*CLHEP::mm,.24*CLHEP::mm);
1253 GeoBox* OD_Fiberbox3 = new GeoBox(30*CLHEP::mm,50*CLHEP::mm,1*CLHEP::mm);
1254 GeoBox* OD_Fiberbox4 = new GeoBox(50*CLHEP::mm,30*CLHEP::mm,1*CLHEP::mm);
1255
1256 for(i=0; i<OD_Nb_Fibers; i++){
1257 GeoTube* OD_Fibertube1 = new GeoTube((29.51-0.5*i)*CLHEP::mm,(29.99-0.5*i)*CLHEP::mm,0.24*CLHEP::mm);
1258
1259 GeoTrf::Transform3D OD_FiberMove1 = GeoTrf::Translate3D(30*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm);
1260 GeoShapeShift * mowe1 = new GeoShapeShift(OD_Fiberbox3, OD_FiberMove1);
1261 GeoShapeSubtraction * OD_Fibersemi1 = new GeoShapeSubtraction(OD_Fibertube1, mowe1);
1262
1263 GeoTrf::Transform3D OD_FiberMove2 = GeoTrf::Translate3D(0*CLHEP::mm, 30*CLHEP::mm, 0*CLHEP::mm);
1264 GeoShapeShift * mowe2 = new GeoShapeShift(OD_Fiberbox4, OD_FiberMove2);
1265 GeoShapeSubtraction * OD_Fibersemi2 = new GeoShapeSubtraction(OD_Fibersemi1, mowe2);
1266
1267 GeoTrf::Transform3D OD_FiberMov4= GeoTrf::Translate3D((-29.75+0.5*i)*CLHEP::mm, 15*CLHEP::mm, 0);
1268 GeoShapeShift * mowe4 = new GeoShapeShift(OD_Fiberbox2, OD_FiberMov4);
1269 GeoShapeUnion * shapeOD_Fiber = new GeoShapeUnion(OD_Fibersemi2, mowe4);
1270
1271 GeoLogVol* logOD_Fiber = new GeoLogVol("logOD_Fiber", shapeOD_Fiber, m_MapMaterials[string("Polystyrene")]);
1272 GeoLogVol* logOD_FiberActive = new GeoLogVol("logOD_FiberActive", OD_Fiberbox1, m_MapMaterials[string("Polystyrene")]);
1273
1274 double fYPos = 0.0;
1275 double fAngle = 0.0;
1276 if (eFType==EFT_ODFIBERU0)
1277 {
1278 //(+16 because U0-nFiberID is indexed from 16 to 30)
1279 fYPos=m_pGeoReader->GetODFiberCentreYPos(eRPName, EFT_ODFIBERU0, iODPlate+1, i+16);
1280 fAngle=m_pGeoReader->GetODFiberAngle(eRPName, EFT_ODFIBERU0, iODPlate+1, i+16);
1281 sprintf(szLabel,"ODFiberU0Active[%d][%d][%d]",eRPName,iODPlate+1,i+1);
1282 }
1283 else if (eFType==EFT_ODFIBERV0)
1284 {
1285 fYPos=m_pGeoReader->GetODFiberCentreYPos(eRPName, EFT_ODFIBERV0, iODPlate+1, i+1);
1286 fAngle=m_pGeoReader->GetODFiberAngle(eRPName, EFT_ODFIBERV0, iODPlate+1, i+1);
1287 sprintf(szLabel,"ODFiberV0Active[%d][%d][%d]",eRPName,iODPlate+1,i+1);
1288 }
1289
1290 TransODFiber=HepGeom::Translate3D(4*CLHEP::mm, fYPos, 0.0*CLHEP::mm)*HepGeom::RotateZ3D(fAngle);
1291
1292 //ODFiber00Active - physical volumes
1293 GeoPhysVol* physOD_FiberActive = new GeoPhysVol(logOD_FiberActive);
1294 pMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransODFiber)));
1295 pMotherVolume->add(new GeoNameTag(szLabel));
1296 pMotherVolume->add(physOD_FiberActive);
1297
1298 //ODFiber00Active - set translation vector of the fiber with respect to the main reference point
1299 HepGeom::Transform3D TransTotal=MotherTransform*TransODCladding*TransODFiber;
1300 HepGeom::Point3D<float> TransPoint=TransTotal*HepGeom::Point3D<float>(0.0,0.0,0.0);
1301 HepGeom::Vector3D<float> TransVector=TransTotal*HepGeom::Vector3D<float>(1.0,0.0,0.0);
1302 float fSlope=tan(TransVector.phi());
1303
1304 /*
1305 if(eRPName==ERPN_A7L1U && eFType==EFT_ODFIBERU0){
1306 TransPoint=MotherTransform*HepGeom::Point3D<float>(0.0*CLHEP::mm,0.0*CLHEP::mm,0.0*CLHEP::mm);
1307 LogStream<<MSG::INFO<<"(U0) Trans Mother only="<<setprecision(10)<<TransPoint<<endmsg;
1308
1309 TransPoint=TransODCladding*HepGeom::Point3D<float>(0.0*CLHEP::mm,0.0*CLHEP::mm,0.0*CLHEP::mm);
1310 LogStream<<MSG::INFO<<"(U0) Trans Cladding only="<<setprecision(10)<<TransPoint.z()<<endmsg;
1311
1312 TransPoint=MotherTransform*TransODCladding*HepGeom::Point3D<float>(0.0*CLHEP::mm,0.0*CLHEP::mm,0.0*CLHEP::mm);
1313 LogStream<<MSG::INFO<<"(U0) Trans Mother+Cladding only ="<<setprecision(10)<<TransPoint.z()<<endmsg;
1314
1315 TransPoint=TransODCladding*TransODFiber*HepGeom::Point3D<float>(0.0*CLHEP::mm,0.0*CLHEP::mm,0.0*CLHEP::mm);
1316 LogStream<<MSG::INFO<<"(U0) Trans Cladding+fiber only ="<<setprecision(10)<<TransPoint.z()<<endmsg;
1317 }
1318 if(eRPName==ERPN_A7L1U && eFType==EFT_ODFIBERV0){
1319 TransPoint=MotherTransform*HepGeom::Point3D<float>(0.0*CLHEP::mm,0.0*CLHEP::mm,0.0*CLHEP::mm);
1320 LogStream<<MSG::INFO<<"(V0) Trans Mother only="<<setprecision(10)<<TransPoint<<endmsg;
1321
1322 TransPoint=TransODCladding*HepGeom::Point3D<float>(0.0*CLHEP::mm,0.0*CLHEP::mm,0.0*CLHEP::mm);
1323 LogStream<<MSG::INFO<<"(V0) Trans Cladding only="<<setprecision(10)<<TransPoint.z()<<endmsg;
1324
1325 TransPoint=MotherTransform*TransODCladding*HepGeom::Point3D<float>(0.0*CLHEP::mm,0.0*CLHEP::mm,0.0*CLHEP::mm);
1326 LogStream<<MSG::INFO<<"(V0) Trans Mother+Cladding only ="<<setprecision(10)<<TransPoint.z()<<endmsg;
1327
1328 TransPoint=TransODCladding*TransODFiber*HepGeom::Point3D<float>(0.0*CLHEP::mm,0.0*CLHEP::mm,0.0*CLHEP::mm);
1329 LogStream<<MSG::INFO<<"(V0) Trans Cladding+fiber only="<<setprecision(10)<<TransPoint.z()<<endmsg;
1330 }*/
1331
1332 if (eFType==EFT_ODFIBERU0)
1333 {
1334 m_pGeoReader->SetODFiberPositionToMainReference(eRPName, EFT_ODFIBERU0, iODPlate+1, i+16, TransPoint, fSlope);
1335 }
1336 else if (eFType==EFT_ODFIBERV0)
1337 {
1338 m_pGeoReader->SetODFiberPositionToMainReference(eRPName, EFT_ODFIBERV0, iODPlate+1, i+1, TransPoint, fSlope);
1339 }
1340
1341 // ODFiber00 physical volume
1342 if (eFType==EFT_ODFIBERU0) sprintf(szLabel,"ODFiberU0[%d][%d][%d]",eRPName,iODPlate+1,i+1);
1343 else if (eFType==EFT_ODFIBERV0) sprintf(szLabel,"ODFiberV0[%d][%d][%d]",eRPName,iODPlate+1,i+1);
1344 GeoPhysVol* physOD_Fiber = new GeoPhysVol(logOD_Fiber);
1345 pMotherVolume->add(new GeoTransform(GeoTrf::Translate3D(0*CLHEP::mm,0*CLHEP::mm,0*CLHEP::mm)));
1346 pMotherVolume->add(new GeoNameTag(szLabel));
1347 pMotherVolume->add(physOD_Fiber);
1348 }
1349}
const int OD_Nb_Fibers

◆ ConstructODFibers01()

void ALFA_DetectorFactory::ConstructODFibers01 ( const eRPotName eRPName,
const int iODPlate,
eFiberType eFType,
GeoFullPhysVol * pMotherVolume,
const HepGeom::Transform3D & MotherTransform,
const HepGeom::Transform3D & TransODCladding )
private

Definition at line 1351 of file ALFA_DetectorFactory.cxx.

1352{
1353 int i;
1354 char szLabel[180]{};
1355 HepGeom::Transform3D TransODFiber;
1356
1357 GeoBox* OD_Fiberbox1 = new GeoBox(4.*CLHEP::mm,.24*CLHEP::mm,.24*CLHEP::mm);
1358 GeoBox* OD_Fiberbox2 = new GeoBox(.24*CLHEP::mm,15*CLHEP::mm,.24*CLHEP::mm);
1359 GeoBox* OD_Fiberbox3 = new GeoBox(30*CLHEP::mm,50*CLHEP::mm,1*CLHEP::mm);
1360 GeoBox* OD_Fiberbox4 = new GeoBox(50*CLHEP::mm,30*CLHEP::mm,1*CLHEP::mm);
1361
1362 for(i=0; i<OD_Nb_Fibers; i++){
1363 GeoTube* OD_Fibertube1 = new GeoTube((22.51+0.5*i)*CLHEP::mm,(22.99+0.5*i)*CLHEP::mm,0.24*CLHEP::mm);
1364
1365 GeoTrf::Transform3D OD_FiberMove1 = GeoTrf::Translate3D(30*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm);
1366 GeoShapeShift * mowe1 = new GeoShapeShift(OD_Fiberbox3, OD_FiberMove1);
1367 GeoShapeSubtraction * OD_Fibersemi1 = new GeoShapeSubtraction(OD_Fibertube1, mowe1);
1368
1369 GeoTrf::Transform3D OD_FiberMove2 = GeoTrf::Translate3D(0*CLHEP::mm, 30*CLHEP::mm, 0*CLHEP::mm);
1370 GeoShapeShift * mowe2 = new GeoShapeShift(OD_Fiberbox4, OD_FiberMove2);
1371 GeoShapeSubtraction * OD_Fibersemi2 = new GeoShapeSubtraction(OD_Fibersemi1, mowe2);
1372
1373 GeoTrf::Transform3D OD_FiberMov4= GeoTrf::Translate3D((-22.75-0.5*i)*CLHEP::mm, 15*CLHEP::mm, 0);
1374 GeoShapeShift * mowe4 = new GeoShapeShift(OD_Fiberbox2, OD_FiberMov4);
1375 GeoShapeUnion * shapeOD_Fiber = new GeoShapeUnion(OD_Fibersemi2, mowe4);
1376
1377 GeoLogVol* logOD_Fiber = new GeoLogVol("logOD_Fiber", shapeOD_Fiber, m_MapMaterials[string("Polystyrene")]);
1378 GeoLogVol* logOD_FiberActive = new GeoLogVol("logOD_FiberActive", OD_Fiberbox1, m_MapMaterials[string("Polystyrene")]);
1379
1380 double fYPos = 0.0;
1381 double fAngle = 0.0;
1382 if (eFType==EFT_ODFIBERU1)
1383 {
1384 //1.10.2010 LN: change of indexation scheme
1385 //fYPos=pGeoReader->GetODFiberCentreYPos(eRPName, EFT_ODFIBERU1, iODPlate+1, i+1);
1386 //fAngle=pGeoReader->GetODFiberAngle(eRPName, EFT_ODFIBERU1, iODPlate+1, i+1);
1387 fYPos=m_pGeoReader->GetODFiberCentreYPos(eRPName, EFT_ODFIBERU1, iODPlate+1, i+16);
1388 fAngle=m_pGeoReader->GetODFiberAngle(eRPName, EFT_ODFIBERU1, iODPlate+1, i+16);
1389
1390 sprintf(szLabel,"ODFiberU1Active[%d][%d][%d]",eRPName,iODPlate+1,i+1);
1391 }
1392 else if (eFType==EFT_ODFIBERV1)
1393 {
1394 //1.10.2010 LN: change of indexation scheme
1395 //(+16 because V1-nFiberID is indexed from 16 to 30)
1396 //fYPos=pGeoReader->GetODFiberCentreYPos(eRPName, EFT_ODFIBERV1, iODPlate+1, i+16);
1397 //fAngle=pGeoReader->GetODFiberAngle(eRPName, EFT_ODFIBERV1, iODPlate+1, i+16);
1398 fYPos=m_pGeoReader->GetODFiberCentreYPos(eRPName, EFT_ODFIBERV1, iODPlate+1, i+1);
1399 fAngle=m_pGeoReader->GetODFiberAngle(eRPName, EFT_ODFIBERV1, iODPlate+1, i+1);
1400
1401 sprintf(szLabel,"ODFiberV1Active[%d][%d][%d]",eRPName,iODPlate+1,i+1);
1402 }
1403
1404 TransODFiber=HepGeom::Translate3D(4*CLHEP::mm, fYPos, 0*CLHEP::mm)*HepGeom::RotateZ3D(fAngle);
1405
1406 //ODFiber01Active - physical volumes
1407 GeoPhysVol* physOD_FiberActive = new GeoPhysVol(logOD_FiberActive);
1408 pMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransODFiber)));
1409 pMotherVolume->add(new GeoNameTag(szLabel));
1410 pMotherVolume->add(physOD_FiberActive);
1411
1412 //ODFiber01Active - set translation vector of the fiber with respect to the main reference point
1413 HepGeom::Transform3D TransTotal=MotherTransform*TransODCladding*TransODFiber;
1414 HepGeom::Point3D<float> TransPoint=TransTotal*HepGeom::Point3D<float>(0.0,0.0,0.0);
1415 HepGeom::Vector3D<float> TransVector=TransTotal*HepGeom::Vector3D<float>(1.0,0.0,0.0);
1416 float fSlope=tan(TransVector.phi());
1417
1418 if (eFType==EFT_ODFIBERU1)
1419 {
1420 //1.10.2010 LN: change of indexation scheme
1421 //pGeoReader->SetODFiberPositionToMainReference(eRPName, EFT_ODFIBERU1, iODPlate+1, i+1, TransPoint, fSlope);
1422 m_pGeoReader->SetODFiberPositionToMainReference(eRPName, EFT_ODFIBERU1, iODPlate+1, i+16, TransPoint, fSlope);
1423 }
1424 else if (eFType==EFT_ODFIBERV1)
1425 {
1426 //1.10.2010 LN: change of indexation scheme
1427 //pGeoReader->SetODFiberPositionToMainReference(eRPName, EFT_ODFIBERV1, iODPlate+1, i+16, TransPoint, fSlope);
1428 m_pGeoReader->SetODFiberPositionToMainReference(eRPName, EFT_ODFIBERV1, iODPlate+1, i+1, TransPoint, fSlope);
1429 }
1430
1431 //ODFiber01 physical volume
1432 if (eFType==EFT_ODFIBERU1) sprintf(szLabel,"ODFiberU1[%d][%d][%d]",eRPName,iODPlate+1,i+1);
1433 else if (eFType==EFT_ODFIBERV1) sprintf(szLabel,"ODFiberV1[%d][%d][%d]",eRPName,iODPlate+1,i+1);
1434 GeoPhysVol* physOD_Fiber = new GeoPhysVol(logOD_Fiber);
1435 pMotherVolume->add(new GeoTransform(GeoTrf::Translate3D(0*CLHEP::mm,0*CLHEP::mm,0*CLHEP::mm)));
1436 pMotherVolume->add(new GeoNameTag(szLabel));
1437 pMotherVolume->add(physOD_Fiber);
1438 }
1439}

◆ ConstructUFiberCladdings()

void ALFA_DetectorFactory::ConstructUFiberCladdings ( const eRPotName eRPName,
GeoFullPhysVol * pMotherVolume,
const HepGeom::Transform3D & MotherTransform,
GeoAlignableTransform * pDetTransform )
private

Definition at line 1445 of file ALFA_DetectorFactory.cxx.

1446{
1447 char strLabel[32]{};
1448 //const double ALFA_stagger[10] = {0.0, 0.283, -0.141, 0.141, -0.283, 0.354, -0.071, 0.212, -0.212, 0.071};
1449
1450 MsgStream LogStream(Athena::getMessageSvc(), "ALFA_DetectorFactory::ConstructUFiberCladdings");
1451
1452 //Claddings
1453 PLATEPARAMS PlateParams;
1454
1455 GeoBox *ALFA_Cladbox1, *ALFA_Cladbox2;
1456 GeoShapeSubtraction* shapeALFA_Clad;
1457
1458 //G4RotationMatrix* ALFA_CladdingURot = new G4RotationMatrix;
1459 //ALFA_CladdingURot -> rotateZ(-45*CLHEP::deg);
1460 //ALFA_CladdingURot -> rotateY(180*CLHEP::deg);
1461 //HepGeom::RotateZ3D ALFA_CladdingURot=HepGeom::RotateZ3D(-45.0*CLHEP::deg);
1462
1463 GeoShapeShift* mowe1;
1464 GeoLogVol* pLogCladdingU;
1465 GeoFullPhysVol* physALFA_CladdingU[ALFAPLATESCNT];
1466 HepGeom::Transform3D TransCladdingU[ALFAPLATESCNT];
1467
1468
1469
1470 for(int i=0; i<ALFAPLATESCNT; i++)
1471 {
1472 m_pGeoReader->GetPlateParams(&PlateParams,eRPName,i+1);
1473 //ALFA_Cladbox1 = new G4Box("ALFA_Cladbox1", 16.*CLHEP::mm,16.*CLHEP::mm,.25*CLHEP::mm);
1474 ALFA_Cladbox1 = new GeoBox(PlateParams.fUCladdingSizeX/2.0,16.0*CLHEP::mm,0.25*CLHEP::mm);
1475 ALFA_Cladbox2 = new GeoBox(16.0*CLHEP::mm,16.0*CLHEP::mm,0.5*CLHEP::mm);
1476
1477 //G4RotationMatrix* Clad_Rot1 = new G4RotationMatrix;
1478 //Clad_Rot1 -> rotateZ(-45*CLHEP::deg);
1479 //G4ThreeVector Clad_Move1(-17.415*CLHEP::mm, -17.415*CLHEP::mm, 0*CLHEP::mm);
1480 GeoTrf::Transform3D Clad_Move1=GeoTrf::Translate3D(-17.415*CLHEP::mm, -17.415*CLHEP::mm, 0*CLHEP::mm)*GeoTrf::RotateZ3D(-45*CLHEP::deg);
1481
1482 mowe1=new GeoShapeShift(ALFA_Cladbox2,Clad_Move1);
1483 shapeALFA_Clad = new GeoShapeSubtraction(ALFA_Cladbox1,mowe1);
1484 pLogCladdingU = new GeoLogVol("logALFA_CladdingU",shapeALFA_Clad, m_MapMaterials[string("PMMA")]);
1485
1486 sprintf(strLabel,"ALFA_CladdingU[%d][%d]",eRPName,i);
1487 TransCladdingU[i]=HepGeom::Translate3D(ALFA_stagger[i]*CLHEP::mm,-20.897*CLHEP::mm, (-18+i*2)*CLHEP::mm)*HepGeom::RotateZ3D(+45.0*CLHEP::deg);
1488
1489 physALFA_CladdingU[i] = new GeoFullPhysVol(pLogCladdingU);
1490 pMotherVolume->add(new GeoNameTag(strLabel));
1491 pMotherVolume->add(pDetTransform);
1492 pMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransCladdingU[i])));
1493 pMotherVolume->add(physALFA_CladdingU[i]);
1494
1495
1496
1497 }
1498
1499 //Fibers
1500 GeoFullPhysVol* physiFibU;
1501 GeoLogVol* logALFA_FiberU;
1502 //GeoLogVol* logALFA_FiberU[ALFAPLATESCNT][ALFAFIBERSCNT];
1503
1504 GeoBox* CladTrim = new GeoBox(16.*CLHEP::mm,16.*CLHEP::mm,.5*CLHEP::mm);
1505 GeoBox* Fib1 = new GeoBox(0.24*CLHEP::mm,16.*CLHEP::mm,.24*CLHEP::mm);
1506
1507 //G4RotationMatrix* FibRotU = new G4RotationMatrix;
1508 //G4RotationMatrix* pFibRotUSlope = new G4RotationMatrix;
1509 //FibRotU -> rotateZ(45*CLHEP::deg);
1510 HepGeom::Transform3D TransFiber;
1511
1512 for(int j=0; j<ALFAFIBERSCNT; j++)
1513 {
1514 //HepGeom::Transform3D FibMove=HepGeom::Translate3D((-33.165+0.5*j)*CLHEP::mm, -17.415*CLHEP::mm, 0*CLHEP::mm)*HepGeom::RotateZ3D(+45.0*CLHEP::deg);
1515 //const GeoShapeShift* Sh6=new GeoShapeShift(CladTrim,FibMove);
1516 //const GeoShapeSubtraction* solFibU=new GeoShapeSubtraction(Fib1,Sh6);
1517 //sprintf(strLabel,"logALFA_FiberU[%d]",j+1);
1518 //logALFA_FiberU=new GeoLogVol(strLabel,solFibU,MapMaterials[string("Polystyrene")]);
1519
1520 for(int i=0; i<ALFAPLATESCNT; i++)
1521 {
1522 double fXPos=m_pGeoReader->GetUFiberCentreXPos(eRPName, i+1, j+1);
1523 double fAngle=m_pGeoReader->GetUFiberAngle(eRPName, i+1, j+1);
1524 double fDx=fXPos-(+15.75-0.5*(j))*CLHEP::mm;
1525
1526 GeoTrf::Transform3D TrimMove=GeoTrf::Translate3D((-33.165+0.5*j)*CLHEP::mm-fDx, -17.415*CLHEP::mm, 0*CLHEP::mm)*GeoTrf::RotateZ3D(+45.0*CLHEP::deg); //bug fix 23.2.2010
1527 const GeoShapeShift* Sh6=new GeoShapeShift(CladTrim,TrimMove);
1528 const GeoShapeSubtraction* solFibU=new GeoShapeSubtraction(Fib1,Sh6);
1529 sprintf(strLabel,"logALFA_FiberU[%d]",j+1);
1530 logALFA_FiberU=new GeoLogVol(strLabel,solFibU,m_MapMaterials[string("Polystyrene")]);
1531
1532 sprintf(strLabel,"ALFA_FiberU[%d][%d][%d]",eRPName,i+1,j+1);
1533 TransFiber=HepGeom::Translate3D(fXPos, 0*CLHEP::mm, 0*CLHEP::mm)*HepGeom::RotateZ3D(-fAngle);
1534 physiFibU=new GeoFullPhysVol(logALFA_FiberU);
1535 physALFA_CladdingU[i]->add(new GeoNameTag(strLabel));
1536 physALFA_CladdingU[i]->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransFiber)));
1537 physALFA_CladdingU[i]->add(physiFibU);
1538
1539 //set translation vector of the fiber with respect to the main reference point
1540 HepGeom::Transform3D TransTotal=MotherTransform*TransCladdingU[i]*TransFiber;
1541 HepGeom::Point3D<float> TransPoint=TransTotal*HepGeom::Point3D<float>(0.0,0.0,0.0);
1542 HepGeom::Vector3D<float> TransVector=TransTotal*HepGeom::Vector3D<float>(0.0,1.0,0.0);
1543 float fSlope=tan(TransVector.phi());
1544
1545 m_pGeoReader->SetUFiberPositionToMainReference(eRPName, i+1, j+1, TransPoint, fSlope);
1546 }
1547 }
1548}
#define ALFAPLATESCNT
#define ALFAFIBERSCNT

◆ ConstructVFiberCladdings()

void ALFA_DetectorFactory::ConstructVFiberCladdings ( const eRPotName eRPName,
GeoFullPhysVol * pMotherVolume,
const HepGeom::Transform3D & MotherTransform,
GeoAlignableTransform * pDetTransform )
private

Definition at line 1551 of file ALFA_DetectorFactory.cxx.

1552{
1553 char strLabel[32];
1554 //const double ALFA_stagger[10] = {0.0, 0.283, -0.141, 0.141, -0.283, 0.354, -0.071, 0.212, -0.212, 0.071};
1555
1556 //Claddings
1557 PLATEPARAMS PlateParams;
1558
1559 GeoShapeShift* mowe1;
1560 GeoBox *ALFA_Cladbox1, *ALFA_Cladbox2;
1561 GeoShapeSubtraction* shapeALFA_Clad;
1562
1563 //G4RotationMatrix* ALFA_CladdingVRot = new G4RotationMatrix;
1564 //ALFA_CladdingVRot -> rotateZ(-45*CLHEP::deg);
1565 //ALFA_CladdingVRot -> rotateY(180*CLHEP::deg);
1566 //HepGeom::RotateZ3D ALFA_CladdingVRot=HepGeom::RotateZ3D(+45.0*CLHEP::deg);
1567
1568 GeoLogVol* pLogCladdingV;
1569 GeoFullPhysVol* physALFA_CladdingV[ALFAPLATESCNT];
1570 HepGeom::Transform3D TransCladdingV[ALFAPLATESCNT];
1571
1572 //RPPOSPARAMS RPosParams;
1573 //m_pGeoReader->GetRPPosParams(&RPosParams,eRPName);
1574
1575 for(int i=0; i<ALFAPLATESCNT; i++)
1576 {
1577 m_pGeoReader->GetPlateParams(&PlateParams,eRPName,i+1);
1578 //ALFA_Cladbox1 = new G4Box("ALFA_Cladbox1", 16.*CLHEP::mm,16.*CLHEP::mm,.25*CLHEP::mm);
1579 ALFA_Cladbox1 = new GeoBox(PlateParams.fVCladdingSizeX/2.0,16.*CLHEP::mm,.25*CLHEP::mm);
1580 ALFA_Cladbox2 = new GeoBox(16.0*CLHEP::mm,16.0*CLHEP::mm,0.5*CLHEP::mm);
1581
1582 //G4RotationMatrix* Clad_Rot1 = new G4RotationMatrix;
1583 //Clad_Rot1 -> rotateZ(-45*CLHEP::deg);
1584 //G4ThreeVector Clad_Move1(-17.415*CLHEP::mm, -17.415*CLHEP::mm, 0*CLHEP::mm);
1585 GeoTrf::Transform3D Clad_Move1=GeoTrf::Translate3D(+17.415*CLHEP::mm, -17.415*CLHEP::mm, 0*CLHEP::mm)*GeoTrf::RotateZ3D(-45*CLHEP::deg);
1586
1587 mowe1=new GeoShapeShift(ALFA_Cladbox2,Clad_Move1);
1588 shapeALFA_Clad = new GeoShapeSubtraction(ALFA_Cladbox1,mowe1);
1589 pLogCladdingV = new GeoLogVol("logALFA_CladdingV",shapeALFA_Clad, m_MapMaterials[string("PMMA")]);
1590
1591 sprintf(strLabel,"ALFA_CladdingV[%d][%d]",eRPName,i);
1592 TransCladdingV[i]=HepGeom::Translate3D(ALFA_stagger[i]*CLHEP::mm,-20.897*CLHEP::mm, (-17+i*2)*CLHEP::mm)*HepGeom::RotateZ3D(-45.0*CLHEP::deg);
1593
1594 physALFA_CladdingV[i] = new GeoFullPhysVol(pLogCladdingV);
1595 pMotherVolume->add(new GeoNameTag(strLabel));
1596 pMotherVolume->add(pDetTransform);
1597 pMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransCladdingV[i])));
1598 pMotherVolume->add(physALFA_CladdingV[i]);
1599 }
1600
1601 //Fibers
1602 GeoFullPhysVol* physiFibV;
1603 GeoLogVol* logALFA_FiberV;
1604 //GeoLogVol* logALFA_FiberV[ALFAPLATESCNT][ALFAFIBERSCNT];
1605
1606 GeoBox* CladTrim = new GeoBox(16.*CLHEP::mm,16.*CLHEP::mm,.5*CLHEP::mm);
1607 GeoBox* Fib1 = new GeoBox(0.24*CLHEP::mm,16.*CLHEP::mm,.24*CLHEP::mm);
1608
1609 //G4RotationMatrix* FibRotV = new G4RotationMatrix;
1610 //G4RotationMatrix* pFibRotVSlope = new G4RotationMatrix;
1611 //FibRotV -> rotateZ(45*CLHEP::deg);
1612 HepGeom::Transform3D TransFiber;
1613
1614 for(int j=0; j<ALFAFIBERSCNT; j++)
1615 {
1616 //HepGeom::Transform3D TrimMove=HepGeom::Translate3D((1.635+0.5*j)*CLHEP::mm, -17.415*CLHEP::mm, 0*CLHEP::mm)*HepGeom::RotateZ3D(+45.0*CLHEP::deg); //moved to inner loop
1617 //const GeoShapeShift* Sh6=new GeoShapeShift(CladTrim,TrimMove);
1618 //const GeoShapeSubtraction* solFibV=new GeoShapeSubtraction(Fib1,Sh6);
1619 //sprintf(strLabel,"logALFA_FiberV[%d]",j+1);
1620 //logALFA_FiberV=new GeoLogVol(strLabel,solFibV,MapMaterials[string("Polystyrene")]);
1621
1622 for(int i=0; i<ALFAPLATESCNT; i++)
1623 {
1624 double fXPos=m_pGeoReader->GetVFiberCentreXPos(eRPName, i+1, j+1);
1625 double fAngle=m_pGeoReader->GetVFiberAngle(eRPName, i+1, j+1);
1626 double fDx=fXPos-(+15.75-0.5*(j))*CLHEP::mm;
1627
1628 GeoTrf::Transform3D TrimMove=GeoTrf::Translate3D((1.665+0.5*j)*CLHEP::mm-fDx, -17.415*CLHEP::mm, 0*CLHEP::mm)*GeoTrf::RotateZ3D(+45.0*CLHEP::deg);
1629 const GeoShapeShift* Sh6=new GeoShapeShift(CladTrim,TrimMove);
1630 const GeoShapeSubtraction* solFibV=new GeoShapeSubtraction(Fib1,Sh6);
1631 sprintf(strLabel,"logALFA_FiberV[%d]",j+1);
1632 logALFA_FiberV=new GeoLogVol(strLabel,solFibV,m_MapMaterials[string("Polystyrene")]);
1633
1634 sprintf(strLabel,"ALFA_FiberV[%d][%d][%d]",eRPName,i+1,j+1);
1635 TransFiber=HepGeom::Translate3D(fXPos, 0*CLHEP::mm, 0*CLHEP::mm)*HepGeom::RotateZ3D(-fAngle);
1636
1637 physiFibV=new GeoFullPhysVol(logALFA_FiberV);
1638 physALFA_CladdingV[i]->add(new GeoNameTag(strLabel));
1639 physALFA_CladdingV[i]->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransFiber)));
1640 physALFA_CladdingV[i]->add(physiFibV);
1641
1642 //set translation vector of the fiber with respect to the main reference point
1643 HepGeom::Transform3D TransTotal=MotherTransform*TransCladdingV[i]*TransFiber;
1644
1645 HepGeom::Point3D<float> TransPoint=TransTotal*HepGeom::Point3D<float>(0.0,0.0,0.0);
1646 HepGeom::Vector3D<float> TransVector=TransTotal*HepGeom::Vector3D<float>(0.0,1.0,0.0);
1647 float fSlope=tan(TransVector.phi());
1648 m_pGeoReader->SetVFiberPositionToMainReference(eRPName, i+1, j+1, TransPoint, fSlope);
1649 }
1650 }
1651}

◆ create()

void ALFA_DetectorFactory::create ( GeoPhysVol * pWorld)
virtual

Definition at line 688 of file ALFA_DetectorFactory.cxx.

689{
690 int i;
692 MsgStream LogStream(Athena::getMessageSvc(), "ALFA_DetectorFactory::create");
693
694 LogStream<<MSG::INFO<<"ALFA_DetectorFactory::buildALFA_RP"<<endmsg;
695 LogStream<<MSG::DEBUG<<"Build ALFA Roman Pot"<<endmsg;
696
697 // Create ALFA_ Detector Manager
698 m_pDetectorManager= new ALFA_DetectorManager();
699 // Retrieve material manager
700 StoredMaterialManager* pMaterialManager = nullptr;
701 if (m_pDetectorStore->retrieve(pMaterialManager, std::string("MATERIALS"))!=StatusCode::SUCCESS){
702 LogStream<<MSG::INFO<<"Could not load material manager"<<endmsg;
703 return;
704 }
705
706 //define materials
707 DefineMaterials (pMaterialManager);
708
709 //create auxiliary axes
710 CreateAxes(pWorld);
711
712 //create geometry reader & inicialize wafer data object
713 if(ReadGeometry()==true){
714 LogStream<<MSG::INFO<<"Geometry loaded successfully"<<endmsg;
715 }
716 else{
717 LogStream<<MSG::INFO<<"Could not load geometry"<<endmsg;
718 return;
719 }
720
721 //detector construction
722 GeoShape* pSolidRP=CreateSolidRP();
723 GeoShape* pSolidAir=CreateSolidAir();
724 GeoShape* pSolidTrigger=CreateSolidTrigger();
725 GeoShape* pSolidRPSupport=CreateSolidRPSupport();
726 GeoShape* pSolidG10Shapes=CreateSolidG10Shapes();
727 map<int,GeoShape*>* pMapSolidTiPlates=CreateSolidTiPlates();
728 map<int,GeoShape*>* pMapSolidOdPlates=CreateSolidODPlates();
729
730 char szLabel[32]{};
731 RPPOSPARAMS RPosParams;
732 ASPOSPARAMS AStationParams;
733 GeoLogVol* pLogRPBox=NULL;
734 GeoLogVol* pLogRPAir=NULL;
735 GeoFullPhysVol* pPhysAlfaBox=NULL;
736 GeoFullPhysVol* pPhysRPBox=NULL;
737 GeoFullPhysVol* pPhysRPAir=NULL;
738 HepGeom::Translate3D ObjTranslate;
739 HepGeom::Rotate3D ObjRotate;
740
741 GeoLogVol* pLogObj=NULL;
742 GeoFullPhysVol* pPhysObj=NULL;
743 HepGeom::Transform3D TransAlfaBox,TransRPAir,TransTot;
744 HepGeom::Transform3D TransAlfaBoxRotate;
745 HepGeom::Transform3D TransRPBoxRotate;
746
747 StoredAlignX *pAlignX;
748 GeoAlignableTransform* pAlTransRPBox;
749 GeoAlignableTransform* pAlTransDetInRPMainPoint;
750 StoredPhysVol* pStPhysRPBox=NULL;
751
752 //Construct ALFA stations & beampipe
753 map<eAStationName,ALFAPHYSVOLUME> mapActiveStations;
754 ConstructAlfaStations(&mapActiveStations, pWorld);
755 if(m_Config.bConstructBeampipe) ConstructBeampipe(pWorld);
756 //LogStream<<MSG::INFO<<"MARK1"<<endmsg;
757
758 for (const eRPotName& eRPName : m_ListExistingRPots)
759 {
760 m_pGeoReader->GetRPPosParams(&RPosParams,eRPName);
761 m_pGeoReader->GetASPosParams(&AStationParams,RPosParams.eASName);
762 pPhysAlfaBox=mapActiveStations[RPosParams.eASName].pPhysVolume;
763 TransAlfaBox=mapActiveStations[RPosParams.eASName].Transform;
764
765 pAlTransRPBox=new GeoAlignableTransform(Amg::CLHEPTransformToEigen(RPosParams.RPTransformInStation));
766 pAlTransDetInRPMainPoint=new GeoAlignableTransform(Amg::CLHEPTransformToEigen(RPosParams.DetTransformInMainPoint));
767
768 //create Roman pot ----------------------------------------------------------------------------
769 sprintf(szLabel,"LogRPBox[%02d]",eRPName);
770 pLogRPBox=new GeoLogVol(szLabel,pSolidRP,m_MapMaterials[string("Steel")]);
771 pPhysRPBox=new GeoFullPhysVol(pLogRPBox);
772
773 sprintf(szLabel,"RPBox[%02d]",eRPName);
774 pPhysAlfaBox->add(new GeoNameTag(szLabel));
775 pPhysAlfaBox->add(pAlTransRPBox);
776 pPhysAlfaBox->add(pPhysRPBox);
777 //LogStream<<MSG::INFO<<"MARK3"<<endmsg;
778
779 //create RP Air
780 sprintf(szLabel,"LogRPAir[%02d]",eRPName);
781 pLogRPAir=new GeoLogVol(szLabel,pSolidAir,m_MapMaterials[string("std::Vacuum")]);
782 pPhysRPAir=new GeoFullPhysVol(pLogRPAir);
783
784 sprintf(szLabel,"RPAir[%02d]",eRPName);
785 TransRPAir=HepGeom::Translate3D(0.0,0.0,0.0);
786 pPhysRPBox->add(new GeoNameTag(szLabel));
787 pPhysRPBox->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransRPAir)));
788 pPhysRPBox->add(pPhysRPAir);
789 //LogStream<<MSG::INFO<<"MARK4"<<endmsg;
790
791 //create Trigger
792 sprintf(szLabel,"LogTrigger[%02d]",eRPName);
793 pLogObj=new GeoLogVol(szLabel,pSolidTrigger,m_MapMaterials[string("PVT")]);
794 pPhysObj=new GeoFullPhysVol(pLogObj);
795 sprintf(szLabel,"Trigger[%02d]",eRPName);
796 pPhysRPAir->add(new GeoNameTag(szLabel));
797 pPhysRPAir->add(pAlTransDetInRPMainPoint);
798 pPhysRPAir->add(new GeoTransform(GeoTrf::Translate3D(-22.0*CLHEP::mm,-31.325*CLHEP::mm,11.3*CLHEP::mm)));
799 pPhysRPAir->add(pPhysObj);
800 //LogStream<<MSG::INFO<<"MARK5"<<endmsg;
801
802 //create RP Support
803 sprintf(szLabel,"LogRPSupport[%02d]",eRPName);
804 pLogObj=new GeoLogVol(szLabel,pSolidRPSupport,m_MapMaterials[string("Steel")]);
805 pPhysObj=new GeoFullPhysVol(pLogObj);
806 sprintf(szLabel,"RPSupport[%02d]",eRPName);
807 pPhysRPAir->add(new GeoNameTag(szLabel));
808 pPhysRPAir->add(pAlTransDetInRPMainPoint);
809 pPhysRPAir->add(new GeoTransform(GeoTrf::Translate3D(0.0*CLHEP::mm,85.475*CLHEP::mm,-28.5*CLHEP::mm)));
810 pPhysRPAir->add(pPhysObj);
811 //LogStream<<MSG::INFO<<"MARK6"<<endmsg;
812
813 //create G10 Shapes
814 sprintf(szLabel,"LogG10Substrate[%02d]",eRPName);
815 pLogObj=new GeoLogVol(szLabel,pSolidG10Shapes,m_MapMaterials[string("PMMA")]);
816 for(i=0;i<ALFAPLATESCNT;i++){
817 pPhysObj=new GeoFullPhysVol(pLogObj);
818 sprintf(szLabel,"G10Substrate[%02d][%d]",eRPName,i);
819 pPhysRPAir->add(new GeoNameTag(szLabel));
820 pPhysRPAir->add(pAlTransDetInRPMainPoint);
821 pPhysRPAir->add(new GeoTransform(GeoTrf::Translate3D(ALFA_stagger[i]*CLHEP::mm,-27.525*CLHEP::mm,(-17.5+i*2)*CLHEP::mm)*GeoTrf::RotateX3D(-90.0*CLHEP::deg)));
822 pPhysRPAir->add(pPhysObj);
823 }
824
825 //create Ti plates
826 for(i=0;i<ALFAPLATESCNT;i++){
827 sprintf(szLabel,"LogRPSupport[%02d][%d]",eRPName,i);
828 pLogObj=new GeoLogVol(szLabel,(*pMapSolidTiPlates)[i],m_MapMaterials[string("Titanium")]);
829 pPhysObj=new GeoFullPhysVol(pLogObj);
830 sprintf(szLabel,"RPSupport[%02d][%d]",eRPName,i);
831 pPhysRPAir->add(new GeoNameTag(szLabel));
832 pPhysRPAir->add(pAlTransDetInRPMainPoint);
833 pPhysRPAir->add(new GeoTransform(GeoTrf::Translate3D(0.0*CLHEP::mm,5.975*CLHEP::mm,(-17.5+i*2)*CLHEP::mm)));
834 pPhysRPAir->add(pPhysObj);
835 }
836 //LogStream<<MSG::INFO<<"MARK7"<<endmsg;
837
838 //create Claddings & Fibers
839 TransTot=TransAlfaBox*RPosParams.RPTransformInStation*TransRPAir*RPosParams.DetTransformInMainPoint;
840
841 ConstructUFiberCladdings(eRPName,pPhysRPAir,TransTot, pAlTransDetInRPMainPoint);
842 ConstructVFiberCladdings(eRPName,pPhysRPAir,TransTot, pAlTransDetInRPMainPoint);
843 //LogStream<<MSG::INFO<<"MARK8"<<endmsg;
844
845 //create OD Plates
846 for(i=0;i<ODPLATESCNT;i++){
847 sprintf(szLabel,"LogODPlate[%02d][%d]",eRPName,i);
848 pLogObj=new GeoLogVol(szLabel,(*pMapSolidOdPlates)[i],m_MapMaterials[string("Titanium")]);
849 pPhysObj=new GeoFullPhysVol(pLogObj);
850 sprintf(szLabel,"ODPlate[%02d][%d]",eRPName,i);
851 pPhysRPAir->add(new GeoNameTag(szLabel));
852 pPhysRPAir->add(pAlTransDetInRPMainPoint);
853 pPhysRPAir->add(new GeoTransform(GeoTrf::Translate3D(0.0*CLHEP::mm,-0.175*CLHEP::mm,(15+i*2)*CLHEP::mm)));
854 pPhysRPAir->add(pPhysObj);
855 }
856 //LogStream<<MSG::INFO<<"MARK9"<<endmsg;
857
858 //create OD Claddings & Fibers
859 ConstructODFiberCladdings(eRPName,pPhysRPAir,TransTot, pAlTransDetInRPMainPoint);
860 //LogStream<<MSG::INFO<<"MARK10"<<endmsg;
861
862 //store alignable transforms -----------------------------------------------------------------
863 sprintf(szLabel,"StRPBox[%02d]",eRPName);
864 pStPhysRPBox=new StoredPhysVol(pPhysRPBox);
865 sc=m_pDetectorStore->record(pStPhysRPBox,szLabel);
866 if(!sc.isSuccess()) throw std::runtime_error("Cannot store alignable record");
867
868 sprintf(szLabel,"AlTransRPBox[%02d]",eRPName);
869 pAlignX = new StoredAlignX(pAlTransRPBox);
870 sc=m_pDetectorStore->record(pAlignX,szLabel);
871 if(!sc.isSuccess()) throw std::runtime_error("Cannot store alignable record");
872
873 sprintf(szLabel,"AlTransDetInRPMainPoint[%02d]",eRPName);
874 pAlignX = new StoredAlignX(pAlTransDetInRPMainPoint);
875 sc=m_pDetectorStore->record(pAlignX,szLabel);
876 if(!sc.isSuccess()) throw std::runtime_error("Cannot store alignable record");
877 }
878
879 LogStream<<MSG::INFO<<"ALFA detector successfully created."<<endmsg;
880
882 {
883 SaveGeometry();
884 }
885
886 if(pMapSolidOdPlates) delete pMapSolidOdPlates;
887 if(pMapSolidTiPlates) delete pMapSolidTiPlates;
888}
@ EMT_METROLOGY
@ EMT_NOMINAL
static Double_t sc
void ConstructBeampipe(GeoPhysVol *pWorld)
void ConstructODFiberCladdings(const eRPotName eRPName, GeoFullPhysVol *pPhysMotherVolume, const HepGeom::Transform3D &MotherTransform, GeoAlignableTransform *pDetTransform)
void ConstructVFiberCladdings(const eRPotName eRPName, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, GeoAlignableTransform *pDetTransform)
void CreateAxes(GeoPhysVol *pMotherVolume)
bool ReadGeometry(bool bAlignCorrections=false)
void ConstructAlfaStations(std::map< eAStationName, ALFAPHYSVOLUME > *pmapActiveStations, GeoPhysVol *pWorld)
std::map< int, GeoShape * > * CreateSolidTiPlates()
void DefineMaterials(StoredMaterialManager *pMaterialManager)
std::list< eRPotName > m_ListExistingRPots
std::map< int, GeoShape * > * CreateSolidODPlates()
void ConstructUFiberCladdings(const eRPotName eRPName, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, GeoAlignableTransform *pDetTransform)
::StatusCode StatusCode
StatusCode definition for legacy code.
HepGeom::Transform3D RPTransformInStation
HepGeom::Transform3D DetTransformInMainPoint
eAStationName eASName

◆ CreateAxes()

void ALFA_DetectorFactory::CreateAxes ( GeoPhysVol * pMotherVolume)
private

Definition at line 377 of file ALFA_DetectorFactory.cxx.

378{
379 GeoBox* pSolBoxX = new GeoBox(500.0*CLHEP::mm,0.5*CLHEP::mm,0.5*CLHEP::mm);
380 GeoBox* pSolBoxY = new GeoBox(0.5*CLHEP::mm,1000.0*CLHEP::mm,0.5*CLHEP::mm);
381 GeoBox* pSolBoxZ = new GeoBox(0.5*CLHEP::mm,0.5*CLHEP::mm,250.0*CLHEP::mm);
382
383 GeoLogVol* pLogBoxX=new GeoLogVol("BoxX",pSolBoxX,m_MapMaterials[string("PMMA")]);
384 GeoLogVol* pLogBoxY=new GeoLogVol("BoxY",pSolBoxY,m_MapMaterials[string("PMMA")]);
385 GeoLogVol* pLogBoxZ=new GeoLogVol("BoxZ",pSolBoxZ,m_MapMaterials[string("PMMA")]);
386
387 GeoFullPhysVol* pPhysBoxX=new GeoFullPhysVol(pLogBoxX);
388 GeoFullPhysVol* pPhysBoxY=new GeoFullPhysVol(pLogBoxY);
389 GeoFullPhysVol* pPhysBoxZ=new GeoFullPhysVol(pLogBoxZ);
390
391 pMotherVolume->add(new GeoNameTag("BoxX"));
392 pMotherVolume->add(new GeoTransform(GeoTrf::Transform3D::Identity()));
393 pMotherVolume->add(pPhysBoxX);
394
395 pMotherVolume->add(new GeoNameTag("BoxY"));
396 pMotherVolume->add(new GeoTransform(GeoTrf::Transform3D::Identity()));
397 pMotherVolume->add(pPhysBoxY);
398
399 pMotherVolume->add(new GeoNameTag("BoxZ"));
400 pMotherVolume->add(new GeoTransform(GeoTrf::Transform3D::Identity()));
401 pMotherVolume->add(pPhysBoxZ);
402
403 //helper box
404 /*
405 GeoBox* pSolBox = new GeoBox(5.0*CLHEP::mm,5.0*CLHEP::mm,5.0*CLHEP::mm);
406 GeoLogVol* pLogBox=new GeoLogVol("Box",pSolBox,MapMaterials[string("PMMA")]);
407 GeoFullPhysVol* pPhysBox=new GeoFullPhysVol(pLogBox);
408 pMotherVolume->add(new GeoNameTag("Box"));
409 pMotherVolume->add(new GeoTransform(HepGeom::Translate3D(50.0*CLHEP::mm, 0, 0)));
410 pMotherVolume->add(pPhysBox);*/
411}

◆ CreateSolidAir()

GeoShape * ALFA_DetectorFactory::CreateSolidAir ( )
private

Definition at line 946 of file ALFA_DetectorFactory.cxx.

947{
948 GeoBox* RP_Airbox1 = new GeoBox(62*CLHEP::mm,27.825*CLHEP::mm,21*CLHEP::mm);
949 GeoBox* RP_Airbox2 = new GeoBox(62*CLHEP::mm,3.5*CLHEP::mm,21*CLHEP::mm);
950 GeoBox* RP_Airbox3 = new GeoBox(16.5*CLHEP::mm,0.925*CLHEP::mm,21*CLHEP::mm);
951 GeoBox* RP_Airbox4 = new GeoBox(20*CLHEP::mm,5.675*CLHEP::mm,6.5*CLHEP::mm);
952 GeoTube* RP_Airtube1 = new GeoTube(0*CLHEP::mm,69*CLHEP::mm,65.425*CLHEP::mm);
953
954 GeoTrf::Transform3D RP_Air_Move1= GeoTrf::Translate3D(0,31.325*CLHEP::mm, 0);
955 GeoShapeShift * mowe1 = new GeoShapeShift(RP_Airbox2,RP_Air_Move1);
956 GeoShapeUnion * RP_Airsemi1 = new GeoShapeUnion(RP_Airbox1, mowe1);
957
958 GeoTrf::Transform3D RP_Air_Move2= GeoTrf::Translate3D(0,-28.75*CLHEP::mm, 0);
959 GeoShapeShift * mowe2 = new GeoShapeShift(RP_Airbox3,RP_Air_Move2);
960 GeoShapeUnion * RP_Airsemi2 = new GeoShapeUnion(RP_Airsemi1, mowe2);
961
962 GeoTrf::Transform3D RP_Air_Move3= GeoTrf::Translate3D( 38.5*CLHEP::mm,-33.5*CLHEP::mm,14.5*CLHEP::mm);
963 GeoShapeShift * mowe3 = new GeoShapeShift(RP_Airbox4,RP_Air_Move3);
964 GeoShapeUnion * RP_Airsemi3 = new GeoShapeUnion(RP_Airsemi2, mowe3);
965
966 GeoTrf::Transform3D RP_Air_Move4= GeoTrf::Translate3D(-38.5*CLHEP::mm,-33.5*CLHEP::mm,14.5*CLHEP::mm);
967 GeoShapeShift * mowe4 = new GeoShapeShift(RP_Airbox4,RP_Air_Move4);
968 GeoShapeUnion * RP_Airsemi4 = new GeoShapeUnion(RP_Airsemi3, mowe4);
969
970 GeoTrf::Transform3D RP_Air_MoveRot5= GeoTrf::Translate3D(0*CLHEP::mm,100.25*CLHEP::mm, -8.5*CLHEP::mm)*GeoTrf::RotateX3D(90*CLHEP::deg);
971 GeoShapeShift * mowe5 = new GeoShapeShift(RP_Airtube1,RP_Air_MoveRot5);
972 GeoShapeUnion * shapeRP_Air = new GeoShapeUnion(RP_Airsemi4, mowe5);
973
974 return shapeRP_Air;
975}

◆ CreateSolidG10Shapes()

GeoShape * ALFA_DetectorFactory::CreateSolidG10Shapes ( )
private

Definition at line 1024 of file ALFA_DetectorFactory.cxx.

1025{
1026 GeoTrd* G10trd1 = new GeoTrd( 15*CLHEP::mm, 17*CLHEP::mm, 0.15*CLHEP::mm, 0.15*CLHEP::mm, 1*CLHEP::mm);
1027 GeoTrd* G10trd2 = new GeoTrd( 30*CLHEP::mm, 9.5*CLHEP::mm, 0.15*CLHEP::mm, 0.15*CLHEP::mm, 10.25*CLHEP::mm);
1028 GeoBox* G10box1 = new GeoBox( 30*CLHEP::mm, 0.15*CLHEP::mm, 3.75*CLHEP::mm);
1029
1030 GeoTrf::Transform3D G10_Move1= GeoTrf::Translate3D(0, 0, 4.75*CLHEP::mm);
1031 GeoShapeShift* mowe1 = new GeoShapeShift(G10box1, G10_Move1);
1032 GeoShapeUnion* G10_Subsemi1 = new GeoShapeUnion(G10trd1, mowe1);
1033
1034 GeoTrf::Transform3D G10_Move2= GeoTrf::Translate3D(0, 0, 18.75*CLHEP::mm);
1035 GeoShapeShift* mowe2 = new GeoShapeShift(G10trd2, G10_Move2);
1036 GeoShapeUnion* shapeG10_Substrate = new GeoShapeUnion(G10_Subsemi1, mowe2);
1037
1038 return shapeG10_Substrate;
1039}

◆ CreateSolidODPlates()

map< int, GeoShape * > * ALFA_DetectorFactory::CreateSolidODPlates ( )
private

Definition at line 1074 of file ALFA_DetectorFactory.cxx.

1075{
1076 int i;
1077 std::map<int,GeoShape*>* pMapODPlates=new std::map<int,GeoShape*>();
1078
1079 GeoBox* OD_Tibox1 = new GeoBox(60*CLHEP::mm,38.65*CLHEP::mm,0.4*CLHEP::mm);
1080 GeoBox* OD_Tibox2 = new GeoBox(10*CLHEP::mm,36.5*CLHEP::mm,1*CLHEP::mm);
1081 GeoBox* OD_Tibox3 = new GeoBox(19*CLHEP::mm,21.5*CLHEP::mm,2*CLHEP::mm);
1082
1083 GeoTrf::Transform3D OD_Move01= GeoTrf::Translate3D(0, 75.15*CLHEP::mm, 0);
1084 GeoShapeShift * mowe01 = new GeoShapeShift(OD_Tibox2,OD_Move01);
1085 GeoShapeUnion * OD_Tisemi01 = new GeoShapeUnion(OD_Tibox1, mowe01);
1086
1087 GeoTrf::Transform3D OD_Move02= GeoTrf::Translate3D(0, -19.15*CLHEP::mm, 0);//(0, -29.383*CLHEP::mm, 0);
1088 GeoShapeShift * mowe02 = new GeoShapeShift(OD_Tibox3, OD_Move02);
1089 GeoShapeSubtraction * OD_Tisemi02 = new GeoShapeSubtraction(OD_Tisemi01, mowe02);
1090
1091 GeoBox* OD_Tibox5 = new GeoBox(60*CLHEP::mm,38.65*CLHEP::mm,0.3*CLHEP::mm);
1092
1093 GeoTube* OD_Titube1 = new GeoTube(22.5*CLHEP::mm,72.5*CLHEP::mm,0.6*CLHEP::mm);
1094 GeoBox* OD_Tibox6 = new GeoBox(72.5*CLHEP::mm,150*CLHEP::mm,1*CLHEP::mm);
1095 GeoBox* OD_Tibox7 = new GeoBox(150*CLHEP::mm,72.5*CLHEP::mm,1*CLHEP::mm);
1096
1097 GeoTrf::Transform3D OD_Move04 = GeoTrf::Translate3D(72.5*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm);
1098 GeoShapeShift * mowe04 = new GeoShapeShift(OD_Tibox6,OD_Move04);
1099 GeoShapeSubtraction * OD_Tisemi04 = new GeoShapeSubtraction(OD_Titube1, mowe04);
1100
1101 GeoTrf::Transform3D OD_Move05 = GeoTrf::Translate3D(0*CLHEP::mm, 72.5*CLHEP::mm, 0*CLHEP::mm);
1102 GeoShapeShift * mowe05 = new GeoShapeShift(OD_Tibox7,OD_Move05);
1103 GeoShapeSubtraction * OD_Tisemi05 = new GeoShapeSubtraction(OD_Tisemi04, mowe05);
1104
1105 GeoBox* OD_Tibox8 = new GeoBox(8.*CLHEP::mm,20.*CLHEP::mm,0.6*CLHEP::mm);
1106 GeoBox* OD_Tibox9 = new GeoBox(20.*CLHEP::mm,60.*CLHEP::mm,0.6*CLHEP::mm);
1107
1108 GeoTrf::Transform3D OD_Move06= GeoTrf::Translate3D(4*CLHEP::mm, -42.5*CLHEP::mm, 0.*CLHEP::mm);
1109 GeoShapeShift * mowe06 = new GeoShapeShift(OD_Tibox8,OD_Move06);
1110 GeoShapeUnion * OD_Tisemi06 = new GeoShapeUnion(OD_Tisemi05, mowe06);
1111
1112 GeoTrf::Transform3D OD_Move07= GeoTrf::Translate3D(-42.5*CLHEP::mm, 60*CLHEP::mm, 0.*CLHEP::mm);
1113 GeoShapeShift * mowe07 = new GeoShapeShift(OD_Tibox9,OD_Move07);
1114 GeoShapeUnion * OD_Tisemi07 = new GeoShapeUnion(OD_Tisemi06, mowe07);
1115
1116 for(i=0;i<OD_Nb_Plates;i++)
1117 {
1118 GeoTrf::Transform3D OD_Move08= GeoTrf::Translate3D(-27*CLHEP::mm, (-8.183+OD_stagger[i])*CLHEP::mm, 0);//(0, -29.383*CLHEP::mm, 0);
1119 GeoShapeShift * mowe08 = new GeoShapeShift(OD_Tisemi07, OD_Move08);
1120 GeoShapeSubtraction * OD_Tisemi08 = new GeoShapeSubtraction(OD_Tibox5, mowe08);
1121
1122 GeoTrf::Transform3D OD_Move09= GeoTrf::Translate3D(27*CLHEP::mm, (-8.183+OD_stagger[i])*CLHEP::mm, 0)*GeoTrf::RotateY3D(180*CLHEP::deg);
1123 GeoShapeShift * mowe09 = new GeoShapeShift(OD_Tisemi07, OD_Move09);
1124 GeoShapeSubtraction * OD_Tisemi09 = new GeoShapeSubtraction(OD_Tisemi08, mowe09);
1125
1126 GeoTrf::Transform3D OD_Move11= GeoTrf::Translate3D(-27*CLHEP::mm, (-0.383+OD_stagger[i])*CLHEP::mm, 0);//(0, -29.383*CLHEP::mm, 0);
1127 GeoShapeShift * mowe11 = new GeoShapeShift(OD_Tisemi07, OD_Move11);
1128 GeoShapeSubtraction * OD_Tisemi11 = new GeoShapeSubtraction(OD_Tibox5, mowe11);
1129
1130 GeoTrf::Transform3D OD_Move12= GeoTrf::Translate3D(27*CLHEP::mm, (-0.383+OD_stagger[i])*CLHEP::mm, 0)*GeoTrf::RotateY3D(180*CLHEP::deg);
1131 GeoShapeShift * mowe12 = new GeoShapeShift(OD_Tisemi07, OD_Move12);
1132 GeoShapeSubtraction * OD_Tisemi12 = new GeoShapeSubtraction(OD_Tisemi11, mowe12);
1133
1134 GeoTrf::Transform3D OD_Move14= GeoTrf::Translate3D(0*CLHEP::mm, 0*CLHEP::mm, 0.7*CLHEP::mm);
1135 GeoShapeShift * mowe14 = new GeoShapeShift(OD_Tisemi09,OD_Move14);
1136 GeoShapeUnion * OD_Tisemi14 = new GeoShapeUnion(OD_Tisemi02, mowe14);
1137
1138 GeoTrf::Transform3D OD_Move15= GeoTrf::Translate3D(0*CLHEP::mm, 0*CLHEP::mm,-0.7*CLHEP::mm);
1139 GeoShapeShift * mowe15 = new GeoShapeShift(OD_Tisemi12,OD_Move15);
1140 GeoShapeUnion * OD_Tisemi15 = new GeoShapeUnion(OD_Tisemi14, mowe15);
1141
1142 GeoTrf::Transform3D OD_Move16 = GeoTrf::Translate3D(0, -19.15*CLHEP::mm, 0);
1143 GeoShapeShift * mowe16 = new GeoShapeShift(OD_Tibox3, OD_Move16);
1144 GeoShapeSubtraction * shapeOD_TiPlate = new GeoShapeSubtraction(OD_Tisemi15, mowe16);
1145
1146 pMapODPlates->insert(std::pair<int,GeoShape*>(i,shapeOD_TiPlate));
1147 }
1148
1149 return pMapODPlates;
1150}
const int OD_Nb_Plates

◆ CreateSolidRP()

GeoShape * ALFA_DetectorFactory::CreateSolidRP ( )
private

Definition at line 893 of file ALFA_DetectorFactory.cxx.

894{
895 GeoBox* RPbox1 = new GeoBox(64*CLHEP::mm,29.825*CLHEP::mm,23*CLHEP::mm);
896 GeoBox* RPbox2 = new GeoBox(21*CLHEP::mm,5.425*CLHEP::mm,7.5*CLHEP::mm);
897 GeoBox* RPbox3 = new GeoBox(22*CLHEP::mm,1*CLHEP::mm,8.5*CLHEP::mm);
898
899 GeoTrf::Transform3D RP_Move1= GeoTrf::Translate3D(0, 4.425*CLHEP::mm, 0);
900 GeoShapeShift * mowe1 = new GeoShapeShift(RPbox3,RP_Move1);
901 GeoShapeUnion * RPsemi1 = new GeoShapeUnion(RPbox2, mowe1);
902
903 GeoTrf::Transform3D RP_Move2= GeoTrf::Translate3D( 38.5*CLHEP::mm, -35.25*CLHEP::mm, 14.5*CLHEP::mm);
904 GeoShapeShift * mowe2 = new GeoShapeShift(RPsemi1,RP_Move2);
905 GeoShapeUnion * RPsemi2 = new GeoShapeUnion(RPbox1, mowe2);
906
907 GeoTrf::Transform3D RP_Move3= GeoTrf::Translate3D(-38.5*CLHEP::mm, -35.25*CLHEP::mm, 14.5*CLHEP::mm);
908 GeoShapeShift * mowe3 = new GeoShapeShift(RPsemi1,RP_Move3);
909 GeoShapeUnion * RPsemi3 = new GeoShapeUnion(RPsemi2, mowe3);
910
911 GeoTube* RPtube1 = new GeoTube(0*CLHEP::mm,74*CLHEP::mm,26.675*CLHEP::mm);
912 GeoTube* RPtube2 = new GeoTube(0*CLHEP::mm,126.5*CLHEP::mm,9.875*CLHEP::mm);
913
914 GeoTrf::Transform3D RP_Move4= GeoTrf::Translate3D(0*CLHEP::mm, 0*CLHEP::mm, -36.55*CLHEP::mm);
915 GeoShapeShift * mowe4 = new GeoShapeShift(RPtube2,RP_Move4);
916 GeoShapeUnion * RPsemi4 = new GeoShapeUnion(RPtube1, mowe4);
917
918 GeoBox* RPbox4 = new GeoBox(104*CLHEP::mm,104*CLHEP::mm,9.875*CLHEP::mm);
919 GeoBox* RPbox5 = new GeoBox(131.75*CLHEP::mm,131.75*CLHEP::mm,22.5*CLHEP::mm);
920
921 GeoTrf::Transform3D RP_Move5= GeoTrf::Translate3D(0*CLHEP::mm, 0*CLHEP::mm, -56.3*CLHEP::mm);
922 GeoShapeShift * mowe5 = new GeoShapeShift(RPbox4,RP_Move5);
923 GeoShapeUnion * RPsemi5 = new GeoShapeUnion(RPsemi4, mowe5);
924
925 GeoTrf::Transform3D RP_Move6= GeoTrf::Translate3D(0*CLHEP::mm, 0*CLHEP::mm, -88.675*CLHEP::mm);
926 GeoShapeShift * mowe6 = new GeoShapeShift(RPbox5,RP_Move6);
927 GeoShapeUnion * RPsemi6 = new GeoShapeUnion(RPsemi5, mowe6);
928
929 GeoTrf::Transform3D RP_MoveRot7= GeoTrf::Translate3D(0*CLHEP::mm, 56.5*CLHEP::mm, -8.5*CLHEP::mm)*GeoTrf::RotateX3D(90*CLHEP::deg);
930 GeoShapeShift * mowe7 = new GeoShapeShift(RPsemi6,RP_MoveRot7);
931 GeoShapeUnion * RPsemi7 = new GeoShapeUnion(RPsemi3, mowe7);
932
933 GeoBox* RPbox6 = new GeoBox(16.97*CLHEP::mm,16.97*CLHEP::mm,0.75*CLHEP::mm);
934
935 GeoTrf::Transform3D RP_MoveRot8= GeoTrf::Translate3D(0*CLHEP::mm, -21.525*CLHEP::mm, 22.25*CLHEP::mm)*GeoTrf::RotateZ3D(45*CLHEP::deg);
936 GeoShapeShift * mowe8 = new GeoShapeShift(RPbox6,RP_MoveRot8);
937 GeoShapeSubtraction * RPsemi8 = new GeoShapeSubtraction(RPsemi7, mowe8);
938
939 GeoTrf::Transform3D RP_MoveRot9= GeoTrf::Translate3D(0*CLHEP::mm, -21.525*CLHEP::mm, -22.25*CLHEP::mm)*GeoTrf::RotateZ3D(45*CLHEP::deg);
940 GeoShapeShift * mowe9 = new GeoShapeShift(RPbox6,RP_MoveRot9);
941 GeoShapeSubtraction * shapeRP = new GeoShapeSubtraction(RPsemi8, mowe9);
942
943 return shapeRP;
944}

◆ CreateSolidRPSupport()

GeoShape * ALFA_DetectorFactory::CreateSolidRPSupport ( )
private

Definition at line 1002 of file ALFA_DetectorFactory.cxx.

1003{
1004 GeoBox* RP_Supbox1 = new GeoBox(10*CLHEP::mm,33*CLHEP::mm,10*CLHEP::mm);
1005 GeoBox* RP_Supbox2 = new GeoBox( 6*CLHEP::mm, 9*CLHEP::mm,15*CLHEP::mm);
1006 GeoBox* RP_Supbox3 = new GeoBox(18*CLHEP::mm, 5*CLHEP::mm,18*CLHEP::mm);
1007 GeoBox* RP_Supbox4 = new GeoBox(18*CLHEP::mm,3.5*CLHEP::mm,18*CLHEP::mm);
1008
1009 GeoTrf::Transform3D RP_Sup_Move1= GeoTrf::Translate3D(0, 42*CLHEP::mm, 8*CLHEP::mm);
1010 GeoShapeShift * mowe1 = new GeoShapeShift(RP_Supbox2, RP_Sup_Move1);
1011 GeoShapeUnion * RP_Supsemi1 = new GeoShapeUnion(RP_Supbox1, mowe1);
1012
1013 GeoTrf::Transform3D RP_Sup_Move2= GeoTrf::Translate3D(0, 56*CLHEP::mm, 20*CLHEP::mm);
1014 GeoShapeShift * mowe2 = new GeoShapeShift(RP_Supbox3, RP_Sup_Move2);
1015 GeoShapeUnion * RP_Supsemi2 = new GeoShapeUnion(RP_Supsemi1, mowe2);
1016
1017 GeoTrf::Transform3D RP_Sup_Move3= GeoTrf::Translate3D(0, 64.5*CLHEP::mm, 20*CLHEP::mm);
1018 GeoShapeShift * mowe3 = new GeoShapeShift(RP_Supbox4, RP_Sup_Move3);
1019 GeoShapeUnion * shapeRP_Support = new GeoShapeUnion(RP_Supsemi2, mowe3);
1020
1021 return shapeRP_Support;
1022}

◆ CreateSolidTiPlates()

map< int, GeoShape * > * ALFA_DetectorFactory::CreateSolidTiPlates ( )
private

Definition at line 1041 of file ALFA_DetectorFactory.cxx.

1042{
1043 int i;
1044 std::map<int,GeoShape*>* pMapTiPlates=new std::map<int,GeoShape*>();
1045
1046 GeoBox* TiPlate_Holder = new GeoBox(10*CLHEP::mm,36.5*CLHEP::mm,1*CLHEP::mm);
1047 GeoBox* TiPlate_Substr = new GeoBox(50*CLHEP::mm,32.5*CLHEP::mm,1*CLHEP::mm);
1048 GeoBox* TiPlate_box1 = new GeoBox(16*CLHEP::mm,120*CLHEP::mm,0.75*CLHEP::mm);
1049 GeoBox* TiPlate_box2 = new GeoBox(19.9793*CLHEP::mm,19.9793*CLHEP::mm,2*CLHEP::mm);
1050
1051 GeoTrf::Transform3D TiPlate_Move1= GeoTrf::Translate3D(0, 69*CLHEP::mm, 0);
1052 GeoShapeShift * mowe1 = new GeoShapeShift(TiPlate_Holder,TiPlate_Move1);
1053 GeoShapeUnion * TiPlatesemi1 = new GeoShapeUnion(TiPlate_Substr, mowe1);
1054
1055 for(i=0; i<ALFA_Nb_Plates; i++){
1056 GeoTrf::Transform3D TiPlate_MoveRot2 = GeoTrf::Translate3D(ALFA_stagger[i]*CLHEP::mm, -26.872*CLHEP::mm, 1*CLHEP::mm)*GeoTrf::RotateZ3D( 45*CLHEP::deg);
1057 GeoTrf::Transform3D TiPlate_MoveRot3 = GeoTrf::Translate3D(ALFA_stagger[i]*CLHEP::mm, -26.872*CLHEP::mm,-1*CLHEP::mm)*GeoTrf::RotateZ3D(-45*CLHEP::deg);
1058
1059 GeoShapeShift * mowe2 = new GeoShapeShift(TiPlate_box1, TiPlate_MoveRot2);
1060 GeoShapeShift * mowe3 = new GeoShapeShift(TiPlate_box1, TiPlate_MoveRot3);
1061 GeoShapeSubtraction * TiPlatesemi2 = new GeoShapeSubtraction(TiPlatesemi1,mowe2);
1062 GeoShapeSubtraction * TiPlatesemi3 = new GeoShapeSubtraction(TiPlatesemi2,mowe3);
1063
1064 GeoTrf::Transform3D TiPlate_MoveRot4 = GeoTrf::Translate3D(ALFA_stagger[i]*CLHEP::mm, -32.5*CLHEP::mm,0*CLHEP::mm)*GeoTrf::RotateZ3D(-45*CLHEP::deg);
1065 GeoShapeShift * mowe4 = new GeoShapeShift(TiPlate_box2, TiPlate_MoveRot4);
1066 GeoShapeSubtraction* shapeTi_Plate = new GeoShapeSubtraction(TiPlatesemi3, mowe4);
1067
1068 pMapTiPlates->insert(std::pair<int,GeoShape*>(i,shapeTi_Plate));
1069 }
1070
1071 return pMapTiPlates;
1072}
const int ALFA_Nb_Plates

◆ CreateSolidTrigger()

GeoShape * ALFA_DetectorFactory::CreateSolidTrigger ( )
private

Definition at line 977 of file ALFA_DetectorFactory.cxx.

978{
979 GeoBox* ALFA_Trigbox1 = new GeoBox(15.75*CLHEP::mm,15.75*CLHEP::mm,1.5*CLHEP::mm);
980 GeoBox* ALFA_Trigbox2 = new GeoBox(15.75*CLHEP::mm,15.75*CLHEP::mm,3*CLHEP::mm);
981 GeoBox* ALFA_Trigbox3 = new GeoBox(3*CLHEP::mm,7.5*CLHEP::mm,1.5*CLHEP::mm);
982
983 GeoTrf::Transform3D ALFA_Trig_MoveRot1= GeoTrf::Translate3D(17.235*CLHEP::mm, -17.235*CLHEP::mm, 0*CLHEP::mm)*GeoTrf::RotateZ3D(45*CLHEP::deg);
984 GeoShapeShift * mowe1 = new GeoShapeShift(ALFA_Trigbox2, ALFA_Trig_MoveRot1);
985 GeoShapeSubtraction * ALFA_Trigsemi1 = new GeoShapeSubtraction(ALFA_Trigbox1, mowe1);
986
987 GeoTrf::Transform3D ALFA_Trig_Move2= GeoTrf::Translate3D(0*CLHEP::mm,0*CLHEP::mm, 3.5*CLHEP::mm);
988 GeoShapeShift * mowe2 = new GeoShapeShift(ALFA_Trigsemi1,ALFA_Trig_Move2);
989 GeoShapeUnion * ALFA_Trigsemi2 = new GeoShapeUnion(ALFA_Trigsemi1, mowe2);
990
991 GeoTrf::Transform3D ALFA_Trig_Move3= GeoTrf::Translate3D(44*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm);
992 GeoShapeShift * mowe3 = new GeoShapeShift(ALFA_Trigbox3,ALFA_Trig_Move3);
993 GeoShapeUnion * ALFA_Trigsemi3 = new GeoShapeUnion(ALFA_Trigbox3, mowe3);
994
995 GeoTrf::Transform3D ALFA_Trig_MoveRot4= GeoTrf::Translate3D(22*CLHEP::mm, 10.424*CLHEP::mm, -7.6*CLHEP::mm)*GeoTrf::RotateZ3D(-45*CLHEP::deg);
996 GeoShapeShift * mowe4 = new GeoShapeShift(ALFA_Trigsemi2,ALFA_Trig_MoveRot4);
997 GeoShapeUnion * shapeALFA_Trigger = new GeoShapeUnion(ALFA_Trigsemi3, mowe4);
998
999 return shapeALFA_Trigger;
1000}

◆ DefineMaterials()

void ALFA_DetectorFactory::DefineMaterials ( StoredMaterialManager * pMaterialManager)
private

Definition at line 220 of file ALFA_DetectorFactory.cxx.

221{
222 string MatName;
223 GeoMaterial* pMaterial;
224
225 //--------- Material definition ---------
226
227 double aH,aB,aC,aN,aO,aNa,aMg,aAl,aSi,aP,aS,aK,aCa,aTi,aCr,aMn,aFe,aNi,aMo,Atot;
228
229 const GeoElement* H = pMaterialManager->getElement("Hydrogen");
230 const GeoElement* B = pMaterialManager->getElement("Boron");
231 const GeoElement* C = pMaterialManager->getElement("Carbon");
232 const GeoElement* N = pMaterialManager->getElement("Nitrogen");
233 const GeoElement* O = pMaterialManager->getElement("Oxygen");
234 const GeoElement* Na = pMaterialManager->getElement("Sodium");
235 const GeoElement* Mg = pMaterialManager->getElement("Magnesium");
236 const GeoElement* Al = pMaterialManager->getElement("Aluminium");
237 const GeoElement* Si = pMaterialManager->getElement("Silicon");
238 const GeoElement* P = pMaterialManager->getElement("Phosphorus");
239 const GeoElement* S = pMaterialManager->getElement("Sulfur");
240 const GeoElement* K = pMaterialManager->getElement("Potassium");
241 const GeoElement* Ca = pMaterialManager->getElement("Calcium");
242 const GeoElement* Ti = pMaterialManager->getElement("Titanium");
243 const GeoElement* Cr = pMaterialManager->getElement("Chromium");
244 const GeoElement* Mn = pMaterialManager->getElement("Manganese");
245 const GeoElement* Fe = pMaterialManager->getElement("Iron");
246 const GeoElement* Ni = pMaterialManager->getElement("Nickel");
247 const GeoElement* Mo = pMaterialManager->getElement("Molybdenum");
248
249 // Steel Grade 316L (Roman Pot)
250 MatName="Steel";
251 pMaterial=new GeoMaterial(MatName, 8*CLHEP::g/CLHEP::cm3);
252
253 aFe=62.045*Fe->getA()/(CLHEP::g/CLHEP::mole);
254 aC =0.03*C ->getA()/(CLHEP::g/CLHEP::mole);
255 aMn=2.0*Mn ->getA()/(CLHEP::g/CLHEP::mole);
256 aSi=0.75*Si->getA()/(CLHEP::g/CLHEP::mole);
257 aP =0.045*P->getA()/(CLHEP::g/CLHEP::mole);
258 aS =0.03*S ->getA()/(CLHEP::g/CLHEP::mole);
259 aCr=18.0*Cr->getA()/(CLHEP::g/CLHEP::mole);
260 aMo=3.0*Mo ->getA()/(CLHEP::g/CLHEP::mole);
261 aNi=14.0*Ni->getA()/(CLHEP::g/CLHEP::mole);
262 aN =0.10*N ->getA()/(CLHEP::g/CLHEP::mole);
263 Atot=aFe+aC+aMn+aSi+aP+aS+aCr+aMo+aNi+aN;
264
265 pMaterial->add(const_cast<GeoElement*> (Fe),aFe/Atot);
266 pMaterial->add(const_cast<GeoElement*> (C), aC/Atot);
267 pMaterial->add(const_cast<GeoElement*> (Mn),aMn/Atot);
268 pMaterial->add(const_cast<GeoElement*> (Si),aSi/Atot);
269 pMaterial->add(const_cast<GeoElement*> (P), aP/Atot);
270 pMaterial->add(const_cast<GeoElement*> (S), aS/Atot);
271 pMaterial->add(const_cast<GeoElement*> (Cr),aCr/Atot);
272 pMaterial->add(const_cast<GeoElement*> (Mo),aMo/Atot);
273 pMaterial->add(const_cast<GeoElement*> (Ni),aNi/Atot);
274 pMaterial->add(const_cast<GeoElement*> (N), aN/Atot);
275 pMaterial->lock();
276 m_MapMaterials.insert(pair<string,GeoMaterial*>(MatName,pMaterial));
277
278 // Titanium 100% (Plates)
279 MatName="Titanium";
280 pMaterial=new GeoMaterial(MatName, 4.506*CLHEP::g/CLHEP::cm3);
281
282 aTi=Ti->getA()/(CLHEP::g/CLHEP::mole);
283 pMaterial->add(const_cast<GeoElement*> (Ti), 1);
284 pMaterial->lock();
285 m_MapMaterials.insert(pair<string,GeoMaterial*>(MatName,pMaterial));
286
287 // PVT - Polyvinyltoluene - BC408 (Trigger)
288 MatName="PVT";
289 pMaterial=new GeoMaterial(MatName, 1.032*CLHEP::g/CLHEP::cm3);
290
291 aH=52.5*H->getA()/(CLHEP::g/CLHEP::mole);
292 aC=47.5*C->getA()/(CLHEP::g/CLHEP::mole);
293 Atot=aH+aC;
294
295 pMaterial->add(const_cast<GeoElement*> (H), aH/Atot);
296 pMaterial->add(const_cast<GeoElement*> (C), aC/Atot);
297 pMaterial->lock();
298 m_MapMaterials.insert(pair<string,GeoMaterial*>(MatName,pMaterial));
299
300 // Isola DE156 - G10 material
301 // resin matrix: 22% C, 12% O, 3% H, 3.5% Al, 1% P, 0.5% N
302 // reinforcement; 2% B, 8% Ca, 4% Al, 15% Si, 1% Mg, <1% Na/K, <0.5% Ti, <0.2% Fe, 27% O
303 MatName="G10";
304 pMaterial=new GeoMaterial(MatName, 1.8*CLHEP::g/CLHEP::cm3);
305
306 aH =.03* H ->getA()/(CLHEP::g/CLHEP::mole);
307 aB =.02* B ->getA()/(CLHEP::g/CLHEP::mole);
308 aC =.22* C ->getA()/(CLHEP::g/CLHEP::mole);
309 aN =.005*N ->getA()/(CLHEP::g/CLHEP::mole);
310 aO =.39* O ->getA()/(CLHEP::g/CLHEP::mole);
311 aNa=.002*Na->getA()/(CLHEP::g/CLHEP::mole);
312 aMg=.01* Mg->getA()/(CLHEP::g/CLHEP::mole);
313 aAl=.075*Al->getA()/(CLHEP::g/CLHEP::mole);
314 aSi=.15* Si->getA()/(CLHEP::g/CLHEP::mole);
315 aP =.01* P ->getA()/(CLHEP::g/CLHEP::mole);
316 aK =.002*K ->getA()/(CLHEP::g/CLHEP::mole);
317 aCa=.08* Ca->getA()/(CLHEP::g/CLHEP::mole);
318 aTi=.004*Ti->getA()/(CLHEP::g/CLHEP::mole);
319 aFe=.002*Fe->getA()/(CLHEP::g/CLHEP::mole);
320 Atot=aH+aB+aC+aN+aO+aNa+aMg+aAl+aSi+aP+aK+aCa+aTi+aFe;
321
322 pMaterial->add(const_cast<GeoElement*> (H), aH/Atot);
323 pMaterial->add(const_cast<GeoElement*> (B), aB/Atot);
324 pMaterial->add(const_cast<GeoElement*> (C), aC/Atot);
325 pMaterial->add(const_cast<GeoElement*> (N), aN/Atot);
326 pMaterial->add(const_cast<GeoElement*> (O), aO/Atot);
327 pMaterial->add(const_cast<GeoElement*> (Na),aNa/Atot);
328 pMaterial->add(const_cast<GeoElement*> (Mg),aMg/Atot);
329 pMaterial->add(const_cast<GeoElement*> (Al),aAl/Atot);
330 pMaterial->add(const_cast<GeoElement*> (Si),aSi/Atot);
331 pMaterial->add(const_cast<GeoElement*> (P), aP/Atot);
332 pMaterial->add(const_cast<GeoElement*> (K), aK/Atot);
333 pMaterial->add(const_cast<GeoElement*> (Ca),aCa/Atot);
334 pMaterial->add(const_cast<GeoElement*> (Ti),aTi/Atot);
335 pMaterial->add(const_cast<GeoElement*> (Fe),aFe/Atot);
336 pMaterial->lock();
337 m_MapMaterials.insert(pair<string,GeoMaterial*>(MatName,pMaterial));
338
339 // Polystyrene (Fiber Core) - (C8H9)n
340 MatName="Polystyrene";
341 pMaterial=new GeoMaterial(MatName, 1.05*CLHEP::g/CLHEP::cm3);
342
343 aH=9*H->getA()/(CLHEP::g/CLHEP::mole);
344 aC=8*C->getA()/(CLHEP::g/CLHEP::mole);
345 Atot=aH+aC;
346
347 pMaterial->add(const_cast<GeoElement*> (H), aH/Atot);
348 pMaterial->add(const_cast<GeoElement*> (C), aC/Atot);
349 pMaterial->lock();
350 m_MapMaterials.insert(pair<string,GeoMaterial*>(MatName,pMaterial));
351
352 // PMMA (Cladding) - (C5O2H8)n
353 MatName="PMMA";
354 pMaterial=new GeoMaterial(MatName, 1.19*CLHEP::g/CLHEP::cm3);
355
356 aH=8*H->getA()/(CLHEP::g/CLHEP::mole);
357 aC=5*C->getA()/(CLHEP::g/CLHEP::mole);
358 aO=2*O->getA()/(CLHEP::g/CLHEP::mole);
359 Atot=aC+aH+aO;
360
361 pMaterial->add(const_cast<GeoElement*> (H), aH/Atot);
362 pMaterial->add(const_cast<GeoElement*> (C), aC/Atot);
363 pMaterial->add(const_cast<GeoElement*> (O), aO/Atot);
364 pMaterial->lock();
365 m_MapMaterials.insert(pair<string,GeoMaterial*>(MatName,pMaterial));
366
367 // std::AIR
368 MatName="std::Air";
369 m_MapMaterials.emplace(MatName,pMaterialManager->getMaterial(MatName));
370
371 // std::Vacuum
372 MatName="std::Vacuum";
373 m_MapMaterials.emplace(MatName,pMaterialManager->getMaterial(MatName));
374
375}
static Double_t P(Double_t *tt, Double_t *par)
#define H(x, y, z)
Definition MD5.cxx:114
virtual const GeoElement * getElement(const std::string &name)=0
virtual const GeoMaterial * getMaterial(const std::string &name)=0
struct color C

◆ getDetectorManager()

virtual const ALFA_DetectorManager * ALFA_DetectorFactory::getDetectorManager ( ) const
inlinevirtual

Definition at line 97 of file ALFA_DetectorFactory.h.

97{ return m_pDetectorManager; }

◆ operator=()

const ALFA_DetectorFactory & ALFA_DetectorFactory::operator= ( const ALFA_DetectorFactory & right)
private

◆ Point3DInDetector()

HepGeom::Point3D< double > ALFA_DetectorFactory::Point3DInDetector ( eRPotName eRPName)
private

Definition at line 1860 of file ALFA_DetectorFactory.cxx.

1861{
1862 MsgStream LogStream(Athena::getMessageSvc(), "ALFA_DetectorFactory::Point3DInDetector(eRPotName eRPName)");
1863 HepGeom::Point3D<double> Point;
1864
1865 switch(eRPName)
1866 {
1867 case ERPN_B7L1U:
1868 Point = HepGeom::Point3D<double>(m_Config.pointTransformInDetectorB7L1U[0], m_Config.pointTransformInDetectorB7L1U[1], m_Config.pointTransformInDetectorB7L1U[2]);
1869 break;
1870 case ERPN_B7L1L:
1871 Point = HepGeom::Point3D<double>(m_Config.pointTransformInDetectorB7L1L[0], m_Config.pointTransformInDetectorB7L1L[1], m_Config.pointTransformInDetectorB7L1L[2]);
1872 break;
1873 case ERPN_A7L1U:
1874 Point = HepGeom::Point3D<double>(m_Config.pointTransformInDetectorA7L1U[0], m_Config.pointTransformInDetectorA7L1U[1], m_Config.pointTransformInDetectorA7L1U[2]);
1875 break;
1876 case ERPN_A7L1L:
1877 Point = HepGeom::Point3D<double>(m_Config.pointTransformInDetectorA7L1L[0], m_Config.pointTransformInDetectorA7L1L[1], m_Config.pointTransformInDetectorA7L1L[2]);
1878 break;
1879 case ERPN_A7R1U:
1880 Point = HepGeom::Point3D<double>(m_Config.pointTransformInDetectorA7R1U[0], m_Config.pointTransformInDetectorA7R1U[1], m_Config.pointTransformInDetectorA7R1U[2]);
1881 break;
1882 case ERPN_A7R1L:
1883 Point = HepGeom::Point3D<double>(m_Config.pointTransformInDetectorA7R1L[0], m_Config.pointTransformInDetectorA7R1L[1], m_Config.pointTransformInDetectorA7R1L[2]);
1884 break;
1885 case ERPN_B7R1U:
1886 Point = HepGeom::Point3D<double>(m_Config.pointTransformInDetectorB7R1U[0], m_Config.pointTransformInDetectorB7R1U[1], m_Config.pointTransformInDetectorB7R1U[2]);
1887 break;
1888 case ERPN_B7R1L:
1889 Point = HepGeom::Point3D<double>(m_Config.pointTransformInDetectorB7R1L[0], m_Config.pointTransformInDetectorB7R1L[1], m_Config.pointTransformInDetectorB7R1L[2]);
1890 break;
1891 default:
1892 LogStream << MSG::WARNING << "Unknown Roman pot, transformation point will be set to default (zero) value" << endmsg;
1893 }
1894
1895 return Point;
1896}
@ ERPN_B7L1L
@ ERPN_A7L1L
@ ERPN_B7R1L
@ ERPN_B7L1U
@ ERPN_A7R1L
@ ERPN_B7R1U
@ ERPN_A7L1U
@ ERPN_A7R1U
ChargedTracksWeightFilter::Spline::Point Point

◆ ReadGeometry()

bool ALFA_DetectorFactory::ReadGeometry ( bool bAlignCorrections = false)

!!

Definition at line 105 of file ALFA_DetectorFactory.cxx.

106{
107 MsgStream LogStream(Athena::getMessageSvc(), "ALFA_DetectorFactory::ReadGeometry");
108
109 bool bRes=false;
110 list<eRPotName>::const_iterator iterRPName;
111
112 m_pGeoReader=std::make_unique<ALFA_GeometryReader>();
113
114 //first we need to setup to zero positions for SWCORRECTIONS
116 if(bAlignCorrections) m_Config.GeometryConfig.eRPMetrologyGeoType=EMT_SWCORRECTIONS;
117 else m_Config.GeometryConfig.eRPMetrologyGeoType=EMT_UNDEFINED;
118 }
120 for(int i=0;i<RPOTSCNT;i++){
121 eRPotName eRPName = (eRPotName)(i+1);
122 if(m_Config.bIsTransformInDetector[i]==true){
123 m_Config.GeometryConfig.CfgRPosParams[i].usercorr.bIsEnabledUserTranform=true;
124 m_Config.GeometryConfig.CfgRPosParams[i].usercorr.UserOriginOfDetTransInRPot=Point3DInDetector(eRPName);
125 m_Config.GeometryConfig.CfgRPosParams[i].usercorr.UserTransformOfDetInRPot=UserTransformInDetector(eRPName);
126 }
127 if(m_Config.bIsTransformInStation[i]==true){
128 m_Config.GeometryConfig.CfgRPosParams[i].usercorr.bIsEnabledUserTranform=true;
129 m_Config.GeometryConfig.CfgRPosParams[i].usercorr.UserTransformOfRPInStation=UserTransformInStation(eRPName);
130 }
131 }
132 }
133
134 if((bRes=m_pGeoReader->Initialize(&m_Config.GeometryConfig,EFCS_CLADDING))==true){
135 LogStream<<MSG::INFO<<"Geometry successfully initialized"<<endmsg;
136 m_pGeoReader->GetListOfExistingRPotIDs(&m_ListExistingRPots);
137 }
138 else
139 {
140 bRes=false;
141 LogStream<<MSG::FATAL<<"Cannot initialize geometry"<<endmsg;
142 throw GaudiException(" Could not load geometry ", "ALFA_DetectorFactory::ReadGeometry", StatusCode::FAILURE);
143 }
144
145 if(m_eRequestedMetrologyType==EMT_SWCORRECTIONS || bAlignCorrections==true){
146 SaveGeometry();
147 }
148
149 return bRes;
150}
#define RPOTSCNT
@ EFCS_CLADDING
@ EMT_SWCORRECTIONS
@ EMT_UNDEFINED
HepGeom::Transform3D UserTransformInDetector(eRPotName eRPName)
HepGeom::Transform3D UserTransformInStation(eRPotName eRPName)
HepGeom::Point3D< double > Point3DInDetector(eRPotName eRPName)

◆ SaveGeometry()

void ALFA_DetectorFactory::SaveGeometry ( )
private

Definition at line 152 of file ALFA_DetectorFactory.cxx.

153{
154 eGeoSourceType eGeoType;
155 char szFilename[64];
156 char szPrefix[8];
157 MsgStream LogStream(Athena::getMessageSvc(), "ALFA_DetectorFactory::SaveGeometry");
158
159 for (const eRPotName& eRPName : m_ListExistingRPots)
160 {
162 //MD fibers
163 eGeoType=m_pGeoReader->GetRPGeometryType(eRPName,EFT_FIBERMD);
164 if(eGeoType!=EGST_UNDEFINED){
165 switch(eGeoType){
167 strcpy(szPrefix,"ideal");
168 break;
169 case EGST_FILE:
170 strcpy(szPrefix,"real");
171 break;
172 case EGST_DATABASE:
173 strcpy(szPrefix,"realdb");
174 break;
175 default:
176 strcpy(szPrefix,"");
177 break;
178 }
179 sprintf(szFilename,"%sgeometry_MD_RP-%s.txt",szPrefix,m_pGeoReader->GetRPotLabel(eRPName));
180 m_pGeoReader->StoreReconstructionGeometry(eRPName, EFT_FIBERMD, szFilename);
181 LogStream<<MSG::INFO<<"The MD fiber geometry was stored in the "<<szFilename<<" file"<<endmsg;
182 }
183 else{
184 LogStream<<MSG::INFO<<"Unknown MD fiber geometry of the RPot "<<m_pGeoReader->GetRPotLabel(eRPName)<<" file"<<endmsg;
185 }
186
187 //OD fibers
188 eGeoType=m_pGeoReader->GetRPGeometryType(eRPName,EFT_FIBEROD);
189 if(eGeoType!=EGST_UNDEFINED){
190 switch(eGeoType){
192 strcpy(szPrefix,"ideal");
193 break;
194 case EGST_FILE:
195 strcpy(szPrefix,"real");
196 break;
197 case EGST_DATABASE:
198 strcpy(szPrefix,"realdb");
199 break;
200 default:
201 strcpy(szPrefix,"");
202 break;
203 }
204 sprintf(szFilename,"%sgeometry_OD_RP-%s.txt",szPrefix,m_pGeoReader->GetRPotLabel(eRPName));
205 m_pGeoReader->StoreReconstructionGeometry(eRPName, EFT_FIBEROD, szFilename);
206 LogStream<<MSG::INFO<<"The OD fiber geometry was stored in the "<<szFilename<<" file"<<endmsg;
207 }
208 else{
209 LogStream<<MSG::INFO<<"Unknown OD fiber geometry of the RPot "<<m_pGeoReader->GetRPotLabel(eRPName)<<" file"<<endmsg;
210 }
211 }
212
213 //save RP geometry params
214 sprintf(szFilename,"geometryinfo_MD_RP-%s.txt",m_pGeoReader->GetRPotLabel(eRPName));
215 m_pGeoReader->SaveRPGeometryParams(eRPName, szFilename);
216 LogStream<<MSG::INFO<<"RP geometry info was stored in the "<<szFilename<<" file"<<endmsg;
217 }
218}
@ EGST_UNDEFINED
@ EGST_IDEALGEOMETRY
@ EGST_DATABASE
@ EGST_FILE
@ EFT_FIBERMD
@ EFT_FIBEROD

◆ SelectRPots()

void ALFA_DetectorFactory::SelectRPots ( )
private

◆ UpdateTransforms()

void ALFA_DetectorFactory::UpdateTransforms ( PALIGNPARAMETERS pAlignParams)

Definition at line 1898 of file ALFA_DetectorFactory.cxx.

1899{
1900 int i;
1901 StatusCode sc;
1902 char szLabel[32]{};
1903 RPPOSPARAMS RPosParams;
1904 StoredAlignX* pAlignX;
1905 GeoAlignableTransform* pAlTrans;
1906 MsgStream LogStream(Athena::getMessageSvc(), "ALFA_DetectorFactory::UpdateTransforms");
1907
1909 for(i=0;i<RPOTSCNT;i++){
1910 m_Config.GeometryConfig.CfgRPosParams[i].swcorr.fXOffset=pAlignParams->fXOffset[i];
1911 m_Config.GeometryConfig.CfgRPosParams[i].swcorr.fYOffset=pAlignParams->fYOffset[i];
1912 m_Config.GeometryConfig.CfgRPosParams[i].swcorr.fTheta=pAlignParams->fTheta[i];
1913 }
1914
1915 if(ReadGeometry(true)){
1916 for (const eRPotName& eRPName : m_ListExistingRPots)
1917 {
1918 m_pGeoReader->GetRPPosParams(&RPosParams,eRPName);
1919
1920 sprintf(szLabel,"AlTransRPBox[%02d]",eRPName);
1921 sc=m_pDetectorStore->retrieve(pAlignX,szLabel);
1922 if(sc==StatusCode::SUCCESS){
1923 pAlTrans=pAlignX->getAlignX();
1924 //pAlTrans->setDelta(RPosParams.RPSWTransformInStation);
1925 pAlTrans->setDelta(Amg::CLHEPTransformToEigen(RPosParams.RPTransformInStation));
1926 }
1927
1928 sprintf(szLabel,"AlTransDetInRPMainPoint[%02d]",eRPName);
1929 sc=m_pDetectorStore->retrieve(pAlignX,szLabel);
1930 if(sc==StatusCode::SUCCESS){
1931 pAlTrans=pAlignX->getAlignX();
1932 //pAlTrans->setDelta(RPosParams.DetSWTransformInMainPoint);
1933 pAlTrans->setDelta(Amg::CLHEPTransformToEigen(RPosParams.DetTransformInMainPoint));
1934 }
1935
1936 }
1937 }
1938 }
1939}
GeoAlignableTransform * getAlignX()
double fTheta[RPOTSCNT]
double fYOffset[RPOTSCNT]
double fXOffset[RPOTSCNT]

◆ UserTransformInDetector()

HepGeom::Transform3D ALFA_DetectorFactory::UserTransformInDetector ( eRPotName eRPName)
private

Definition at line 1784 of file ALFA_DetectorFactory.cxx.

1785{
1786 MsgStream LogStream(Athena::getMessageSvc(), "ALFA_DetectorFactory::UserHepGeom::Transform3DInDetector(eRPotName eRPName)");
1787
1788 CLHEP::HepRep3x3 matRotation;
1789 USERTRANSFORM structUserTransform;
1790
1791 switch(eRPName)
1792 {
1793 case ERPN_B7L1U:
1794 structUserTransform.fAngle = m_Config.vecTransformInDetectorB7L1U[0];
1795 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorB7L1U[1], m_Config.vecTransformInDetectorB7L1U[2], m_Config.vecTransformInDetectorB7L1U[3]);
1796 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorB7L1U[4], m_Config.vecTransformInDetectorB7L1U[5], m_Config.vecTransformInDetectorB7L1U[6]);
1797 break;
1798 case ERPN_B7L1L:
1799 structUserTransform.fAngle = m_Config.vecTransformInDetectorB7L1L[0];
1800 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorB7L1L[1], m_Config.vecTransformInDetectorB7L1L[2], m_Config.vecTransformInDetectorB7L1L[3]);
1801 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorB7L1L[4], m_Config.vecTransformInDetectorB7L1L[5], m_Config.vecTransformInDetectorB7L1L[6]);
1802 break;
1803 case ERPN_A7L1U:
1804 structUserTransform.fAngle = m_Config.vecTransformInDetectorA7L1U[0];
1805 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorA7L1U[1], m_Config.vecTransformInDetectorA7L1U[2], m_Config.vecTransformInDetectorA7L1U[3]);
1806 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorA7L1U[4], m_Config.vecTransformInDetectorA7L1U[5], m_Config.vecTransformInDetectorA7L1U[6]);
1807 break;
1808 case ERPN_A7L1L:
1809 structUserTransform.fAngle = m_Config.vecTransformInDetectorA7L1L[0];
1810 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorA7L1L[1], m_Config.vecTransformInDetectorA7L1L[2], m_Config.vecTransformInDetectorA7L1L[3]);
1811 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorA7L1L[4], m_Config.vecTransformInDetectorA7L1L[5], m_Config.vecTransformInDetectorA7L1L[6]);
1812 break;
1813 case ERPN_A7R1U:
1814 structUserTransform.fAngle = m_Config.vecTransformInDetectorA7R1U[0];
1815 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorA7R1U[1], m_Config.vecTransformInDetectorA7R1U[2], m_Config.vecTransformInDetectorA7R1U[3]);
1816 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorA7R1U[4], m_Config.vecTransformInDetectorA7R1U[5], m_Config.vecTransformInDetectorA7R1U[6]);
1817 break;
1818 case ERPN_A7R1L:
1819 structUserTransform.fAngle = m_Config.vecTransformInDetectorA7R1L[0];
1820 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorA7R1L[1], m_Config.vecTransformInDetectorA7R1L[2], m_Config.vecTransformInDetectorA7R1L[3]);
1821 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorA7R1L[4], m_Config.vecTransformInDetectorA7R1L[5], m_Config.vecTransformInDetectorA7R1L[6]);
1822 break;
1823 case ERPN_B7R1U:
1824 structUserTransform.fAngle = m_Config.vecTransformInDetectorB7R1U[0];
1825 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorB7R1U[1], m_Config.vecTransformInDetectorB7R1U[2], m_Config.vecTransformInDetectorB7R1U[3]);
1826 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorB7R1U[4], m_Config.vecTransformInDetectorB7R1U[5], m_Config.vecTransformInDetectorB7R1U[6]);
1827 break;
1828 case ERPN_B7R1L:
1829 structUserTransform.fAngle = m_Config.vecTransformInDetectorB7R1L[0];
1830 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorB7R1L[1], m_Config.vecTransformInDetectorB7R1L[2], m_Config.vecTransformInDetectorB7R1L[3]);
1831 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInDetectorB7R1L[4], m_Config.vecTransformInDetectorB7R1L[5], m_Config.vecTransformInDetectorB7R1L[6]);
1832 break;
1833 default:
1834 LogStream << MSG::WARNING << "Unknown Roman pot, detector transformation will be set to default (zero) values" << endmsg;
1835 structUserTransform.fAngle = 0.0;
1836 structUserTransform.vecRotation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
1837 structUserTransform.vecTranslation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
1838 }
1839
1840 double fPhi = structUserTransform.fAngle;
1841
1842 CLHEP::Hep3Vector vRotation = CLHEP::Hep3Vector(structUserTransform.vecRotation);
1843 CLHEP::Hep3Vector vTranslation = CLHEP::Hep3Vector(structUserTransform.vecTranslation);
1844
1845 matRotation.xx_ = vRotation.x()*vRotation.x()*(1 - cos(fPhi)) + cos(fPhi);
1846 matRotation.xy_ = vRotation.x()*vRotation.y()*(1 - cos(fPhi)) - vRotation.z()*sin(fPhi);
1847 matRotation.xz_ = vRotation.x()*vRotation.z()*(1 - cos(fPhi)) + vRotation.y()*sin(fPhi);
1848
1849 matRotation.yx_ = vRotation.y()*vRotation.x()*(1 - cos(fPhi)) + vRotation.z()*sin(fPhi);
1850 matRotation.yy_ = vRotation.y()*vRotation.y()*(1 - cos(fPhi)) + cos(fPhi);
1851 matRotation.yz_ = vRotation.y()*vRotation.z()*(1 - cos(fPhi)) - vRotation.x()*sin(fPhi);
1852
1853 matRotation.zx_ = vRotation.z()*vRotation.x()*(1 - cos(fPhi)) - vRotation.y()*sin(fPhi);
1854 matRotation.zy_ = vRotation.z()*vRotation.y()*(1 - cos(fPhi)) + vRotation.x()*sin(fPhi);
1855 matRotation.zz_ = vRotation.z()*vRotation.z()*(1 - cos(fPhi)) + cos(fPhi);
1856
1857 return HepGeom::Transform3D(CLHEP::HepRotation(matRotation), vTranslation);
1858}
struct _USERTRANSFORM USERTRANSFORM
CLHEP::Hep3Vector vecTranslation
CLHEP::Hep3Vector vecRotation

◆ UserTransformInStation()

HepGeom::Transform3D ALFA_DetectorFactory::UserTransformInStation ( eRPotName eRPName)
private

Definition at line 1708 of file ALFA_DetectorFactory.cxx.

1709{
1710 MsgStream LogStream(Athena::getMessageSvc(), "ALFA_DetectorFactory::UserHepGeom::Transform3DInStation(eRPotName eRPName)");
1711
1712 CLHEP::HepRep3x3 matRotation;
1713 USERTRANSFORM structUserTransform;
1714
1715 switch(eRPName)
1716 {
1717 case ERPN_B7L1U:
1718 structUserTransform.fAngle = m_Config.vecTransformInStationB7L1U[0];
1719 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInStationB7L1U[1], m_Config.vecTransformInStationB7L1U[2], m_Config.vecTransformInStationB7L1U[3]);
1720 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInStationB7L1U[4], m_Config.vecTransformInStationB7L1U[5], m_Config.vecTransformInStationB7L1U[6]);
1721 break;
1722 case ERPN_B7L1L:
1723 structUserTransform.fAngle = m_Config.vecTransformInStationB7L1L[0];
1724 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInStationB7L1L[1], m_Config.vecTransformInStationB7L1L[2], m_Config.vecTransformInStationB7L1L[3]);
1725 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInStationB7L1L[4], m_Config.vecTransformInStationB7L1L[5], m_Config.vecTransformInStationB7L1L[6]);
1726 break;
1727 case ERPN_A7L1U:
1728 structUserTransform.fAngle = m_Config.vecTransformInStationA7L1U[0];
1729 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInStationA7L1U[1], m_Config.vecTransformInStationA7L1U[2], m_Config.vecTransformInStationA7L1U[3]);
1730 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInStationA7L1U[4], m_Config.vecTransformInStationA7L1U[5], m_Config.vecTransformInStationA7L1U[6]);
1731 break;
1732 case ERPN_A7L1L:
1733 structUserTransform.fAngle = m_Config.vecTransformInStationA7L1L[0];
1734 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInStationA7L1L[1], m_Config.vecTransformInStationA7L1L[2], m_Config.vecTransformInStationA7L1L[3]);
1735 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInStationA7L1L[4], m_Config.vecTransformInStationA7L1L[5], m_Config.vecTransformInStationA7L1L[6]);
1736 break;
1737 case ERPN_A7R1U:
1738 structUserTransform.fAngle = m_Config.vecTransformInStationA7R1U[0];
1739 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInStationA7R1U[1], m_Config.vecTransformInStationA7R1U[2], m_Config.vecTransformInStationA7R1U[3]);
1740 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInStationA7R1U[4], m_Config.vecTransformInStationA7R1U[5], m_Config.vecTransformInStationA7R1U[6]);
1741 break;
1742 case ERPN_A7R1L:
1743 structUserTransform.fAngle = m_Config.vecTransformInStationA7R1L[0];
1744 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInStationA7R1L[1], m_Config.vecTransformInStationA7R1L[2], m_Config.vecTransformInStationA7R1L[3]);
1745 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInStationA7R1L[4], m_Config.vecTransformInStationA7R1L[5], m_Config.vecTransformInStationA7R1L[6]);
1746 break;
1747 case ERPN_B7R1U:
1748 structUserTransform.fAngle = m_Config.vecTransformInStationB7R1U[0];
1749 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInStationB7R1U[1], m_Config.vecTransformInStationB7R1U[2], m_Config.vecTransformInStationB7R1U[3]);
1750 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInStationB7R1U[4], m_Config.vecTransformInStationB7R1U[5], m_Config.vecTransformInStationB7R1U[6]);
1751 break;
1752 case ERPN_B7R1L:
1753 structUserTransform.fAngle = m_Config.vecTransformInStationB7R1L[0];
1754 structUserTransform.vecRotation = CLHEP::Hep3Vector(m_Config.vecTransformInStationB7R1L[1], m_Config.vecTransformInStationB7R1L[2], m_Config.vecTransformInStationB7R1L[3]);
1755 structUserTransform.vecTranslation = CLHEP::Hep3Vector(m_Config.vecTransformInStationB7R1L[4], m_Config.vecTransformInStationB7R1L[5], m_Config.vecTransformInStationB7R1L[6]);
1756 break;
1757 default:
1758 LogStream << MSG::WARNING << "Unknown Roman pot, station transformation will be set to default (zero) values" << endmsg;
1759 structUserTransform.fAngle = 0.0;
1760 structUserTransform.vecRotation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
1761 structUserTransform.vecTranslation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
1762 }
1763
1764 double fPhi = structUserTransform.fAngle;
1765
1766 CLHEP::Hep3Vector vRotation = CLHEP::Hep3Vector(structUserTransform.vecRotation);
1767 CLHEP::Hep3Vector vTranslation = CLHEP::Hep3Vector(structUserTransform.vecTranslation);
1768
1769 matRotation.xx_ = vRotation.x()*vRotation.x()*(1 - cos(fPhi)) + cos(fPhi);
1770 matRotation.xy_ = vRotation.x()*vRotation.y()*(1 - cos(fPhi)) - vRotation.z()*sin(fPhi);
1771 matRotation.xz_ = vRotation.x()*vRotation.z()*(1 - cos(fPhi)) + vRotation.y()*sin(fPhi);
1772
1773 matRotation.yx_ = vRotation.y()*vRotation.x()*(1 - cos(fPhi)) + vRotation.z()*sin(fPhi);
1774 matRotation.yy_ = vRotation.y()*vRotation.y()*(1 - cos(fPhi)) + cos(fPhi);
1775 matRotation.yz_ = vRotation.y()*vRotation.z()*(1 - cos(fPhi)) - vRotation.x()*sin(fPhi);
1776
1777 matRotation.zx_ = vRotation.z()*vRotation.x()*(1 - cos(fPhi)) - vRotation.y()*sin(fPhi);
1778 matRotation.zy_ = vRotation.z()*vRotation.y()*(1 - cos(fPhi)) + vRotation.x()*sin(fPhi);
1779 matRotation.zz_ = vRotation.z()*vRotation.z()*(1 - cos(fPhi)) + cos(fPhi);
1780
1781 return HepGeom::Transform3D(CLHEP::HepRotation(matRotation), vTranslation);
1782}

Member Data Documentation

◆ m_Config

CONFIGURATION ALFA_DetectorFactory::m_Config
private

Definition at line 84 of file ALFA_DetectorFactory.h.

◆ m_eRequestedMetrologyType

eMetrologyType ALFA_DetectorFactory::m_eRequestedMetrologyType {eMetrologyType::EMT_UNDEFINED}
private

Definition at line 83 of file ALFA_DetectorFactory.h.

◆ m_ListExistingRPots

std::list<eRPotName> ALFA_DetectorFactory::m_ListExistingRPots
private

Definition at line 86 of file ALFA_DetectorFactory.h.

◆ m_MapMaterials

std::map<std::string,const GeoMaterial*> ALFA_DetectorFactory::m_MapMaterials
private

Definition at line 87 of file ALFA_DetectorFactory.h.

◆ m_pDetectorManager

ALFA_DetectorManager* ALFA_DetectorFactory::m_pDetectorManager {}
private

Definition at line 79 of file ALFA_DetectorFactory.h.

79{};

◆ m_pDetectorStore

StoreGateSvc* ALFA_DetectorFactory::m_pDetectorStore {}
private

Definition at line 80 of file ALFA_DetectorFactory.h.

80{};

◆ m_pGeoReader

std::unique_ptr<ALFA_GeometryReader> ALFA_DetectorFactory::m_pGeoReader
private

Definition at line 85 of file ALFA_DetectorFactory.h.

◆ m_pIRDBAccess

IRDBAccessSvc* ALFA_DetectorFactory::m_pIRDBAccess {}
private

Definition at line 81 of file ALFA_DetectorFactory.h.

81{};

The documentation for this class was generated from the following files: