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<const 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 const* _t = &etaPartition->type();
78  theEtaPartitionTypes.push_back(_t);
79  theMap.insert(std::pair<DetId,const 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 */
std::vector< GeomDetType const * > DetTypeContainer
int i
Definition: DBlmapReader.cc:9
std::vector< const GEMEtaPartition * > allEtaPartitions
Definition: GEMGeometry.h:82
virtual const GeomDetUnit * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: GEMGeometry.cc:40
DetIdContainer theEtaPartitionIds
Definition: GEMGeometry.h:76
virtual const GeomDet * idToDet(DetId) const override
Definition: GEMGeometry.cc:44
virtual const DetTypeContainer & detTypes() const override
Return a vector of all det types.
Definition: GEMGeometry.cc:15
virtual const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: GEMGeometry.cc:25
virtual const DetIdContainer & detUnitIds() const override
Returm a vector of all GeomDetUnit DetIds.
Definition: GEMGeometry.cc:30
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
mapIdToDet theMap
Definition: GEMGeometry.h:80
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM chambers.
Definition: GEMGeometry.cc:57
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
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
virtual const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
Definition: GEMGeometry.cc:35
virtual const DetUnitContainer & detUnits() const override
Returm a vector of all GeomDetUnit.
Definition: GEMGeometry.cc:20
DetTypeContainer theEtaPartitionTypes
Definition: GEMGeometry.h:75
std::vector< GeomDet const * > DetContainer
std::vector< GeomDetUnit const * > DetUnitContainer
std::vector< DetId > DetIdContainer