CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloSubdetectorGeometry.h
Go to the documentation of this file.
1 #ifndef GEOMETRY_CALOGEOMETRY_CALOSUBDETECTORGEOMETRY_H
2 #define GEOMETRY_CALOGEOMETRY_CALOSUBDETECTORGEOMETRY_H 1
3 
4 #include <vector>
5 #include <set>
10 
22 
23  public:
24 
26 
27  typedef std::set<DetId> DetIdSet;
28 
32 
33  typedef std::vector<CCGFloat> TrVec ;
34  typedef std::vector<unsigned int> IVec ;
35  typedef std::vector<CCGFloat> DimVec ;
36 
38 
40  virtual ~CaloSubdetectorGeometry();
41 
42  virtual void newCell( const GlobalPoint& f1 ,
43  const GlobalPoint& f2 ,
44  const GlobalPoint& f3 ,
45  const CCGFloat* parm ,
46  const DetId& detId ) = 0 ;
47 
49  virtual bool present( const DetId& id ) const;
50 
52  virtual const CaloCellGeometry* getGeometry( const DetId& id ) const ;
53 
58  virtual const std::vector<DetId>& getValidDetIds( DetId::Detector det = DetId::Detector(0) ,
59  int subdet = 0 ) const ;
60 
61  // Get closest cell, etc...
62  virtual DetId getClosestCell( const GlobalPoint& r ) const ;
63 
70  virtual DetIdSet getCells( const GlobalPoint& r, double dR ) const ;
71 
72  CCGFloat deltaPhi( const DetId& detId ) const ;
73 
74  CCGFloat deltaEta( const DetId& detId ) const ;
75 
77 
79 
80  void allocatePar( ParVec::size_type n, unsigned int m ) ;
81 
82  ParMgr* parMgr() { return m_parMgr ; }
83  const ParMgr* parMgrConst() const { return m_parMgr ; }
84 
86  const ParVecVec& parVecVec() const { return m_parVecVec ; }
87 
88  virtual unsigned int numberOfShapes() const { return 1 ; }
89  virtual unsigned int numberOfParametersPerShape() const { return 1 ; }
90  virtual unsigned int numberOfTransformParms() const { return 6 ; }
91 
92  virtual void fillDefaultNamedParameters() const { return ; }
93 
94  void getSummary( TrVec& trVector,
95  IVec& iVector,
96  DimVec& dimVector ) const ;
97 
98  virtual void initializeParms() { return ; }
99 
100  protected:
101 
102  virtual const CaloCellGeometry* cellGeomPtr( uint32_t index ) const = 0 ;
103 
105 
106  static CCGFloat deltaR( const GlobalPoint& p1,
107  const GlobalPoint& p2 )
108  { return reco::deltaR( p1, p2 ) ; }
109 
110  mutable std::vector<DetId> m_validIds ;
111 
112  private:
113 
115 
117 
121 
122  mutable bool m_sortedIds ;
123 
124  mutable std::vector<CCGFloat>* m_deltaPhi ;
125  mutable std::vector<CCGFloat>* m_deltaEta ;
126 };
127 
128 
129 #endif
CaloCellGeometry::CornersMgr * m_cmgr
std::vector< CCGFloat > DimVec
std::vector< ParVec > ParVecVec
virtual unsigned int numberOfParametersPerShape() const
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)=0
const ParMgr * parMgrConst() const
CCGFloat deltaPhi(const DetId &detId) const
MgrType::size_type size_type
Definition: EZArrayFL.h:30
std::vector< CCGFloat > * m_deltaEta
std::vector< unsigned int > IVec
std::vector< CCGFloat > TrVec
virtual void fillDefaultNamedParameters() const
CCGFloat deltaEta(const DetId &detId) const
CaloCellGeometry::CCGFloat CCGFloat
void allocatePar(ParVec::size_type n, unsigned int m)
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 const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
double deltaR(double eta1, double phi1, double eta2, double phi2)
Definition: deltaR.h:19
virtual bool present(const DetId &id) const
is this detid present in the geometry?
virtual DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
virtual unsigned int numberOfShapes() const
std::vector< DetId > m_validIds
CaloCellGeometry::ParVec ParVec
double p2[4]
Definition: TauolaWrapper.h:90
virtual const CaloCellGeometry * cellGeomPtr(uint32_t index) const =0
virtual DetId getClosestCell(const GlobalPoint &r) const
Definition: DetId.h:20
void getSummary(TrVec &trVector, IVec &iVector, DimVec &dimVector) const
CaloCellGeometry::CornersMgr * cornersMgr()
Detector
Definition: DetId.h:26
std::vector< CCGFloat > * m_deltaPhi
CaloCellGeometry::ParVecVec ParVecVec
Definition: EZMgrFL.h:8
const ParVecVec & parVecVec() const
CaloCellGeometry::ParMgr ParMgr
static CCGFloat deltaR(const GlobalPoint &p1, const GlobalPoint &p2)
virtual ~CaloSubdetectorGeometry()
The base class DOES assume that it owns the CaloCellGeometry objects.
double p1[4]
Definition: TauolaWrapper.h:89
void allocateCorners(CaloCellGeometry::CornersVec::size_type n)
CaloSubdetectorGeometry & operator=(const CaloSubdetectorGeometry &)
virtual unsigned int numberOfTransformParms() const