A rod of volumes in a barrel sector. A rod is made of several "slabs".
- Author
- N. Amapane - INFN Torino
Definition at line 17 of file bRod.h.
MagGeoBuilderFromDDD::bRod::bRod |
( |
handles::const_iterator |
begin, |
|
|
handles::const_iterator |
end |
|
) |
| |
Constructor from list of volumes.
Definition at line 20 of file bRod.cc.
References ClusterizingHistogram::clusterize(), gather_cfg::cout, MagGeoBuilderFromDDD::debug, f, ClusterizingHistogram::fill(), plotBeamSpotDB::first, i, plotBeamSpotDB::last, phimax, phimin, precomputed_value_sort(), MagGeoBuilderFromDDD::volumeHandle::printUniqueNames(), dtDQMClient_cfg::resolution, slabs, volumes, SiStripMonitorClusterAlca_cfi::zmax, and SiStripMonitorClusterAlca_cfi::zmin.
38 for (handles::const_iterator
i=first;
i!=
last; ++
i){
39 hisZ.fill((*i)->center().z());
41 std::vector<float> zClust = hisZ.clusterize(resolution);
44 <<
" slabs: " << std::endl;
46 handles::const_iterator slabStart =
first;
47 handles::const_iterator separ =
first;
49 for (
unsigned int i=0;
i<zClust.size() - 1; ++
i) {
50 float zSepar = (zClust[
i] + zClust[
i+1])/2.
f;
51 while ((*separ)->center().z() < zSepar) ++separ;
54 <<
" elements: " << separ-slabStart <<
" unique volumes: ";
58 slabs.push_back(bSlab(slabStart, separ));
63 std::cout <<
" Slab at: " << zClust.back() <<
" elements: " << last-separ
64 <<
" unique volumes: ";
67 slabs.push_back(bSlab(separ, last));
71 std::vector<bSlab>::const_iterator
i =
slabs.begin();
74 for (++i; i!=
slabs.end(); ++
i) {
75 if(fabs(phimax - (*i).maxPhi()) > 0.001 ||
76 fabs(phimin - (*i).minPhi()) > 0.001){
std::vector< bSlab > slabs
static void printUniqueNames(handles::const_iterator begin, handles::const_iterator end, bool uniq=true)
Just for debugging...
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)