ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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
 
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 93 of file ALFA_DetectorFactory.cxx.

94  :m_pDetectorManager(NULL),
95  m_pDetectorStore(pDetStore),
96  m_pIRDBAccess(pAccess),
98  m_Config(*pConfig),
99  m_pGeoReader(std::make_unique<ALFA_GeometryReader>())
100 {
101 
102 }

◆ ~ALFA_DetectorFactory()

ALFA_DetectorFactory::~ALFA_DetectorFactory ( )

Definition at line 104 of file ALFA_DetectorFactory.cxx.

105 {
106 }

◆ 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 416 of file ALFA_DetectorFactory.cxx.

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

◆ AddGlobalVacuumSensorInStation()

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

Definition at line 441 of file ALFA_DetectorFactory.cxx.

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

◆ ConstructAlfaStations()

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

Definition at line 461 of file ALFA_DetectorFactory.cxx.

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

◆ ConstructBeampipe()

void ALFA_DetectorFactory::ConstructBeampipe ( GeoPhysVol *  pWorld)
private

Definition at line 548 of file ALFA_DetectorFactory.cxx.

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

◆ ConstructODFiberCladdings()

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

Definition at line 1159 of file ALFA_DetectorFactory.cxx.

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

◆ 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 1246 of file ALFA_DetectorFactory.cxx.

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

◆ 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 1354 of file ALFA_DetectorFactory.cxx.

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

◆ ConstructUFiberCladdings()

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

Definition at line 1448 of file ALFA_DetectorFactory.cxx.

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

◆ ConstructVFiberCladdings()

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

Definition at line 1563 of file ALFA_DetectorFactory.cxx.

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

◆ create()

void ALFA_DetectorFactory::create ( GeoPhysVol *  pWorld)
virtual

Definition at line 691 of file ALFA_DetectorFactory.cxx.

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

◆ CreateAxes()

void ALFA_DetectorFactory::CreateAxes ( GeoPhysVol *  pMotherVolume)
private

Definition at line 380 of file ALFA_DetectorFactory.cxx.

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

◆ CreateSolidAir()

GeoShape * ALFA_DetectorFactory::CreateSolidAir ( )
private

Definition at line 949 of file ALFA_DetectorFactory.cxx.

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

◆ CreateSolidG10Shapes()

GeoShape * ALFA_DetectorFactory::CreateSolidG10Shapes ( )
private

Definition at line 1027 of file ALFA_DetectorFactory.cxx.

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

◆ CreateSolidODPlates()

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

Definition at line 1077 of file ALFA_DetectorFactory.cxx.

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

◆ CreateSolidRP()

GeoShape * ALFA_DetectorFactory::CreateSolidRP ( )
private

Definition at line 896 of file ALFA_DetectorFactory.cxx.

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

◆ CreateSolidRPSupport()

GeoShape * ALFA_DetectorFactory::CreateSolidRPSupport ( )
private

Definition at line 1005 of file ALFA_DetectorFactory.cxx.

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

◆ CreateSolidTiPlates()

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

Definition at line 1044 of file ALFA_DetectorFactory.cxx.

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

◆ CreateSolidTrigger()

GeoShape * ALFA_DetectorFactory::CreateSolidTrigger ( )
private

Definition at line 980 of file ALFA_DetectorFactory.cxx.

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

◆ DefineMaterials()

void ALFA_DetectorFactory::DefineMaterials ( StoredMaterialManager pMaterialManager)
private

Definition at line 223 of file ALFA_DetectorFactory.cxx.

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

◆ 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 1872 of file ALFA_DetectorFactory.cxx.

1873 {
1874  MsgStream LogStream(Athena::getMessageSvc(), "ALFA_DetectorFactory::Point3DInDetector(eRPotName eRPName)");
1875  HepGeom::Point3D<double> Point;
1876 
1877  switch(eRPName)
1878  {
1879  case ERPN_B7L1U:
1881  break;
1882  case ERPN_B7L1L:
1884  break;
1885  case ERPN_A7L1U:
1887  break;
1888  case ERPN_A7L1L:
1890  break;
1891  case ERPN_A7R1U:
1893  break;
1894  case ERPN_A7R1L:
1896  break;
1897  case ERPN_B7R1U:
1899  break;
1900  case ERPN_B7R1L:
1902  break;
1903  default:
1904  LogStream << MSG::WARNING << "Unknown Roman pot, transformation point will be set to default (zero) value" << endmsg;
1905  }
1906 
1907  return Point;
1908 }

◆ ReadGeometry()

bool ALFA_DetectorFactory::ReadGeometry ( bool  bAlignCorrections = false)

!!

Definition at line 108 of file ALFA_DetectorFactory.cxx.

