Skip to content
Snippets Groups Projects
Commit e3b5110c authored by Nicholas Styles's avatar Nicholas Styles Committed by Graeme Stewart
Browse files

update SCT settings obo N Barlow (SiLorentzAngleSvc-01-00-05-03)

	* Update forceUseDb settings obo N. Barlow
	* Tagged as SiLorentzAngleSvc-01-00-05-03

2015-05-05 Nick Styles
	* Temporary fix for ATLASRECTS-2049 until IBL DCS working
	* Tagged as SiLorentzAngleSvc-01-00-05-01
	* Fix in SiLorentzAngleSvc-01-00-05-02 (missed SCT temperature setting)
parent 6ac56042
No related branches found
No related tags found
No related merge requests found
......@@ -132,6 +132,9 @@ private:
std::vector<std::string> m_bfieldFolders;
int m_outOfRangeWarningThresh;
std::string m_corrDBFolder;
bool m_pixelDefaults;
bool m_sctDefaults;
// needed services
ServiceHandle<ISiliconConditionsSvc> m_siConditionsSvc;
......
......@@ -77,7 +77,7 @@ class SCTLorentzAngleSvcSetup:
def forceUseDB(self) :
"Force usage of conditions DB"
self.SCT_SiliconConditionsSvc.CheckGeoModel = False
self.SCTLorentzAngleSvc.useSctDefaults = False
# Force to use the defaults from GeoModel. In case it is not possible to use DCS
def forceUseGeoModel(self) :
......
......@@ -23,6 +23,8 @@
SiLorentzAngleSvc::SiLorentzAngleSvc( const std::string& name, ISvcLocator* pSvcLocator ) :
AthService(name, pSvcLocator),
m_pixelDefaults(true),
m_sctDefaults(true),
m_siConditionsSvc("PixelSiliconConditionsSvc", name),
m_magFieldSvc("AtlasFieldSvc", name),
m_detStore("StoreGateSvc/DetectorStore", name),
......@@ -32,6 +34,7 @@ SiLorentzAngleSvc::SiLorentzAngleSvc( const std::string& name, ISvcLocator* pSvc
m_isPixel(true),
m_magFieldInit(false),
m_detManager(0)
{
m_bfieldFolders.push_back("/GLOBAL/BField/Map");
......@@ -66,6 +69,8 @@ SiLorentzAngleSvc::SiLorentzAngleSvc( const std::string& name, ISvcLocator* pSvc
"Warning will be given if more elements than this return an invalid temperature");
declareProperty("CorrDBFolder",m_corrDBFolder="");
declareProperty("usePixelDefaults",m_pixelDefaults);
declareProperty("useSctDefaults",m_sctDefaults);
}
SiLorentzAngleSvc::~SiLorentzAngleSvc(){
......@@ -453,16 +458,8 @@ SiLorentzAngleSvc::updateCache(const IdentifierHash & elementHash, const Amg::Ve
double temperature;
double deplVoltage;
double biasVoltage;
//if (!m_conditionsSvcValid) {
if (true) {
//temperature = m_temperature + 273.15;
//deplVoltage = m_deplVoltage * CLHEP::volt;
//biasVoltage = m_biasVoltage * CLHEP::volt;
if(m_isPixel){
temperature = m_temperaturePix + 273.15;
}else{
temperature = m_temperature + 273.15;
}
if ((!m_conditionsSvcValid && m_isPixel) || (m_pixelDefaults && m_isPixel)) {
temperature = m_temperaturePix + 273.15;
if (isIBL && !is3D) deplVoltage = 40. * CLHEP::volt;
if (isIBL && is3D) deplVoltage = 10. * CLHEP::volt;
if (!isIBL) deplVoltage = m_deplVoltage * CLHEP::volt;
......@@ -470,7 +467,15 @@ SiLorentzAngleSvc::updateCache(const IdentifierHash & elementHash, const Amg::Ve
if (isIBL && is3D) biasVoltage = m_biasVoltageIBL3D * CLHEP::volt;
if (!isIBL) biasVoltage = m_biasVoltage * CLHEP::volt;
ATH_MSG_DEBUG("Hash = " << elementHash << " Temperature = " << temperature << " BiasV = " << biasVoltage << " DeplV = " << deplVoltage);
} else {
}
else if ((!m_conditionsSvcValid && !m_isPixel) || (m_sctDefaults && !m_isPixel)) {
biasVoltage = m_biasVoltage * CLHEP::volt;
deplVoltage = m_deplVoltage * CLHEP::volt;
temperature = m_temperature + 273.15;
}
else {
temperature = m_siConditionsSvc->temperature(elementHash) + 273.15;
deplVoltage = m_siConditionsSvc->depletionVoltage(elementHash) * CLHEP::volt;
biasVoltage = m_siConditionsSvc->biasVoltage(elementHash) * CLHEP::volt;
......
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