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 
25  typedef std::vector< const CaloCellGeometry * > CellCont;
26 
27  typedef std::set<DetId> DetIdSet;
28 
32 
33  typedef std::vector<double> TrVec ;
34  typedef std::vector<unsigned int> IVec ;
35  typedef std::vector<double> DimVec ;
36 
38 
40  virtual ~CaloSubdetectorGeometry();
41 
43  const CellCont& cellGeometries() const { return m_cellG ; }
44 
46  void addCell( const DetId& id,
47  CaloCellGeometry* ccg ) ;
48 
50  virtual bool present( const DetId& id ) const;
51 
53  virtual const CaloCellGeometry* getGeometry( const DetId& id ) const ;
54 
59  virtual const std::vector<DetId>& getValidDetIds( DetId::Detector det = DetId::Detector(0) ,
60  int subdet = 0 ) const ;
61 
62  // Get closest cell, etc...
63  virtual DetId getClosestCell( const GlobalPoint& r ) const ;
64 
71  virtual DetIdSet getCells( const GlobalPoint& r, double dR ) const ;
72 
73 
74  double deltaPhi( const DetId& detId ) const ;
75 
76  double deltaEta( const DetId& detId ) const ;
77 
78 
79 
81 
83 
84  void allocatePar( ParVec::size_type n, unsigned int m ) ;
85 
86  ParMgr* parMgr() { return m_parMgr ; }
87  const ParMgr* parMgrConst() const { return m_parMgr ; }
88 
90  const ParVecVec& parVecVec() const { return m_parVecVec ; }
91 
92  virtual unsigned int numberOfShapes() const { return 1 ; }
93  virtual unsigned int numberOfParametersPerShape() const { return 1 ; }
94  virtual unsigned int numberOfTransformParms() const { return 6 ; }
95 
96  virtual void fillDefaultNamedParameters() const { return ; }
97 
98  void getSummary( TrVec& trVector,
99  IVec& iVector,
100  DimVec& dimVector ) const ;
101 
102  virtual void initializeParms() { return ; }
103 
104  protected:
105 
107 
108  static double deltaR( const GlobalPoint& p1,
109  const GlobalPoint& p2 )
110  { return reco::deltaR( p1, p2 ) ; }
111 
112  private:
113 
115 
117 
121 
123 
124  mutable bool m_sortedIds ;
125 
126  mutable std::vector<DetId> m_validIds ;
127 
128  mutable std::vector<double>* m_deltaPhi ;
129  mutable std::vector<double>* m_deltaEta ;
130 };
131 
132 
133 #endif
CaloCellGeometry::CornersMgr * m_cmgr
std::vector< double > * m_deltaEta
static double deltaR(const GlobalPoint &p1, const GlobalPoint &p2)
std::vector< const CaloCellGeometry * > CellCont
std::vector< ParVec > ParVecVec
virtual unsigned int numberOfParametersPerShape() const
double deltaEta(const DetId &detId) const
const ParMgr * parMgrConst() const
MgrType::size_type size_type
Definition: EZArrayFL.h:30
std::vector< unsigned int > IVec
virtual void fillDefaultNamedParameters() const
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.
return((rh^lh)&mask)
double deltaR(double eta1, double phi1, double eta2, double phi2)
Definition: deltaR.h:19
void addCell(const DetId &id, CaloCellGeometry *ccg)
Add a cell to the geometry.
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.
double deltaPhi(const DetId &detId) const
virtual unsigned int numberOfShapes() const
const CellCont & cellGeometries() const
the cells
std::vector< DetId > m_validIds
CaloCellGeometry::ParVec ParVec
double p2[4]
Definition: TauolaWrapper.h:90
virtual DetId getClosestCell(const GlobalPoint &r) const
std::vector< double > DimVec
Definition: DetId.h:20
void getSummary(TrVec &trVector, IVec &iVector, DimVec &dimVector) const
CaloCellGeometry::CornersMgr * cornersMgr()
Detector
Definition: DetId.h:26
CaloCellGeometry::ParVecVec ParVecVec
Definition: EZMgrFL.h:8
std::vector< double > * m_deltaPhi
const ParVecVec & parVecVec() const
CaloCellGeometry::ParMgr ParMgr
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)
std::vector< double > TrVec
CaloSubdetectorGeometry & operator=(const CaloSubdetectorGeometry &)
virtual unsigned int numberOfTransformParms() const