109 {
110  MsgStream LogStream(Athena::getMessageSvc(), "ALFA_DetectorFactory::ReadGeometry");
111 
112  bool bRes=false;
113  list<eRPotName>::const_iterator iterRPName;
114 
115  m_pGeoReader=std::make_unique<ALFA_GeometryReader>();
116 
117  //first we need to setup to zero positions for SWCORRECTIONS
121  }
123  for(int i=0;i<RPOTSCNT;i++){
124  eRPotName eRPName = (eRPotName)(i+1);
125  if(m_Config.bIsTransformInDetector[i]==true){
129  }
130  if(m_Config.bIsTransformInStation[i]==true){
133  }
134  }
135  }
136 
137  if((bRes=m_pGeoReader->Initialize(&m_Config.GeometryConfig,EFCS_CLADDING))==true){
138  LogStream<<MSG::INFO<<"Geometry successfully initialized"<<endmsg;
139  m_pGeoReader->GetListOfExistingRPotIDs(&m_ListExistingRPots);
140  }
141  else
142  {
143  bRes=false;
144  LogStream<<MSG::FATAL<<"Cannot initialize geometry"<<endmsg;
145  throw GaudiException(" Could not load geometry ", "ALFA_DetectorFactory::ReadGeometry", StatusCode::FAILURE);
146  }
147 
148  if(m_eRequestedMetrologyType==EMT_SWCORRECTIONS || bAlignCorrections==true){
149  SaveGeometry();
150  }
151 
152  return bRes;
153 }

◆ SaveGeometry()

void ALFA_DetectorFactory::SaveGeometry ( )
private

Definition at line 155 of file ALFA_DetectorFactory.cxx.

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

◆ SelectRPots()

void ALFA_DetectorFactory::SelectRPots ( )
private

◆ UpdateTransforms()

void ALFA_DetectorFactory::UpdateTransforms ( PALIGNPARAMETERS  pAlignParams)

Definition at line 1910 of file ALFA_DetectorFactory.cxx.

1911 {
1912  int i;
1913  StatusCode sc;
1914  char szLabel[32];
1915  RPPOSPARAMS RPosParams;
1916  StoredAlignX* pAlignX;
1917  GeoAlignableTransform* pAlTrans;
1918  MsgStream LogStream(Athena::getMessageSvc(), "ALFA_DetectorFactory::UpdateTransforms");
1919 
1921  for(i=0;i<RPOTSCNT;i++){
1925  }
1926 
1927  if(ReadGeometry(true)){
1928  for (const eRPotName& eRPName : m_ListExistingRPots)
1929  {
1930  m_pGeoReader->GetRPPosParams(&RPosParams,eRPName);
1931 
1932  sprintf(szLabel,"AlTransRPBox[%02d]",eRPName);
1933  sc=m_pDetectorStore->retrieve(pAlignX,szLabel);
1934  if(sc==StatusCode::SUCCESS){
1935  pAlTrans=pAlignX->getAlignX();
1936  //pAlTrans->setDelta(RPosParams.RPSWTransformInStation);
1937  pAlTrans->setDelta(Amg::CLHEPTransformToEigen(RPosParams.RPTransformInStation));
1938  }
1939 
1940  sprintf(szLabel,"AlTransDetInRPMainPoint[%02d]",eRPName);
1941  sc=m_pDetectorStore->retrieve(pAlignX,szLabel);
1942  if(sc==StatusCode::SUCCESS){
1943  pAlTrans=pAlignX->getAlignX();
1944  //pAlTrans->setDelta(RPosParams.DetSWTransformInMainPoint);
1945  pAlTrans->setDelta(Amg::CLHEPTransformToEigen(RPosParams.DetTransformInMainPoint));
1946  }
1947 
1948  }
1949  }
1950  }
1951 }

◆ UserTransformInDetector()

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

Definition at line 1796 of file ALFA_DetectorFactory.cxx.

