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::pair< uint32_t, std::vector<FedChannelConnection> >
Element;
38 typedef std::vector< RegionCabling >
Cabling;
121 const double deltaeta,
122 const double deltaphi,
124 const uint32_t
layer)
const;
127 void print( std::stringstream& )
const;
207 if (!refgetter.
find(index)) refgetter.
push_back(lazygetter,index);
215 double offeta = pos.first-center.first;
216 double offphi = pos.second-center.second;
219 uint32_t plueta =
static_cast<uint32_t
>(offeta+.5+toteta);
220 uint32_t pluphi =
static_cast<uint32_t
>(offphi+.5+totphi);
221 uint32_t mineta =
static_cast<uint32_t
>(-offeta+.5+toteta);
222 uint32_t minphi =
static_cast<uint32_t
>(-offphi+.5+totphi);
224 for (uint32_t
i=0;
i<mineta+plueta+1;
i++) {
225 for (uint32_t
j=0;
j<minphi+pluphi+1;
j++) {
227 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.
std::vector< Element > ElementCabling
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
std::pair< uint32_t, std::vector< FedChannelConnection > > Element
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
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