CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloTowerConstituentsMap.h
Go to the documentation of this file.
1 #ifndef GEOMETRY_CALOTOPOLOGY_CALOTOWERCONSTITUENTSMAP_H
2 #define GEOMETRY_CALOTOPOLOGY_CALOTOWERCONSTITUENTSMAP_H 1
3 
7 #include <vector>
8 #include <map>
9 
17 public:
19 
21  CaloTowerDetId towerOf(const DetId& id) const;
22 
24  std::vector<DetId> constituentsOf(const CaloTowerDetId& id) const;
25 
27  void assign(const DetId& cell, const CaloTowerDetId& tower);
28 
30  void sort();
31 
33  void useStandardHB(bool use=true);
35  void useStandardHE(bool use=true);
37  void useStandardHO(bool use=true);
39  void useStandardHF(bool use=true);
41  void useStandardEB(bool use=true);
42 
43 private:
49 
50  struct MapItem {
51  typedef DetId key_type;
52  MapItem(const DetId& acell, const CaloTowerDetId& atower) : cell(acell),tower(atower) { }
55  inline DetId id() const { return cell; }
56  };
57 
59  mutable std::multimap<CaloTowerDetId,DetId> m_reverseItems;
60 };
61 
62 #endif
void useStandardHE(bool use=true)
add standard (hardcoded) HE items?
std::multimap< CaloTowerDetId, DetId > m_reverseItems
MapItem(const DetId &acell, const CaloTowerDetId &atower)
void useStandardEB(bool use=true)
add standard (hardcoded) EB items?
void sort()
done adding to the association
void useStandardHB(bool use=true)
add standard (hardcoded) HB items?
std::vector< DetId > constituentsOf(const CaloTowerDetId &id) const
Get the constituent detids for this tower id ( not yet implemented )
CaloTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
void assign(const DetId &cell, const CaloTowerDetId &tower)
set the association between a DetId and a tower
Definition: DetId.h:20
void useStandardHO(bool use=true)
add standard (hardcoded) HO items?
void useStandardHF(bool use=true)
add standard (hardcoded) HF items?
edm::SortedCollection< MapItem > m_items