Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:48:56

0001 #include "Geometry/MuonNumbering/interface/MuonSimHitNumberingScheme.h"
0002 #include "Geometry/MuonNumbering/interface/DTNumberingScheme.h"
0003 #include "Geometry/MuonNumbering/interface/CSCNumberingScheme.h"
0004 #include "Geometry/MuonNumbering/interface/RPCNumberingScheme.h"
0005 #include "Geometry/MuonNumbering/interface/GEMNumberingScheme.h"
0006 #include "Geometry/MuonNumbering/interface/ME0NumberingScheme.h"
0007 #include "Geometry/MuonNumbering/interface/MuonBaseNumber.h"
0008 #include "Geometry/MuonNumbering/interface/MuonSubDetector.h"
0009 #include "Geometry/MuonNumbering/interface/MuonGeometryConstants.h"
0010 
0011 MuonSimHitNumberingScheme::MuonSimHitNumberingScheme(MuonSubDetector* d, const MuonGeometryConstants& muonConstants) {
0012   theDetector = d;
0013   if (theDetector->isBarrel()) {
0014     theNumbering = new DTNumberingScheme(muonConstants);
0015   } else if (theDetector->isEndcap()) {
0016     theNumbering = new CSCNumberingScheme(muonConstants);
0017   } else if (theDetector->isRPC()) {
0018     theNumbering = new RPCNumberingScheme(muonConstants);
0019   } else if (theDetector->isGEM()) {
0020     theNumbering = new GEMNumberingScheme(muonConstants);
0021   } else if (theDetector->isME0()) {
0022     theNumbering = new ME0NumberingScheme(muonConstants);
0023   }
0024 }
0025 
0026 MuonSimHitNumberingScheme::~MuonSimHitNumberingScheme() { delete theNumbering; }
0027 
0028 int MuonSimHitNumberingScheme::baseNumberToUnitNumber(const MuonBaseNumber& num) const {
0029   if (theNumbering) {
0030     return theNumbering->baseNumberToUnitNumber(num);
0031   } else {
0032     return 0;
0033   }
0034 }