CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GEMGeometry.cc
Go to the documentation of this file.
1 
8 
10 
11 
13 
14 
16  return theEtaPartitionTypes;
17 }
18 
19 
21  return theEtaPartitions;
22 }
23 
24 
26  return theDets;
27 }
28 
29 
31  return theEtaPartitionIds;
32 }
33 
34 
36  return theDetIds;
37 }
38 
39 
41  return dynamic_cast<const GeomDetUnit*>(idToDet(id));
42 }
43 
45  mapIdToDet::const_iterator i = theMap.find(id);
46  return (i != theMap.end()) ?
47  i->second : 0 ;
48 }
49 
50 /*
51 const std::vector<GEMChamber*>& GEMGeometry::chambers() const {
52  return allChambers;
53 }
54 */
55 
56 
57 const std::vector<GEMEtaPartition*>& GEMGeometry::etaPartitions() const{
58  return allEtaPartitions;
59 }
60 
61 //const GEMChamber* GEMGeometry::chamber(GEMDetId id) const{
62 // return dynamic_cast<const GEMChamber*>(idToDet(id.chamberId()));
63 //}
64 
66  return dynamic_cast<const GEMEtaPartition*>(idToDetUnit(id));
67 }
68 
69 
70 void
72  theDets.push_back(etaPartition);
73  allEtaPartitions.push_back(etaPartition);
74  theEtaPartitions.push_back(etaPartition);
75  theEtaPartitionIds.push_back(etaPartition->geographicalId());
76  theDetIds.push_back(etaPartition->geographicalId());
77  GeomDetType* _t = const_cast<GeomDetType*>(&etaPartition->type());
78  theEtaPartitionTypes.push_back(_t);
79  theMap.insert(std::pair<DetId,GeomDetUnit*>
80  (etaPartition->geographicalId(),etaPartition));
81 }
82 
83 /*
84 void
85 GEMGeometry::add(GEMChamber* chamber){
86  allChambers.push_back(chamber);
87  theDets.push_back(chamber);
88  theDetIds.push_back(chamber->geographicalId());
89  theMap.insert(std::pair<DetId,GeomDet*>
90  (chamber->geographicalId(),chamber));
91 }
92 */
int i
Definition: DBlmapReader.cc:9
DetIdContainer theEtaPartitionIds
Definition: GEMGeometry.h:76
std::vector< GeomDet * > DetContainer
GEMGeometry()
Default constructor.
Definition: GEMGeometry.cc:9
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a etaPartition given its id.
Definition: GEMGeometry.cc:65
DetIdContainer theDetIds
Definition: GEMGeometry.h:77
virtual ~GEMGeometry()
Destructor.
Definition: GEMGeometry.cc:12
virtual const DetIdContainer & detIds() const
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
Definition: GEMGeometry.cc:35
mapIdToDet theMap
Definition: GEMGeometry.h:80
virtual const DetContainer & dets() const
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: GEMGeometry.cc:25
std::vector< GeomDetUnit * > DetUnitContainer
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
virtual const DetIdContainer & detUnitIds() const
Returm a vector of all GeomDetUnit DetIds.
Definition: GEMGeometry.cc:30
std::vector< GeomDetType * > DetTypeContainer
virtual const DetTypeContainer & detTypes() const
Return a vector of all det types.
Definition: GEMGeometry.cc:15
void add(GEMEtaPartition *etaPartition)
Add a GEM etaPartition to the Geometry.
Definition: GEMGeometry.cc:71
Definition: DetId.h:18
const GeomDetType & type() const
DetContainer theDets
Definition: GEMGeometry.h:74
DetUnitContainer theEtaPartitions
Add a GEM Chamber to the Geometry.
Definition: GEMGeometry.h:73
std::vector< GEMEtaPartition * > allEtaPartitions
Definition: GEMGeometry.h:82
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: GEMGeometry.cc:40
virtual const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.
Definition: GEMGeometry.cc:20
DetTypeContainer theEtaPartitionTypes
Definition: GEMGeometry.h:75
virtual const GeomDet * idToDet(DetId) const
Definition: GEMGeometry.cc:44
const std::vector< GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM chambers.
Definition: GEMGeometry.cc:57
std::vector< DetId > DetIdContainer