1 #ifndef CalibTracker_SiStripConnectivity_SiStripRegionCabling_H
2 #define CalibTracker_SiStripConnectivity_SiStripRegionCabling_H
3 #define _USE_MATH_DEFINES
5 #include <boost/cstdint.hpp>
33 typedef std::pair< uint32_t, std::vector<FedChannelConnection> >
Element;
37 typedef std::vector< RegionCabling >
Cabling;
114 const double deltaeta,
115 const double deltaphi,
117 const uint32_t
layer)
const;
120 void print( std::stringstream& )
const;
200 if (!refgetter.
find(index)) refgetter.
push_back(lazygetter,index);
208 double offeta = pos.first-center.first;
209 double offphi = pos.second-center.second;
212 uint32_t plueta =
static_cast<uint32_t
>(offeta+.5+toteta);
213 uint32_t pluphi =
static_cast<uint32_t
>(offphi+.5+totphi);
214 uint32_t mineta =
static_cast<uint32_t
>(-offeta+.5+toteta);
215 uint32_t minphi =
static_cast<uint32_t
>(-offphi+.5+totphi);
217 for (uint32_t
i=0;
i<mineta+plueta+1;
i++) {
218 for (uint32_t
j=0;
j<minphi+pluphi+1;
j++) {
220 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
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.
std::vector< Element > ElementCabling
U second(std::pair< T, U > const &p)
void setRegionCabling(const Cabling &)
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
std::pair< uint32_t, std::vector< FedChannelConnection > > Element
const Position position(const uint32_t) const
bool find(uint32_t) const
Returns true if region already defined.
const uint32_t region(const Position) const
static int position[264][3]
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::vector< RegionCabling > Cabling