#include "ITimeShiftedGasHit.hxx" #include // =============================================================================== // GasHit // =============================================================================== COMET::ITimeShiftedGasHit::ITimeShiftedGasHit(const IG4HitGas& hit, double time_shift) : IG4HitGas(hit), IVTimeShiftedHit() { OffsetTime(time_shift); } void COMET::ITimeShiftedGasHit::OffsetTime(double time_shift){ // Offset the timing by the needed time shift fTime += time_shift; fFirstTime += time_shift; fLastTime += time_shift; for (auto& aux: fAuxiliaryPoints) aux.fTime += time_shift; } void COMET::ITimeShiftedGasHit::GetTrackIDs(std::set& oldIDs){ // Insert the needed primary track ID oldIDs.insert(fPrimaryId); } void COMET::ITimeShiftedGasHit::SetTrackIDs(const std::map& newIDs){ // Reset the primary ID to the new value fPrimaryId=GetId(fPrimaryId,newIDs); }