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

#include <CrackDMConstruction.h>

Inheritance diagram for CrackDMConstruction:
Collaboration diagram for CrackDMConstruction:

Public Member Functions

 CrackDMConstruction ()=delete
 CrackDMConstruction (IRDBAccessSvc *rdbAccess, IGeoModelSvc *geoModel, StoredMaterialManager *materialManager, bool activateFT)
void create (GeoFullPhysVol *envelope)
bool msgLvl (const MSG::Level lvl) const
 Test the output level.
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
void setLevel (MSG::Level lvl)
 Change the current logging level.

Private Member Functions

void initMessaging () const
 Initialize our message level and MessageSvc.

Private Attributes

IRDBAccessSvcm_rdbAccess {nullptr}
IGeoModelSvcm_geoModel {nullptr}
StoredMaterialManagerm_materialManager {nullptr}
bool m_activateFT {false}
std::string m_nm
 Message source name.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels)
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging)

Detailed Description

Definition at line 15 of file CrackDMConstruction.h.

Constructor & Destructor Documentation

◆ CrackDMConstruction() [1/2]

CrackDMConstruction::CrackDMConstruction ( )
delete

◆ CrackDMConstruction() [2/2]

CrackDMConstruction::CrackDMConstruction ( IRDBAccessSvc * rdbAccess,
IGeoModelSvc * geoModel,
StoredMaterialManager * materialManager,
bool activateFT )

Definition at line 848 of file CrackDMConstruction.cxx.

852 : AthMessaging("CrackDMConstruction")
853 , m_rdbAccess(rdbAccess)
854 , m_geoModel(geoModel)
855 , m_materialManager(materialManager)
856 , m_activateFT(activateFT)
857{
858}
AthMessaging()
Default constructor:
IRDBAccessSvc * m_rdbAccess
StoredMaterialManager * m_materialManager

Member Function Documentation

◆ create()

void CrackDMConstruction::create ( GeoFullPhysVol * envelope)

Definition at line 860 of file CrackDMConstruction.cxx.

