CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/L1Trigger/CSCCommonTrigger/src/CSCTriggerGeomManager.cc

Go to the documentation of this file.
00001 #include <L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeomManager.h>
00002 
00003 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
00004 #include <DataFormats/MuonDetId/interface/CSCTriggerNumbering.h>
00005 
00006 #include <iostream>
00007 
00008 std::vector<CSCChamber*> 
00009 CSCTriggerGeomManager::sectorOfChambersInStation(unsigned endcap, unsigned station, 
00010                                                  unsigned sector, unsigned subsector) const
00011 {
00012   std::vector<CSCChamber*> result;
00013   int ring = 0, chamber = 0;
00014   CSCDetId id;
00015 
00016   for(int tcscid = CSCTriggerNumbering::minTriggerCscId(); 
00017       tcscid <= CSCTriggerNumbering::maxTriggerCscId(); ++tcscid)
00018     {
00019       ring = CSCTriggerNumbering::ringFromTriggerLabels(station,tcscid);
00020       chamber = CSCTriggerNumbering::chamberFromTriggerLabels(sector,subsector,station,tcscid);
00021       
00022       id = CSCDetId(endcap,station,ring,chamber,0);
00023       
00024       result.push_back(const_cast<CSCChamber*>(geom->chamber(id)));
00025     }
00026 
00027   return result;
00028 }
00029 
00030 CSCChamber*
00031 CSCTriggerGeomManager::chamber(unsigned endcap, unsigned station, 
00032                                unsigned sector, unsigned subsector, 
00033                                unsigned tcscid) const
00034 {
00035   CSCChamber* result = NULL;
00036   
00037   int ring = 0;
00038   int chamber = 0;
00039 
00040   ring = CSCTriggerNumbering::ringFromTriggerLabels(station,tcscid);
00041   chamber = CSCTriggerNumbering::chamberFromTriggerLabels(sector,subsector,station,tcscid);
00042   CSCDetId id(endcap,station,ring,chamber,0);
00043   
00044   result = const_cast<CSCChamber*>(geom->chamber(id));
00045   
00046   return result;
00047 }