Commit 630d58c5 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia Committed by Graeme Stewart
Browse files

Fix MBTS geometry description for minimal geometry configurations (LArGeoEndcap-00-00-87)

	* Fix MBTS geometry description for minimal geometry configurations

2014-09-23  Andrey Sukharev <Andrey.Sukharev@cern.ch>

	* Change DETAILED_ABSORBER_EC to be an int rather than a bool to
	allow for multiple options. ATLASSIM-376
	* tag LArGeoEndcap-00-00-86
parent 60b70203
...@@ -130,21 +130,19 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) ...@@ -130,21 +130,19 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos)
DecodeVersionKey larVersionKey(geoModelSvc, "LAr"); DecodeVersionKey larVersionKey(geoModelSvc, "LAr");
// Flag for building detailed absorber. Default=false // Flag for building detailed absorber. Default=false
bool mlabs(false); int mlabs = 0;
IRDBRecordset_ptr larSwitches = pAccessSvc->getRecordsetPtr("LArSwitches", larVersionKey.tag(), larVersionKey.node()); IRDBRecordset_ptr larSwitches = pAccessSvc->getRecordsetPtr("LArSwitches", larVersionKey.tag(), larVersionKey.node());
if(larSwitches->size()!=0) { if(larSwitches->size()!=0){
if(!(*larSwitches)[0]->isFieldNull("DETAILED_ABSORBER_EC")) { if(!(*larSwitches)[0]->isFieldNull("DETAILED_ABSORBER_EC")){
mlabs = (bool)(*larSwitches)[0]->getInt("DETAILED_ABSORBER_EC"); mlabs = (*larSwitches)[0]->getInt("DETAILED_ABSORBER_EC");
} } else if(!(*larSwitches)[0]->isFieldNull("DETAILED_ABSORBER")){
else if(!(*larSwitches)[0]->isFieldNull("DETAILED_ABSORBER")) { mlabs = (*larSwitches)[0]->getInt("DETAILED_ABSORBER");
mlabs = (bool)(*larSwitches)[0]->getInt("DETAILED_ABSORBER"); }
} }
} if(mlabs > 0)
if(mlabs)
std::cout << "============== EMEC Construction ===============" std::cout << "============== EMEC Construction ==============="
<< std::endl << std::endl
<< " multi-layered version of absorbers activated " << " multi-layered version of absorbers activated, mlabs == " << mlabs
<< std::endl << std::endl
<< "================================================" << "================================================"
<< std::endl; << std::endl;
...@@ -160,25 +158,43 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) ...@@ -160,25 +158,43 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos)
if(!LAr) throw std::runtime_error("Error in EMECConstruction, std::LiquidArgon is not found."); if(!LAr) throw std::runtime_error("Error in EMECConstruction, std::LiquidArgon is not found.");
GeoMaterial* innerAbsorberMaterial = 0; GeoMaterial* innerAbsorberMaterial = 0;
if(mlabs){ std::string innerAbsorberMaterial_name = "LAr::EMEC_Thickabs";
if(mlabs > 0){
if(mlabs != 2){
// to be replaced with steel - finished by Adam Agocs // to be replaced with steel - finished by Adam Agocs
innerAbsorberMaterial = materialManager->getMaterial("std::Iron"); innerAbsorberMaterial_name = "std::Iron";
} else { } else {
innerAbsorberMaterial = materialManager->getMaterial("LAr::EMEC_Thickabs"); innerAbsorberMaterial_name = "LAr::EMEC_shell";
}
}
innerAbsorberMaterial = materialManager->getMaterial(innerAbsorberMaterial_name.c_str());
if(!innerAbsorberMaterial){
throw std::runtime_error(
(innerAbsorberMaterial_name +
" is not found for inner absorber in EMECConstruction.").c_str()
);
} }
if(!innerAbsorberMaterial) throw std::runtime_error("Error in EMECConstruction, LAr::EMEC_Thickabs is not found.");
GeoMaterial* outerAbsorberMaterial = 0; GeoMaterial* outerAbsorberMaterial = 0;
if(mlabs){ std::string outerAbsorberMaterial_name = "LAr::EMEC_Thinabs";
if(mlabs > 0){
if(mlabs != 2){
// to be replaced with steel - finished by Adam Agocs // to be replaced with steel - finished by Adam Agocs
outerAbsorberMaterial = materialManager->getMaterial("std::Iron"); outerAbsorberMaterial_name = "std::Iron";
} else { } else {
outerAbsorberMaterial = materialManager->getMaterial("LAr::EMEC_Thinabs"); outerAbsorberMaterial_name = "LAr::EMEC_shell";
}
}
outerAbsorberMaterial = materialManager->getMaterial(outerAbsorberMaterial_name.c_str());
if(!outerAbsorberMaterial){
throw std::runtime_error(
(outerAbsorberMaterial_name +
" is not found for outer absorber in EMECConstruction.").c_str()
);
} }
if(!outerAbsorberMaterial) throw std::runtime_error("Error in EMECConstruction, LAr::EMEC_Thinabs is not found.");
GeoMaterial *Glue = 0, *Lead = 0; GeoMaterial *Glue = 0, *Lead = 0;
if(mlabs){ if(mlabs > 0){
// to be replaced with glue and lead - finished by Adam Agocs // to be replaced with glue and lead - finished by Adam Agocs
Glue = materialManager->getMaterial("LAr::Glue"); Glue = materialManager->getMaterial("LAr::Glue");
if(!Glue) throw std::runtime_error("Error in EMECConstruction, LAr::Glue is not found."); if(!Glue) throw std::runtime_error("Error in EMECConstruction, LAr::Glue is not found.");
...@@ -326,15 +342,18 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) ...@@ -326,15 +342,18 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos)
fullPV->add(new GeoTransform(HepGeom::Transform3D())); fullPV->add(new GeoTransform(HepGeom::Transform3D()));
fullPV->add(innerElectrodePhysical); fullPV->add(innerElectrodePhysical);
if(mlabs){ if(mlabs > 0){
std::string IGWname = innerName + "::Glue"; GeoPhysVol* innerGluePhysical = innerAbsorberPhysical;
LArCustomShape* innerGlueShape = new LArCustomShape(IGWname); if(mlabs != 2){
GeoLogVol* innerGlueLogical = std::string IGWname = innerName + "::Glue";
new GeoLogVol(IGWname, innerGlueShape, Glue); LArCustomShape* innerGlueShape = new LArCustomShape(IGWname);
GeoPhysVol* innerGluePhysical = new GeoPhysVol(innerGlueLogical); GeoLogVol* innerGlueLogical =
innerAbsorberPhysical->add(new GeoIdentifierTag(1)); new GeoLogVol(IGWname, innerGlueShape, Glue);
innerAbsorberPhysical->add(new GeoTransform(HepGeom::Transform3D())); innerGluePhysical = new GeoPhysVol(innerGlueLogical);
innerAbsorberPhysical->add(innerGluePhysical); innerAbsorberPhysical->add(new GeoIdentifierTag(1));
innerAbsorberPhysical->add(new GeoTransform(HepGeom::Transform3D()));
innerAbsorberPhysical->add(innerGluePhysical);
}
std::string ILWname = innerName + "::Lead"; std::string ILWname = innerName + "::Lead";
LArCustomShape* innerLeadShape = new LArCustomShape(ILWname); LArCustomShape* innerLeadShape = new LArCustomShape(ILWname);
...@@ -398,15 +417,18 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) ...@@ -398,15 +417,18 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos)
fullPV->add(new GeoTransform(HepGeom::Transform3D())); fullPV->add(new GeoTransform(HepGeom::Transform3D()));
fullPV->add(outerElectrodePhysical); fullPV->add(outerElectrodePhysical);
if(mlabs){ if(mlabs > 0){
std::string OGWname = outerName + "::Glue"; GeoPhysVol* outerGluePhysical = outerAbsorberPhysical;
LArCustomShape* outerGlueShape = new LArCustomShape(OGWname); if(mlabs != 2){
GeoLogVol* outerGlueLogical = std::string OGWname = outerName + "::Glue";
new GeoLogVol(OGWname, outerGlueShape, Glue); LArCustomShape* outerGlueShape = new LArCustomShape(OGWname);
GeoPhysVol* outerGluePhysical = new GeoPhysVol(outerGlueLogical); GeoLogVol* outerGlueLogical =
outerAbsorberPhysical->add(new GeoIdentifierTag(1)); new GeoLogVol(OGWname, outerGlueShape, Glue);
outerAbsorberPhysical->add(new GeoTransform(HepGeom::Transform3D())); outerGluePhysical = new GeoPhysVol(outerGlueLogical);
outerAbsorberPhysical->add(outerGluePhysical); outerAbsorberPhysical->add(new GeoIdentifierTag(1));
outerAbsorberPhysical->add(new GeoTransform(HepGeom::Transform3D()));
outerAbsorberPhysical->add(outerGluePhysical);
}
std::string OLWname = outerName + "::Lead"; std::string OLWname = outerName + "::Lead";
LArCustomShape* outerLeadShape = new LArCustomShape(OLWname); LArCustomShape* outerLeadShape = new LArCustomShape(OLWname);
......
...@@ -701,6 +701,10 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) ...@@ -701,6 +701,10 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos)
double zposMM = 0.; double zposMM = 0.;
std::map<std::string,unsigned> trdMap; // Used in the new description only std::map<std::string,unsigned> trdMap; // Used in the new description only
for(unsigned indTrd(0);indTrd<mbtsTrds->size();++indTrd) {
std::string keyTrd = (*mbtsTrds)[indTrd]->getString("TRD");
trdMap[keyTrd]=indTrd;
}
// Build material geometry only if the FullGeo flag has been set // Build material geometry only if the FullGeo flag has been set
if(m_fullGeo) { if(m_fullGeo) {
...@@ -917,10 +921,6 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) ...@@ -917,10 +921,6 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos)
} }
else { else {
// The "new" description: scintillators + aluminum envelopes + plastic plugs + aluminum press bars (only for RUN1) // The "new" description: scintillators + aluminum envelopes + plastic plugs + aluminum press bars (only for RUN1)
for(unsigned indTrd(0);indTrd<mbtsTrds->size();++indTrd) {
std::string keyTrd = (*mbtsTrds)[indTrd]->getString("TRD");
trdMap[keyTrd]=indTrd;
}
// General parameters // General parameters
int nAirEnv = (*mbtsGen)[0]->getInt("NSCIN"); int nAirEnv = (*mbtsGen)[0]->getInt("NSCIN");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment