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 
15 
16 
17 
18 // Pure virtual trigger geometry class
19 // Provides the interface to access trigger cell and module mappings
21 {
22  public:
23  struct es_info
24  {
27  };
28 
29  typedef std::unordered_map<unsigned,unsigned> geom_map;
30  typedef std::unordered_set<unsigned> geom_set;
31  typedef std::set<unsigned> geom_ordered_set;
32 
35 
36  const std::string& name() const { return name_; }
37 
38  const std::string& eeSDName() const { return ee_sd_name_; }
39  const std::string& fhSDName() const { return fh_sd_name_; }
40  const std::string& bhSDName() const { return bh_sd_name_; }
41 
42  // non-const access to the geometry class
43  virtual void initialize( const es_info& ) = 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 
65 
66  private:
71 
72 
73 };
74 
77 
78 
79 #endif
HGCalTriggerGeometryBase(const edm::ParameterSet &conf)
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
edm::ESHandle< HGCalTopology > topo_ee
virtual geom_set getCellsFromModule(const unsigned cell_det_id) const =0
virtual GlobalPoint getModulePosition(const unsigned module_det_id) const =0
edm::ESHandle< HGCalGeometry > geom_bh
virtual void initialize(const es_info &)=0
virtual geom_set getNeighborsFromTriggerCell(const unsigned trigger_cell_det_id) const =0
const std::string & fhSDName() const
virtual geom_set getTriggerCellsFromModule(const unsigned trigger_cell_det_id) const =0
edm::ESHandle< HGCalGeometry > geom_ee
edm::ESHandle< HGCalGeometry > geom_fh
const std::string & eeSDName() const
edm::ESHandle< HGCalTopology > topo_bh
edm::ESHandle< HGCalTopology > topo_fh
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
std::unordered_set< unsigned > geom_set
const std::string & name() const
const std::string & bhSDName() const
virtual unsigned getTriggerCellFromCell(const unsigned cell_det_id) const =0
virtual GlobalPoint getTriggerCellPosition(const unsigned trigger_cell_det_id) const =0