diff --git a/InnerDetector/InDetDigitization/FastTRT_Digitization/FastTRT_Digitization/TRTFastDigitizationTool.h b/InnerDetector/InDetDigitization/FastTRT_Digitization/FastTRT_Digitization/TRTFastDigitizationTool.h index b6d0b866f2880ae6e8fd9449f499bc455fbbd7e2..7c4958695ff31b28bd3341a1c26f37e3707424f4 100644 --- a/InnerDetector/InDetDigitization/FastTRT_Digitization/FastTRT_Digitization/TRTFastDigitizationTool.h +++ b/InnerDetector/InDetDigitization/FastTRT_Digitization/FastTRT_Digitization/TRTFastDigitizationTool.h @@ -141,6 +141,11 @@ private: int m_HardScatterSplittingMode; // Process all TRT_Hits or just those from signal or background events bool m_HardScatterSplittingSkipper; IntegerProperty m_vetoThisBarcode; + + bool m_useEventInfo; // get mu from EventInfo ? + std::string m_EventInfoKey; + float m_NCollPerEvent; + }; #endif // FASTTRT_DIGITIZATION_FASTTRT_DIGITIZATIONTOOL_H diff --git a/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx index 133f02c7476969b06bc7ff021504f39f9af739ff..2eabbbcde22ccf1a29cf4f8a11d2de8fc88aba8d 100644 --- a/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx @@ -72,7 +72,10 @@ TRTFastDigitizationTool::TRTFastDigitizationTool( const std::string &type, m_trt_id( nullptr ), m_HardScatterSplittingMode( 0 ), m_HardScatterSplittingSkipper( false ), - m_vetoThisBarcode( crazyParticleBarcode ) + m_vetoThisBarcode( crazyParticleBarcode ), + m_useEventInfo( false ), + m_EventInfoKey( "McEventInfo" ), + m_NCollPerEvent( 30 ) { declareInterface< ITRTFastDigitizationTool >( this ); declareProperty( "TRT_DriftFunctionTool", m_trtDriftFunctionTool ); @@ -86,6 +89,9 @@ TRTFastDigitizationTool::TRTFastDigitizationTool( const std::string &type, declareProperty( "trtPrdMultiTruthCollection", m_trtPrdTruth ); declareProperty( "HardScatterSplittingMode", m_HardScatterSplittingMode, "Control pileup & signal splitting" ); declareProperty( "ParticleBarcodeVeto", m_vetoThisBarcode, "Barcode of particle to ignore"); + declareProperty( "useEventInfo", m_useEventInfo); + declareProperty( "EventInfoKey", m_EventInfoKey); + declareProperty( "NCollPerEvent", m_NCollPerEvent); } @@ -193,6 +199,17 @@ StatusCode TRTFastDigitizationTool::produceDriftCircles() { { 0.986, 1.020, 0.800, 0.995, 2.400 }, // Barrel C-side Argon { 1.018, 1.040, 0.800, 0.935, 2.400 } // EndCap C-side Argon }; + + if(m_useEventInfo){ + + SG::ReadHandle<EventInfo> eventInfoContainer(m_EventInfoKey); + if(eventInfoContainer.isValid()){ + m_NCollPerEvent = (float) eventInfoContainer->averageInteractionsPerCrossing(); + } + else{ + ATH_MSG_INFO("Cannot retrieve event info"); + } + } m_driftCircleMap.clear(); @@ -243,7 +260,7 @@ StatusCode TRTFastDigitizationTool::produceDriftCircles() { double sigmaTrt = trtSigmaDriftRadiusTail; if ( !isTail ) { double driftTime = m_trtDriftFunctionTool->approxDriftTime( fabs( driftRadiusLoc ) ); - sigmaTrt = m_trtDriftFunctionTool->errorOfDriftRadius( driftTime, hit_id ); + sigmaTrt = m_trtDriftFunctionTool->errorOfDriftRadius( driftTime, hit_id, m_NCollPerEvent ); } // driftRadiusLoc smearing procedure