861{
862 createFromDB(envelope
864 , m_geoModel
866
867 if(m_activateFT){
868 std::string name = "LAr::Barrel::SignalFT::";
869 ATH_MSG_DEBUG("creating " << name << " volumes");
870
871 const GeoMaterial* iron = m_materialManager->getMaterial("std::Iron");
872
873 const double wflange_height = 37.*Gaudi::Units::mm;
874 const double wflange_R = 0.5*360.*Gaudi::Units::mm;
875 const GeoMaterial* wflange_mat = m_materialManager->getMaterial("LAr::FT::WarmFlange");
876
877 GeoShape* wflange = new GeoTube(0., wflange_R, wflange_height/2);
878 GeoLogVol* wflangeLV = new GeoLogVol(name + "WarmFlange", wflange, wflange_mat);
879 GeoPhysVol* wflangePV = new GeoPhysVol(wflangeLV);
880
881 const double bellow_height = 225.*Gaudi::Units::mm;
882 const double bellow_Router = 0.5*299.*Gaudi::Units::mm; // this also to be cut in warm wall
883 const double bellow_wall = 15.*Gaudi::Units::mm;
884 const GeoMaterial* bellow_mat = m_materialManager->getMaterial("LAr::FT::Bellow");
885
886 const double bellow_Rinner = bellow_Router - bellow_wall;
887 GeoShape* bellow = new GeoTube(bellow_Rinner, bellow_Router, bellow_height/2);
888 GeoLogVol* bellowLV = new GeoLogVol(name + "Bellow", bellow, bellow_mat);
889 GeoPhysVol* bellowPV = new GeoPhysVol(bellowLV);
890
891 const GeoMaterial* vcables_mat = m_materialManager->getMaterial("LAr::FT::VacuumCables");
892
893 GeoShape* vcables = new GeoTube(0., bellow_Rinner, bellow_height/2);
894 GeoLogVol* vcablesLV = new GeoLogVol(name + "VacuumCables", vcables, vcables_mat);
895 GeoPhysVol* vcablesPV = new GeoPhysVol(vcablesLV);
896
897 const double cflange_height = 35.*Gaudi::Units::mm;
898 const double cflange_Router = 0.5*283.*Gaudi::Units::mm;
899 const GeoMaterial* cflange_mat = m_materialManager->getMaterial("LAr::FT::ColdFlange");
900 GeoShape* cflange = new GeoTube(0., cflange_Router, cflange_height/2);
901 GeoLogVol* cflangeLV = new GeoLogVol(name + "ColdFlange", cflange, cflange_mat);
902 GeoPhysVol* cflangePV = new GeoPhysVol(cflangeLV);
903
904 const double coldbox1_Router = cflange_Router;
905 const double coldbox1_wall = 0.134*2.54*Gaudi::Units::cm;
906 const double coldbox1_height = 90.*Gaudi::Units::mm;
907 const double coldbox2_height = 16.*Gaudi::Units::mm;
908 const double hole_r = 0.5*133.*Gaudi::Units::mm;
909 const double hole_shift = -31.*Gaudi::Units::mm;
910 const double coldbox3_Router = 0.5*140.*Gaudi::Units::mm; // this also to be cut in cold wall
911 const double barrel_dist_from_outer_warm_wall_to_inner_cold_wall =
912 500.*Gaudi::Units::mm;
913 const double coldbox3_height = // adjust to match dist between cryo walls
914 barrel_dist_from_outer_warm_wall_to_inner_cold_wall
915 - bellow_height - coldbox1_height - coldbox2_height;
916 ATH_MSG_DEBUG("funnel tube len = " << coldbox3_height / Gaudi::Units::mm << " mm ");
917 const GeoMaterial* coldbox_mat = iron;
918 GeoShape* coldbox1 = new GeoTube(coldbox1_Router - coldbox1_wall, coldbox1_Router, coldbox1_height/2); // wide part
919 GeoShape* coldbox11 = new GeoTube(0., coldbox1_Router, coldbox1_height/2); // wide part for FTenvelope
920 GeoLogVol* coldbox1LV = new GeoLogVol(name + "ColdBox1", coldbox1, coldbox_mat);
921 GeoPhysVol* coldbox1PV = new GeoPhysVol(coldbox1LV);
922 GeoShape* coldbox21 = new GeoTube(0., coldbox1_Router, coldbox2_height/2); // plate
923 GeoShape* coldbox22 = new GeoTube(0., hole_r, coldbox2_height); // hole in the plate
924 const GeoShape& coldbox2 = coldbox21->subtract((*coldbox22) << GeoTrf::TranslateY3D(hole_shift));
925 GeoLogVol* coldbox2LV = new GeoLogVol(name + "ColdBox2", &coldbox2, coldbox_mat);
926 GeoPhysVol* coldbox2PV = new GeoPhysVol(coldbox2LV);
927 GeoShape* coldbox3 = new GeoTube(hole_r, coldbox3_Router, coldbox3_height/2); // narrow part
928 GeoShape* coldbox31 = new GeoTube(0., coldbox3_Router, coldbox3_height/2); // narrow part for FTenvelope
929 GeoLogVol* coldbox3LV = new GeoLogVol(name + "ColdBox3", coldbox3, coldbox_mat);
930 GeoPhysVol* coldbox3PV = new GeoPhysVol(coldbox3LV);
931
932 GeoTrf::TranslateZ3D bellow_pos(-wflange_height/2 - bellow_height/2);
933 GeoTrf::TranslateZ3D cflange_pos(-wflange_height/2 - bellow_height - cflange_height/2);
934 GeoTrf::TranslateZ3D coldbox1_pos(-wflange_height/2 - bellow_height - cflange_height - coldbox1_height/2);
935 GeoTrf::TranslateZ3D coldbox2_pos(-wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height/2);
936 GeoTrf::Translate3D coldbox2hole_pos(
937 0., hole_shift,
938 -wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height/2
939 );
940 GeoTrf::Translate3D coldbox3_pos(
941 0., hole_shift,
942 -wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height - coldbox3_height/2
943 );
944
945 const GeoShape& FTenvelope = wflange->add(
946 (*bellow) << bellow_pos
947 ).add(
948 (*cflange) << cflange_pos
949 ).add(
950 (*coldbox11) << coldbox1_pos
951 ).add(
952 (*coldbox21) << coldbox2_pos
953 ).add(
954 (*coldbox31) << coldbox3_pos
955 );
956
957 GeoLogVol* FTLV = new GeoLogVol(name + "Envelope",
958 &FTenvelope,
959 m_materialManager->getMaterial("std::Air")
960 );
961 GeoPhysVol* FTPV = new GeoPhysVol(FTLV);
962
963 FTPV->add(wflangePV);
964 GeoTransform *bellow_trf = new GeoTransform(bellow_pos);
965 FTPV->add(bellow_trf);
966 FTPV->add(bellowPV);
967 FTPV->add(bellow_trf);
968 FTPV->add(vcablesPV);
969 GeoTransform *cflange_trf = new GeoTransform(cflange_pos);
970 FTPV->add(cflange_trf);
971 FTPV->add(cflangePV);
972 GeoTransform *coldbox1_trf = new GeoTransform(coldbox1_pos);
973 FTPV->add(coldbox1_trf);
974 FTPV->add(coldbox1PV);
975 GeoTransform *coldbox2_trf = new GeoTransform(coldbox2_pos);
976 FTPV->add(coldbox2_trf);
977 FTPV->add(coldbox2PV);
978 GeoTransform *coldbox3_trf = new GeoTransform(coldbox3_pos);
979 FTPV->add(coldbox3_trf);
980 FTPV->add(coldbox3PV);
981
982 const GeoMaterial* lar_mat = m_materialManager->getMaterial("std::LiquidArgon");
983 GeoShape* lar1 = new GeoTube(0., coldbox1_Router - coldbox1_wall, coldbox1_height/2);
984 GeoShape* lar2 = new GeoTube(0., hole_r, coldbox1_height);
985 const GeoShape& lar = lar1->subtract((*lar2) << GeoTrf::TranslateY3D(hole_shift));
986 GeoLogVol* larLV = new GeoLogVol(name + "LAr", &lar, lar_mat);
987 GeoPhysVol* larPV = new GeoPhysVol(larLV);
988 FTPV->add(coldbox1_trf);
989 FTPV->add(larPV);
990
991 const GeoMaterial *pigtail_mat = m_materialManager->getMaterial("LAr::FT::Pigtail");
992
993 const double pth = (coldbox1_height + coldbox2_height + coldbox3_height) / 2;
994 GeoTransform *pigtail_trf = new GeoTransform(
995 GeoTrf::Translate3D(0, hole_shift,
996 -wflange_height/2 - bellow_height - cflange_height - pth
997 ));
998 GeoShape* pigtail = new GeoTube(0., hole_r, pth);
999 GeoLogVol* pigtailLV = new GeoLogVol(name + "Pigtail", pigtail, pigtail_mat);
1000 GeoPhysVol* pigtailPV = new GeoPhysVol(pigtailLV);
1001 FTPV->add(pigtail_trf);
1002 FTPV->add(pigtailPV);
1003
1004 // total lenght should be 28.5 cm
1005 const double ocable_len = 10.*Gaudi::Units::cm;
1006 const double ocable_R = (1.1/2)*sqrt(1920*2.85)*Gaudi::Units::mm;
1007 const GeoMaterial* ocable_mat = m_materialManager->getMaterial("LAr::FT::Cable");
1008 GeoShape* ocable = new GeoTube(0., ocable_R, ocable_len / 2);
1009 GeoLogVol* ocableLV = new GeoLogVol("LAr::Barrel::FTCables", ocable, ocable_mat);
1010 GeoPhysVol* ocablePV = new GeoPhysVol(ocableLV);
1011
1012 // todo: take cryostat parameters from DB
1013 const double r0 = 277.5*Gaudi::Units::cm // cryo warm wall outer radius
1014 + wflange_height/2; // warm flange is abobe the wall
1015 const double r2 = r0 + wflange_height/2 + ocable_len/2;
1016 const double z_pos = 3170.*Gaudi::Units::mm;
1017 const int NCrates = 16;
1018 const double dphi = 4.*Gaudi::Units::deg;
1019
1020 auto put1 = [&envelope](GeoPhysVol *object, double r, double phi, double z)
1021 {
1022 envelope->add(new GeoTransform(
1023 GeoTrf::Translate3D(r*cos(phi), r*sin(phi), z) *
1024 GeoTrf::RotateX3D(90.*Gaudi::Units::deg) *
1025 GeoTrf::RotateY3D(phi + 90.*Gaudi::Units::deg)
1026 ));
1027 if(z < 0){
1028 envelope->add(new GeoTransform(GeoTrf::RotateZ3D(180.*Gaudi::Units::deg)));
1029 }
1030 envelope->add(object);
1031 };
1032
1033 auto put = [&put1, &FTPV, &ocablePV, r0, r2](double phi, double z)
1034 {
1035 put1(FTPV, r0, phi, z);
1036 put1(ocablePV, r2, phi, z);
1037 };
1038
1039 for(int i = 0; i < 16; ++ i){
1040 const double phi = 360.*Gaudi::Units::deg / NCrates * i;
1041 put(phi - dphi, z_pos);
1042 put(phi + dphi, z_pos);
1043 put(phi - dphi, -z_pos);
1044 put(phi + dphi, -z_pos);
1045 }
1046 }
1047
1048}
Scalar phi() const
phi method
#define ATH_MSG_DEBUG(x)
void createFromDB(GeoFullPhysVol *envelope, IRDBAccessSvc *rdbAccess, IGeoModelSvc *geoModel, StoredMaterialManager *materialManager)
#define z
int r
Definition globals.cxx:22
const double r0
electron radius{cm}

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40{
42 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 163 of file AthMessaging.h.

164{
165 MsgStream* ms = m_msg_tls.get();
166 if (!ms) {
167 if (!m_initialized.test_and_set()) initMessaging();
168 ms = new MsgStream(m_imsg,m_nm);
169 m_msg_tls.reset( ms );
170 }
171
172 ms->setLevel (m_lvl);
173 return *ms;
174}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
void initMessaging() const
Initialize our message level and MessageSvc.

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 178 of file AthMessaging.h.

179{ return msg() << lvl; }
MsgStream & msg() const
The standard message stream.

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152{
153 if (m_lvl <= lvl) {
154 msg() << lvl;
155 return true;
156 } else {
157 return false;
158 }
159}

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29{
30 m_lvl = lvl;
31}

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_activateFT

bool CrackDMConstruction::m_activateFT {false}
private

Definition at line 30 of file CrackDMConstruction.h.

30{false};

◆ m_geoModel

IGeoModelSvc* CrackDMConstruction::m_geoModel {nullptr}
private

Definition at line 28 of file CrackDMConstruction.h.

28{nullptr};

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

138{ MSG::NIL };

◆ m_materialManager

StoredMaterialManager* CrackDMConstruction::m_materialManager {nullptr}
private

Definition at line 29 of file CrackDMConstruction.h.

29{nullptr};

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_rdbAccess

IRDBAccessSvc* CrackDMConstruction::m_rdbAccess {nullptr}
private

Definition at line 27 of file CrackDMConstruction.h.

27{nullptr};

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