#include <CastorGeometry.h>
Public Types | |
enum | { k_NumberOfCellsForCorners = HcalCastorDetId::kSizeForDenseIndexing } |
enum | { k_NumberOfShapes = 4 } |
enum | { k_NumberOfParametersPerShape = 6 } |
typedef CastorGeometryRecord | AlignedRecord |
typedef CastorAlignmentRcd | AlignmentRecord |
typedef HcalCastorDetId | DetIdType |
typedef PCastorRcd | PGeometryRecord |
Public Member Functions | |
CastorGeometry () | |
CastorGeometry (const CastorTopology *topology) | |
virtual DetId | getClosestCell (const GlobalPoint &r) const |
virtual const std::vector < DetId > & | getValidDetIds (DetId::Detector det=DetId::Detector(0), int subdet=0) const |
Get a list of valid detector ids (for the given subdetector) | |
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 std::vector < HepGeom::Point3D< double > > | localCorners (const double *pv, unsigned int i, HepGeom::Point3D< double > &ref) |
static CaloCellGeometry * | newCell (const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, CaloCellGeometry::CornersMgr *mgr, const double *parm, const DetId &detId) |
static unsigned int | numberOfAlignments () |
static std::string | producerTag () |
Private Attributes | |
DetId::Detector | lastReqDet_ |
int | lastReqSubdet_ |
bool | m_ownsTopology |
std::vector< DetId > | m_validIds |
const CastorTopology * | theTopology |
Definition at line 13 of file CastorGeometry.h.
Definition at line 18 of file CastorGeometry.h.
Definition at line 17 of file CastorGeometry.h.
Definition at line 20 of file CastorGeometry.h.
Definition at line 19 of file CastorGeometry.h.
anonymous enum |
Definition at line 22 of file CastorGeometry.h.
anonymous enum |
Definition at line 24 of file CastorGeometry.h.
{ k_NumberOfShapes = 4 } ;
anonymous enum |
Definition at line 26 of file CastorGeometry.h.
{ k_NumberOfParametersPerShape = 6 } ;
CastorGeometry::CastorGeometry | ( | ) |
Definition at line 8 of file CastorGeometry.cc.
: theTopology( new CastorTopology ), lastReqDet_(DetId::Detector(0)), lastReqSubdet_(0), m_ownsTopology ( true ) { }
CastorGeometry::CastorGeometry | ( | const CastorTopology * | topology | ) | [explicit] |
Definition at line 16 of file CastorGeometry.cc.
: theTopology(topology), lastReqDet_(DetId::Detector(0)), lastReqSubdet_(0), m_ownsTopology ( false ) { }
CastorGeometry::~CastorGeometry | ( | ) | [virtual] |
Definition at line 25 of file CastorGeometry.cc.
References m_ownsTopology, and theTopology.
{ if( m_ownsTopology ) delete theTopology ; }
unsigned int CastorGeometry::alignmentTransformIndexGlobal | ( | const DetId & | id | ) | [static] |
Definition at line 101 of file CastorGeometry.cc.
References DetId::Calo.
{ return (unsigned int)DetId::Calo - 1 ; }
unsigned int CastorGeometry::alignmentTransformIndexLocal | ( | const DetId & | id | ) | [static] |
Definition at line 91 of file CastorGeometry.cc.
References CaloGenericDetId::isCastor().
{ const CaloGenericDetId gid ( id ) ; assert( gid.isCastor() ) ; return 0 ; }
static std::string CastorGeometry::dbString | ( | ) | [inline, static] |
Definition at line 28 of file CastorGeometry.h.
{ return "PCastorRcd" ; }
DetId CastorGeometry::getClosestCell | ( | const GlobalPoint & | r | ) | const [virtual] |
Reimplemented from CaloSubdetectorGeometry.
Definition at line 71 of file CastorGeometry.cc.
References CaloSubdetectorGeometry::getGeometry(), 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( cell.inside( r ) ) { returnId = *it ; break ; } } return returnId ; }
const std::vector< DetId > & CastorGeometry::getValidDetIds | ( | DetId::Detector | det = DetId::Detector(0) , |
int | subdet = 0 |
||
) | const [virtual] |
Get a list of valid detector ids (for the given subdetector)
Reimplemented from CaloSubdetectorGeometry.
Definition at line 31 of file CastorGeometry.cc.
References CaloSubdetectorGeometry::getValidDetIds(), i, ExpressReco_HICollisions_FallBack::id, lastReqDet_, lastReqSubdet_, m_validIds, and python::multivaluedict::sort().
Referenced by getClosestCell().
{ const std::vector<DetId>& baseIds ( CaloSubdetectorGeometry::getValidDetIds() ) ; if( det == DetId::Detector( 0 ) && subdet == 0 ) { return baseIds ; } if( lastReqDet_ != det || lastReqSubdet_ != subdet ) { lastReqDet_ = det ; lastReqSubdet_ = subdet ; m_validIds.clear(); m_validIds.reserve( baseIds.size() ) ; } if( m_validIds.empty() ) { for( unsigned int i ( 0 ) ; i != baseIds.size() ; ++i ) { const DetId id ( baseIds[i] ); if( id.det() == det && id.subdetId() == subdet ) { m_validIds.push_back( id ) ; } } std::sort(m_validIds.begin(),m_validIds.end()); } return m_validIds; }
std::vector< HepGeom::Point3D< double > > CastorGeometry::localCorners | ( | const double * | pv, |
unsigned int | i, | ||
HepGeom::Point3D< double > & | ref | ||
) | [static] |
Definition at line 107 of file CastorGeometry.cc.
References calogeom::IdealCastorTrapezoid::localCorners().
{ return ( calogeom::IdealCastorTrapezoid::localCorners( pv, ref ) ) ; }
CaloCellGeometry * CastorGeometry::newCell | ( | const GlobalPoint & | f1, |
const GlobalPoint & | f2, | ||
const GlobalPoint & | f3, | ||
CaloCellGeometry::CornersMgr * | mgr, | ||
const double * | parm, | ||
const DetId & | detId | ||
) | [static] |
Definition at line 115 of file CastorGeometry.cc.
References CaloGenericDetId::isCastor().
{ const CaloGenericDetId cgid ( detId ) ; assert( cgid.isCastor() ) ; return ( new calogeom::IdealCastorTrapezoid( f1, mgr, parm ) ) ; }
static unsigned int CastorGeometry::numberOfAlignments | ( | ) | [inline, static] |
Definition at line 48 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 33 of file CastorGeometry.h.
References k_NumberOfParametersPerShape.
{ return k_NumberOfParametersPerShape ; }
virtual unsigned int CastorGeometry::numberOfShapes | ( | ) | const [inline, virtual] |
Reimplemented from CaloSubdetectorGeometry.
Definition at line 32 of file CastorGeometry.h.
References k_NumberOfShapes.
{ return k_NumberOfShapes ; }
virtual unsigned int CastorGeometry::numberOfTransformParms | ( | ) | const [inline, virtual] |
Reimplemented from CaloSubdetectorGeometry.
Definition at line 30 of file CastorGeometry.h.
{ return 3 ; }
static std::string CastorGeometry::producerTag | ( | ) | [inline, static] |
Definition at line 46 of file CastorGeometry.h.
Referenced by PCaloGeometryBuilder::beginRun(), CastorHardcodeGeometryEP::CastorHardcodeGeometryEP(), and CaloGeometryBuilder::produceAligned().
{ return "CASTOR" ; }
DetId::Detector CastorGeometry::lastReqDet_ [mutable, private] |
Definition at line 68 of file CastorGeometry.h.
Referenced by getValidDetIds().
int CastorGeometry::lastReqSubdet_ [mutable, private] |
Definition at line 69 of file CastorGeometry.h.
Referenced by getValidDetIds().
bool CastorGeometry::m_ownsTopology [private] |
Definition at line 71 of file CastorGeometry.h.
Referenced by ~CastorGeometry().
std::vector<DetId> CastorGeometry::m_validIds [mutable, private] |
Reimplemented from CaloSubdetectorGeometry.
Definition at line 70 of file CastorGeometry.h.
Referenced by getValidDetIds().
const CastorTopology* CastorGeometry::theTopology [private] |
Definition at line 67 of file CastorGeometry.h.
Referenced by ~CastorGeometry().