18 #include "CLHEP/Random/RandFlat.h" 23 : 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;
100 std::cout <<
"ERROR:FP420ClusterMain: No valid clusterizer selected" << std::endl;
117 std::cout <<
"FP420ClusterMain: OK1" << std::endl;
120 int number_detunits = 0;
121 int number_localelectroderechits = 0;
131 for (
int det = 1; det <
dn0; det++) {
132 for (
int sector = 1; sector <
sn0; sector++) {
133 for (
int zmodule = 1; zmodule <
pn0; zmodule++) {
138 std::cout <<
" FP420ClusterMain:1 run loop index no iu = " << detID << std::endl;
140 float moduleThickness = 0;
162 std::vector<HDigiFP420> dcollector;
165 std::cout <<
" FP420ClusterMain:2 number_detunits = " << number_detunits << std::endl;
167 digiRange =
input->get(detID);
172 std::cout <<
" FP420ClusterMain: input->get DONE dcollector.size()=" << dcollector.size() << std::endl;
177 for (; sort_begin != sort_end; ++sort_begin) {
178 dcollector.push_back(*sort_begin);
180 if (!dcollector.empty()) {
184 std::cout <<
" FP420ClusterMain: channel Begin = " << (digiRangeIteratorBegin)->channel() << std::endl;
185 std::cout <<
" FP420ClusterMain: channel end = " << (digiRangeIteratorEnd - 1)->channel() << std::endl;
188 std::cout <<
" FP420ClusterMain:3 noise treatment " << std::endl;
191 std::vector<ClusterFP420> collector;
207 std::cout <<
" FP420ClusterMain:4 numStrips = " << numStrips << std::endl;
209 for (
int electrode = 0; electrode < numStrips; ++electrode) {
213 vnoise.push_back(theElectrodData);
217 std::cout <<
" FP420ClusterMain:5 BadElectrodeProbability added " << std::endl;
225 digiRangeIteratorBegin, digiRangeIteratorEnd, detID, vnoise,
xytype,
verbosity);
228 std::cout <<
" FP420ClusterMain:6 threeThreshold OK " << std::endl;
246 if (!collector.empty()) {
252 std::cout <<
" FP420ClusterMain:7 collector.size()>0 " << std::endl;
257 unsigned int detID0 = 0;
259 std::cout <<
" FP420ClusterMain:8 first soutput->put " << std::endl;
266 std::cout <<
" FP420ClusterMain:9 soutput->put " << std::endl;
270 number_localelectroderechits += collector.size();
275 << number_localelectroderechits <<
" ClusterFP420s in " << number_detunits <<
" DetUnits." 286 for (
int det = 1; det <
dn0; det++) {
287 for (
int sector = 1; sector <
sn0; sector++) {
288 for (
int zmodule = 1; zmodule <
pn0; zmodule++) {
292 std::cout <<
" iu = " << iu <<
" sector = " << sector <<
" zmodule = " << zmodule <<
" zside = " <<
zside 293 <<
" det=" << det << std::endl;
294 std::vector<ClusterFP420> collector;
297 outputRange = soutput->
get(iu);
301 for (; sort_begin != sort_end; ++sort_begin) {
302 collector.push_back(*sort_begin);
306 std::cout <<
" =========== FP420ClusterMain:check: iu= " << iu <<
" zside = " <<
zside << std::endl;
307 std::cout <<
" ======renew collector size = " << collector.size() << std::endl;
310 std::vector<ClusterFP420>::const_iterator simHitIter = collector.begin();
311 std::vector<ClusterFP420>::const_iterator simHitIterEnd = collector.end();
313 for (; simHitIter != simHitIterEnd; ++simHitIter) {
322 for (
unsigned int i = 0;
i < icluster.
amplitudes().size();
i++) {
327 std::cout <<
" =======================" << std::endl;
346 std::cout <<
"======= FP420ClusterMain: end of check " << std::endl;
T getParameter(std::string const &) const
float barycenterW() const
std::vector< ClusterFP420 >::const_iterator ContainerIterator
std::vector< HDigiFP420 >::const_iterator ContainerIterator
std::unique_ptr< const ClusterProducerFP420 > threeThreshold_
std::vector< ClusterNoiseFP420::ElectrodData > ElectrodNoiseVector
void put(Range input, unsigned int detID)
double BadElectrodeProbability_
void run(edm::Handle< DigiCollectionFP420 > &input, ClusterCollectionFP420 *soutput) const
Runs the algorithm.
static std::string const input
T getUntrackedParameter(std::string const &, T const &) const
static unsigned packMYIndex(int rn0, int pn0, int sn0, int det, int zside, int sector, int zmodule)
std::pair< ContainerIterator, ContainerIterator > Range
FP420ClusterMain(const edm::ParameterSet &conf, int dn, int sn, int pn, int rn)
bool UseNoiseBadElectrodeFlagFromDB_
const Range get(unsigned int detID) const
std::pair< ContainerIterator, ContainerIterator > Range
const std::vector< short > & amplitudes() const