CMS 3D CMS Logo

EcalTrigTowerConstituentsMap.h
Go to the documentation of this file.
1 #ifndef GEOMETRY_CALOTOPOLOGY_ECALTRIGTOWERCONSTITUENTSMAP_H
2 #define GEOMETRY_CALOTOPOLOGY_ECALTRIGTOWERCONSTITUENTSMAP_H 1
3 
6 
7 #include <boost/multi_index_container.hpp>
8 #include <boost/multi_index/member.hpp>
9 #include <boost/multi_index/ordered_index.hpp>
10 #include <boost/tuple/tuple.hpp>
11 
12 #include <vector>
13 
20 public:
22 
24  EcalTrigTowerDetId towerOf(const DetId& id) const;
25 
27  std::vector<DetId> constituentsOf(const EcalTrigTowerDetId& id) const;
28 
30  void assign(const DetId& cell, const EcalTrigTowerDetId& tower);
31 
32 private:
34  DetId wrapEEDetId(const DetId& id) const;
36  DetId wrapEcalTrigTowerDetId(const DetId& id) const;
37 
38  DetId changeEEDetIdQuadrantAndZ(const DetId& fromid, const int& toQuadrant, const int& tozside) const;
39 
40  int changeTowerQuadrant(int phiTower, int fromQuadrant, int toQuadrant) const;
41 
42  struct MapItem {
43  MapItem(const DetId& acell, const EcalTrigTowerDetId& atower) : cell(acell), tower(atower) {}
46  };
47 
48  typedef boost::multi_index_container<
49  MapItem,
50  boost::multi_index::indexed_by<
51  boost::multi_index::ordered_unique<boost::multi_index::member<MapItem, DetId, &MapItem::cell> >,
52  boost::multi_index::ordered_non_unique<
53  boost::multi_index::member<MapItem, EcalTrigTowerDetId, &MapItem::tower> > > >
55 
58 
60 };
61 
62 #endif
EcalTrigTowerConstituentsMap::changeTowerQuadrant
int changeTowerQuadrant(int phiTower, int fromQuadrant, int toQuadrant) const
Definition: EcalTrigTowerConstituentsMap.cc:125
EcalTrigTowerConstituentsMap::EcalTrigTowerConstituentsMap
EcalTrigTowerConstituentsMap()
Definition: EcalTrigTowerConstituentsMap.cc:9
EcalTrigTowerConstituentsMap::MapItem::MapItem
MapItem(const DetId &acell, const EcalTrigTowerDetId &atower)
Definition: EcalTrigTowerConstituentsMap.h:43
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:3
EcalTrigTowerConstituentsMap::MapItem::cell
DetId cell
Definition: EcalTrigTowerConstituentsMap.h:44
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
EcalTrigTowerConstituentsMap::changeEEDetIdQuadrantAndZ
DetId changeEEDetIdQuadrantAndZ(const DetId &fromid, const int &toQuadrant, const int &tozside) const
Definition: EcalTrigTowerConstituentsMap.cc:94
DetId
Definition: DetId.h:17
EcalTrigTowerConstituentsMap::MapItem::tower
EcalTrigTowerDetId tower
Definition: EcalTrigTowerConstituentsMap.h:45
EcalTrigTowerConstituentsMap::EcalTowerMap_by_towerDetId
EcalTowerMap::nth_index< 1 >::type EcalTowerMap_by_towerDetId
Definition: EcalTrigTowerConstituentsMap.h:57
EcalTrigTowerDetId.h
EcalTrigTowerConstituentsMap
Definition: EcalTrigTowerConstituentsMap.h:19
EcalTrigTowerConstituentsMap::wrapEEDetId
DetId wrapEEDetId(const DetId &id) const
Wrap a generic EEDetId to the equivalent one in z+ Quadrant 1 (from 0 < phi < pi/2)
Definition: EcalTrigTowerConstituentsMap.cc:40
EcalTrigTowerConstituentsMap::MapItem
Definition: EcalTrigTowerConstituentsMap.h:42
EcalTrigTowerConstituentsMap::EcalTowerMap_by_DetId
EcalTowerMap::nth_index< 0 >::type EcalTowerMap_by_DetId
Definition: EcalTrigTowerConstituentsMap.h:56
EcalTrigTowerConstituentsMap::wrapEcalTrigTowerDetId
DetId wrapEcalTrigTowerDetId(const DetId &id) const
Wrap a generic EcalTrigTowerDetId to the equivalent one in z+ Quadrant 1 (from 0 < phi < pi/2)
Definition: EcalTrigTowerConstituentsMap.cc:65
EcalTrigTowerConstituentsMap::towerOf
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
Definition: EcalTrigTowerConstituentsMap.cc:11
type
type
Definition: HCALResponse.h:21
EcalTrigTowerConstituentsMap::constituentsOf
std::vector< DetId > constituentsOf(const EcalTrigTowerDetId &id) const
Get the constituent detids for this tower id.
Definition: EcalTrigTowerConstituentsMap.cc:162
DetId.h
EcalTrigTowerConstituentsMap::assign
void assign(const DetId &cell, const EcalTrigTowerDetId &tower)
set the association between a DetId and a tower
Definition: EcalTrigTowerConstituentsMap.cc:152
EcalTrigTowerConstituentsMap::m_items
EcalTowerMap m_items
Definition: EcalTrigTowerConstituentsMap.h:59
EcalTrigTowerConstituentsMap::EcalTowerMap
boost::multi_index_container< MapItem, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::member< MapItem, DetId, &MapItem::cell > >, boost::multi_index::ordered_non_unique< boost::multi_index::member< MapItem, EcalTrigTowerDetId, &MapItem::tower > > > > EcalTowerMap
Definition: EcalTrigTowerConstituentsMap.h:54