CMS 3D CMS Logo

HGCalTriggerGeometryBase.h
Go to the documentation of this file.
1 #ifndef __L1Trigger_L1THGCal_HGCalTriggerGeometryBase_h__
2 #define __L1Trigger_L1THGCal_HGCalTriggerGeometryBase_h__
3 
4 #include <iostream>
5 #include <unordered_set>
6 #include <unordered_map>
7 
9 
12 
17 
18 
19 
20 // Pure virtual trigger geometry class
21 // Provides the interface to access trigger cell and module mappings
23 {
24  public:
25  typedef std::unordered_map<unsigned,unsigned> geom_map;
26  typedef std::unordered_set<unsigned> geom_set;
27  typedef std::set<unsigned> geom_ordered_set;
28 
31 
32  const std::string& name() const { return name_; }
33 
35  const HGCalGeometry* eeGeometry() const {return (static_cast<const HGCalGeometry*>(calo_geometry_->getSubdetectorGeometry(DetId::Forward,HGCEE)));}
36  const HGCalGeometry* fhGeometry() const {return (static_cast<const HGCalGeometry*>(calo_geometry_->getSubdetectorGeometry(DetId::Forward,HGCHEF)));}
37  const HcalGeometry* bhGeometry() const {return (static_cast<const HcalGeometry*>(calo_geometry_->getSubdetectorGeometry(DetId::Hcal,HcalEndcap)));}
38  const HGCalTopology& eeTopology() const {return eeGeometry()->topology();}
39  const HGCalTopology& fhTopology() const {return fhGeometry()->topology();}
40  const HcalTopology& bhTopology() const {return bhGeometry()->topology();}
41 
42  // non-const access to the geometry class
43  virtual void initialize(const edm::ESHandle<CaloGeometry>&) = 0;
44  virtual void reset();
45 
46  // const access to the geometry class
47  virtual unsigned getTriggerCellFromCell( const unsigned cell_det_id ) const = 0;
48  virtual unsigned getModuleFromCell( const unsigned cell_det_id ) const = 0;
49  virtual unsigned getModuleFromTriggerCell( const unsigned trigger_cell_det_id ) const = 0;
50 
51  virtual geom_set getCellsFromTriggerCell( const unsigned cell_det_id ) const = 0;
52  virtual geom_set getCellsFromModule( const unsigned cell_det_id ) const = 0;
53  virtual geom_set getTriggerCellsFromModule( const unsigned trigger_cell_det_id ) const = 0;
54 
55  virtual geom_ordered_set getOrderedCellsFromModule( const unsigned cell_det_id ) const = 0;
56  virtual geom_ordered_set getOrderedTriggerCellsFromModule( const unsigned trigger_cell_det_id ) const = 0;
57 
58  virtual geom_set getNeighborsFromTriggerCell( const unsigned trigger_cell_det_id ) const = 0;
59 
60  virtual GlobalPoint getTriggerCellPosition(const unsigned trigger_cell_det_id) const = 0;
61  virtual GlobalPoint getModulePosition(const unsigned module_det_id) const = 0;
62 
63  virtual bool validTriggerCell( const unsigned trigger_cell_id) const = 0;
64  virtual bool disconnectedModule(const unsigned module_id) const = 0;
65 
66  protected:
68 
69 
70  private:
72 
74 
75 };
76 
79 
80 
81 #endif
HGCalTriggerGeometryBase(const edm::ParameterSet &conf)
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:44
virtual geom_ordered_set getOrderedTriggerCellsFromModule(const unsigned trigger_cell_det_id) const =0
virtual geom_set getCellsFromTriggerCell(const unsigned cell_det_id) const =0
std::unordered_map< unsigned, unsigned > geom_map
edmplugin::PluginFactory< HGCalTriggerGeometryBase *(const edm::ParameterSet &) > HGCalTriggerGeometryFactory
virtual geom_set getCellsFromModule(const unsigned cell_det_id) const =0
virtual GlobalPoint getModulePosition(const unsigned module_det_id) const =0
const HGCalGeometry * eeGeometry() const
const HGCalTopology & eeTopology() const
virtual geom_set getNeighborsFromTriggerCell(const unsigned trigger_cell_det_id) const =0
const HcalTopology & topology() const
Definition: HcalGeometry.h:116
virtual geom_set getTriggerCellsFromModule(const unsigned trigger_cell_det_id) const =0
const HGCalGeometry * fhGeometry() const
const HcalTopology & bhTopology() const
const HGCalTopology & topology() const
Definition: HGCalGeometry.h:98
void setCaloGeometry(const edm::ESHandle< CaloGeometry > &geom)
const HcalGeometry * bhGeometry() const
virtual bool disconnectedModule(const unsigned module_id) const =0
virtual unsigned getModuleFromCell(const unsigned cell_det_id) const =0
virtual unsigned getModuleFromTriggerCell(const unsigned trigger_cell_det_id) const =0
virtual geom_ordered_set getOrderedCellsFromModule(const unsigned cell_det_id) const =0
std::set< unsigned > geom_ordered_set
virtual bool validTriggerCell(const unsigned trigger_cell_id) const =0
edm::ESHandle< CaloGeometry > calo_geometry_
std::unordered_set< unsigned > geom_set
const std::string & name() const
virtual void initialize(const edm::ESHandle< CaloGeometry > &)=0
virtual unsigned getTriggerCellFromCell(const unsigned cell_det_id) const =0
const HGCalTopology & fhTopology() const
virtual GlobalPoint getTriggerCellPosition(const unsigned trigger_cell_det_id) const =0
const edm::ESHandle< CaloGeometry > & caloGeometry() const