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 GeoLogVol* coldbox1LV = new GeoLogVol(name + "ColdBox1", coldbox1, coldbox_mat);
920 GeoPhysVol* coldbox1PV = new GeoPhysVol(coldbox1LV);
921 GeoShape* coldbox21 = new GeoTube(0., coldbox1_Router, coldbox2_height/2); // plate
922 GeoShape* coldbox22 = new GeoTube(0., hole_r, coldbox2_height); // hole in the plate
923 const GeoShape& coldbox2 = coldbox21->subtract((*coldbox22) << GeoTrf::TranslateY3D(hole_shift));
924 GeoLogVol* coldbox2LV = new GeoLogVol(name + "ColdBox2", &coldbox2, coldbox_mat);
925 GeoPhysVol* coldbox2PV = new GeoPhysVol(coldbox2LV);
926 GeoShape* coldbox3 = new GeoTube(hole_r, coldbox3_Router, coldbox3_height/2); // narrow part
927 GeoShape* coldbox31 = new GeoTube(0., coldbox3_Router, coldbox3_height/2); // narrow part for FTenvelope
928 GeoLogVol* coldbox3LV = new GeoLogVol(name + "ColdBox3", coldbox3, coldbox_mat);
929 GeoPhysVol* coldbox3PV = new GeoPhysVol(coldbox3LV);
930
931 GeoTrf::TranslateZ3D bellow_pos(-wflange_height/2 - bellow_height/2);
932 GeoTrf::TranslateZ3D cflange_pos(-wflange_height/2 - bellow_height - cflange_height/2);
933 GeoTrf::TranslateZ3D coldbox1_pos(-wflange_height/2 - bellow_height - cflange_height - coldbox1_height/2);
934 GeoTrf::TranslateZ3D coldbox2_pos(-wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height/2);
935 GeoTrf::Translate3D coldbox2hole_pos(
936 0., hole_shift,
937 -wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height/2
938 );
939 GeoTrf::Translate3D coldbox3_pos(
940 0., hole_shift,
941 -wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height - coldbox3_height/2
942 );
943
944 // The SignalFT air envelope is built as one coaxial polycone, plus one
945 // boolean union with the non-coaxial ColdBox3 tube below. From negative
946 // to positive z, the polycone covers these coaxial envelope sections:
947 // - z_min to the bellow: ColdBox2 plate, ColdBox1 and ColdFlange,
948 // all enclosed at coldbox1_Router;
949 // - bellow: Bellow and VacuumCables, enclosed at bellow_Router;
950 // - warm end: WarmFlange, enclosed at wflange_R.
951 // Repeated z planes below encode the radius steps between these sections.
952 GeoPcon* coaxialEnvelope = new GeoPcon(0., 360.*Gaudi::Units::deg);
953 coaxialEnvelope->addPlane(
954 -wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height,
955 0., coldbox1_Router
956 );
957 coaxialEnvelope->addPlane(
958 -wflange_height/2 - bellow_height,
959 0., coldbox1_Router
960 );
961 coaxialEnvelope->addPlane(
962 -wflange_height/2 - bellow_height,
963 0., bellow_Router
964 );
965 coaxialEnvelope->addPlane(
966 -wflange_height/2,
967 0., bellow_Router
968 );
969 coaxialEnvelope->addPlane(
970 -wflange_height/2,
971 0., wflange_R
972 );
973 coaxialEnvelope->addPlane(
974 wflange_height/2,
975 0., wflange_R
976 );
977
978 const GeoShape& FTenvelope = coaxialEnvelope->add((*coldbox31) << coldbox3_pos);
979
980 GeoLogVol* FTLV = new GeoLogVol(name + "Envelope",
981 &FTenvelope,
982 m_materialManager->getMaterial("std::Air")
983 );
984 GeoPhysVol* FTPV = new GeoPhysVol(FTLV);
985
986 FTPV->add(wflangePV);
987 GeoTransform *bellow_trf = new GeoTransform(bellow_pos);
988 FTPV->add(bellow_trf);
989 FTPV->add(bellowPV);
990 FTPV->add(bellow_trf);
991 FTPV->add(vcablesPV);
992 GeoTransform *cflange_trf = new GeoTransform(cflange_pos);
993 FTPV->add(cflange_trf);
994 FTPV->add(cflangePV);
995 GeoTransform *coldbox1_trf = new GeoTransform(coldbox1_pos);
996 FTPV->add(coldbox1_trf);
997 FTPV->add(coldbox1PV);
998 GeoTransform *coldbox2_trf = new GeoTransform(coldbox2_pos);
999 FTPV->add(coldbox2_trf);
1000 FTPV->add(coldbox2PV);
1001 GeoTransform *coldbox3_trf = new GeoTransform(coldbox3_pos);
1002 FTPV->add(coldbox3_trf);
1003 FTPV->add(coldbox3PV);
1004
1005 const GeoMaterial* lar_mat = m_materialManager->getMaterial("std::LiquidArgon");
1006 GeoShape* lar1 = new GeoTube(0., coldbox1_Router - coldbox1_wall, coldbox1_height/2);
1007 GeoShape* lar2 = new GeoTube(0., hole_r, coldbox1_height);
1008 const GeoShape& lar = lar1->subtract((*lar2) << GeoTrf::TranslateY3D(hole_shift));
1009 GeoLogVol* larLV = new GeoLogVol(name + "LAr", &lar, lar_mat);
1010 GeoPhysVol* larPV = new GeoPhysVol(larLV);
1011 FTPV->add(coldbox1_trf);
1012 FTPV->add(larPV);
1013
1014 const GeoMaterial *pigtail_mat = m_materialManager->getMaterial("LAr::FT::Pigtail");
1015
1016 const double pth = (coldbox1_height + coldbox2_height + coldbox3_height) / 2;
1017 GeoTransform *pigtail_trf = new GeoTransform(
1018 GeoTrf::Translate3D(0, hole_shift,
1019 -wflange_height/2 - bellow_height - cflange_height - pth
1020 ));
1021 GeoShape* pigtail = new GeoTube(0., hole_r, pth);
1022 GeoLogVol* pigtailLV = new GeoLogVol(name + "Pigtail", pigtail, pigtail_mat);
1023 GeoPhysVol* pigtailPV = new GeoPhysVol(pigtailLV);
1024 FTPV->add(pigtail_trf);
1025 FTPV->add(pigtailPV);
1026
1027 // total lenght should be 28.5 cm
1028 const double ocable_len = 10.*Gaudi::Units::cm;
1029 const double ocable_R = (1.1/2)*sqrt(1920*2.85)*Gaudi::Units::mm;
1030 const GeoMaterial* ocable_mat = m_materialManager->getMaterial("LAr::FT::Cable");
1031 GeoShape* ocable = new GeoTube(0., ocable_R, ocable_len / 2);
1032 GeoLogVol* ocableLV = new GeoLogVol("LAr::Barrel::FTCables", ocable, ocable_mat);
1033 GeoPhysVol* ocablePV = new GeoPhysVol(ocableLV);
1034
1035 // todo: take cryostat parameters from DB
1036 const double r0 = 277.5*Gaudi::Units::cm // cryo warm wall outer radius
1037 + wflange_height/2; // warm flange is abobe the wall
1038 const double r2 = r0 + wflange_height/2 + ocable_len/2;
1039 const double z_pos = 3170.*Gaudi::Units::mm;
1040 const int NCrates = 16;
1041 const double dphi = 4.*Gaudi::Units::deg;
1042
1043 auto put1 = [&envelope](GeoPhysVol *object, double r, double phi, double z)
1044 {
1045 envelope->add(new GeoTransform(
1046 GeoTrf::Translate3D(r*cos(phi), r*sin(phi), z) *
1047 GeoTrf::RotateX3D(90.*Gaudi::Units::deg) *
1048 GeoTrf::RotateY3D(phi + 90.*Gaudi::Units::deg)
1049 ));
1050 if(z < 0){
1051 envelope->add(new GeoTransform(GeoTrf::RotateZ3D(180.*Gaudi::Units::deg)));
1052 }
1053 envelope->add(object);
1054 };
1055
1056 auto put = [&put1, &FTPV, &ocablePV, r0, r2](double phi, double z)
1057 {
1058 put1(FTPV, r0, phi, z);
1059 put1(ocablePV, r2, phi, z);
1060 };
1061
1062 for(int i = 0; i < 16; ++ i){
1063 const double phi = 360.*Gaudi::Units::deg / NCrates * i;
1064 put(phi - dphi, z_pos);
1065 put(phi + dphi, z_pos);
1066 put(phi - dphi, -z_pos);
1067 put(phi + dphi, -z_pos);
1068 }
1069 }
1070
1071}
Scalar phi() const
phi method
#define ATH_MSG_DEBUG(x,...)
static const unsigned int NCrates
void createFromDB(GeoFullPhysVol *envelope, IRDBAccessSvc *rdbAccess, IGeoModelSvc *geoModel, StoredMaterialManager *materialManager)
#define z
int r
Definition globals.cxx:22
std::pair< const_iterator, bool > put(val_t key, size_t hash, val_t val, bool overwrite, const typename Updater_t::Context_t &ctx)
Add an entry to the table.
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)
int outputLevel(const IMessageSvc *ims, const std::string &source)

◆ 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 167 of file AthMessaging.h.

168{
169 MsgStream* ms = m_msg_tls.get();
170 if (!ms) {
171 if (!m_initialized.test_and_set()) initMessaging();
172 ms = new MsgStream(m_imsg,m_nm);
173 m_msg_tls.reset( ms );
174 }
175
176 ms->setLevel (m_lvl);
177 return *ms;
178}
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 182 of file AthMessaging.h.

183{ 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 user did not set explicit message level we have to initialize
154 // the messaging and retrieve the default via the MessageSvc.
155 if (m_lvl==MSG::NIL && !m_initialized.test_and_set()) initMessaging();
156
157 if (m_lvl <= lvl) {
158 msg() << lvl;
159 return true;
160 } else {
161 return false;
162 }
163}

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