Definition at line 17 of file bSector.h.
bSector::bSector |
( |
handles::const_iterator |
begin, |
|
|
handles::const_iterator |
end, |
|
|
bool |
debugVal = false |
|
) |
| |
Constructor from list of volumes.
FIXME: (float) resolution; ??
Definition at line 25 of file bSector.cc.
References ClusterizingHistogram::clusterize(), gather_cfg::cout, debug, f, ClusterizingHistogram::fill(), dqmdumpme::first, mps_fire::i, createfilelist::int, dqmdumpme::last, angle0to2pi::make0To2pi(), CosmicsPD_Skims::maxZ, CosmicGenFilterHelix_cff::minZ, AlignmentTrackSelector_cfi::phiMax, AlignmentTrackSelector_cfi::phiMin, precomputed_value_sort(), magneticfield::printUniqueNames(), L1TObjectsTimingClient_cff::resolution, rods, and volumes.
28 cout <<
" Sector at Phi " <<
volumes.front()->center().phi() <<
" " <<
volumes.back()->center().phi() << endl;
32 cout <<
" Rod at: 0 elements: " <<
end -
begin <<
" unique volumes: ";
53 float phiTmp =
static_cast<float>(
volumes.back()->maxPhi()) - static_cast<float>(phi0) +
resolution;
58 cout <<
", phi0 = " <<
phi0 <<
", volumes.back()->maxPhi() = " <<
volumes.back()->maxPhi();
67 for (handles::const_iterator
i =
first;
i !=
last; ++
i) {
68 hisPhi.fill((*i)->maxPhi() -
phi0);
70 vector<float> phiClust = hisPhi.clusterize(
resolution);
73 cout <<
" Found " << phiClust.size() <<
" clusters in Phi, " 76 handles::const_iterator rodStart =
first;
77 handles::const_iterator separ =
first;
82 for (
unsigned int i = 0;
i < phiClust.size(); ++
i) {
84 if (
i < phiClust.size() - 1) {
85 phiSepar = (phiClust[
i] + phiClust[
i + 1]) / 2.
f;
90 cout <<
" cluster " <<
i <<
" phisepar " << phiSepar << endl;
91 while (separ <
last && (*separ)->maxPhi() -
phi0 < phiSepar) {
92 DZ1 += ((*separ)->maxZ() - (*separ)->minZ());
94 cout <<
" " << (*separ)->name <<
" " << (*separ)->maxPhi() -
phi0 <<
" " << (*separ)->maxZ() <<
" " 95 << (*separ)->minZ() <<
" " << DZ1 << endl;
101 if (fabs(DZ - DZ1) > 0.001 && fabs(DZ - DZ1) < 0.5) {
103 cout <<
"*** WARNING: Z lenght mismatch by " << DZ - DZ1 <<
" " << DZ <<
" " << DZ1 << endl;
105 if (fabs(DZ - DZ1) > 0.25) {
107 cout <<
" Incomplete, use also next cluster: " << DZ <<
" " << DZ1 <<
" " << DZ - DZ1 << endl;
110 }
else if (DZ1 > DZ + 0.05) {
111 cout <<
" *** ERROR: bSector finding messed up." << endl;
116 cout <<
" Rod at: " << phiClust[
i] <<
" elements: " << separ - rodStart <<
" unique volumes: ";
127 cout <<
" *** ERROR: bSector has no rods " << DZ <<
" " << DZ1 << endl;
129 cout <<
"-----------------------" << endl;
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, const Compare &comp)
constexpr valType make0To2pi(valType angle)