#include "IECALMapPointer.hxx" #include "IGeomInfo.hxx" #include "IChannelId.hxx" TVector3 _IECALMapPointer_GetGlobalPosition(const COMET::IChannelId* chanId) { if(not chanId) return TVector3(1e10, 1e10, 1e10); COMET::IECALGeom& geom = COMET::IGeomInfo::ECAL(); TVector3 pos = geom.GetCrystalPosition(geom.GetSequenceIdFromChannelId(*chanId)); return pos; } TVector3 _IECALMapPointer_GetLocalPosition(const COMET::IChannelId* chanId) { TVector3 gpos = _IECALMapPointer_GetGlobalPosition(chanId); if(1e10 < gpos.Mag()) return gpos; TVector3 lpos; COMET::IGeomInfo::ECAL().MasterToECALLocal(gpos, lpos); return lpos; }