CMS 3D CMS Logo

Public Member Functions | Private Attributes

GEMGeometry Class Reference

#include <GEMGeometry.h>

Inheritance diagram for GEMGeometry:
TrackingGeometry

List of all members.

Public Member Functions

void add (GEMEtaPartition *etaPartition)
 Add a GEM etaPartition to the Geometry.
virtual const DetIdContainerdetIds () const
 Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
virtual const DetContainerdets () const
 Returm a vector of all GeomDet (including all GeomDetUnits)
virtual const DetTypeContainerdetTypes () const
 Return a vector of all det types.
virtual const DetIdContainerdetUnitIds () const
 Returm a vector of all GeomDetUnit DetIds.
virtual const DetUnitContainerdetUnits () const
 Returm a vector of all GeomDetUnit.
const GEMEtaPartitionetaPartition (GEMDetId id) const
 Return a etaPartition given its id.
const std::vector
< GEMEtaPartition * > & 
etaPartitions () const
 Return a vector of all GEM chambers.
 GEMGeometry ()
 Default constructor.
virtual const GeomDetidToDet (DetId) const
virtual const GeomDetUnitidToDetUnit (DetId) const
 Return the pointer to the GeomDetUnit corresponding to a given DetId.
virtual ~GEMGeometry ()
 Destructor.

Private Attributes

std::vector< GEMEtaPartition * > allEtaPartitions
DetIdContainer theDetIds
DetContainer theDets
DetIdContainer theEtaPartitionIds
DetUnitContainer theEtaPartitions
 Add a GEM Chamber to the Geometry.
DetTypeContainer theEtaPartitionTypes
mapIdToDet theMap

Detailed Description

The model of the geometry of GEM.

Author:
M. Maggi - INFN Bari

Definition at line 21 of file GEMGeometry.h.


Constructor & Destructor Documentation

GEMGeometry::GEMGeometry ( )

Default constructor.

Implementation of the Model for GEM Geometry

Author:
M. Maggi - INFN Bari

Definition at line 9 of file GEMGeometry.cc.

{}
GEMGeometry::~GEMGeometry ( ) [virtual]

Destructor.

Definition at line 12 of file GEMGeometry.cc.

{}  

Member Function Documentation

void GEMGeometry::add ( GEMEtaPartition etaPartition)

Add a GEM etaPartition to the Geometry.

Definition at line 71 of file GEMGeometry.cc.

References allEtaPartitions, etaPartition(), GeomDet::geographicalId(), theDetIds, theDets, theEtaPartitionIds, theEtaPartitions, theEtaPartitionTypes, theMap, and GEMEtaPartition::type().

Referenced by GEMGeometryBuilderFromDDD::buildGeometry().

                                             {
  theDets.push_back(etaPartition);
  allEtaPartitions.push_back(etaPartition);
  theEtaPartitions.push_back(etaPartition);
  theEtaPartitionIds.push_back(etaPartition->geographicalId());
  theDetIds.push_back(etaPartition->geographicalId());
  GeomDetType* _t = const_cast<GeomDetType*>(&etaPartition->type());
  theEtaPartitionTypes.push_back(_t);
  theMap.insert(std::pair<DetId,GeomDetUnit*>
                (etaPartition->geographicalId(),etaPartition));
}
const GEMGeometry::DetIdContainer & GEMGeometry::detIds ( ) const [virtual]

Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)

Implements TrackingGeometry.

Definition at line 35 of file GEMGeometry.cc.

References theDetIds.

                                                          {
  return theDetIds;
}
const GEMGeometry::DetContainer & GEMGeometry::dets ( ) const [virtual]

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 25 of file GEMGeometry.cc.

References theDets.

                                                      {
  return theDets;
}
const GEMGeometry::DetTypeContainer & GEMGeometry::detTypes ( ) const [virtual]

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 15 of file GEMGeometry.cc.

References theEtaPartitionTypes.

                                                               {
  return theEtaPartitionTypes;
}
const GEMGeometry::DetIdContainer & GEMGeometry::detUnitIds ( ) const [virtual]

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 30 of file GEMGeometry.cc.

References theEtaPartitionIds.

                                                              {
  return theEtaPartitionIds;
}
const GEMGeometry::DetUnitContainer & GEMGeometry::detUnits ( ) const [virtual]

Returm a vector of all GeomDetUnit.

Implements TrackingGeometry.

Definition at line 20 of file GEMGeometry.cc.

References theEtaPartitions.

                                                              {
  return theEtaPartitions;
}
const GEMEtaPartition * GEMGeometry::etaPartition ( GEMDetId  id) const

Return a etaPartition given its id.

Definition at line 65 of file GEMGeometry.cc.

References idToDetUnit().

Referenced by add().

                                                                 {
  return dynamic_cast<const GEMEtaPartition*>(idToDetUnit(id));
}
const std::vector< GEMEtaPartition * > & GEMGeometry::etaPartitions ( ) const

Return a vector of all GEM chambers.

Return a vector of all GEM eta partitions

Definition at line 57 of file GEMGeometry.cc.

References allEtaPartitions.

                                                                   {
  return allEtaPartitions;
}
const GeomDet * GEMGeometry::idToDet ( DetId  ) const [virtual]

Return the pointer to the GeomDet corresponding to a given DetId (valid also for GeomDetUnits)

Implements TrackingGeometry.

Definition at line 44 of file GEMGeometry.cc.

References i, and theMap.

Referenced by idToDetUnit().

                                                 {
  mapIdToDet::const_iterator i = theMap.find(id);
  return (i != theMap.end()) ?
    i->second : 0 ;
}
const GeomDetUnit * GEMGeometry::idToDetUnit ( DetId  ) const [virtual]

Return the pointer to the GeomDetUnit corresponding to a given DetId.

Implements TrackingGeometry.

Definition at line 40 of file GEMGeometry.cc.

References idToDet().

Referenced by etaPartition().

                                                         {
  return dynamic_cast<const GeomDetUnit*>(idToDet(id));
}

Member Data Documentation

Definition at line 82 of file GEMGeometry.h.

Referenced by add(), and etaPartitions().

Definition at line 77 of file GEMGeometry.h.

Referenced by add(), and detIds().

Definition at line 74 of file GEMGeometry.h.

Referenced by add(), and dets().

Definition at line 76 of file GEMGeometry.h.

Referenced by add(), and detUnitIds().

Add a GEM Chamber to the Geometry.

Definition at line 73 of file GEMGeometry.h.

Referenced by add(), and detUnits().

Definition at line 75 of file GEMGeometry.h.

Referenced by add(), and detTypes().

Definition at line 80 of file GEMGeometry.h.

Referenced by add(), and idToDet().