17 using namespace SurfaceOrientation;
23 handles::const_iterator
end) :
40 for (handles::const_iterator
i=first;
i!=
last; ++
i){
41 hisZ.
fill((*i)->center().z());
43 std::vector<float> zClust = hisZ.
clusterize(resolution);
46 <<
" slabs: " << std::endl;
48 handles::const_iterator slabStart =
first;
49 handles::const_iterator separ =
first;
51 for (
unsigned int i=0;
i<zClust.size() - 1; ++
i) {
52 float zSepar = (zClust[
i] + zClust[
i+1])/2.
f;
53 while ((*separ)->center().z() < zSepar) ++separ;
56 <<
" elements: " << separ-slabStart <<
" unique volumes: ";
65 std::cout <<
" Slab at: " << zClust.back() <<
" elements: " << last-separ
66 <<
" unique volumes: ";
73 std::vector<bSlab>::const_iterator
i =
slabs.begin();
76 for (++i; i!=
slabs.end(); ++
i) {
77 if(fabs(phimax - (*i).maxPhi()) > 0.001 ||
78 fabs(phimin - (*i).minPhi()) > 0.001){
88 std::vector<MagBSlab*> mSlabs;
89 for (std::vector<bSlab>::const_iterator slab = slabs.begin();
90 slab!=slabs.end(); ++slab) {
91 mSlabs.push_back((*slab).buildMagBSlab());
93 mrod =
new MagBRod(mSlabs,slabs.front().minPhi());
static void printUniqueNames(handles::const_iterator begin, handles::const_iterator end)
Just for debugging...
std::vector< bSlab > slabs
std::vector< float > clusterize(float resolution)
MagBRod * buildMagBRod() const
Construct the MagBRod upon request.
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
bRod(handles::const_iterator begin, handles::const_iterator end)
Constructor from list of volumes.