test
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 class CaloTowerTopology;
13 
19 public:
20  CaloTowerConstituentsMap() = delete;
22  CaloTowerConstituentsMap(const HcalTopology * hcaltopo, const CaloTowerTopology * cttopo);
23 
25  CaloTowerDetId towerOf(const DetId& id) const;
26 
28  std::vector<DetId> constituentsOf(const CaloTowerDetId& id) const;
29 
31  void assign(const DetId& cell, const CaloTowerDetId& tower);
32 
34  void sort();
35 
37  void useStandardHB(bool use=true);
39  void useStandardHE(bool use=true);
41  void useStandardHO(bool use=true);
43  void useStandardHF(bool use=true);
45  void useStandardEB(bool use=true);
46 
47 private:
50 
56 
57  struct MapItem {
58  typedef DetId key_type;
59  MapItem(const DetId& acell, const CaloTowerDetId& atower) : cell(acell),tower(atower) { }
62  inline DetId id() const { return cell; }
63  };
64 
66  mutable std::atomic<std::multimap<CaloTowerDetId,DetId>*> m_reverseItems;
67 };
68 
69 #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?
const CaloTowerTopology * m_cttopo
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