1797 {
1798  MsgStream LogStream(Athena::getMessageSvc(), "ALFA_DetectorFactory::UserHepGeom::Transform3DInDetector(eRPotName eRPName)");
1799 
1800  CLHEP::HepRep3x3 matRotation;
1801  USERTRANSFORM structUserTransform;
1802 
1803  switch(eRPName)
1804  {
1805  case ERPN_B7L1U:
1806  structUserTransform.fAngle = m_Config.vecTransformInDetectorB7L1U[0];
1809  break;
1810  case ERPN_B7L1L:
1811  structUserTransform.fAngle = m_Config.vecTransformInDetectorB7L1L[0];
1814  break;
1815  case ERPN_A7L1U:
1816  structUserTransform.fAngle = m_Config.vecTransformInDetectorA7L1U[0];
1819  break;
1820  case ERPN_A7L1L:
1821  structUserTransform.fAngle = m_Config.vecTransformInDetectorA7L1L[0];
1824  break;
1825  case ERPN_A7R1U:
1826  structUserTransform.fAngle = m_Config.vecTransformInDetectorA7R1U[0];
1829  break;
1830  case ERPN_A7R1L:
1831  structUserTransform.fAngle = m_Config.vecTransformInDetectorA7R1L[0];
1834  break;
1835  case ERPN_B7R1U:
1836  structUserTransform.fAngle = m_Config.vecTransformInDetectorB7R1U[0];
1839  break;
1840  case ERPN_B7R1L:
1841  structUserTransform.fAngle = m_Config.vecTransformInDetectorB7R1L[0];
1844  break;
1845  default:
1846  LogStream << MSG::WARNING << "Unknown Roman pot, detector transformation will be set to default (zero) values" << endmsg;
1847  structUserTransform.fAngle = 0.0;
1848  structUserTransform.vecRotation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
1849  structUserTransform.vecTranslation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
1850  }
1851 
1852  double fPhi = structUserTransform.fAngle;
1853 
1854  CLHEP::Hep3Vector vRotation = CLHEP::Hep3Vector(structUserTransform.vecRotation);
1855  CLHEP::Hep3Vector vTranslation = CLHEP::Hep3Vector(structUserTransform.vecTranslation);
1856 
1857  matRotation.xx_ = vRotation.x()*vRotation.x()*(1 - cos(fPhi)) + cos(fPhi);
1858  matRotation.xy_ = vRotation.x()*vRotation.y()*(1 - cos(fPhi)) - vRotation.z()*sin(fPhi);
1859  matRotation.xz_ = vRotation.x()*vRotation.z()*(1 - cos(fPhi)) + vRotation.y()*sin(fPhi);
1860 
1861  matRotation.yx_ = vRotation.y()*vRotation.x()*(1 - cos(fPhi)) + vRotation.z()*sin(fPhi);
1862  matRotation.yy_ = vRotation.y()*vRotation.y()*(1 - cos(fPhi)) + cos(fPhi);
1863  matRotation.yz_ = vRotation.y()*vRotation.z()*(1 - cos(fPhi)) - vRotation.x()*sin(fPhi);
1864 
1865  matRotation.zx_ = vRotation.z()*vRotation.x()*(1 - cos(fPhi)) - vRotation.y()*sin(fPhi);
1866  matRotation.zy_ = vRotation.z()*vRotation.y()*(1 - cos(fPhi)) + vRotation.x()*sin(fPhi);
1867  matRotation.zz_ = vRotation.z()*vRotation.z()*(1 - cos(fPhi)) + cos(fPhi);
1868 
1869  return HepGeom::Transform3D(CLHEP::HepRotation(matRotation), vTranslation);
1870 }

◆ UserTransformInStation()

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

Definition at line 1720 of file ALFA_DetectorFactory.cxx.

1721 {
1722  MsgStream LogStream(Athena::getMessageSvc(), "ALFA_DetectorFactory::UserHepGeom::Transform3DInStation(eRPotName eRPName)");
1723 
1724  CLHEP::HepRep3x3 matRotation;
1725  USERTRANSFORM structUserTransform;
1726 
1727  switch(eRPName)
1728  {
1729  case ERPN_B7L1U:
1730  structUserTransform.fAngle = m_Config.vecTransformInStationB7L1U[0];
1733  break;
1734  case ERPN_B7L1L:
1735  structUserTransform.fAngle = m_Config.vecTransformInStationB7L1L[0];
1738  break;
1739  case ERPN_A7L1U:
1740  structUserTransform.fAngle = m_Config.vecTransformInStationA7L1U[0];
1743  break;
1744  case ERPN_A7L1L:
1745  structUserTransform.fAngle = m_Config.vecTransformInStationA7L1L[0];
1748  break;
1749  case ERPN_A7R1U:
1750  structUserTransform.fAngle = m_Config.vecTransformInStationA7R1U[0];
1753  break;
1754  case ERPN_A7R1L:
1755  structUserTransform.fAngle = m_Config.vecTransformInStationA7R1L[0];
1758  break;
1759  case ERPN_B7R1U:
1760  structUserTransform.fAngle = m_Config.vecTransformInStationB7R1U[0];
1763  break;
1764  case ERPN_B7R1L:
1765  structUserTransform.fAngle = m_Config.vecTransformInStationB7R1L[0];
1768  break;
1769  default:
1770  LogStream << MSG::WARNING << "Unknown Roman pot, station transformation will be set to default (zero) values" << endmsg;
1771  structUserTransform.fAngle = 0.0;
1772  structUserTransform.vecRotation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
1773  structUserTransform.vecTranslation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
1774  }
1775 
1776  double fPhi = structUserTransform.fAngle;
1777 
1778  CLHEP::Hep3Vector vRotation = CLHEP::Hep3Vector(structUserTransform.vecRotation);
1779  CLHEP::Hep3Vector vTranslation = CLHEP::Hep3Vector(structUserTransform.vecTranslation);
1780 
1781  matRotation.xx_ = vRotation.x()*vRotation.x()*(1 - cos(fPhi)) + cos(fPhi);
1782  matRotation.xy_ = vRotation.x()*vRotation.y()*(1 - cos(fPhi)) - vRotation.z()*sin(fPhi);
1783  matRotation.xz_ = vRotation.x()*vRotation.z()*(1 - cos(fPhi)) + vRotation.y()*sin(fPhi);
1784 
1785  matRotation.yx_ = vRotation.y()*vRotation.x()*(1 - cos(fPhi)) + vRotation.z()*sin(fPhi);
1786  matRotation.yy_ = vRotation.y()*vRotation.y()*(1 - cos(fPhi)) + cos(fPhi);
1787  matRotation.yz_ = vRotation.y()*vRotation.z()*(1 - cos(fPhi)) - vRotation.x()*sin(fPhi);
1788 
1789  matRotation.zx_ = vRotation.z()*vRotation.x()*(1 - cos(fPhi)) - vRotation.y()*sin(fPhi);
1790  matRotation.zy_ = vRotation.z()*vRotation.y()*(1 - cos(fPhi)) + vRotation.x()*sin(fPhi);
1791  matRotation.zz_ = vRotation.z()*vRotation.z()*(1 - cos(fPhi)) + cos(fPhi);
1792 
1793  return HepGeom::Transform3D(CLHEP::HepRotation(matRotation), vTranslation);
1794 }

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
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.

