Load the GEM geometry only in the plugins (MuonGEMHits, MuonGEMDigis) and pass the pointer to the code in the src directory.