18 #include "CLHEP/Random/RandFlat.h"
23 : conf_(conf), dn0(dn), sn0(sn), pn0(pn), rn0(rn) {
70 std::cout <<
"FP420ClusterMain constructor: sn0 = " <<
sn0 <<
" pn0=" <<
pn0 <<
" dn0=" <<
dn0 <<
" rn0=" <<
rn0
72 std::cout <<
"FP420ClusterMain constructor: ENC = " <<
ENC_ << std::endl;
83 std::cout <<
"using a SingleNoiseValue and good electrode flags" << std::endl;
87 std::cout <<
"using Noise and BadElectrode flags accessed from DB" << std::endl;
99 std::cout <<
"ERROR:FP420ClusterMain: No valid clusterizer selected" << std::endl;
114 std::vector<ClusterNoiseFP420>& electrodnoise)
124 std::cout <<
"FP420ClusterMain: OK1" << std::endl;
127 int number_detunits = 0;
128 int number_localelectroderechits = 0;
138 for (
int det = 1; det <
dn0; det++) {
139 for (
int sector = 1; sector <
sn0; sector++) {
140 for (
int zmodule = 1; zmodule <
pn0; zmodule++) {
145 std::cout <<
" FP420ClusterMain:1 run loop index no iu = " << detID << std::endl;
171 std::vector<HDigiFP420> dcollector;
174 std::cout <<
" FP420ClusterMain:2 number_detunits = " << number_detunits << std::endl;
176 digiRange =
input->get(detID);
181 std::cout <<
" FP420ClusterMain: input->get DONE dcollector.size()=" << dcollector.size() << std::endl;
186 for (; sort_begin != sort_end; ++sort_begin) {
187 dcollector.push_back(*sort_begin);
189 if (!dcollector.empty()) {
193 std::cout <<
" FP420ClusterMain: channel Begin = " << (digiRangeIteratorBegin)->channel() << std::endl;
194 std::cout <<
" FP420ClusterMain: channel end = " << (digiRangeIteratorEnd - 1)->channel() << std::endl;
197 std::cout <<
" FP420ClusterMain:3 noise treatment " << std::endl;
200 std::vector<ClusterFP420> collector;
218 for (
int electrode = 0; electrode <
numStrips; ++electrode) {
222 vnoise.push_back(theElectrodData);
226 std::cout <<
" FP420ClusterMain:5 BadElectrodeProbability added " << std::endl;
234 digiRangeIteratorBegin, digiRangeIteratorEnd, detID, vnoise,
xytype,
verbosity);
237 std::cout <<
" FP420ClusterMain:6 threeThreshold OK " << std::endl;
255 if (!collector.empty()) {
261 std::cout <<
" FP420ClusterMain:7 collector.size()>0 " << std::endl;
266 unsigned int detID0 = 0;
268 std::cout <<
" FP420ClusterMain:8 first soutput->put " << std::endl;
275 std::cout <<
" FP420ClusterMain:9 soutput->put " << std::endl;
279 number_localelectroderechits += collector.size();
284 << number_localelectroderechits <<
" ClusterFP420s in " << number_detunits <<
" DetUnits."
295 for (
int det = 1; det <
dn0; det++) {
296 for (
int sector = 1; sector <
sn0; sector++) {
297 for (
int zmodule = 1; zmodule <
pn0; zmodule++) {
301 std::cout <<
" iu = " << iu <<
" sector = " << sector <<
" zmodule = " << zmodule <<
" zside = " <<
zside
302 <<
" det=" << det << std::endl;
303 std::vector<ClusterFP420> collector;
306 outputRange = soutput->
get(iu);
310 for (; sort_begin != sort_end; ++sort_begin) {
311 collector.push_back(*sort_begin);
315 std::cout <<
" =========== FP420ClusterMain:check: iu= " << iu <<
" zside = " <<
zside << std::endl;
316 std::cout <<
" ======renew collector size = " << collector.size() << std::endl;
319 std::vector<ClusterFP420>::const_iterator simHitIter = collector.begin();
320 std::vector<ClusterFP420>::const_iterator simHitIterEnd = collector.end();
322 for (; simHitIter != simHitIterEnd; ++simHitIter) {
331 for (
unsigned int i = 0;
i < icluster.
amplitudes().size();
i++) {
336 std::cout <<
" =======================" << std::endl;
355 std::cout <<
"======= FP420ClusterMain: end of check " << std::endl;