20 bLayer::bLayer(handles::const_iterator begin, handles::const_iterator end,
bool debugFlag)
31 handles::iterator secBegin =
theVolumes.begin();
32 handles::iterator secEnd = secBegin;
50 std::cout <<
" Sector is just one volume." << std::endl;
52 }
else if (
size == 12 ||
54 secEnd = secBegin +
size / 12;
60 std::cout << (*secBegin)->name <<
" " << (*secBegin)->copyno << std::endl;
64 (*secBegin)->sameSurface(
78 secEnd = secBegin +
size / 12;
82 std::cout <<
"*** ERROR: Big mess while looking for sectors " << (*secBegin)->name <<
" " << (*secBegin)->copyno
83 <<
" " << (*(secEnd - 1))->name <<
" " << (*(secEnd - 1))->copyno << std::endl;
88 std::cout <<
" First sector: volumes " << secEnd -
theVolumes.begin() <<
" from " << newbegin
89 <<
" (phi = " << (*secBegin)->center().phi() <<
") " 90 <<
" to " << newend <<
" (phi = " << (*secEnd)->center().phi() <<
") " 91 <<
" # " << (*secBegin)->copyno <<
" ";
98 for (
int i = 0;
i < 12; ++
i) {
99 int isec = (
i + binOffset) % 12;
100 sectors[isec >= 0 ? isec : isec + 12] =
106 std::cout <<
"-----------------------" << std::endl;
111 return (
i >= 0 ?
i :
i +
size);
135 std::cout <<
"ERROR: bLayer::buildMagBLayer, 0 sectors but " <<
size <<
" volumes" << std::endl;
143 std::vector<MagBSector*> mSectors;
144 for (
unsigned int i = 0;
i <
sectors.size(); ++
i) {
145 mSectors.push_back(
sectors[
i].buildMagBSector());
void printUniqueNames(handles::const_iterator begin, handles::const_iterator end, bool uniq=true)
Just for debugging...
std::vector< bSector > sectors
double minR() const
Return sector at i (handling periodicity)
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
const RotationType & rotation() const
def rotate(angle, cx=0, cy=0)
Global3DVector GlobalVector
MagBLayer * buildMagBLayer() const
Construct the MagBLayer upon request.