CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes

CastorGeometry Class Reference

#include <CastorGeometry.h>

Inheritance diagram for CastorGeometry:
CaloSubdetectorGeometry

List of all members.

Public Types

enum  { k_NumberOfCellsForCorners = HcalCastorDetId::kSizeForDenseIndexing }
enum  { k_NumberOfShapes = 4 }
enum  { k_NumberOfParametersPerShape = 6 }
typedef CastorGeometryRecord AlignedRecord
typedef CastorAlignmentRcd AlignmentRecord
typedef CaloCellGeometry::CCGFloat CCGFloat
typedef std::vector
< IdealCastorTrapezoid
CellVec
typedef HcalCastorDetId DetIdType
typedef PCastorRcd PGeometryRecord
typedef CaloCellGeometry::Pt3D Pt3D
typedef CaloCellGeometry::Pt3DVec Pt3DVec
typedef CaloCellGeometry::Tr3D Tr3D

Public Member Functions

 CastorGeometry ()
 CastorGeometry (const CastorTopology *topology)
virtual DetId getClosestCell (const GlobalPoint &r) const
virtual void newCell (const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
virtual unsigned int numberOfParametersPerShape () const
virtual unsigned int numberOfShapes () const
virtual unsigned int numberOfTransformParms () const
virtual ~CastorGeometry ()

Static Public Member Functions

static unsigned int alignmentTransformIndexGlobal (const DetId &id)
static unsigned int alignmentTransformIndexLocal (const DetId &id)
static std::string dbString ()
static void localCorners (Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
static unsigned int numberOfAlignments ()
static std::string producerTag ()

Protected Member Functions

virtual const CaloCellGeometrycellGeomPtr (uint32_t index) const

Private Attributes

DetId::Detector lastReqDet_
int lastReqSubdet_
CellVec m_cellVec
bool m_ownsTopology
const CastorTopologytheTopology

Detailed Description

Definition at line 14 of file CastorGeometry.h.


Member Typedef Documentation

Definition at line 26 of file CastorGeometry.h.

Definition at line 25 of file CastorGeometry.h.

Reimplemented from CaloSubdetectorGeometry.

Definition at line 20 of file CastorGeometry.h.

Definition at line 18 of file CastorGeometry.h.

Definition at line 28 of file CastorGeometry.h.

Definition at line 27 of file CastorGeometry.h.

Definition at line 21 of file CastorGeometry.h.

Definition at line 22 of file CastorGeometry.h.

Definition at line 23 of file CastorGeometry.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
k_NumberOfCellsForCorners 

Definition at line 30 of file CastorGeometry.h.

anonymous enum
Enumerator:
k_NumberOfShapes 

Definition at line 32 of file CastorGeometry.h.

{ k_NumberOfShapes = 4 } ;
anonymous enum
Enumerator:
k_NumberOfParametersPerShape 

Definition at line 34 of file CastorGeometry.h.


Constructor & Destructor Documentation

CastorGeometry::CastorGeometry ( )
CastorGeometry::CastorGeometry ( const CastorTopology topology) [explicit]
CastorGeometry::~CastorGeometry ( ) [virtual]

Definition at line 29 of file CastorGeometry.cc.

References m_ownsTopology, and theTopology.

{
  if( m_ownsTopology ) delete theTopology ;
}

Member Function Documentation

unsigned int CastorGeometry::alignmentTransformIndexGlobal ( const DetId id) [static]

Definition at line 66 of file CastorGeometry.cc.

References DetId::Calo.

{
   return (unsigned int)DetId::Calo - 1 ;
}
unsigned int CastorGeometry::alignmentTransformIndexLocal ( const DetId id) [static]

Definition at line 56 of file CastorGeometry.cc.

References CaloGenericDetId::isCastor().

{
   const CaloGenericDetId gid ( id ) ;

   assert( gid.isCastor() ) ;

   return 0 ;
}
const CaloCellGeometry * CastorGeometry::cellGeomPtr ( uint32_t  index) const [protected, virtual]

Implements CaloSubdetectorGeometry.

Definition at line 98 of file CastorGeometry.cc.

References m_cellVec, and CaloCellGeometry::param().

{
   const CaloCellGeometry* cell ( &m_cellVec[ index ] ) ;
   return ( m_cellVec.size() < index ||
            0 == cell->param() ? 0 : cell ) ;
}
static std::string CastorGeometry::dbString ( ) [inline, static]

Definition at line 36 of file CastorGeometry.h.

{ return "PCastorRcd" ; }
DetId CastorGeometry::getClosestCell ( const GlobalPoint r) const [virtual]

Reimplemented from CaloSubdetectorGeometry.

Definition at line 35 of file CastorGeometry.cc.

References CaloSubdetectorGeometry::getGeometry(), CaloSubdetectorGeometry::getValidDetIds(), and CaloCellGeometry::inside().

{
   DetId returnId ( 0 ) ;
   const std::vector<DetId>& detIds ( getValidDetIds() ) ;
   for( std::vector<DetId>::const_iterator it ( detIds.begin() ) ;
        it != detIds.end(); ++it )
   {
      const CaloCellGeometry* cell ( getGeometry( *it ) ) ;
      if( 0 != cell &&
          cell->inside( r ) )
      {
         returnId = *it ;
         break ;
      }
   }
   return returnId ;
}
void CastorGeometry::localCorners ( Pt3DVec lc,
const CCGFloat pv,
unsigned int  i,
Pt3D ref 
) [static]

Definition at line 72 of file CastorGeometry.cc.

void CastorGeometry::newCell ( const GlobalPoint f1,
const GlobalPoint f2,
const GlobalPoint f3,
const CCGFloat parm,
const DetId detId 
) [virtual]

Implements CaloSubdetectorGeometry.

Definition at line 81 of file CastorGeometry.cc.

References CaloSubdetectorGeometry::cornersMgr(), CaloGenericDetId::denseIndex(), CaloGenericDetId::isCastor(), m_cellVec, and CaloSubdetectorGeometry::m_validIds.

{
   const CaloGenericDetId cgid ( detId ) ;
   
   assert( cgid.isCastor() ) ;

   const unsigned int di ( cgid.denseIndex() ) ;

   m_cellVec[ di ] = IdealCastorTrapezoid( f1, cornersMgr(), parm ) ;
   m_validIds.push_back( detId ) ;
}
static unsigned int CastorGeometry::numberOfAlignments ( ) [inline, static]

Definition at line 52 of file CastorGeometry.h.

Referenced by FakeCaloAlignmentEP::produceCastorAli(), and TestCaloAlignmentEP::produceCastorAli().

{ return 1 ; }
virtual unsigned int CastorGeometry::numberOfParametersPerShape ( ) const [inline, virtual]

Reimplemented from CaloSubdetectorGeometry.

Definition at line 41 of file CastorGeometry.h.

References k_NumberOfParametersPerShape.

virtual unsigned int CastorGeometry::numberOfShapes ( ) const [inline, virtual]

Reimplemented from CaloSubdetectorGeometry.

Definition at line 40 of file CastorGeometry.h.

References k_NumberOfShapes.

{ return k_NumberOfShapes ; }
virtual unsigned int CastorGeometry::numberOfTransformParms ( ) const [inline, virtual]

Reimplemented from CaloSubdetectorGeometry.

Definition at line 38 of file CastorGeometry.h.

{ return 3 ; }
static std::string CastorGeometry::producerTag ( ) [inline, static]

Member Data Documentation

Definition at line 77 of file CastorGeometry.h.

int CastorGeometry::lastReqSubdet_ [mutable, private]

Definition at line 78 of file CastorGeometry.h.

Definition at line 81 of file CastorGeometry.h.

Referenced by cellGeomPtr(), and newCell().

Definition at line 79 of file CastorGeometry.h.

Referenced by ~CastorGeometry().

Definition at line 76 of file CastorGeometry.h.

Referenced by ~CastorGeometry().