diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx index 6a8c82ca2f37bfc59cb37f1318f75fad09b3efb3..7555c3427d9d7caa3e6db77eb2dcc900d415ecdf 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx @@ -177,6 +177,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const { writeCdo -> setBarrelCrossTalk(m_BarrelCrossTalkRUN1); writeCdo -> setBarrelNoiseOccupancy(m_BarrelNoiseOccupancyRUN1); writeCdo -> setBarrelDisableProbability(m_BarrelDisableProbabilityRUN1); + writeCdo -> setBarrelLorentzAngleCorr(m_BarrelLorentzAngleCorrRUN1); writeCdo -> setEndcapToTThreshold(m_EndcapToTThresholdRUN1); writeCdo -> setFEI3EndcapLatency(m_FEI3EndcapLatencyRUN1); @@ -186,6 +187,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const { writeCdo -> setEndcapCrossTalk(m_EndcapCrossTalkRUN1); writeCdo -> setEndcapNoiseOccupancy(m_EndcapNoiseOccupancyRUN1); writeCdo -> setEndcapDisableProbability(m_EndcapDisableProbabilityRUN1); + writeCdo -> setEndcapLorentzAngleCorr(m_EndcapLorentzAngleCorrRUN1); // This is ad-hoc solution. for (size_t i=0; i<m_BLayerNoiseShapeRUN1.size(); i++) { writeCdo->setBarrelNoiseShape(0,m_BLayerNoiseShapeRUN1[i]); } @@ -206,6 +208,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const { writeCdo -> setBarrelCrossTalk(m_BarrelCrossTalk2016); writeCdo -> setBarrelNoiseOccupancy(m_BarrelNoiseOccupancy2016); writeCdo -> setBarrelDisableProbability(m_BarrelDisableProbability2016); + writeCdo -> setBarrelLorentzAngleCorr(m_BarrelLorentzAngleCorr2016); writeCdo -> setEndcapToTThreshold(m_EndcapToTThreshold2016); writeCdo -> setFEI3EndcapLatency(m_FEI3EndcapLatency2016); @@ -215,6 +218,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const { writeCdo -> setEndcapCrossTalk(m_EndcapCrossTalk2016); writeCdo -> setEndcapNoiseOccupancy(m_EndcapNoiseOccupancy2016); writeCdo -> setEndcapDisableProbability(m_EndcapDisableProbability2016); + writeCdo -> setEndcapLorentzAngleCorr(m_EndcapLorentzAngleCorr2016); writeCdo -> setDBMToTThreshold(m_DBMToTThreshold2016); writeCdo -> setDBMCrossTalk(m_DBMCrossTalk2016); @@ -250,11 +254,13 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const { writeCdo -> setBarrelCrossTalk(m_BarrelCrossTalkITK); writeCdo -> setBarrelNoiseOccupancy(m_BarrelNoiseOccupancyITK); writeCdo -> setBarrelDisableProbability(m_BarrelDisableProbabilityITK); + writeCdo -> setBarrelLorentzAngleCorr(m_BarrelLorentzAngleCorrITK); writeCdo -> setEndcapToTThreshold(m_EndcapToTThresholdITK); writeCdo -> setEndcapCrossTalk(m_EndcapCrossTalkITK); writeCdo -> setEndcapNoiseOccupancy(m_EndcapNoiseOccupancyITK); writeCdo -> setEndcapDisableProbability(m_EndcapDisableProbabilityITK); + writeCdo -> setEndcapLorentzAngleCorr(m_EndcapLorentzAngleCorrITK); // This is ad-hoc solution. for (size_t i=0; i<m_InnermostNoiseShapeITK.size(); i++) { writeCdo->setBarrelNoiseShape(0,m_InnermostNoiseShapeITK[i]); } @@ -276,6 +282,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const { writeCdo -> setBarrelCrossTalk(m_BarrelCrossTalk2016); writeCdo -> setBarrelNoiseOccupancy(m_BarrelNoiseOccupancy2016); writeCdo -> setBarrelDisableProbability(m_BarrelDisableProbability2016); + writeCdo -> setBarrelLorentzAngleCorr(m_BarrelLorentzAngleCorr2016); writeCdo -> setEndcapToTThreshold(m_EndcapToTThreshold2016); writeCdo -> setFEI3EndcapLatency(m_FEI3EndcapLatency2016); @@ -285,6 +292,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const { writeCdo -> setEndcapCrossTalk(m_EndcapCrossTalk2016); writeCdo -> setEndcapNoiseOccupancy(m_EndcapNoiseOccupancy2016); writeCdo -> setEndcapDisableProbability(m_EndcapDisableProbability2016); + writeCdo -> setEndcapLorentzAngleCorr(m_EndcapLorentzAngleCorr2016); writeCdo -> setDBMToTThreshold(m_DBMToTThreshold2016); writeCdo -> setDBMCrossTalk(m_DBMCrossTalk2016); @@ -315,6 +323,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const { writeCdo -> setBarrelCrossTalk(m_BarrelCrossTalk2017); writeCdo -> setBarrelNoiseOccupancy(m_BarrelNoiseOccupancy2017); writeCdo -> setBarrelDisableProbability(m_BarrelDisableProbability2017); + writeCdo -> setBarrelLorentzAngleCorr(m_BarrelLorentzAngleCorr2017); writeCdo -> setEndcapToTThreshold(m_EndcapToTThreshold2017); writeCdo -> setFEI3EndcapLatency(m_FEI3EndcapLatency2017); @@ -324,6 +333,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const { writeCdo -> setEndcapCrossTalk(m_EndcapCrossTalk2017); writeCdo -> setEndcapNoiseOccupancy(m_EndcapNoiseOccupancy2017); writeCdo -> setEndcapDisableProbability(m_EndcapDisableProbability2017); + writeCdo -> setEndcapLorentzAngleCorr(m_EndcapLorentzAngleCorr2017); writeCdo -> setDBMToTThreshold(m_DBMToTThreshold2017); writeCdo -> setDBMCrossTalk(m_DBMCrossTalk2017); @@ -354,6 +364,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const { writeCdo -> setBarrelCrossTalk(m_BarrelCrossTalk2018); writeCdo -> setBarrelNoiseOccupancy(m_BarrelNoiseOccupancy2018); writeCdo -> setBarrelDisableProbability(m_BarrelDisableProbability2018); + writeCdo -> setBarrelLorentzAngleCorr(m_BarrelLorentzAngleCorr2018); writeCdo -> setEndcapToTThreshold(m_EndcapToTThreshold2018); writeCdo -> setFEI3EndcapLatency(m_FEI3EndcapLatency2018); @@ -363,6 +374,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const { writeCdo -> setEndcapCrossTalk(m_EndcapCrossTalk2018); writeCdo -> setEndcapNoiseOccupancy(m_EndcapNoiseOccupancy2018); writeCdo -> setEndcapDisableProbability(m_EndcapDisableProbability2018); + writeCdo -> setEndcapLorentzAngleCorr(m_EndcapLorentzAngleCorr2018); writeCdo -> setDBMToTThreshold(m_DBMToTThreshold2018); writeCdo -> setDBMCrossTalk(m_DBMCrossTalk2018); diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h index 2f22aa8a4a8fee954cae3e047d89088be4a6f435..a833f65d8ad624b7357672051effd454350204ae 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h @@ -170,6 +170,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm { Gaudi::Property<std::vector<double>> m_BarrelDisableProbability2016 {this, "BarrelDisableProbability2016", {9e-3,9e-3,9e-3,9e-3}, "Disable probability of barrel pixel layers in 2015/2016"}; + Gaudi::Property<std::vector<double>> m_BarrelLorentzAngleCorr2016 + {this, "BarrelLorentzAngleCorr2016", {1.0,1.0,1.0,1.0}, "Scale factor for Lorentz angle of barrel pixel layers in 2015/2016"}; + // So far, Gaudi::Property does not support 2D vector. // Gaudi::Property<std::vector<std::vector<float>>> m_BarrelNoiseShape2016 // {this, "BarrelNoiseShape", {{0.0,1.0},{0.0,1.0},{0.0,1.0},{0.0,1.0}}, "Noise shape of barrel pixel layers"}; @@ -209,6 +212,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm { Gaudi::Property<std::vector<double>> m_EndcapDisableProbability2016 {this, "EndcapDisableProbability2016", {9e-3,9e-3,9e-3}, "Disable probability of endcap pixel layers in 2015/2016"}; + Gaudi::Property<std::vector<double>> m_EndcapLorentzAngleCorr2016 + {this, "EndcapLorentzAngleCorr2016", {1.0,1.0,1.0}, "Scale factor for Lorentz angle of endcap pixel layers in 2015/2016"}; + // DBM RUN2 2015/2016 Gaudi::Property<std::vector<int>> m_DBMToTThreshold2016 {this, "DBMToTThreshold2016", {-1,-1,-1}, "ToT thresholds for DBM layers in 2015/2016"}; @@ -248,6 +254,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm { Gaudi::Property<std::vector<double>> m_BarrelDisableProbability2017 {this, "BarrelDisableProbability2017", {9e-3,9e-3,9e-3,9e-3}, "Disable probability of barrel pixel layers in 2017"}; + Gaudi::Property<std::vector<double>> m_BarrelLorentzAngleCorr2017 + {this, "BarrelLorentzAngleCorr2017", {1.0,1.0,1.0,1.0}, "Scale factor for Lorentz angle of barrel pixel layers in 2017"}; + // This is ad-hoc solution. Gaudi::Property<std::vector<float>> m_IBLNoiseShape2017 {this, "IBLNoiseShape2017", {0.0,1.0}, "Noise shape for IBL in 2017"}; @@ -283,6 +292,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm { Gaudi::Property<std::vector<double>> m_EndcapDisableProbability2017 {this, "EndcapDisableProbability2017", {9e-3,9e-3,9e-3}, "Disable probability of endcap pixel layers in 2017"}; + Gaudi::Property<std::vector<double>> m_EndcapLorentzAngleCorr2017 + {this, "EndcapLorentzAngleCorr2017", {1.0,1.0,1.0}, "Scale factor for Lorentz angle of endcap pixel layers in 2017"}; + // DBM RUN2 2017 Gaudi::Property<std::vector<int>> m_DBMToTThreshold2017 {this, "DBMToTThreshold2017", {-1,-1,-1}, "ToT thresholds for DBM layers in 2017"}; @@ -322,6 +334,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm { Gaudi::Property<std::vector<double>> m_BarrelDisableProbability2018 {this, "BarrelDisableProbability2018", {9e-3,9e-3,9e-3,9e-3}, "Disable probability of barrel pixel layers in 2018"}; + Gaudi::Property<std::vector<double>> m_BarrelLorentzAngleCorr2018 + {this, "BarrelLorentzAngleCorr2018", {1.0,1.0,1.0,1.0}, "Scale factor for Lorentz angle of barrel pixel layers in 2018"}; + // This is ad-hoc solution. Gaudi::Property<std::vector<float>> m_IBLNoiseShape2018 {this, "IBLNoiseShape2018", {0.0,1.0}, "Noise shape for IBL in 2018"}; @@ -357,6 +372,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm { Gaudi::Property<std::vector<double>> m_EndcapDisableProbability2018 {this, "EndcapDisableProbability2018", {9e-3,9e-3,9e-3}, "Disable probability of endcap pixel layers in 2018"}; + Gaudi::Property<std::vector<double>> m_EndcapLorentzAngleCorr2018 + {this, "EndcapLorentzAngleCorr2018", {1.0,1.0,1.0}, "Scale factor for Lorentz angle of endcap pixel layers in 2018"}; + // DBM RUN2 2018 Gaudi::Property<std::vector<int>> m_DBMToTThreshold2018 {this, "DBMToTThreshold2018", {-1,-1,-1}, "ToT thresholds for DBM layers in 2018"}; @@ -396,6 +414,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm { Gaudi::Property<std::vector<double>> m_BarrelDisableProbabilityRUN1 {this, "BarrelDisableProbabilityRUN1", {9e-3,9e-3,9e-3}, "Disable probability of barrel pixel layers in RUN1"}; + Gaudi::Property<std::vector<double>> m_BarrelLorentzAngleCorrRUN1 + {this, "BarrelLorentzAngleCorrRUN1", {1.0,1.0,1.0}, "Scale factor for Lorentz angle of barrel pixel layers in RUN1"}; + // This is ad-hoc solution. Gaudi::Property<std::vector<float>> m_BLayerNoiseShapeRUN1 {this, "BLayerNoiseShapeRUN1", {0.0,1.0}, "Noise shape for b-layer in RUN1"}; @@ -428,6 +449,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm { Gaudi::Property<std::vector<double>> m_EndcapDisableProbabilityRUN1 {this, "EndcapDisableProbabilityRUN1", {9e-3,9e-3,9e-3}, "Disable probability of endcap pixel layers in RUN1"}; + Gaudi::Property<std::vector<double>> m_EndcapLorentzAngleCorrRUN1 + {this, "EndcapLorentzAngleCorrRUN1", {1.0,1.0,1.0}, "Scale factor for Lorentz angle of endcap pixel layers in RUN1"}; + //==================================================================================== // Barrel ITK Gaudi::Property<std::vector<int>> m_BarrelToTThresholdITK @@ -442,6 +466,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm { Gaudi::Property<std::vector<double>> m_BarrelDisableProbabilityITK {this, "BarrelDisableProbabilityITK", {9e-3,9e-3,9e-3,9e-3,9e-3}, "Disable probability of barrel pixel layers in ITK"}; + Gaudi::Property<std::vector<double>> m_BarrelLorentzAngleCorrITK + {this, "BarrelLorentzAngleCorrITK", {1.0,1.0,1.0,1.0,1.0}, "Scale factor for Lorentz angle of barrel pixel layers in ITK"}; + // This is ad-hoc solution. Gaudi::Property<std::vector<float>> m_InnermostNoiseShapeITK {this, "InnermostNoiseShapeITK", {0.0,1.0}, "Noise shape for IBL in ITK"}; @@ -465,6 +492,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm { Gaudi::Property<std::vector<double>> m_EndcapDisableProbabilityITK {this, "EndcapDisableProbabilityITK", {9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3}, "Disable probability of endcap pixel layers in ITK"}; + Gaudi::Property<std::vector<double>> m_EndcapLorentzAngleCorrITK + {this, "EndcapLorentzAngleCorrITK", {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0}, "Scale factor for Lorentz angle of endcap pixel layers in ITK"}; + //==================================================================================== // The following parameters are default values which will be overwritten by the one // from the conditions DB. Otherwise the DB is not retrieved nor available, these diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h index 06f32bd7addfc29daa2632f0f4ed559735e847a3..62c9f18125c92c9475fea4cd9e7be8c1c861cb65 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h @@ -136,6 +136,11 @@ class PixelModuleData { float getDefaultQ2TotE() const; float getDefaultQ2TotC() const; + // Lorentz angle correction + void setBarrelLorentzAngleCorr(std::vector<double> BarrelLorentzAngleCorr); + void setEndcapLorentzAngleCorr(std::vector<double> EndcapLorentzAngleCorr); + double getLorentzAngleCorr(const int bec, const int layer) const; + // DCS parameters void setDefaultBiasVoltage(float biasVoltage); float getDefaultBiasVoltage() const; @@ -258,6 +263,9 @@ class PixelModuleData { float m_paramE; float m_paramC; + std::vector<double> m_BarrelLorentzAngleCorr; + std::vector<double> m_EndcapLorentzAngleCorr; + float m_biasVoltage; float m_temperature; diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx index 0877f64ae306aa81dcbab238ddeafe389c192653..e68a927975af558a9b779321a0884df017c8a51f 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx @@ -280,6 +280,16 @@ float PixelModuleData::getDefaultQ2TotA() const { return m_paramA; } float PixelModuleData::getDefaultQ2TotE() const { return m_paramE; } float PixelModuleData::getDefaultQ2TotC() const { return m_paramC; } +// Lorentz angle correction +void PixelModuleData::setBarrelLorentzAngleCorr(std::vector<double> BarrelLorentzAngleCorr) { m_BarrelLorentzAngleCorr = BarrelLorentzAngleCorr; } +void PixelModuleData::setEndcapLorentzAngleCorr(std::vector<double> EndcapLorentzAngleCorr) { m_EndcapLorentzAngleCorr = EndcapLorentzAngleCorr; } +double PixelModuleData::getLorentzAngleCorr(const int bec, const int layer) const { + double LAcorr = 1.0; + if (std::abs(bec)==0 && layer<(int)m_BarrelLorentzAngleCorr.size()) { LAcorr=m_BarrelLorentzAngleCorr.at(layer); } + if (std::abs(bec)==2 && layer<(int)m_EndcapLorentzAngleCorr.size()) { LAcorr=m_EndcapLorentzAngleCorr.at(layer); } + return LAcorr; +} + // DCS parameters void PixelModuleData::setDefaultBiasVoltage(float biasVoltage) { m_biasVoltage=biasVoltage; } float PixelModuleData::getDefaultBiasVoltage() const { return m_biasVoltage; } diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx index 5ad66b6dd64164b5f52799e58857298fc6dfa683..e3fd0bba45b25ade8889a769fa240a45fee052a6 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx @@ -25,6 +25,7 @@ StatusCode PixelSiLorentzAngleCondAlg::initialize() { ATH_CHECK(m_condSvc.retrieve()); + ATH_CHECK(m_moduleDataKey.initialize()); ATH_CHECK(m_readKeyTemp.initialize()); ATH_CHECK(m_readKeyHV.initialize()); ATH_CHECK(m_writeKey.initialize()); @@ -56,6 +57,8 @@ PixelSiLorentzAngleCondAlg::execute(const EventContext& ctx) const { return StatusCode::SUCCESS; } + SG::ReadCondHandle<PixelModuleData>moduleData(m_moduleDataKey, ctx); + // Read Cond Handle (temperature) SG::ReadCondHandle<PixelDCSTempData> readHandleTemp(m_readKeyTemp, ctx); const PixelDCSTempData* readCdoTemp(*readHandleTemp); @@ -137,6 +140,13 @@ PixelSiLorentzAngleCondAlg::execute(const EventContext& ctx) const { } const InDetDD::PixelModuleDesign* p_design = dynamic_cast<const InDetDD::PixelModuleDesign*>(&element->design()); + + const PixelID* pixelId = static_cast<const PixelID *>(element->getIdHelper()); + int barrel_ec = pixelId->barrel_ec(element->identify()); + int layerIndex = pixelId->layer_disk(element->identify()); + + double LACorr = moduleData->getLorentzAngleCorr(barrel_ec,layerIndex); + if (not p_design){ ATH_MSG_FATAL("Dynamic cast to PixelModuleDesign* failed in PixelSiLorentzAngleCondAlg::execute"); return StatusCode::FAILURE; @@ -157,25 +167,25 @@ PixelSiLorentzAngleCondAlg::execute(const EventContext& ctx) const { // The hit depth axis is pointing from the readout side to the backside if m_design->readoutSide() < 0 // The hit depth axis is pointing from the backside to the readout side if m_design->readoutSide() > 0 double tanLorentzAnglePhi = forceLorentzToZero*element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitPhiDirection()*(element->normal().cross(magneticField)).dot(element->phiAxis()); - writeCdo->setTanLorentzAngle(elementHash, m_correctionFactor*tanLorentzAnglePhi); + writeCdo->setTanLorentzAngle(elementHash, LACorr*tanLorentzAnglePhi); // This gives the effective correction in the reconstruction frame hence the extra hitPhiDirection() // as the angle above is in the hit frame. double lorentzCorrectionPhi = -0.5*element->hitPhiDirection()*tanLorentzAnglePhi*depletionDepth; - writeCdo->setLorentzShift(elementHash, m_correctionFactor*lorentzCorrectionPhi); + writeCdo->setLorentzShift(elementHash, LACorr*lorentzCorrectionPhi); // The Lorentz eta shift very small and so can be ignored, but we include it for completeness. double tanLorentzAngleEta = forceLorentzToZero*element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitEtaDirection()*(element->normal().cross(magneticField)).dot(element->etaAxis()); - writeCdo->setTanLorentzAngleEta(elementHash, m_correctionFactor*tanLorentzAngleEta); + writeCdo->setTanLorentzAngleEta(elementHash, LACorr*tanLorentzAngleEta); double lorentzCorrectionEta = -0.5*element->hitPhiDirection()*tanLorentzAngleEta*depletionDepth; - writeCdo->setLorentzShiftEta(elementHash, m_correctionFactor*lorentzCorrectionEta); + writeCdo->setLorentzShiftEta(elementHash, LACorr*lorentzCorrectionEta); // Monitoring value writeCdo->setBiasVoltage(elementHash, biasVoltage/CLHEP::volt); writeCdo->setTemperature(elementHash, temperature-273.15); writeCdo->setDepletionVoltage(elementHash, deplVoltage/CLHEP::volt); - ATH_MSG_DEBUG("Hash = " << elementHash << " tanPhi = " << lorentzCorrectionPhi << " shiftPhi = " << writeCdo->getLorentzShift(elementHash) << " Factor = " << m_correctionFactor << "Depletion depth = " << depletionDepth); + ATH_MSG_DEBUG("Hash = " << elementHash << " tanPhi = " << lorentzCorrectionPhi << " shiftPhi = " << writeCdo->getLorentzShift(elementHash) << " Factor = " << LACorr << " Depletion depth = " << depletionDepth); ATH_MSG_DEBUG("Hash = " << elementHash << " tanPhi = " << lorentzCorrectionPhi << " shiftPhi = " << writeCdo->getLorentzShift(elementHash) << "Depletion depth = " << depletionDepth); ATH_MSG_VERBOSE("Temperature (C), bias voltage, depletion voltage: " << temperature-273.15 << ", " << biasVoltage/CLHEP::volt << ", " << deplVoltage/CLHEP::volt); ATH_MSG_VERBOSE("Depletion depth: " << depletionDepth/CLHEP::mm); diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.h b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.h index 0ac808add49895d7f1708d07ed526851eca20ead..3ecb7efcdec92396b34ced773e2dd5eab4dd465a 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.h +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.h @@ -18,6 +18,7 @@ #include "AthenaPoolUtilities/CondAttrListCollection.h" #include "GeoPrimitives/GeoPrimitives.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" +#include "PixelConditionsData/PixelModuleData.h" #include "PixelConditionsData/PixelDCSHVData.h" #include "PixelConditionsData/PixelDCSTempData.h" #include "GaudiKernel/ICondSvc.h" @@ -44,6 +45,9 @@ class PixelSiLorentzAngleCondAlg: public AthReentrantAlgorithm { private: ServiceHandle<ICondSvc> m_condSvc; + SG::ReadCondHandleKey<PixelModuleData> m_moduleDataKey + {this, "PixelModuleData", "PixelModuleData", "Pixel module data"}; + SG::ReadCondHandleKey<PixelDCSTempData> m_readKeyTemp {this, "ReadKeyeTemp", "PixelDCSTempCondData", "Key of input sensor temperature conditions folder"}; @@ -66,7 +70,7 @@ class PixelSiLorentzAngleCondAlg: public AthReentrantAlgorithm { DoubleProperty m_nominalField {this, "NominalField", 2.0834*Gaudi::Units::tesla, "Default nominal field"}; BooleanProperty m_useMagFieldCache{this, "UseMagFieldCache", true}; BooleanProperty m_useMagFieldDcs{this, "UseMagFieldDcs", true}; - DoubleProperty m_correctionFactor{this, "CorrectionFactor", 0.9, "Lorentz angle correction factor"}; + unsigned int m_maxHash; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx index df14c3d5aececbc9c238dc01ee0e660841e95da1..170c86963c52cc2708dfc23da18c100d00ce47a1 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx @@ -405,7 +405,7 @@ StatusCode SensorSimPlanarTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiC double collectionDist = 0.2*CLHEP::mm; double smearScale = 1. + 0.35*smearRand; double tanLorentz = m_lorentzAngleTool->getTanLorentzAngle(Module.identifyHash()); - double coLorentz=sqrt(1+pow(tanLorentz,2)); + double coLorentz=std::sqrt(1.0+pow(tanLorentz,2)); const EBC_EVCOLL evColl = EBC_MAINEVCOLL; const HepMcParticleLink::PositionFlag idxFlag = (phit.eventId()==0) ? HepMcParticleLink::IS_POSITION: HepMcParticleLink::IS_INDEX;