18 using namespace SurfaceOrientation;
22 handles::const_iterator
end) :
24 theVolumes(begin,end),
37 handles::iterator secBegin =
theVolumes.begin();
38 handles::iterator secEnd;
58 }
else if (
size==12 ||
59 (((*secBegin)->shape()!=
ddtrap) && (*secBegin)->shape()!=
ddbox)) {
60 secEnd = secBegin+
size/12;
63 float tolerance = 0.025;
66 <<
" " << (*secBegin)->copyno << std::endl;
69 (*secBegin)->sameSurface(refSurf,
outer, tolerance));
79 secEnd = secBegin+
size/12;
82 if (!((*secBegin)->sameSurface((*(secEnd-1))->surface(
outer),
84 std::cout <<
"*** ERROR: Big mess while looking for sectors "
85 << (*secBegin)->name <<
" " << (*secBegin)->copyno <<
" "
86 << (*(secEnd-1))->name <<
" " << (*(secEnd-1))->copyno
93 <<
" from " << newbegin
94 <<
" (phi = " << (*secBegin)->center().phi() <<
") "
96 <<
" (phi = " << (*secEnd)->center().phi() <<
") "
97 <<
" # " << (*secBegin)->copyno <<
" ";
105 for (
int i = 0;
i<12; ++
i) {
106 int isec = (
i+binOffset)%12;
120 return (i>=0?i:i+
size);
132 return theVolumes.front()->minR();
146 std::cout <<
"ERROR: bLayer::buildMagBLayer, 0 sectors but "
147 <<
size <<
" volumes" << std::endl;
151 mlayer =
new MagBLayer(theVolumes.front()->magVolume, minR());
155 std::vector<MagBSector*> mSectors;
156 for (
unsigned int i=0;
i<
sectors.size(); ++
i) {
157 mSectors.push_back(
sectors[
i].buildMagBSector());
159 mlayer =
new MagBLayer(mSectors, minR());
static void printUniqueNames(handles::const_iterator begin, handles::const_iterator end)
Just for debugging...
unsigned int offset(bool)
std::vector< bSector > sectors
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
MagBLayer * buildMagBLayer() const
Construct the MagBLayer upon request.
const RotationType & rotation() const
bLayer(handles::const_iterator begin, handles::const_iterator end)
Constructor from list of volumes.
double minR() const
Return sector at i (handling periodicity)
tuple size
Write out results.
Global3DVector GlobalVector