CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
21  public:
22 
24 
26  EcalTrigTowerDetId towerOf(const DetId& id) const;
27 
29  std::vector<DetId> constituentsOf(const EcalTrigTowerDetId& id) const;
30 
32  void assign(const DetId& cell, const EcalTrigTowerDetId& tower);
33 
34  private:
36  DetId wrapEEDetId(const DetId& id) const;
38  DetId wrapEcalTrigTowerDetId(const DetId& id) const;
39 
40  DetId changeEEDetIdQuadrantAndZ(const DetId& fromid, const int& toQuadrant,const int& tozside) const;
41 
42  int changeTowerQuadrant(int phiTower, int fromQuadrant, int toQuadrant) const;
43 
44  struct MapItem {
45  MapItem(const DetId& acell, const EcalTrigTowerDetId& atower) : cell(acell),tower(atower) { }
48 
49  };
50 
51  typedef boost::multi_index_container<
52  MapItem,
53  boost::multi_index::indexed_by<
54  boost::multi_index::ordered_unique< boost::multi_index::member < MapItem,DetId,&MapItem::cell > >,
55  boost::multi_index::ordered_non_unique< boost::multi_index::member < MapItem,EcalTrigTowerDetId,&MapItem::tower> >
56  >
58 
61 
63 };
64 
65 #endif
type
Definition: HCALResponse.h:21
int changeTowerQuadrant(int phiTower, int fromQuadrant, int toQuadrant) const
void assign(const DetId &cell, const EcalTrigTowerDetId &tower)
set the association between a DetId and a tower
DetId changeEEDetIdQuadrantAndZ(const DetId &fromid, const int &toQuadrant, const int &tozside) const
DetId wrapEcalTrigTowerDetId(const DetId &id) const
Wrap a generic EcalTrigTowerDetId to the equivalent one in z+ Quadrant 1 (from 0 &lt; phi &lt; pi/2) ...
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
EcalTowerMap::nth_index< 0 >::type EcalTowerMap_by_DetId
MapItem(const DetId &acell, const EcalTrigTowerDetId &atower)
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
std::vector< DetId > constituentsOf(const EcalTrigTowerDetId &id) const
Get the constituent detids for this tower id.
Definition: DetId.h:18
EcalTowerMap::nth_index< 1 >::type EcalTowerMap_by_towerDetId
DetId wrapEEDetId(const DetId &id) const
Wrap a generic EEDetId to the equivalent one in z+ Quadrant 1 (from 0 &lt; phi &lt; pi/2) ...