64 ISvcLocator *svcLocator = Gaudi::svcLocator();
66 if (svcLocator->service(
"MessageSvc",
msgSvc,
true )==StatusCode::FAILURE) {
67 throw std::runtime_error(
"Error in TableConstructionH62002, cannot access MessageSvc");
70 MsgStream
log(
msgSvc,
"LArGeo::TableConstructionH62002");
72 log <<
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
73 log <<
"+ +" << std::endl;
74 log <<
"+ HELLO from LArGeo::TableConstructionH62002 +" << std::endl;
75 log <<
"+ +" << std::endl;
76 log <<
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
80 if (svcLocator->service(
"DetectorStore",
detStore,
false )==StatusCode::FAILURE) {
81 throw std::runtime_error(
"Error in TableConstructionH62002, cannot access DetectorStore");
85 if (geoDbTagSvc.retrieve().isFailure()) {
86 throw std::runtime_error (
"Cannot locate GeoDbTagSvc!!");
92 if (StatusCode::SUCCESS !=
detStore->retrieve(materialManager, std::string(
"MATERIALS")))
return nullptr;
94 const GeoMaterial *Air = materialManager->
getMaterial(
"std::Air");
95 if (!Air)
throw std::runtime_error(
"Error in TableConstructionH62002, std::Air is not found.");
97 const GeoMaterial *Aluminium = materialManager->
getMaterial(
"std::Aluminium");
98 if (!Aluminium)
throw std::runtime_error(
"Error in TableConstructionH62002, std::Aluminium is not found.");
107 const GeoMaterial *Scint = materialManager->
getMaterial(
"std::Polystyrene");
108 if (!Scint)
throw std::runtime_error(
"Error in TableConstructionH62002, std::Polystyrene is not found.");
110 const GeoMaterial *Mylar = materialManager->
getMaterial(
"std::Mylar");
111 if (!Mylar)
throw std::runtime_error(
"Error in TableConstructionH62002, std::Mylar is not found.");
118 std::string LArVersion = geoDbTagSvc->LAr_VersionOverride();
120 std::string detectorKey = LArVersion.empty() ?
AtlasVersion : LArVersion;
121 std::string detectorNode = LArVersion.empty() ?
"ATLAS" :
"LAr";
134 std::string baseName =
"LAr::TBH62002";
135 std::string H62002TableName = baseName +
"::Table";
141 GeoBox* H62002TableShape =
new GeoBox( H62002TableXY, H62002TableXY, H62002TableZ );
142 const GeoLogVol* H62002TableLogical =
new GeoLogVol( H62002TableName, H62002TableShape, Air );
152 log <<
"Create F1/F2 Scintillators ..." << std::endl;
159 std::vector<double> v_ScintZ;
162 const double ScintDx =
Fx;
163 const double ScintDy =
Fy;
164 const double ScintDz = Fz;
168 GeoBox* ScintShape =
new GeoBox(ScintDx, ScintDy, ScintDz);
169 std::string ScintName = baseName +
"::Scintillator";
170 GeoLogVol* ScintLogical =
new GeoLogVol( ScintName, ScintShape, Scint );
171 GeoIntrusivePtr<GeoPhysVol> ScintPhysical =
new GeoPhysVol( ScintLogical );
172 for (
unsigned int i = 0;
i < v_ScintZ.size();
i++ ) {
175 log << MSG::INFO <<
" Position the F Scintillator at: " << v_ScintZ[
i ] <<
endmsg ;
187 const int MwpcNumber = 3;
188 std::vector<double> v_MwpcPos;
193 MWPCConstruction mwpcXConstruction (WireStep);
194 PVLink mwpcEnvelope = mwpcXConstruction.GetEnvelope();
195 for (
int imwpc = 0; imwpc<MwpcNumber ; imwpc++)