55 : g4Label_(ps.getUntrackedParameter<std::
string>(
"moduleLabel",
"g4SimHits")),
56 hitLab_(ps.getUntrackedParameter<std::
string>(
"hcCollection",
"HcalHits")),
57 testN_(ps.getUntrackedParameter<bool>(
"testNumbering",
false)),
58 dumpHits_(ps.getUntrackedParameter<bool>(
"dumpHits",
false)),
59 maxEvent_(ps.getUntrackedParameter<int>(
"maxEvent", 100)),
68 <<
" MaxEvent: " <<
maxEvent_ <<
" Numbering scheme: " <<
testN_ <<
" (0 normal; 1 test)";
78 descriptions.
add(
"hcalTestSimHitID", desc);
92 std::vector<PCaloHit> hcHits;
96 std::vector<PCaloHit> hits;
97 hits.insert(hits.end(), hitsCalo->begin(), hitsCalo->end());
101 unsigned int good(0);
102 for (
unsigned int i = 0;
i < hits.size();
i++) {
103 unsigned int id = hits[
i].id();
121 edm::LogVerbatim(
"HcalSim") <<
"Hit[" <<
i <<
"] " << hid <<
" ***** ERROR *****";
124 edm::LogVerbatim(
"HcalSim") <<
"\nHcalTestSimHitID:: " << good <<
" among " << hits.size() <<
" hits";
Log< level::Info, true > LogVerbatim
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
EventNumber_t event() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::EventSetup & c
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
maxEvent_(ps.getParameter< int >("MaxEvent"))
bool validHcal(const HcalDetId &id) const
bool getData(T &iHolder) const
const edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_topo_
const std::string hitLab_
const std::string g4Label_
edm::EDGetTokenT< edm::PCaloHitContainer > toks_calo_
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_hrdd_
void analyze(const edm::Event &e, const edm::EventSetup &c) override
GlobalPoint getPosition(const DetId &id) const
auto const good
min quality of good
void add(std::string const &label, ParameterSetDescription const &psetDescription)
HcalTestSimHitID(const edm::ParameterSet &ps)
DetId relabel(const uint32_t testId) const
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
tok_geom_(esConsumes< CaloGeometry, CaloGeometryRecord, edm::Transition::BeginRun >())
~HcalTestSimHitID() override=default