diff --git a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py index c04edcaebcf763beca7cf4f1c14ceb43a91d18c9..e0b26f059ccf4bf10597782ab2b53f0e7e3066ab 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py +++ b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py @@ -62,18 +62,22 @@ def FrontEndSimTool(name="FrontEndSimTool", **kwargs): def BarrelRD53SimTool(name="BarrelRD53SimTool", **kwargs): kwargs.setdefault("BarrelEC", 0) + kwargs.setdefault("DoNoise", digitizationFlags.doInDetNoise.get_Value()) return CfgMgr.RD53SimTool(name, **kwargs) def EndcapRD53SimTool(name="EndcapRD53SimTool", **kwargs): kwargs.setdefault("BarrelEC", 2) + kwargs.setdefault("DoNoise", digitizationFlags.doInDetNoise.get_Value()) return CfgMgr.RD53SimTool(name, **kwargs) def BarrelFEI4SimTool(name="BarrelFEI4SimTool", **kwargs): kwargs.setdefault("BarrelEC", 0) + kwargs.setdefault("DoNoise", digitizationFlags.doInDetNoise.get_Value()) return CfgMgr.FEI4SimTool(name, **kwargs) def DBMFEI4SimTool(name="DBMFEI4SimTool", **kwargs): kwargs.setdefault("BarrelEC", 4) + kwargs.setdefault("DoNoise", digitizationFlags.doInDetNoise.get_Value()) return CfgMgr.FEI4SimTool(name, **kwargs) def BarrelFEI3SimTool(name="BarrelFEI3SimTool", **kwargs): diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx index 8d6da081e46f6760add8ce6d67cf6e92d2ccceb7..55e6adfc7c1fabed779aea2c9e6fe0fde08d7bb0 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx @@ -43,14 +43,16 @@ void FEI3SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle // Add cross-talk CrossTalk(moduleData->getCrossTalk(barrel_ec,layerIndex),chargedDiodes); - // Add thermal noise - ThermalNoise(moduleData->getThermalNoise(barrel_ec,layerIndex),chargedDiodes, rndmEngine); + if (m_doNoise) { + // Add thermal noise + ThermalNoise(moduleData->getThermalNoise(barrel_ec,layerIndex),chargedDiodes, rndmEngine); - // Add random noise - RandomNoise(chargedDiodes, rndmEngine); + // Add random noise + RandomNoise(chargedDiodes, rndmEngine); + } // Add random diabled pixels - RandomDisable(chargedDiodes, rndmEngine); + RandomDisable(chargedDiodes, rndmEngine); // FIXME How should we handle disabling pixels in Overlay jobs? for (SiChargedDiodeIterator i_chargedDiode=chargedDiodes.begin(); i_chargedDiode!=chargedDiodes.end(); ++i_chargedDiode) { // Merge ganged pixel @@ -94,7 +96,7 @@ void FEI3SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle double th0 = calibData->getAnalogThreshold((int)moduleHash, circ, type); double ith0 = calibData->getInTimeThreshold((int)moduleHash, circ, type); - double threshold = th0+calibData->getAnalogThresholdSigma((int)moduleHash,circ,type)*CLHEP::RandGaussZiggurat::shoot(rndmEngine)+calibData->getAnalogThresholdNoise((int)moduleHash, circ, type)*CLHEP::RandGaussZiggurat::shoot(rndmEngine); + double threshold = th0+calibData->getAnalogThresholdSigma((int)moduleHash,circ,type)*CLHEP::RandGaussZiggurat::shoot(rndmEngine)+calibData->getAnalogThresholdNoise((int)moduleHash, circ, type)*CLHEP::RandGaussZiggurat::shoot(rndmEngine); // This noise check is unaffected by digitizationFlags.doInDetNoise in 21.0 - see PixelCellDiscriminator.cxx in that branch double intimethreshold = (ith0/th0)*threshold; if (charge>threshold) { diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx index 1a32968b36308406403882ca782eba2c0e50eead..51169413dda367f618b24bd6c747b7d73a8dd1d2 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx @@ -53,14 +53,16 @@ void FEI4SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle // Add cross-talk CrossTalk(moduleData->getCrossTalk(barrel_ec,layerIndex),chargedDiodes); - // Add thermal noise - ThermalNoise(moduleData->getThermalNoise(barrel_ec,layerIndex),chargedDiodes,rndmEngine); + if (m_doNoise) { + // Add thermal noise + ThermalNoise(moduleData->getThermalNoise(barrel_ec,layerIndex),chargedDiodes,rndmEngine); - // Add random noise - RandomNoise(chargedDiodes,rndmEngine); + // Add random noise + RandomNoise(chargedDiodes,rndmEngine); + } // Add random diabled pixels - RandomDisable(chargedDiodes,rndmEngine); + RandomDisable(chargedDiodes,rndmEngine); // FIXME How should we handle disabling pixels in Overlay jobs? for (SiChargedDiodeIterator i_chargedDiode=chargedDiodes.begin(); i_chargedDiode!=chargedDiodes.end(); ++i_chargedDiode) { @@ -73,7 +75,7 @@ void FEI4SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle // Apply analogu threshold, timing simulation double th0 = calibData->getAnalogThreshold((int)moduleHash, circ, type); - double threshold = th0+calibData->getAnalogThresholdSigma((int)moduleHash,circ,type)*CLHEP::RandGaussZiggurat::shoot(rndmEngine)+calibData->getAnalogThresholdNoise((int)moduleHash, circ, type)*CLHEP::RandGaussZiggurat::shoot(rndmEngine); + double threshold = th0+calibData->getAnalogThresholdSigma((int)moduleHash,circ,type)*CLHEP::RandGaussZiggurat::shoot(rndmEngine)+calibData->getAnalogThresholdNoise((int)moduleHash, circ, type)*CLHEP::RandGaussZiggurat::shoot(rndmEngine); // This noise check is unaffected by digitizationFlags.doInDetNoise in 21.0 - see PixelCellDiscriminator.cxx in that branch if (charge>threshold) { int bunchSim; diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/FrontEndSimTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/FrontEndSimTool.h index 37612a73994261a4e6a6d4c8dad3aa05c22bdd8c..a15ada699506ee44e0c3ed3a2d03611cd534d4ea 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/FrontEndSimTool.h +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/FrontEndSimTool.h @@ -37,10 +37,12 @@ class FrontEndSimTool:public AthAlgTool,virtual public IAlgTool { public: FrontEndSimTool( const std::string& type, const std::string& name,const IInterface* parent): AthAlgTool(type,name,parent), - m_BarrelEC(0) + m_BarrelEC(0), + m_doNoise(true) { declareInterface<FrontEndSimTool>(this); declareProperty("BarrelEC", m_BarrelEC, "Index of barrel or endcap"); + declareProperty("DoNoise", m_doNoise); } static const InterfaceID& interfaceID() { return IID_IFrontEndSimTool; } @@ -168,6 +170,7 @@ class FrontEndSimTool:public AthAlgTool,virtual public IAlgTool { {this, "PixelChargeCalibCondData", "PixelChargeCalibCondData", "Pixel charge calibration data"}; int m_BarrelEC; + bool m_doNoise; double getG4Time(const SiTotalCharge &totalCharge) const { // If there is one single charge, return its time: diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/RD53SimTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/RD53SimTool.cxx index 4808a7924c208331b1252d60a91bf851445b31a0..6253ac5c5506f92d9ee184ae21b7ed28349ff90e 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/RD53SimTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/RD53SimTool.cxx @@ -60,14 +60,16 @@ void RD53SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle // Add cross-talk CrossTalk(moduleData->getCrossTalk(barrel_ec,layerIndex),chargedDiodes); - // Add thermal noise - ThermalNoise(moduleData->getThermalNoise(barrel_ec,layerIndex),chargedDiodes,rndmEngine); + if (m_doNoise) { + // Add thermal noise + ThermalNoise(moduleData->getThermalNoise(barrel_ec,layerIndex),chargedDiodes,rndmEngine); - // Add random noise - RandomNoise(chargedDiodes,rndmEngine); + // Add random noise + RandomNoise(chargedDiodes,rndmEngine); + } // Add random diabled pixels - RandomDisable(chargedDiodes,rndmEngine); + RandomDisable(chargedDiodes,rndmEngine); // FIXME How should we handle disabling pixels in Overlay jobs? for (SiChargedDiodeIterator i_chargedDiode=chargedDiodes.begin(); i_chargedDiode!=chargedDiodes.end(); ++i_chargedDiode) { @@ -80,7 +82,7 @@ void RD53SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle // Apply analogu threshold, timing simulation double th0 = calibData->getAnalogThreshold((int)moduleHash, circ, type); - double threshold = th0+calibData->getAnalogThresholdSigma((int)moduleHash,circ,type)*CLHEP::RandGaussZiggurat::shoot(rndmEngine)+calibData->getAnalogThresholdNoise((int)moduleHash, circ, type)*CLHEP::RandGaussZiggurat::shoot(rndmEngine); + double threshold = th0+calibData->getAnalogThresholdSigma((int)moduleHash,circ,type)*CLHEP::RandGaussZiggurat::shoot(rndmEngine)+calibData->getAnalogThresholdNoise((int)moduleHash, circ, type)*CLHEP::RandGaussZiggurat::shoot(rndmEngine); // This noise check is unaffected by digitizationFlags.doInDetNoise in 21.0 - see PixelCellDiscriminator.cxx in that branch if (charge>threshold) { diff --git a/Tools/PROCTools/python/RunTier0TestsTools.py b/Tools/PROCTools/python/RunTier0TestsTools.py index 893128855f3e4b6121d27c4c645e3fe1b4ac3246..3c2419aa3cc2b7719018fb48c520aea2c4d4fa50 100644 --- a/Tools/PROCTools/python/RunTier0TestsTools.py +++ b/Tools/PROCTools/python/RunTier0TestsTools.py @@ -24,7 +24,7 @@ ciRefFileMap = { 's3126-22.0' : 'v7', # OverlayTier0Test_required-test 'overlay-d1498-21.0' : 'v2', - 'overlay-d1498-22.0' : 'v17', + 'overlay-d1498-22.0' : 'v18', 'overlay-bkg-21.0' : 'v1', 'overlay-bkg-22.0' : 'v1', }