diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py index aa6bd085a93acfe10e264ff56cd7009f0dddeb08..3ab63159c016aa58e473287a7e1cb4ac07a31311 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py @@ -46,7 +46,9 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs): # Digitization parameters CondArgs.update( BunchSpace=25.0, - FEI4BarrelHitDiscConfig=[2] + FEI4BarrelHitDiscConfig=[2], + ChargeScaleFEI4=1.0, + UseFEI4SpecialScalingFunction=False ) #==================================================================================== # Run-dependent SIMULATION(digitization) parameters: @@ -179,6 +181,8 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs): DefaultCalibrationParameterA=70.2, DefaultCalibrationParameterE=-3561.25, DefaultCalibrationParameterC=26000.0 +# IBLChargeScale=1.0, +# IBLSpecificCorrection=False ) # DCS parameters CondArgs.update( diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx index 2c001d00ad9a7376649cedc972df37c72a07b2f7..6a8c82ca2f37bfc59cb37f1318f75fad09b3efb3 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx @@ -138,6 +138,8 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const { writeCdo -> setDBMThermalNoise(m_DBMThermalNoise); writeCdo -> setFEI4BarrelHitDiscConfig(m_FEI4BarrelHitDiscConfig); writeCdo -> setFEI4EndcapHitDiscConfig(m_FEI4EndcapHitDiscConfig); + writeCdo -> setFEI4ChargScaling(m_chargeScaleFEI4); + writeCdo -> setUseFEI4SpecialScalingFunction(m_UseFEI4SpecialScalingFunction); // Charge calibration parameters writeCdo -> setDefaultQ2TotA(m_CalibrationParameterA); diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h index 70561869d2a2bc4d0534a31218ca0ec04ade47f5..2f22aa8a4a8fee954cae3e047d89088be4a6f435 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h @@ -521,6 +521,12 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm { Gaudi::Property<std::vector<int>> m_FEI4EndcapHitDiscConfig {this, "FEI4EndcapHitDiscConfig", {2}, "Set HitDiscConfig parameter for endcap pixel layers"}; + Gaudi::Property<float> m_chargeScaleFEI4 + {this, "ChargeScaleFEI4", 1.0, "Scaling of the FEI4 charge"}; + + Gaudi::Property<bool> m_UseFEI4SpecialScalingFunction + {this, "UseFEI4SpecialScalingFunction", false, "Use FEI4 special scaling function"}; + // Charge calibration parameters Gaudi::Property<float> m_CalibrationParameterA {this, "DefaultCalibrationParameterA", 70.2, "Default charge calibration parameter A"}; @@ -530,7 +536,7 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm { Gaudi::Property<float> m_CalibrationParameterC {this, "DefaultCalibrationParameterC", 26000.0, "Default charge calibration parameter C"}; - + // DCS parameters Gaudi::Property<float> m_biasVoltage {this, "DefaultBiasVoltage", 150.0, "Default bias voltage"}; diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h index 1e5f99896750fa5894f8f3aadea95e03eb676348..06f32bd7addfc29daa2632f0f4ed559735e847a3 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h @@ -123,6 +123,11 @@ class PixelModuleData { int getFEI4HitDiscConfig(int bec, int layer) const; int getFEI4OverflowToT(int bec, int layer) const; + void setFEI4ChargScaling(float scaleFEI4); + void setUseFEI4SpecialScalingFunction(bool UseFEI4SpecialScalingFunction); + float getFEI4ChargScaling() const; + bool getUseFEI4SpecialScalingFunction() const; + // Charge calibration parameters void setDefaultQ2TotA(float paramA); void setDefaultQ2TotE(float paramE); @@ -246,6 +251,9 @@ class PixelModuleData { std::vector<int> m_FEI4BarrelHitDiscConfig; std::vector<int> m_FEI4EndcapHitDiscConfig; + float m_scaleFEI4; + bool m_UseFEI4SpecialScalingFunction; + float m_paramA; float m_paramE; float m_paramC; diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx index 8f9ba34259b0b98c2bc7b4d7b3688c8f667579d8..0877f64ae306aa81dcbab238ddeafe389c192653 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx @@ -267,6 +267,11 @@ int PixelModuleData::getFEI4OverflowToT(int bec, int layer) const { return overflow[idx]; } +void PixelModuleData::setFEI4ChargScaling(float scaleFEI4) { m_scaleFEI4 = scaleFEI4; } +void PixelModuleData::setUseFEI4SpecialScalingFunction(bool UseFEI4SpecialScalingFunction) { m_UseFEI4SpecialScalingFunction = UseFEI4SpecialScalingFunction; } +float PixelModuleData::getFEI4ChargScaling() const { return m_scaleFEI4; } +bool PixelModuleData::getUseFEI4SpecialScalingFunction() const { return m_UseFEI4SpecialScalingFunction; } + // Charge calibration parameters void PixelModuleData::setDefaultQ2TotA(float paramA) { m_paramA=paramA; } void PixelModuleData::setDefaultQ2TotE(float paramE) { m_paramE=paramE; } diff --git a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py index d5cf18f794d0e7bcd54c4ca1934a7429693889f4..312fddb0754c5de86a2fc770b3c1db36f34afb2b 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py +++ b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py @@ -201,6 +201,9 @@ def PixelConfigCondAlg_MC(): alg.BunchSpace=25.0 alg.FEI4BarrelHitDiscConfig=[2] + alg.ChargeScaleFEI4=1.0 + alg.UseFEI4SpecialScalingFunction=False + #==================================================================================== # Run-dependent SIMULATION(digitization) parameters: #==================================================================================== diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx index 87dba03de4bb09a144cf67cb375b27a2ebb591ff..baab2f0611e3f67877c0a84f6751b2433d56a242 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx @@ -70,6 +70,14 @@ void FEI4SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle Identifier diodeID = chargedDiodes.getId(diode.diode()); double charge = diode.charge(); + // charge scaling function applied. (Reference: ATL-COM-INDET-2018-052) + if (moduleData->getUseFEI4SpecialScalingFunction()) { + double corrQ = 1.11*(1.0-(-7.09*1000.0)/(23.72*1000.0+charge)+(-0.22*1000.0)/(-0.42*1000.0+charge)); + if (corrQ<1.0) { corrQ = 1.0; } + charge *= 1.0/corrQ; + } + charge *= moduleData->getFEI4ChargScaling(); + int circ = m_pixelCabling->getFE(&diodeID,moduleID); int type = m_pixelCabling->getPixelType(diodeID);