Skip to content
Snippets Groups Projects
Commit 3ad7f57f authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia Committed by Graeme Stewart
Browse files

Migrate to CLHEP v21 (LArGeoCode-00-02-18)

parent 0dd94efd
No related branches found
No related tags found
No related merge requests found
# Packages needed to compile this one:
PACKAGES := DetectorDescription/GeoModel/GeoModelKernel
# Standardized compilation commands.
include $(MAKEPACKAGE)
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef DATABASEACCESSTOOL_H_
#define DATABASEACCESSTOOL_H_
#include <string>
//---------------------------------------------------------------------
//
// This class gets data from the detector description database. If no
// connection is open we create one. We drop it when the object goes
// out of scope.
//
//---------------------------------------------------------------------
class DatabaseAccessTool {
public:
// Constructor:
DatabaseAccessTool();
// Destructor:
~DatabaseAccessTool();
// Access the data. The table will be taken from the current tagged ATLAS
// version. If a fallback version name is provided then the value will be
// taken from the fallback name.
double getDouble(const std::string & TableName, const std::string & FallbackVersion, const std::string & ColumnName) const;
private:
// It is illegal to copy or clone:
DatabaseAccessTool & operator= (const DatabaseAccessTool & );
DatabaseAccessTool(const DatabaseAccessTool & );
// Internals:
class Clockwork;
Clockwork *cw;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef _LARMATERIALMANAGER_H_
#define _LARMATERIALMANAGER_H_
//----------------------------------------------------------//
// //
// class LArMaterialManager This is a material manager //
// with special materials for LAR which require geometrical //
// information to calculate because they are blended. //
// Other materials (non blended, or not blended using //
// geometrical constants) should go to NovaMaterialManager //
// in GeoModelService, for the brief duration of its //
// miserable existence. From which point onward materials //
// will be stored in Oracle. //
// //
// Joe Boudreau March 2003 //
// //
// ------------------------ //
// //
// LArMaterialManager class switched to the new interface //
// of StoredMaterialManager. //
// As of now it does need to be subclassed from //
// AbsMaterialManager and the only thing it has to do is //
// to build LAr specific materials and store them into //
// central Stored Material manager //
// //
// V.Tsulaia, Jan-2009 //
// //
//----------------------------------------------------------//
class StoreGateSvc;
class StoredMaterialManager;
class IMessageSvc;
class LArMaterialManager
{
public:
// Constructor:
LArMaterialManager(StoreGateSvc *pDetStore);
// Destructor:
~LArMaterialManager();
// Build LAr specific blended materials
void buildMaterials();
private:
StoredMaterialManager* m_storedManager;
IMessageSvc* m_msgSvc;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// VDetectorParameters
// 30-Jun-2003 Bill Seligman
// Interface class that defines how the different detector-parameter
// methods return values to the simulation.
// Purpose: This class isolates the method of storing detector
// parameters from the simulation itself. Detector parameters might
// be stored as constants, as entries in a MySQL database, or in some
// other form; they might be stored in AGE structures or in some other
// form. This interface separates the details of how the parameters
// are stored from the simulation's geometry and hit-calculation
// routines.
#ifndef __LArGeo_VDetectorParameters_h_
#define __LArGeo_VDetectorParameters_h_
#include <string>
#include <limits.h>
namespace LArGeo {
class VDetectorParameters {
public:
virtual ~VDetectorParameters() {};
// This class uses a modified version of the singleton pattern.
// It has to be explicitly initialized with a "SetInstance" call,
// whose parameter is some class that inherits from
// VDetectorParameters and implements the GetValue method.
// Thereafter, any routine in the simulation can use the result of
// "GetInstance" to find out how to get its parameters.
static void SetInstance(VDetectorParameters*);
static VDetectorParameters* GetInstance();
// This is the general access method for obtaining valued from
// some source of detector parameters. THe paramter is identified
// by some string. Optionally, up to five integers can be used
// (typically to index an array of some sort). The default value
// of these integers, INT_MIN, comes from limits.h; it's the
// minimum possible integer value that can be represented on the
// computer.
virtual double GetValue(const std::string&,
const int i0 = INT_MIN,
const int i1 = INT_MIN,
const int i2 = INT_MIN,
const int i3 = INT_MIN,
const int i4 = INT_MIN ) = 0;
protected:
VDetectorParameters() {};
private:
static VDetectorParameters* s_instance;
};
} // namespace LArGeo
#endif // __LArGeo_VDetectorParameters_h_
package LArGeoCode
author Joe Boudreau <boudreau@pitt.edu>
author Bill Seligman <seligman@nevis.columbia.edu>
use AtlasPolicy AtlasPolicy-*
# Build the library (and export the headers)
library LArGeoCode *.cxx
apply_pattern installed_library
private
use AtlasCLHEP AtlasCLHEP-* External
use GaudiInterface GaudiInterface-* External
use GeoModelKernel GeoModelKernel-* DetectorDescription/GeoModel
use RDBAccessSvc RDBAccessSvc-* Database/AthenaPOOL
use StoreGate StoreGate-* Control
use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel
\ No newline at end of file
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
@mainpage
This package contains classes used by few other LArG4 and LArGeoModel packages. These classes are:
1. LArMaterialManager. This classs is used to construct LAr specific materials in the code, without detting them from the Geometry DB.
2. VDetectorParameters. This interface is used by some client packages in order to access LAr primary numbers in the Geometry DB.
--------------------------------
REQUIREMENTS
--------------------------------
@include requirements
@htmlinclude used_packages.html
*/
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "LArGeoCode/DatabaseAccessTool.h"
#include "RDBAccessSvc/IRDBAccessSvc.h"
#include "RDBAccessSvc/IRDBRecord.h"
#include "RDBAccessSvc/IRDBRecordset.h"
#include "GeoModelInterfaces/IGeoModelSvc.h"
#include "GaudiKernel/ISvcLocator.h"
#include "GaudiKernel/Bootstrap.h"
#include <map>
class DatabaseAccessTool::Clockwork {
public:
IRDBAccessSvc *pAccessSvc;
std::string detectorKey;
std::string detectorNode;
std::map<std::string, IRDBRecordset_ptr> recMap;
};
DatabaseAccessTool::DatabaseAccessTool ()
:cw(new Clockwork())
{
IGeoModelSvc *geoModel;
ISvcLocator *svcLocator=Gaudi::svcLocator();
if (svcLocator->service ("GeoModelSvc",geoModel)!=StatusCode::SUCCESS) {
throw std::runtime_error ("Cannot locate GeoModelSvc!!");
}
if (svcLocator->service("RDBAccessSvc",cw->pAccessSvc)!=StatusCode::SUCCESS) {
throw std::runtime_error ("Cannot locate RDBAccessSvc!!");
}
// Obtain the geometry version information:
std::string AtlasVersion = geoModel->atlasVersion();
std::string LArVersion = geoModel->LAr_VersionOverride();
cw->detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion;
cw->detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
cw->pAccessSvc->connect();
}
DatabaseAccessTool::~DatabaseAccessTool ()
{
cw->pAccessSvc->disconnect();
delete cw;
}
double DatabaseAccessTool::getDouble(const std::string & TableName,
const std::string & FallbackVersion,
const std::string & ColumnName) const {
std::map<std::string, IRDBRecordset_ptr>::iterator m=cw->recMap.find(TableName);
IRDBRecordset_ptr rec = (m==cw->recMap.end()) ? cw->pAccessSvc->getRecordsetPtr(TableName,cw->detectorKey,cw->detectorNode): (*m).second;
if (rec->size()==0) {
rec = cw->pAccessSvc->getRecordsetPtr(TableName,FallbackVersion);
if (rec->size()==0) {
throw std::runtime_error((std::string("Cannot find the Table: ") + TableName).c_str());
}
}
double retval = (*rec)[0]->getDouble(ColumnName);
if (m==cw->recMap.end()) {
cw->recMap[TableName]=rec;
}
return retval;
}
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "LArGeoCode/LArMaterialManager.h"
#include "GeoModelKernel/GeoMaterial.h"
#include "GeoModelKernel/GeoElement.h"
#include "StoreGate/StoreGate.h"
#include "StoreGate/DataHandle.h"
#include "StoreGate/StoreGateSvc.h"
#include "CLHEP/Units/PhysicalConstants.h"
#include "GaudiKernel/Bootstrap.h"
#include "GeoModelInterfaces/IGeoModelSvc.h"
#include "GeoModelInterfaces/StoredMaterialManager.h"
#include "GaudiKernel/ISvcLocator.h"
#include "LArGeoCode/DatabaseAccessTool.h"
#include <algorithm>
// #define DEBUGGEO
LArMaterialManager::LArMaterialManager(StoreGateSvc* detStore):
m_storedManager(0)
{
// Get the Message Service:
ISvcLocator* svcLocator = Gaudi::svcLocator();
StatusCode status = svcLocator->service("MessageSvc", m_msgSvc);
if(status.isFailure())
throw std::runtime_error("LArMaterialManager: cannot initialize message service");
DataHandle<StoredMaterialManager> materialManager;
status = detStore->retrieve(materialManager, std::string("MATERIALS"));
if(status.isFailure())
throw std::runtime_error("Error in LArMaterialManager, list of precalculated materials is absent..");
m_storedManager = materialManager;
}
LArMaterialManager::~LArMaterialManager()
{
}
void LArMaterialManager::buildMaterials()
{
MsgStream msg(m_msgSvc, "LArMaterialManager");
#ifdef DEBUGGEO
msg << "**** in Material Manager " << endreq;
#endif
GeoMaterial *Copper = m_storedManager->getMaterial("std::Copper");
if (!Copper) throw std::runtime_error("Error in LArMaterialManager, std::Copper is not found.");
#ifdef DEBUGGEO
msg << "Copper radiation length " << Copper->getRadLength() << " "
<< Copper->getDensity()/(CLHEP::g/CLHEP::cm3) << endreq;
#endif
GeoMaterial *Iron = m_storedManager->getMaterial("std::Iron");
if (!Iron) throw std::runtime_error("Error in LArMaterialManager, std::Iron is not found.");
GeoMaterial *Lead = m_storedManager->getMaterial("std::Lead");
if (!Lead) throw std::runtime_error("Error in LArMaterialManager, std::Lead is not found.");
#ifdef DEBUGGEO
msg << MSG::INFO<< "Lead radiation length " << Lead->getRadLength() << " "
<< Lead->getDensity()/(CLHEP::g/CLHEP::cm3) << endreq;
#endif
GeoMaterial *LAr = m_storedManager->getMaterial("std::LiquidArgon");
if (!LAr) throw std::runtime_error("Error in LArMaterialManager, std::LiquidArgon is not found.");
#ifdef DEBUGGEO
msg << MSG::INFO<< "LAr radiation length " << LAr->getRadLength() << " "
<< LAr->getDensity()/(CLHEP::g/CLHEP::cm3) << endreq;
#endif
GeoMaterial *Air = m_storedManager->getMaterial("std::Air");
if (!Air) throw std::runtime_error("Error in LArMaterialManager, std::Air is not found.");
GeoMaterial *Kapton = m_storedManager->getMaterial("std::Kapton");
if (!Kapton) throw std::runtime_error("Error in LArMaterialManager, std::Kapton is not found.");
#ifdef DEBUGGEO
msg << MSG::INFO<< "Kapton radiation length " << Kapton->getRadLength() << " "
<< Kapton->getDensity()/(CLHEP::g/CLHEP::cm3) << endreq;
for (size_t i = 0; i< Kapton->getNumElements();i++) {
msg << MSG::INFO << int (Kapton->getFraction(i)*100) << "% \t" << Kapton->getElement(i)->getName() << endreq;
}
#endif
GeoMaterial *Glue = m_storedManager->getMaterial("LAr::Glue");
if (!Glue) throw std::runtime_error("Error in LArMaterialManager, LAr::Glue is not found.");
#ifdef DEBUGGEO
msg << MSG::INFO<< "Glue radiation length " << Glue->getRadLength() << " "
<< Glue->getDensity()/(CLHEP::g/CLHEP::cm3) << endreq;
for (size_t i = 0; i< Glue->getNumElements();i++) {
msg << MSG::INFO << int (Glue->getFraction(i)*100) << "% \t" << Glue->getElement(i)->getName() << endreq;
}
#endif
GeoMaterial *G10 = m_storedManager->getMaterial("LAr::G10");
if (!G10) throw std::runtime_error("Error in LArMaterialManager, LAr::G10 is not found.");
#ifdef DEBUGGEO
msg << MSG::INFO<< "G10 radiation length " << G10->getRadLength() << " "
<< G10->getDensity()/(CLHEP::g/CLHEP::cm3) << endreq;
for (size_t i = 0; i< G10->getNumElements();i++) {
msg << MSG::INFO << int (G10->getFraction(i)*100) << "% \t" << G10->getElement(i)->getName() << endreq;
}
#endif
DatabaseAccessTool dB;
//----------------------------------------------------------------------------------------//
// LAR... //
//----------------------------------------------------------------------------------------//
{
//**** GU: be careful
// In GeoMaterial::add, the fractions are per MASS
//
double Tggl, Tgfe, Tgpb, Thgl, Thfe, Thpb, Thcu, Thfg, ThMBcu, ThMBG10;
// thin and thick lead absorbers
double Totalthick,Totalmass,Fracpb,Fracfe,Fracgl;
double Totalthicke,Totalmasse,FracCu,FracKap;
// contraction from warm to cold
double contract=dB.getDouble("ColdContraction","ColdContraction-00", "ABSORBERCONTRACTION"); // LArEMBAbsorberContraction
// first thin absorbers
Tggl=dB.getDouble("BarrelGeometry","BarrelGeometry-00","TGGL")*CLHEP::cm*contract; // LArEMBThinAbsGlue
Tgfe=dB.getDouble("BarrelGeometry","BarrelGeometry-00","TGFE")*CLHEP::cm*contract; // LArEMBThinAbsIron
Tgpb=dB.getDouble("BarrelGeometry","BarrelGeometry-00","TGPB")*CLHEP::cm*contract; // LArEMBThinAbsLead
Totalthick = Tggl+Tgfe+Tgpb;
Totalmass = (Tgpb*Lead->getDensity()+Tgfe*Iron->getDensity()+Tggl*Glue->getDensity());
//***GU below are the fraction per mass
Fracpb = (Tgpb*Lead->getDensity())/Totalmass;
Fracfe = (Tgfe*Iron->getDensity())/Totalmass;
Fracgl = (Tggl*Glue->getDensity())/Totalmass;
double density = Totalmass/Totalthick/(contract*contract*contract);
msg << MSG::DEBUG <<"---- THIN absorber characteristics: ----" << endreq;
msg << MSG::DEBUG <<" Fraction pb,fe,gl: "<<Fracpb<<","<<Fracfe<<"," <<Fracgl<< endreq;
msg << MSG::DEBUG <<" Total mass, Thickness: "<<Totalmass<<" ," <<Totalthick<< endreq;
msg << MSG::DEBUG<<" Contraction " << contract << endreq;
msg << MSG::DEBUG <<" Thinabs Density = "<< density/(CLHEP::g/CLHEP::cm3) << endreq;
GeoMaterial* Thin_abs = new GeoMaterial("Thinabs",density);
Thin_abs->add(Lead,Fracpb);
Thin_abs->add(Iron,Fracfe);
Thin_abs->add(Glue,Fracgl);
m_storedManager->addMaterial("LAr", Thin_abs);
#ifdef DEBUGGEO
msg << MSG::INFO<< "ThinAbs radiation length " << Thin_abs->getRadLength() << endreq;
#endif
// then thick absorbers
Thgl=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THGL")*CLHEP::cm*contract; // LArEMBThickAbsGlue
Thfe=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THFE")*CLHEP::cm*contract; // LArEMBThickAbsIron
Thpb=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THPB")*CLHEP::cm*contract; // LArEMBThickAbsLead
Totalthick = Thgl+Thfe+Thpb;
Totalmass = (Thpb*Lead->getDensity()+Thfe*Iron->getDensity()+Thgl*Glue->getDensity());
//**GU below are the fractions per mass
Fracpb = (Thpb*Lead->getDensity())/Totalmass;
Fracfe = (Thfe*Iron->getDensity())/Totalmass;
Fracgl = (Thgl*Glue->getDensity())/Totalmass;
density = Totalmass/Totalthick/(contract*contract*contract);
msg << MSG::DEBUG <<"---- THICK absorber characteristics: ----" << endreq;
msg << MSG::DEBUG <<" Fraction pb,fe,gl: "<<Fracpb<<","<<Fracfe<<","<<Fracgl << endreq;
msg << MSG::DEBUG <<" Total mass, Thickness: "<<Totalmass<<" ,"<<Totalthick << endreq;
msg << MSG::DEBUG <<" Thickabs Density = " << density/(CLHEP::g/CLHEP::cm3) << endreq;
GeoMaterial* Thick_abs = new GeoMaterial("Thickabs",density);
Thick_abs->add(Lead,Fracpb);
Thick_abs->add(Iron,Fracfe);
Thick_abs->add(Glue,Fracgl);
m_storedManager->addMaterial("LAr",Thick_abs);
#ifdef DEBUGGEO
msg << MSG::INFO<< "ThickAbs radiation length " << Thick_abs->getRadLength() << endreq;
#endif
// electrode =mixture Kapton+Cu
Thcu=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THCU")*CLHEP::cm; // LArEMBThickElecCopper
Thfg=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THFG")*CLHEP::cm; // LArEMBThickElecKapton
Totalthicke = Thcu+Thfg;
Totalmasse = (Thcu*Copper->getDensity()+Thfg*Kapton->getDensity());
//**GU below are the fractions per mass
FracCu = (Thcu*Copper->getDensity())/Totalmasse;
FracKap = (Thfg*Kapton->getDensity())/Totalmasse;
// density = Totalmasse/Totalthicke;
double contract_e=1./1.003625; // From Fares (J.T.)
density = (Totalmasse/Totalthicke)/(contract_e*contract_e*contract_e);
msg << MSG::DEBUG <<"---- Electrode characteristics: ----" << endreq;
msg << MSG::DEBUG <<" Fraction Cu, Kapton: " << FracCu << ","<< FracKap << endreq;
msg << MSG::DEBUG <<" Total mass, Thickness:"<<Totalmasse<<" ,"<<Totalthicke<< endreq;
msg << MSG::DEBUG <<" Electrode Density = " << density/(CLHEP::g/CLHEP::cm3) << endreq;
GeoMaterial* Kapton_Cu = new GeoMaterial("KaptonC",density);
Kapton_Cu->add(Copper,FracCu);
Kapton_Cu->add(Kapton,FracKap);
m_storedManager->addMaterial("LAr",Kapton_Cu);
#ifdef DEBUGGEO
msg << MSG::INFO<< "Electrode radiation length " << Kapton_Cu->getRadLength() << endreq;
#endif
// material for Cables/electronics (mixture of Kapton and copper)
// density = 2.440*CLHEP::g/CLHEP::cm3;
//**GU get fractions per mass
double frmassCu = dB.getDouble("BarrelAccordionCables","BarrelAccordionCables-00","PERCU"); // LArEMBmasspercentCu
double frmassKap= dB.getDouble("BarrelAccordionCables","BarrelAccordionCables-00","PERKAP"); // LArEMBmasspercentKap
//GU 28 July 2005 recompute correctly density
density = Copper->getDensity()*(1.+frmassKap/frmassCu)
/(1.+frmassKap/frmassCu*Copper->getDensity()/Kapton->getDensity());
GeoMaterial* Cable_elect = new GeoMaterial("Cables",density);
double fractionmass;
Cable_elect->add(Copper, fractionmass=frmassCu*CLHEP::perCent);
Cable_elect->add(Kapton, fractionmass=frmassKap*CLHEP::perCent);
m_storedManager->addMaterial("LAr", Cable_elect);
#ifdef DEBUGGEO
msg << MSG::INFO<< "Cable radiation length " << Cable_elect->getRadLength() << endreq;
#endif
// material for motherboard
// Mother_board is defined as a mixture of epox_G10 (C8 H14 O4) and Copper
ThMBcu = dB.getDouble("BarrelMotherboards","BarrelMotherboards-00","THICU")*CLHEP::cm; // LArEMBCuThickness
ThMBG10 = dB.getDouble("BarrelMotherboards","BarrelMotherboards-00","THIG10")*CLHEP::cm; // LArEMBG10Thickness
double TotalthickMBe = ThMBcu+ThMBG10;
double TotalmassMBe = (ThMBcu*Copper->getDensity()+ThMBG10*G10->getDensity());
double FracMBCu = (ThMBcu*Copper->getDensity())/TotalmassMBe;
double FracMBG10 = (ThMBG10*G10->getDensity())/TotalmassMBe;
density = TotalmassMBe/TotalthickMBe;
msg << MSG::DEBUG <<"---- Mother Board characteristics: ----" << endreq;
msg << MSG::DEBUG <<" Fraction Cu, G10: " << FracMBCu << ","
<< FracMBG10 << endreq;
msg << MSG::DEBUG <<" Total mass, Thickness:"
<< TotalmassMBe <<" ," <<TotalthickMBe<< endreq;
msg << MSG::DEBUG <<" M_board Density = "<<density/(CLHEP::g/CLHEP::cm3) << endreq;
GeoMaterial* Moth_elect = new GeoMaterial("MBoards",density);
// ****GU: use fraction per masses of G10 and Cu
Moth_elect->add(G10,FracMBG10);
Moth_elect->add(Copper,FracMBCu);
m_storedManager->addMaterial("LAr", Moth_elect);
#ifdef DEBUGGEO
msg << MSG::INFO<< "MotherBoard radiation length " << Moth_elect->getRadLength() << endreq;
#endif
//==GU 28 July 2005
// implement latest definitions from hard coded geometry
GeoElement* Si = m_storedManager->getElement("Silicon");
GeoElement *O = m_storedManager->getElement("Oxygen");
density = dB.getDouble("BarrelMotherboards", "BarrelMotherboards-00", "DG10")*CLHEP::g/CLHEP::cm3; //LArEMBEpoxyVolumicMass
GeoMaterial* SiO2 = new GeoMaterial("SiO2",density);
double fractionSi=28.09/(28.09+2*16.0);
SiO2->add(Si,fractionSi);
double fractionO=2.*16.0/(28.09+2.*16.0);
SiO2->add(O,fractionO);
SiO2->lock();
// Gten for the bars of the calorimeter= mixture of regular G10 and SiO2
density=1.72*CLHEP::g/CLHEP::cm3; // should be replaced by number from database
GeoMaterial* Gten_bar = new GeoMaterial("G10_bar",density);
Gten_bar->add(G10,0.38); // should be replaced by number from database
Gten_bar->add(SiO2,0.62); // should be replaced by number from database
m_storedManager->addMaterial("LAr",Gten_bar);
#ifdef DEBUGGEO
msg << MSG::INFO<< "fracionSi,fracionO2 " << fractionSi << " " << fractionO << endreq;
msg << MSG::INFO<< "SiO2 density " << SiO2->getDensity()/(CLHEP::g/CLHEP::cm3) << endreq;
msg << MSG::INFO<< "SiO2 radiation length " << SiO2->getRadLength() << endreq;
msg << MSG::INFO<< "G10bar radiation length " << Gten_bar->getRadLength() << endreq;
#endif
// material for the effective M_PIn+summing board effect
double ThSBCu = 0.28*CLHEP::mm; // should be replaced by number from database
double ThSBAr = 9.72*CLHEP::mm; // should be replaced by number from database
double TotalThickSB = ThSBCu+ThSBAr;
double dcu = Copper->getDensity();
double dar = LAr->getDensity();
double TotalMassSB = ThSBCu*dcu + ThSBAr*dar;
double fracSBCu = ThSBCu*dcu/TotalMassSB;
double fracSBAr = ThSBAr*dar/TotalMassSB;
density = TotalMassSB/TotalThickSB;
GeoMaterial* Summing_board = new GeoMaterial("SBoard",density);
Summing_board->add(LAr,fracSBAr);
Summing_board->add(Copper,fracSBCu);
m_storedManager->addMaterial("LAr",Summing_board);
#ifdef DEBUGGEO
msg << MSG::INFO<< "SBoard radiation length " << Summing_board->getRadLength() << endreq;
#endif
//==end GU
// Make sure these get deleted, if there's nothing referencing them.
SiO2->ref();
SiO2->unref();
}
//----------------------------------------------------------------------------------------//
// LAR Endcap only //
//----------------------------------------------------------------------------------------//
{
// ----------------------
// Vacuum for TB cryostat
// ----------------------
GeoElement *H = m_storedManager->getElement( "Hydrogen" );
GeoMaterial *Vacuum = new GeoMaterial( "Vacuum", CLHEP::universe_mean_density );
Vacuum->add( H, 1. );
m_storedManager->addMaterial("LAr", Vacuum );
#ifdef DEBUGGEO
msg << MSG::INFO<< "Vacuum radiation length " << Vacuum->getRadLength() << " "
<< Vacuum->getDensity()/(CLHEP::g/CLHEP::cm3) << endreq;
#endif
// ----------------------------
// Materials for EMEC absorbers
// ----------------------------
double Tggl, Tgfe, Tgpb, Thgl, Thfe, Thpb;
double Totalthick,Totalmass,Fracpb,Fracfe,Fracgl;
// contraction from warm to cold
double contract=dB.getDouble("ColdContraction","ColdContraction-00", "ABSORBERCONTRACTION"); // LArEMBAbsorberContraction
//
// EMEC thin absorbers
//
/* Tggl = 0.30 * CLHEP::mm;
Tgfe = 0.40 * CLHEP::mm;
Tgpb = 1.70 * CLHEP::mm; */
Tggl = 0.20 * CLHEP::mm;
Tgfe = 0.40 * CLHEP::mm;
Tgpb = 1.69 * CLHEP::mm;
Totalthick = Tggl+Tgfe+Tgpb;
Totalmass = (Tgpb*Lead->getDensity()+Tgfe*Iron->getDensity()+Tggl*Glue->getDensity());
// Fractions per mass
Fracpb = (Tgpb*Lead->getDensity())/Totalmass;
Fracfe = (Tgfe*Iron->getDensity())/Totalmass;
Fracgl = (Tggl*Glue->getDensity())/Totalmass;
double density = Totalmass/Totalthick/(contract*contract*contract);
msg << MSG::DEBUG <<"---- EMEC THIN absorber characteristics: ----" << endreq;
msg << MSG::DEBUG <<" Thickness pb,fe,gl,[mm]="<<Tgpb<<" "<<Tgfe<<" "<<Tggl << endreq;
msg << MSG::DEBUG <<" Fraction pb,fe,gl ="<<Fracpb<<","<<Fracfe<<"," <<Fracgl << endreq;
msg << MSG::DEBUG <<" Total mass, Thickness ="<<Totalmass<<" ," <<Totalthick << endreq;
msg << MSG::DEBUG <<" Thinabs Density ="<< density/(CLHEP::g/CLHEP::cm3) << endreq;
msg << MSG::DEBUG << "---- EMEC THIN absorber characteristics: ----" << endreq;
msg << MSG::DEBUG <<" Thickness pb,fe,gl,[mm]="<<Tgpb<<" "<<Tgfe<<" "<<Tggl << endreq;
msg << MSG::DEBUG <<" Fraction pb,fe,gl ="<<Fracpb<<","<<Fracfe<<"," <<Fracgl << endreq;
msg << MSG::DEBUG <<" Total mass, Thickness ="<<Totalmass<<" ," <<Totalthick << endreq;
msg << MSG::DEBUG <<" Thinabs Density ="<< density/(CLHEP::g/CLHEP::cm3) << endreq;
GeoMaterial* Thin_abs = new GeoMaterial("EMEC_Thinabs",density);
Thin_abs->add(Lead,Fracpb);
Thin_abs->add(Iron,Fracfe);
Thin_abs->add(Glue,Fracgl);
m_storedManager->addMaterial("LAr", Thin_abs);
#ifdef DEBUGGEO
msg << MSG::INFO<< "EMEC thinAbs radiation length " << Thin_abs->getRadLength() << endreq;
#endif
//
// EMEC thick absorbers
//
/* Thgl = 0.30 * CLHEP::mm;
Thfe = 0.40 * CLHEP::mm;
Thpb = 2.20 * CLHEP::mm; */
Thgl = 0.20 * CLHEP::mm;
Thfe = 0.40 * CLHEP::mm;
Thpb = 2.20 * CLHEP::mm;
Totalthick = Thgl+Thfe+Thpb;
Totalmass = (Thpb*Lead->getDensity()+Thfe*Iron->getDensity()+Thgl*Glue->getDensity());
// Fractions per mass
Fracpb = (Thpb*Lead->getDensity())/Totalmass;
Fracfe = (Thfe*Iron->getDensity())/Totalmass;
Fracgl = (Thgl*Glue->getDensity())/Totalmass;
density = Totalmass/Totalthick/(contract*contract*contract);
msg << MSG::DEBUG <<"---- EMEC THICK absorber characteristics: ----"<<endreq;
msg << MSG::DEBUG <<" Thickness pb,fe,gl[mm]="<<Thpb<<" "<<Thfe<<" "<<Thgl<<endreq;
msg << MSG::DEBUG <<" Fraction pb,fe,gl: "<<Fracpb<<","<<Fracfe<<","<<Fracgl<<endreq;
msg << MSG::DEBUG <<" Total mass, Thickness: "<<Totalmass<<" ,"<<Totalthick<<endreq;
msg << MSG::DEBUG <<" Thickabs Density = "<<density/(CLHEP::g/CLHEP::cm3) <<endreq;
GeoMaterial* Thick_abs = new GeoMaterial("EMEC_Thickabs",density);
Thick_abs->add(Lead,Fracpb);
Thick_abs->add(Iron,Fracfe);
Thick_abs->add(Glue,Fracgl);
m_storedManager->addMaterial("LAr",Thick_abs);
#ifdef DEBUGGEO
msg << MSG::INFO<< "EMEC thickAbs radiation length " << Thick_abs->getRadLength() << endreq;
#endif
// ----------------------------
// Materials for EMEC barrettes
// ----------------------------
double TgG10, ThG10;
double FracG10;
//
// EMEC Outer Wheel barrette
//
//!! Check whether G10 or G10_bar is to be used!!!!
/* Tggl = 0.30 * CLHEP::mm;
Tgfe = 0.40 * CLHEP::mm;
TgG10 =1.70 * CLHEP::mm;*/
Tggl = 0.20 * CLHEP::mm;
Tgfe = 0.40 * CLHEP::mm;
TgG10 =1.69 * CLHEP::mm;
Totalthick = Tggl+Tgfe+TgG10;
Totalmass = (TgG10*G10->getDensity()+Tgfe*Iron->getDensity()+Tggl*Glue->getDensity());
// Fractions per mass
FracG10 = (TgG10*G10->getDensity())/Totalmass;
Fracfe = (Tgfe*Iron->getDensity())/Totalmass;
Fracgl = (Tggl*Glue->getDensity())/Totalmass;
// density = Totalmass/Totalthick;
density = (Totalmass/Totalthick)/(contract*contract*contract);
GeoMaterial* G10FeOuter = new GeoMaterial("G10FeOuter",density);
G10FeOuter->add(G10,FracG10);
G10FeOuter->add(Iron,Fracfe);
G10FeOuter->add(Glue,Fracgl);
m_storedManager->addMaterial("LAr", G10FeOuter);
#ifdef DEBUGGEO
msg << MSG::INFO<< "EMEC G10FeOuter radiation length " << G10FeOuter->getRadLength() << endreq;
#endif
//
// EMEC Inner Wheel barrette
//
/* Thgl = 0.30 * CLHEP::mm;
Thfe = 0.40 * CLHEP::mm;
ThG10 =2.20 * CLHEP::mm;*/
Thgl = 0.20 * CLHEP::mm;
Thfe = 0.40 * CLHEP::mm;
ThG10 =2.20 * CLHEP::mm;
Totalthick = Thgl+Thfe+ThG10;
Totalmass = (ThG10*G10->getDensity()+Thfe*Iron->getDensity()+Thgl*Glue->getDensity());
// Fractions per mass
FracG10 = (ThG10*G10->getDensity())/Totalmass;
Fracfe = (Thfe*Iron->getDensity())/Totalmass;
Fracgl = (Thgl*Glue->getDensity())/Totalmass;
// density = Totalmass/Totalthick;
density = (Totalmass/Totalthick)/(contract*contract*contract);
GeoMaterial* G10FeInner = new GeoMaterial("G10FeInner",density);
G10FeInner->add(G10,FracG10);
G10FeInner->add(Iron,Fracfe);
G10FeInner->add(Glue,Fracgl);
m_storedManager->addMaterial("LAr",G10FeInner);
#ifdef DEBUGGEO
msg << MSG::INFO<< "EMEC G10FeInner radiation length " << G10FeInner->getRadLength() << endreq;
#endif
}
}
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// DetectorParameters
// 30-Jun-2003 Bill Seligman (WGS)
// This routine implements a modified version of the singleton
// pattern. It's initialized with a pointer to some class that
// inherits from this one; thereafter that pointer can be accessed
// from any routine in the simulation.
// Note: we're using the LArGeo namespace, which is why LArGeo:: is in
// front of so many names.
#include "LArGeoCode/VDetectorParameters.h"
#include <iostream>
#include <stdlib.h>
LArGeo::VDetectorParameters* LArGeo::VDetectorParameters::s_instance = 0;
void LArGeo::VDetectorParameters::SetInstance(VDetectorParameters* p)
{
if(s_instance!=0) {
/* -- Consider moving these printouts to MsgSvc
if(p==0)
std::cerr << "LArGeo::VDetectorParameters::SetInstance warning: "
<< "database-parameter access objet is being deleted."
<< std::endl;
else
std::cerr << "LArGeo::VDetectorParameters::SetInstance warning: "
<< "database-parameter access object is being re-defined."
<< std::endl;
*/
delete s_instance;
}
s_instance = p;
}
LArGeo::VDetectorParameters* LArGeo::VDetectorParameters::GetInstance()
{
if(s_instance==0)
std::cerr << "LArGeo::VDetectorParameters::GetInstance was called, but "
<< "the pointer to the detector-parameter access object is 0."
<< std::endl;
return s_instance;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment