1 #ifndef CalibTracker_SiStripConnectivity_SiStripRegionCabling_H
2 #define CalibTracker_SiStripConnectivity_SiStripRegionCabling_H
3 #define _USE_MATH_DEFINES
5 #include <boost/cstdint.hpp>
34 typedef std::map< uint32_t, std::vector<FedChannelConnection> >
ElementCabling;
37 typedef std::vector< RegionCabling >
Cabling;
120 const double deltaeta,
121 const double deltaphi,
123 const uint32_t
layer)
const;
126 void print( std::stringstream& )
const;
206 if (!refgetter.
find(index)) refgetter.
push_back(lazygetter,index);
214 double offeta = pos.first-center.first;
215 double offphi = pos.second-center.second;
218 uint32_t plueta =
static_cast<uint32_t
>(offeta+.5+toteta);
219 uint32_t pluphi =
static_cast<uint32_t
>(offphi+.5+totphi);
220 uint32_t mineta =
static_cast<uint32_t
>(-offeta+.5+toteta);
221 uint32_t minphi =
static_cast<uint32_t
>(-offphi+.5+totphi);
223 for (uint32_t
i=0;
i<mineta+plueta+1;
i++) {
224 for (uint32_t
j=0;
j<minphi+pluphi+1;
j++) {
226 updateSiStripRefGetter<T>(refgetter,lazygetter,
k);
static const ElementIndex elementIndex(const uint32_t region, const SubDet, const uint32_t layer)
void print(std::stringstream &) const
const std::pair< double, double > regionDimensions() const
static const uint32_t physicalLayer(const SubDet, const uint32_t layer)
const PositionIndex positionIndex(const uint32_t) const
void push_back(const edm::Handle< LazyGetter< T > > &, const uint32_t &)
Add a new region to the end of the collection.
static int position[TOTALCHAMBERS][3]
U second(std::pair< T, U > const &p)
void setRegionCabling(const Cabling &)
static const uint32_t physicalLayerFromDetId(const uint32_t detid)
const uint32_t phidivisions() const
std::vector< ElementCabling > WedgeCabling
void updateSiStripRefGetter(edm::RefGetter< T > &refgetter, const edm::Handle< edm::LazyGetter< T > > &lazygetter, const ElementIndex) const
static const SubDet subdet(const ElementIndex)
static const SubDet subdetFromDetId(const uint32_t detid)
std::pair< double, double > Position
const Cabling & getRegionCabling() const
const Position position(const uint32_t) const
static const uint32_t layerFromDetId(const uint32_t detid)
bool find(uint32_t) const
Returns true if region already defined.
const uint32_t region(const Position) const
const uint32_t etadivisions() const
PositionIndex increment(const PositionIndex, int, int) const
std::vector< WedgeCabling > RegionCabling
std::pair< uint32_t, uint32_t > PositionIndex
static const uint32_t layer(const ElementIndex)
std::map< uint32_t, std::vector< FedChannelConnection > > ElementCabling
std::vector< RegionCabling > Cabling