16 using namespace SurfaceOrientation;
18 using namespace magneticfield;
21 eSector::eSector(handles::const_iterator
begin, handles::const_iterator
end,
bool debugFlag)
22 : theVolumes(begin, end), msector(nullptr),
debug(debugFlag) {
34 cout <<
" Z layers: " << zmin <<
" " << zmax << endl;
39 for (handles::const_iterator
i = first;
i !=
last; ++
i) {
40 hisZ.
fill((*i)->center().z());
42 vector<float> zClust = hisZ.
clusterize(resolution);
45 cout <<
" Found " << zClust.size() <<
" clusters in Z, "
46 <<
" layers: " << endl;
48 handles::const_iterator layStart =
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)
56 cout <<
" Layer at: " << zClust[
i] <<
" elements: " << separ - layStart <<
" unique volumes: ";
65 cout <<
" Layer at: " << zClust.back() <<
" elements: " << last - separ <<
" unique volumes: ";
76 vector<MagELayer*> mLayers;
77 for (vector<eLayer>::const_iterator lay =
layers.begin(); lay !=
layers.end(); ++lay) {
78 mLayers.push_back((*lay).buildMagELayer());
void printUniqueNames(handles::const_iterator begin, handles::const_iterator end, bool uniq=true)
Just for debugging...
std::vector< float > clusterize(float resolution)
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
MagESector * buildMagESector() const
Construct the MagESector upon request.
std::vector< eLayer > layers