56 : g4Label_(ps.getUntrackedParameter<
std::
string>(
"moduleLabel",
"g4SimHits")),
57 hitLab_(ps.getUntrackedParameter<
std::
string>(
"hcCollection",
"HcalHits")),
58 testN_(ps.getUntrackedParameter<
bool>(
"testNumbering",
false)),
59 dumpHits_(ps.getUntrackedParameter<
bool>(
"dumpHits",
false)),
60 maxEvent_(ps.getUntrackedParameter<
int>(
"maxEvent", 100)),
64 tok_hrdd_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord>();
65 tok_topo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
66 tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
69 <<
" Numbering scheme: " <<
testN_ <<
" (0 normal; 1 test)\n";
76 desc.addUntracked<
bool>(
"testNumbering",
false);
77 desc.addUntracked<
bool>(
"dumpHits",
false);
78 desc.addUntracked<
int>(
"maxEvent", 100);
79 descriptions.
add(
"hcalTestSimHitID",
desc);
84 std::cout <<
"HcalTestSimHitID::Serial # " <<
nevt_ <<
" Run # " <<
e.id().run() <<
" Event # " <<
e.id().event()
96 std::vector<PCaloHit> hcHits;
100 std::vector<PCaloHit>
hits;
101 hits.insert(
hits.end(), hitsCalo->begin(), hitsCalo->end());
102 std::cout <<
"HcalValidation: Hit buffer " <<
hits.size() << std::endl;
105 unsigned int good(0);
106 for (
unsigned int i = 0;
i <
hits.size();
i++) {
107 unsigned int id =
hits[
i].id();
120 std::cout <<
"Hit[" <<
i <<
"] " << hid <<
" \n";
122 std::cout <<
"Test " <<
p1 <<
" from HcalDetId " <<
p2 <<
"\n";
125 std::cout <<
"Hit[" <<
i <<
"] " << hid <<
" ***** ERROR *****\n";
128 std::cout <<
"HcalTestSimHitID:: " << good <<
" among " <<
hits.size() <<
" hits\n";