00001 #include "Geometry/MuonNumbering/interface/MuonSimHitNumberingScheme.h" 00002 #include "Geometry/MuonNumbering/interface/DTNumberingScheme.h" 00003 #include "Geometry/MuonNumbering/interface/CSCNumberingScheme.h" 00004 #include "Geometry/MuonNumbering/interface/RPCNumberingScheme.h" 00005 #include "Geometry/MuonNumbering/interface/GEMNumberingScheme.h" 00006 #include "Geometry/MuonNumbering/interface/MuonBaseNumber.h" 00007 #include "Geometry/MuonNumbering/interface/MuonSubDetector.h" 00008 00009 //#define LOCAL_DEBUG 00010 00011 MuonSimHitNumberingScheme::MuonSimHitNumberingScheme(MuonSubDetector* d, const DDCompactView& cpv) { 00012 theDetector=d; 00013 if (theDetector->isBarrel()) { 00014 theNumbering=new DTNumberingScheme(cpv); 00015 } else if (theDetector->isEndcap()) { 00016 theNumbering=new CSCNumberingScheme(cpv); 00017 } else if (theDetector->isRpc()) { 00018 theNumbering=new RPCNumberingScheme(cpv); 00019 } else if (theDetector->isGem()) { 00020 theNumbering=new GEMNumberingScheme(cpv); 00021 } 00022 } 00023 00024 MuonSimHitNumberingScheme::~MuonSimHitNumberingScheme() { 00025 delete theNumbering; 00026 } 00027 00028 int MuonSimHitNumberingScheme::baseNumberToUnitNumber(const MuonBaseNumber num) { 00029 if (theNumbering) { 00030 return theNumbering->baseNumberToUnitNumber(num); 00031 } else { 00032 return 0; 00033 } 00034 } 00035