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 #include <atomic>
10 
11 class HcalTopology;
12 
18 public:
19  CaloTowerConstituentsMap() = delete;
21  CaloTowerConstituentsMap(const HcalTopology * topology);
22 
24  CaloTowerDetId towerOf(const DetId& id) const;
25 
27  std::vector<DetId> constituentsOf(const CaloTowerDetId& id) const;
28 
30  void assign(const DetId& cell, const CaloTowerDetId& tower);
31 
33  void sort();
34 
36  void useStandardHB(bool use=true);
38  void useStandardHE(bool use=true);
40  void useStandardHO(bool use=true);
42  void useStandardHF(bool use=true);
44  void useStandardEB(bool use=true);
45 
46 private:
48 
54 
55  struct MapItem {
56  typedef DetId key_type;
57  MapItem(const DetId& acell, const CaloTowerDetId& atower) : cell(acell),tower(atower) { }
60  inline DetId id() const { return cell; }
61  };
62 
64  mutable std::atomic<std::multimap<CaloTowerDetId,DetId>*> m_reverseItems;
65 };
66 
67 #endif
void useStandardHE(bool use=true)
add standard (hardcoded) HE items?
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:18
void useStandardHO(bool use=true)
add standard (hardcoded) HO items?
std::atomic< std::multimap< CaloTowerDetId, DetId > * > m_reverseItems
void useStandardHF(bool use=true)
add standard (hardcoded) HF items?
edm::SortedCollection< MapItem > m_items