CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ME0Geometry.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<ME0Chamber*>& ME0Geometry::chambers() const {
52  return allChambers;
53 }
54 */
55 
56 
57 const std::vector<ME0EtaPartition const*>& ME0Geometry::etaPartitions() const{
58  return allEtaPartitions;
59 }
60 
62  return dynamic_cast<const ME0EtaPartition*>(idToDetUnit(id));
63 }
64 
65 
66 void
68  theDets.push_back(etaPartition);
69  allEtaPartitions.push_back(etaPartition);
70  theEtaPartitions.push_back(etaPartition);
71  theEtaPartitionIds.push_back(etaPartition->geographicalId());
72  theDetIds.push_back(etaPartition->geographicalId());
73  theEtaPartitionTypes.push_back(&etaPartition->type());
74  theMap.insert(std::pair<DetId,GeomDetUnit*>
75  (etaPartition->geographicalId(),etaPartition));
76 }
77 
std::vector< GeomDetType const * > DetTypeContainer
DetTypeContainer theEtaPartitionTypes
Definition: ME0Geometry.h:64
int i
Definition: DBlmapReader.cc:9
virtual const GeomDet * idToDet(DetId) const
Definition: ME0Geometry.cc:44
virtual const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.
Definition: ME0Geometry.cc:20
mapIdToDet theMap
Definition: ME0Geometry.h:69
DetIdContainer theDetIds
Definition: ME0Geometry.h:66
DetContainer theDets
Definition: ME0Geometry.h:63
std::vector< ME0EtaPartition const * > allEtaPartitions
Definition: ME0Geometry.h:71
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return a etaPartition given its id.
Definition: ME0Geometry.cc:61
virtual const DetContainer & dets() const
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: ME0Geometry.cc:25
virtual const DetTypeContainer & detTypes() const
Return a vector of all det types.
Definition: ME0Geometry.cc:15
virtual ~ME0Geometry()
Destructor.
Definition: ME0Geometry.cc:12
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
DetUnitContainer theEtaPartitions
Definition: ME0Geometry.h:62
const std::vector< ME0EtaPartition const * > & etaPartitions() const
Return a vector of all ME0 eta partitions.
Definition: ME0Geometry.cc:57
Definition: DetId.h:18
DetIdContainer theEtaPartitionIds
Definition: ME0Geometry.h:65
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: ME0Geometry.cc:40
void add(ME0EtaPartition *etaPartition)
Add a ME0 etaPartition to the Geometry.
Definition: ME0Geometry.cc:67
const GeomDetType & type() const
virtual const DetIdContainer & detUnitIds() const
Returm a vector of all GeomDetUnit DetIds.
Definition: ME0Geometry.cc:30
std::vector< GeomDet const * > DetContainer
std::vector< GeomDetUnit const * > DetUnitContainer
virtual const DetIdContainer & detIds() const
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
Definition: ME0Geometry.cc:35
ME0Geometry()
Default constructor.
Definition: ME0Geometry.cc:9
std::vector< DetId > DetIdContainer