A sector of volumes in a barrel layer (i.e. only 1 element in R) One sector is composed of 1 or more rods.
- Author
- N. Amapane - INFN Torino
Definition at line 17 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 28 of file bSector.cc.
References ClusterizingHistogram::clusterize(), gather_cfg::cout, MagGeoBuilderFromDDD::debug, f, ClusterizingHistogram::fill(), plotBeamSpotDB::first, i, plotBeamSpotDB::last, MagGeoBuilderFromDDD::maxZ(), HLT_FULL_cff::minZ, precomputed_value_sort(), MagGeoBuilderFromDDD::volumeHandle::printUniqueNames(), dtDQMClient_cfg::resolution, rods, and volumes.
34 <<
volumes.back()->center().phi() << endl;
39 <<
" unique volumes: ";
53 ExtractPhiMax(), LessDPhi());
66 for (handles::const_iterator
i=first;
i!=
last; ++
i){
67 hisPhi.fill((*i)->maxPhi()-phi0);
69 vector<float> phiClust = hisPhi.clusterize(resolution);
74 handles::const_iterator rodStart =
first;
75 handles::const_iterator separ =
first;
77 float DZ = (*max_element(first,last,LessZ()))->
maxZ() -
78 (*min_element(first,last,LessZ()))->
minZ();
81 for (
unsigned int i=0;
i<phiClust.size(); ++
i) {
83 if (
i<phiClust.size()-1) {
84 phiSepar = (phiClust[
i] + phiClust[
i+1])/2.
f;
89 <<
" phisepar " << phiSepar <<endl;
90 while (separ < last && (*separ)->maxPhi()-phi0 < phiSepar ) {
91 DZ1 += ((*separ)->maxZ() - (*separ)->minZ());
93 << (*separ)->maxPhi()-phi0 <<
" "
94 << (*separ)->maxZ() <<
" " << (*separ)->minZ() <<
" "
101 if (fabs(DZ-DZ1) > 0.001 && fabs(DZ-DZ1) < 0.5) {
103 <<
" " << DZ <<
" " << DZ1 << endl;
106 if (fabs(DZ-DZ1) > 0.25 ) {
108 << DZ <<
" " << DZ1 <<
" " << DZ-DZ1 << endl;
111 }
else if (DZ1>DZ+0.05) {
112 cout <<
" *** ERROR: bSector finding messed up." << endl;
117 cout <<
" Rod at: " << phiClust[
i] <<
" elements: "
118 << separ-rodStart <<
" unique volumes: ";
122 rods.push_back(bRod(rodStart, separ));
128 if (
rods.size()==0)
cout <<
" *** ERROR: bSector has no rods " << DZ <<
" " << DZ1 << endl;
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)