47 : g4Label_(ps.getParameter<
std::
string>(
"moduleLabel")),
48 caloHitSource_(ps.getParameter<
std::
string>(
"caloHitSource")),
49 nameSense_(ps.getParameter<
std::
string>(
"nameSense")),
50 nameDetector_(ps.getParameter<
std::
string>(
"nameDevice")),
51 verbosity_(ps.getParameter<
int>(
"Verbosity")),
64 desc.add<
int>(
"Verbosity", 0);
65 descriptions.
add(
"hgcalHitIdCheckEE",
desc);
70 edm::LogVerbatim(
"HitStudy") <<
"Run = " <<
e.id().run() <<
" Event = " <<
e.id().event();
74 const std::vector<DetId>& validIds =
geom->getValidDetIds();
77 bool getHits = (hitsCalo.
isValid());
78 uint32_t
nhits = (getHits) ? hitsCalo->size() : 0;
81 edm::LogVerbatim(
"HitStudy") <<
"HGcalHitIdCheck: Input flags Hits " << getHits <<
" with " <<
nhits <<
" hits";
84 std::vector<PCaloHit>
hits;
85 hits.insert(
hits.end(), hitsCalo->begin(), hitsCalo->end());
90 if (
std::find(validIds.begin(), validIds.end(),
id) != validIds.end()) {
109 bool ok = (
std::find(validIds.begin(), validIds.end(),
DetId(hid2)) != validIds.end());
111 << hid2 <<
" in list " <<
ok;
114 <<
"Hit[" <<
all <<
":" <<
good <<
"]" << std::hex <<
id.rawId() <<
std::dec <<
" not valid *****";
122 <<
" Invalid DetIds = " << (
all -
good);
Log< level::Info, true > LogVerbatim
auto const good
min quality of good
std::vector< PCaloHit > PCaloHitContainer
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
void analyze(edm::Event const &, edm::EventSetup const &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int type() const
get/set the type
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
int iphi() const
get the phi index
const std::string nameSense_
int layer() const
get the layer #
const std::string nameDetector_
#define DEFINE_FWK_MODULE(type)
~HGcalHitIdCheck() override
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_calo_
int ring() const
get the eta index
const std::string caloHitSource_
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > geomToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
HGcalHitIdCheck(const edm::ParameterSet &ps)
const std::string g4Label_