A sector of volumes in a barrel layer (i.e. only 1 element in R) One sector is composed of 1 or more rods.
- Date:
- 2005/09/27 15:15:52
- Revision:
- 1.2
- Author
- N. Amapane - INFN Torino
Definition at line 19 of file bSector.h.
MagGeoBuilderFromDDD::bSector::bSector |
( |
handles::const_iterator |
begin, |
|
|
handles::const_iterator |
end |
|
) |
| |
Constructor from list of volumes.
FIXME: (float) resolution; ??
Definition at line 30 of file bSector.cc.
References ClusterizingHistogram::clusterize(), gather_cfg::cout, MagGeoBuilderFromDDD::debug, f, ClusterizingHistogram::fill(), first, i, prof2calltree::last, MagGeoBuilderFromDDD::maxZ(), jptDQMConfig_cff::phiMax, jptDQMConfig_cff::phiMin, precomputed_value_sort(), MagGeoBuilderFromDDD::volumeHandle::printUniqueNames(), dtDQMClient_cfg::resolution, rods, and volumes.
36 <<
volumes.back()->center().phi() << endl;
41 <<
" unique volumes: ";
55 ExtractPhiMax(), LessDPhi());
68 for (handles::const_iterator
i=first;
i!=
last; ++
i){
69 hisPhi.fill((*i)->maxPhi()-phi0);
71 vector<float> phiClust = hisPhi.clusterize(resolution);
76 handles::const_iterator rodStart =
first;
77 handles::const_iterator separ =
first;
79 float DZ = (*max_element(first,last,LessZ()))->
maxZ() -
80 (*min_element(first,last,LessZ()))->minZ();
83 for (
unsigned int i=0;
i<phiClust.size(); ++
i) {
85 if (
i<phiClust.size()-1) {
86 phiSepar = (phiClust[
i] + phiClust[
i+1])/2.
f;
91 <<
" phisepar " << phiSepar <<endl;
92 while (separ < last && (*separ)->maxPhi()-phi0 < phiSepar ) {
93 DZ1 += ((*separ)->maxZ() - (*separ)->minZ());
95 << (*separ)->maxPhi()-phi0 <<
" "
96 << (*separ)->maxZ() <<
" " << (*separ)->minZ() <<
" "
103 if (fabs(DZ-DZ1) > 0.001 && fabs(DZ-DZ1) < 0.5) {
105 <<
" " << DZ <<
" " << DZ1 << endl;
108 if (fabs(DZ-DZ1) > 0.25 ) {
110 << DZ <<
" " << DZ1 <<
" " << DZ-DZ1 << endl;
113 }
else if (DZ1>DZ+0.05) {
114 cout <<
" *** ERROR: bSector finding messed up." << endl;
119 cout <<
" Rod at: " << phiClust[
i] <<
" elements: "
120 << separ-rodStart <<
" unique volumes: ";
124 rods.push_back(bRod(rodStart, separ));
static void printUniqueNames(handles::const_iterator begin, handles::const_iterator end)
Just for debugging...
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)