test
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 const*>& 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 
78 
79 
80 void
82  allChambers.push_back(chamber);
83  theDets.push_back(chamber);
84  theDetIds.push_back(chamber->geographicalId());
85  theMap.insert(std::pair<DetId,GeomDet*>
86  (chamber->geographicalId(),chamber));
87 }
88 
std::vector< GeomDetType const * > DetTypeContainer
DetTypeContainer theEtaPartitionTypes
Definition: ME0Geometry.h:70
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:75
DetIdContainer theDetIds
Definition: ME0Geometry.h:72
DetContainer theDets
Definition: ME0Geometry.h:69
std::vector< ME0EtaPartition const * > allEtaPartitions
Definition: ME0Geometry.h:77
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
const std::vector< const ME0Chamber * > & chambers() const
Return a vector of all ME0 chambers.
Definition: ME0Geometry.cc:51
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
DetUnitContainer theEtaPartitions
Definition: ME0Geometry.h:68
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:71
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: ME0Geometry.cc:40
std::vector< ME0Chamber const * > allChambers
Definition: ME0Geometry.h:78
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