diff --git a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx index 4c62d3ebfed2c7a4ce31c1185b04c6b852e5da33..d41f86635ea83e4f054b5c219efce5d6dd9c9051 100755 --- a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx +++ b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx @@ -2251,9 +2251,10 @@ StatusCode LArPileUpTool::ConvertHits2Samples(const Identifier & cellId, CaloGai #endif // fix the shift +1 if HEC and nSamples 4 and firstSample 0 - // in case of overlay this should NOT be done as the pulse shape read from the database is already shifted + // in case of data overlay this should NOT be done as the pulse shape read from the database is already shifted + // but this should still be done in case of MC overlay int ihecshift=0; - if(!m_RndmEvtOverlay && m_larem_id->is_lar_hec(cellId) && m_NSamples == 4 && m_firstSample == 0) ihecshift=1; + if((!m_RndmEvtOverlay || m_isMcOverlay) && m_larem_id->is_lar_hec(cellId) && m_NSamples == 4 && m_firstSample == 0) ihecshift=1; if (!m_usePhase) {