A rod of volumes in a barrel sector. A rod is made of several "slabs".
- Date:
- 2005/09/06 15:48:28
- Revision:
- 1.1
- Author
- N. Amapane - INFN Torino
Definition at line 19 of file bRod.h.
MagGeoBuilderFromDDD::bRod::bRod |
( |
handles::const_iterator |
begin, |
|
|
handles::const_iterator |
end |
|
) |
| |
Constructor from list of volumes.
Definition at line 22 of file bRod.cc.
References ClusterizingHistogram::clusterize(), gather_cfg::cout, MagGeoBuilderFromDDD::debug, f, ClusterizingHistogram::fill(), first, i, prof2calltree::last, precomputed_value_sort(), MagGeoBuilderFromDDD::volumeHandle::printUniqueNames(), slabs, and volumes.
30 const float resolution = 5.;
31 float zmin =
volumes.front()->center().z()-resolution;
32 float zmax =
volumes.back()->center().z()+resolution;
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: ";
60 slabs.push_back(bSlab(slabStart, separ));
65 std::cout <<
" Slab at: " << zClust.back() <<
" elements: " << last-separ
66 <<
" unique volumes: ";
69 slabs.push_back(bSlab(separ, last));
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){
static void printUniqueNames(handles::const_iterator begin, handles::const_iterator end)
Just for debugging...
std::vector< bSlab > slabs
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)