◆ m_pDetectorStore

StoreGateSvc* ALFA_DetectorFactory::m_pDetectorStore
private

Definition at line 80 of file ALFA_DetectorFactory.h.

◆ 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.


The documentation for this class was generated from the following files:
CFGRPPOSPARAMS::fYOffset
double fYOffset
Definition: ALFA_GeometryReader.h:183
ALFA_DetectorManager
Definition: ALFA_DetectorManager.h:16
ALFA_DetectorFactory::AddBeamPipeInStation
void AddBeamPipeInStation(GeoFullPhysVol *pPhysStation, const char *pszStationLabel)
Definition: ALFA_DetectorFactory.cxx:416
BEAMPIPEINNERRADIUS
#define BEAMPIPEINNERRADIUS
Definition: ALFA_DetectorFactory.cxx:52
_CONFIGURATION::vecTransformInDetectorA7L1U
std::vector< double > vecTransformInDetectorA7L1U
Definition: ALFA_DetectorFactory.h:57
RPPOSPARAMS
Definition: ALFA_GeometryReader.h:50
_CONFIGURATION::vecTransformInDetectorB7L1L
std::vector< double > vecTransformInDetectorB7L1L
Definition: ALFA_DetectorFactory.h:56
ALFA_DetectorFactory::SaveGeometry
void SaveGeometry()
Definition: ALFA_DetectorFactory.cxx:155
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
_CONFIGURATION::pointTransformInDetectorA7L1L
std::vector< double > pointTransformInDetectorA7L1L
Definition: ALFA_DetectorFactory.h:50
_USERTRANSFORM::vecRotation
CLHEP::Hep3Vector vecRotation
Definition: ALFA_DetectorTool.h:21
EFT_ODFIBERV0
@ EFT_ODFIBERV0
Definition: ALFA_GeometryReader.h:26
_CONFIGURATION::pointTransformInDetectorA7R1L
std::vector< double > pointTransformInDetectorA7R1L
Definition: ALFA_DetectorFactory.h:54
_CONFIGURATION::vecTransformInStationB7R1U
std::vector< double > vecTransformInStationB7R1U
Definition: ALFA_DetectorFactory.h:67
_CONFIGURATION::vecTransformInDetectorA7R1L
std::vector< double > vecTransformInDetectorA7R1L
Definition: ALFA_DetectorFactory.h:62
ALFA_DetectorFactory::AddGlobalVacuumSensorInStation
void AddGlobalVacuumSensorInStation(GeoFullPhysVol *pPhysStation, eAStationName eStatName)
Definition: ALFA_DetectorFactory.cxx:441
CFGRPPOSPARAMS::swcorr
struct CFGRPPOSPARAMS::@52 swcorr
EGST_IDEALGEOMETRY
@ EGST_IDEALGEOMETRY
Definition: ALFA_GeometryReader.h:24
_CONFIGURATION::vecTransformInStationB7L1L
std::vector< double > vecTransformInStationB7L1L
Definition: ALFA_DetectorFactory.h:64
_CONFIGURATION::pointTransformInDetectorA7R1U
std::vector< double > pointTransformInDetectorA7R1U
Definition: ALFA_DetectorFactory.h:53
ALFA_DetectorFactory::m_pIRDBAccess
IRDBAccessSvc * m_pIRDBAccess
Definition: ALFA_DetectorFactory.h:81
ERPN_B7R1U
@ ERPN_B7R1U
Definition: ALFA_GeometryReader.h:28
StoredAlignX
Definition: StoredAlignX.h:23
ALFAFIBERSCNT
#define ALFAFIBERSCNT
Definition: ALFA_constants.h:10
ALFA_DetectorFactory::m_pDetectorStore
StoreGateSvc * m_pDetectorStore
Definition: ALFA_DetectorFactory.h:80
eRPotName
eRPotName
Definition: ALFA_GeometryReader.h:28
DMTest::C
C_v1 C
Definition: C.h:26
EMT_SWCORRECTIONS
@ EMT_SWCORRECTIONS
Definition: ALFA_GeometryReader.h:25
_CONFIGURATION::bIsTransformInDetector
std::vector< bool > bIsTransformInDetector
Definition: ALFA_DetectorFactory.h:46
StoredMaterialManager::getElement
virtual const GeoElement * getElement(const std::string &name)=0
ERPN_A7L1U
@ ERPN_A7L1U
Definition: ALFA_GeometryReader.h:28
cm3
#define cm3
ASPOSPARAMS::IdealMainPoint
HepGeom::Point3D< double > IdealMainPoint
Definition: ALFA_GeometryReader.h:86
ALFA_DetectorFactory::CreateSolidG10Shapes
GeoShape * CreateSolidG10Shapes()
Definition: ALFA_DetectorFactory.cxx:1027
RPOTSCNT
#define RPOTSCNT
Definition: ALFA_CLinkAlg.h:26
ASPOSPARAMS::ASTransformInATLAS
HepGeom::Transform3D ASTransformInATLAS
Definition: ALFA_GeometryReader.h:93
deg
#define deg
Definition: SbPolyhedron.cxx:17
ALFA_DetectorFactory::m_ListExistingRPots
std::list< eRPotName > m_ListExistingRPots
Definition: ALFA_DetectorFactory.h:86
ERPN_B7R1L
@ ERPN_B7R1L
Definition: ALFA_GeometryReader.h:28
ALFA_DetectorFactory::m_pDetectorManager
ALFA_DetectorManager * m_pDetectorManager
Definition: ALFA_DetectorFactory.h:79
ALFA_DetectorFactory::m_pGeoReader
std::unique_ptr< ALFA_GeometryReader > m_pGeoReader
Definition: ALFA_DetectorFactory.h:85
CFGRPPOSPARAMS::fTheta
double fTheta
Definition: ALFA_GeometryReader.h:185
_ALFAPHYSVOLUME
Definition: ALFA_DetectorFactory.h:26
EASN_A7R1
@ EASN_A7R1
Definition: ALFA_GeometryReader.h:27
RPPOSPARAMS::eASName
eAStationName eASName
Definition: ALFA_GeometryReader.h:56
_CONFIGURATION::pointTransformInDetectorB7L1L
std::vector< double > pointTransformInDetectorB7L1L
Definition: ALFA_DetectorFactory.h:48
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
CFGRPPOSPARAMS::fXOffset
double fXOffset
Definition: ALFA_GeometryReader.h:184
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
RPPOSPARAMS::DetTransformInMainPoint
HepGeom::Transform3D DetTransformInMainPoint
Definition: ALFA_GeometryReader.h:77
PLATEPARAMS::fUCladdingSizeX
double fUCladdingSizeX
Definition: ALFA_GeometryReader.h:135
_CONFIGURATION::vecTransformInStationB7L1U
std::vector< double > vecTransformInStationB7L1U
Definition: ALFA_DetectorFactory.h:63
EFCS_CLADDING
@ EFCS_CLADDING
Definition: ALFA_GeometryReader.h:30
EFT_FIBERMD
@ EFT_FIBERMD
Definition: ALFA_GeometryReader.h:26
JetTiledMap::S
@ S
Definition: TiledEtaPhiMap.h:44
Point
ChargedTracksWeightFilter::Spline::Point Point
Definition: ChargedTracksWeightFilter.cxx:11
CFGRPPOSPARAMS::usercorr
struct CFGRPPOSPARAMS::@53 usercorr
ALFA_DetectorFactory::CreateSolidTrigger
GeoShape * CreateSolidTrigger()
Definition: ALFA_DetectorFactory.cxx:980
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
ALFA_DetectorFactory::ConstructBeampipe
void ConstructBeampipe(GeoPhysVol *pWorld)
Definition: ALFA_DetectorFactory.cxx:548
ALFA_DetectorFactory::ReadGeometry
bool ReadGeometry(bool bAlignCorrections=false)
Definition: ALFA_DetectorFactory.cxx:108
ALFA_DetectorFactory::CreateSolidRP
GeoShape * CreateSolidRP()
Definition: ALFA_DetectorFactory.cxx:896
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
EMT_NOMINAL
@ EMT_NOMINAL
Definition: ALFA_GeometryReader.h:25
eAStationName
eAStationName
Definition: ALFA_GeometryReader.h:27
ASPOSPARAMS
Definition: ALFA_GeometryReader.h:84
EMT_METROLOGY
@ EMT_METROLOGY
Definition: ALFA_GeometryReader.h:25
CFGRPPOSPARAMS::UserTransformOfDetInRPot
HepGeom::Transform3D UserTransformOfDetInRPot
Definition: ALFA_GeometryReader.h:191
StoredPhysVol
Definition: StoredPhysVol.h:27
_CONFIGURATION::vecTransformInDetectorA7R1U
std::vector< double > vecTransformInDetectorA7R1U
Definition: ALFA_DetectorFactory.h:61
_CONFIGURATION::bIsTransformInStation
std::vector< bool > bIsTransformInStation
Definition: ALFA_DetectorFactory.h:45
_ALIGNPARAMETERS::fXOffset
double fXOffset[RPOTSCNT]
Definition: ALFA_DetectorFactory.h:33
EASN_UNDEFINED
@ EASN_UNDEFINED
Definition: ALFA_GeometryReader.h:27
ALFA_DetectorFactory::Point3DInDetector
HepGeom::Point3D< double > Point3DInDetector(eRPotName eRPName)
Definition: ALFA_DetectorFactory.cxx:1872
ALFA_DetectorManager::addTreeTop
void addTreeTop(PVLink)
Definition: ALFA_DetectorManager.cxx:26
lwtDev::Component::O
@ O
CFGRPPOSPARAMS::bIsEnabledUserTranform
bool bIsEnabledUserTranform
Definition: ALFA_GeometryReader.h:189
_USERTRANSFORM::vecTranslation
CLHEP::Hep3Vector vecTranslation
Definition: ALFA_DetectorTool.h:22
H
#define H(x, y, z)
Definition: MD5.cxx:114
eMetrologyType
eMetrologyType
Definition: ALFA_GeometryReader.h:25
EASN_B7L1
@ EASN_B7L1
Definition: ALFA_GeometryReader.h:27
ALFA_DetectorFactory::ConstructAlfaStations
void ConstructAlfaStations(std::map< eAStationName, ALFAPHYSVOLUME > *pmapActiveStations, GeoPhysVol *pWorld)
Definition: ALFA_DetectorFactory.cxx:461
_CONFIGURATION::GeometryConfig
GEOMETRYCONFIGURATION GeometryConfig
Definition: ALFA_DetectorFactory.h:40
ERPN_B7L1U
@ ERPN_B7L1U
Definition: ALFA_GeometryReader.h:28
lumiFormat.i
int i
Definition: lumiFormat.py:92
RPPOSPARAMS::RPTransformInStation
HepGeom::Transform3D RPTransformInStation
Definition: ALFA_GeometryReader.h:66
_CONFIGURATION::vecTransformInStationA7R1L
std::vector< double > vecTransformInStationA7R1L
Definition: ALFA_DetectorFactory.h:70
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EFT_ODFIBERU1
@ EFT_ODFIBERU1
Definition: ALFA_GeometryReader.h:26
_ALIGNPARAMETERS::fYOffset
double fYOffset[RPOTSCNT]
Definition: ALFA_DetectorFactory.h:32
EGST_UNDEFINED
@ EGST_UNDEFINED
Definition: ALFA_GeometryReader.h:24
INNERDETZSPACE
#define INNERDETZSPACE
Definition: ALFA_constants.h:33
_CONFIGURATION::vecTransformInStationA7L1U
std::vector< double > vecTransformInStationA7L1U
Definition: ALFA_DetectorFactory.h:65
ALFASTATIONHSIZEZ
#define ALFASTATIONHSIZEZ
Definition: ALFA_constants.h:29
ALFA_DetectorFactory::CreateSolidRPSupport
GeoShape * CreateSolidRPSupport()
Definition: ALFA_DetectorFactory.cxx:1005
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
ALFA_DetectorFactory::m_eRequestedMetrologyType
eMetrologyType m_eRequestedMetrologyType
Definition: ALFA_DetectorFactory.h:83
ALFA_DetectorFactory::ConstructUFiberCladdings
void ConstructUFiberCladdings(const eRPotName eRPName, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, GeoAlignableTransform *pDetTransform)
Definition: ALFA_DetectorFactory.cxx:1448
OD_Nb_Fibers
const int OD_Nb_Fibers
Definition: ALFA_constants.h:26
_CONFIGURATION::pointTransformInDetectorB7L1U
std::vector< double > pointTransformInDetectorB7L1U
Definition: ALFA_DetectorFactory.h:47
ERPN_B7L1L
@ ERPN_B7L1L
Definition: ALFA_GeometryReader.h:28
ALFA_DetectorFactory::CreateSolidTiPlates
std::map< int, GeoShape * > * CreateSolidTiPlates()
Definition: ALFA_DetectorFactory.cxx:1044
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
GEOMETRYCONFIGURATION::CfgRPosParams
CFGRPPOSPARAMS CfgRPosParams[RPOTSCNT]
Definition: ALFA_GeometryReader.h:206
ASPOSPARAMS::szLabel
char szLabel[8]
Definition: ALFA_GeometryReader.h:85
OD_Nb_Plates
const int OD_Nb_Plates
Definition: ALFA_constants.h:24
ALFA_DetectorFactory::ConstructVFiberCladdings
void ConstructVFiberCladdings(const eRPotName eRPName, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, GeoAlignableTransform *pDetTransform)
Definition: ALFA_DetectorFactory.cxx:1563
ALFA_DetectorFactory::CreateSolidAir
GeoShape * CreateSolidAir()
Definition: ALFA_DetectorFactory.cxx:949
ALFA_DetectorFactory::m_Config
CONFIGURATION m_Config
Definition: ALFA_DetectorFactory.h:84
_CONFIGURATION::vecTransformInStationA7R1U
std::vector< double > vecTransformInStationA7R1U
Definition: ALFA_DetectorFactory.h:69
ALFA_DetectorFactory::CreateSolidODPlates
std::map< int, GeoShape * > * CreateSolidODPlates()
Definition: ALFA_DetectorFactory.cxx:1077
ERPN_A7R1L
@ ERPN_A7R1L
Definition: ALFA_GeometryReader.h:28
_CONFIGURATION::vecTransformInDetectorB7R1U
std::vector< double > vecTransformInDetectorB7R1U
Definition: ALFA_DetectorFactory.h:59
GEOMETRYCONFIGURATION::eRPMetrologyGeoType
int eRPMetrologyGeoType
Definition: ALFA_GeometryReader.h:198
ALFA_Nb_Plates
const int ALFA_Nb_Plates
Definition: ALFA_constants.h:19
_CONFIGURATION::pointTransformInDetectorB7R1U
std::vector< double > pointTransformInDetectorB7R1U
Definition: ALFA_DetectorFactory.h:51
EGST_DATABASE
@ EGST_DATABASE
Definition: ALFA_GeometryReader.h:24
ChargedTracksWeightFilter::Spline::Point
Linear spline representation of a function used to calculate weights.
Definition: ChargedTracksWeightFilter.h:28
ALFA_DetectorFactory::ConstructODFibers00
void ConstructODFibers00(const eRPotName eRPName, const int iODPlate, eFiberType eFType, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, const HepGeom::Transform3D &TransODCladding)
Definition: ALFA_DetectorFactory.cxx:1246
_ALFAPHYSVOLUME::Transform
HepGeom::Transform3D Transform
Definition: ALFA_DetectorFactory.h:28
_CONFIGURATION::pointTransformInDetectorA7L1U
std::vector< double > pointTransformInDetectorA7L1U
Definition: ALFA_DetectorFactory.h:49
_CONFIGURATION::bConstructBeampipe
bool bConstructBeampipe
Definition: ALFA_DetectorFactory.h:42
_USERTRANSFORM::fAngle
double fAngle
Definition: ALFA_DetectorTool.h:20
dqt_zlumi_alleff_HIST.B
B
Definition: dqt_zlumi_alleff_HIST.py:110
ALFA_DetectorFactory::UserTransformInStation
HepGeom::Transform3D UserTransformInStation(eRPotName eRPName)
Definition: ALFA_DetectorFactory.cxx:1720
EASN_A7L1
@ EASN_A7L1
Definition: ALFA_GeometryReader.h:27
CFGRPPOSPARAMS::UserOriginOfDetTransInRPot
HepGeom::Point3D< double > UserOriginOfDetTransInRPot
Definition: ALFA_GeometryReader.h:190
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
_CONFIGURATION::vecTransformInDetectorB7L1U
std::vector< double > vecTransformInDetectorB7L1U
Definition: ALFA_DetectorFactory.h:55
ERPN_A7R1U
@ ERPN_A7R1U
Definition: ALFA_GeometryReader.h:28
ODPLATESCNT
#define ODPLATESCNT
Definition: ALFA_CLinkAlg.h:31
ALFA_GVSTHICKNESS
#define ALFA_GVSTHICKNESS
Definition: ALFA_constants.h:34
ALFA_DetectorFactory::CreateAxes
void CreateAxes(GeoPhysVol *pMotherVolume)
Definition: ALFA_DetectorFactory.cxx:380
Amg::CLHEPTransformToEigen
Amg::Transform3D CLHEPTransformToEigen(const HepGeom::Transform3D &CLHEPtransf)
Converts a CLHEP-based HepGeom::Transform3D into an Eigen Amg::Transform3D.
Definition: CLHEPtoEigenConverter.h:38
_USERTRANSFORM
Definition: ALFA_DetectorTool.h:18
_ALIGNPARAMETERS::fTheta
double fTheta[RPOTSCNT]
Definition: ALFA_DetectorFactory.h:34
_CONFIGURATION::pointTransformInDetectorB7R1L
std::vector< double > pointTransformInDetectorB7R1L
Definition: ALFA_DetectorFactory.h:52
_CONFIGURATION::vecTransformInStationB7R1L
std::vector< double > vecTransformInStationB7R1L
Definition: ALFA_DetectorFactory.h:68
DEBUG
#define DEBUG
Definition: page_access.h:11
_CONFIGURATION::vecTransformInDetectorB7R1L
std::vector< double > vecTransformInDetectorB7R1L
Definition: ALFA_DetectorFactory.h:60
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
BEAMPIPEOUTERRADIUS
#define BEAMPIPEOUTERRADIUS
Definition: ALFA_DetectorFactory.cxx:53
mole
#define mole
StoredMaterialManager
This class holds one or more material managers and makes them storeable, under StoreGate.
Definition: StoredMaterialManager.h:28
ALFA_DetectorFactory::ConstructODFiberCladdings
void ConstructODFiberCladdings(const eRPotName eRPName, GeoFullPhysVol *pPhysMotherVolume, const HepGeom::Transform3D &MotherTransform, GeoAlignableTransform *pDetTransform)
Definition: ALFA_DetectorFactory.cxx:1159
ALFA_DetectorFactory::DefineMaterials
void DefineMaterials(StoredMaterialManager *pMaterialManager)
Definition: ALFA_DetectorFactory.cxx:223
EFT_ODFIBERU0
@ EFT_ODFIBERU0
Definition: ALFA_GeometryReader.h:26
CFGRPPOSPARAMS::UserTransformOfRPInStation
HepGeom::Transform3D UserTransformOfRPInStation
Definition: ALFA_GeometryReader.h:192
EGST_FILE
@ EGST_FILE
Definition: ALFA_GeometryReader.h:24
eGeoSourceType
eGeoSourceType
Definition: ALFA_GeometryReader.h:24
_CONFIGURATION::vecTransformInStationA7L1L
std::vector< double > vecTransformInStationA7L1L
Definition: ALFA_DetectorFactory.h:66
StoredAlignX::getAlignX
GeoAlignableTransform * getAlignX()
Definition: StoredAlignX.cxx:21
ALFA_DetectorFactory::ConstructODFibers01
void ConstructODFibers01(const eRPotName eRPName, const int iODPlate, eFiberType eFType, GeoFullPhysVol *pMotherVolume, const HepGeom::Transform3D &MotherTransform, const HepGeom::Transform3D &TransODCladding)
Definition: ALFA_DetectorFactory.cxx:1354
EFT_ODFIBERV1
@ EFT_ODFIBERV1
Definition: ALFA_GeometryReader.h:26
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
ERPN_A7L1L
@ ERPN_A7L1L
Definition: ALFA_GeometryReader.h:28
ALFAEDGEBEAMPIPEHLENGTH
#define ALFAEDGEBEAMPIPEHLENGTH
Definition: ALFA_constants.h:30
_CONFIGURATION::vecTransformInDetectorA7L1L
std::vector< double > vecTransformInDetectorA7L1L
Definition: ALFA_DetectorFactory.h:58
EFT_FIBEROD
@ EFT_FIBEROD
Definition: ALFA_GeometryReader.h:26
EMT_UNDEFINED
@ EMT_UNDEFINED
Definition: ALFA_GeometryReader.h:25
_ALFAPHYSVOLUME::pPhysVolume
GeoFullPhysVol * pPhysVolume
Definition: ALFA_DetectorFactory.h:27
_CONFIGURATION::bAddIBP
bool bAddIBP
Definition: ALFA_DetectorFactory.h:43
ALFAPLATESCNT
#define ALFAPLATESCNT
Definition: ALFA_constants.h:9
EASN_B7R1
@ EASN_B7R1
Definition: ALFA_GeometryReader.h:27
ALFA_DetectorFactory::UserTransformInDetector
HepGeom::Transform3D UserTransformInDetector(eRPotName eRPName)
Definition: ALFA_DetectorFactory.cxx:1796
PLATEPARAMS::fVCladdingSizeX
double fVCladdingSizeX
Definition: ALFA_GeometryReader.h:136
ALFA_DetectorFactory::m_MapMaterials
std::map< std::string, const GeoMaterial * > m_MapMaterials
Definition: ALFA_DetectorFactory.h:87
PLATEPARAMS
Definition: ALFA_GeometryReader.h:134