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);
78 bool getHits = (hitsCalo.
isValid());
79 uint32_t
nhits = (getHits) ? hitsCalo->size() : 0;
82 edm::LogVerbatim(
"HitStudy") <<
"HGcalHitIdCheck: Input flags Hits " << getHits <<
" with " << nhits <<
" hits";
85 std::vector<PCaloHit> hits;
86 hits.insert(hits.end(), hitsCalo->begin(), hitsCalo->end());
88 for (
auto hit : hits) {
91 if (
std::find(validIds.begin(), validIds.end(),
id) != validIds.end()) {
110 bool ok = (
std::find(validIds.begin(), validIds.end(),
DetId(hid2)) != validIds.end());
111 edm::LogVerbatim(
"HitStudy") <<
"Hit[" << all <<
":" <<
good <<
"]" << hid1 <<
" not valid ***** but "
112 << hid2 <<
" in list " <<
ok;
115 <<
"Hit[" << all <<
":" <<
good <<
"]" << std::hex <<
id.rawId() <<
std::dec <<
" not valid *****";
122 edm::LogVerbatim(
"HitStudy") <<
"Total hits = " << all <<
":" << nhits <<
" Good DetIds = " <<
good
123 <<
" Invalid DetIds = " << (all -
good);
Log< level::Info, true > LogVerbatim
EventNumber_t event() const
std::vector< PCaloHit > PCaloHitContainer
uint16_t *__restrict__ id
void analyze(edm::Event const &, edm::EventSetup const &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
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)
bool getData(T &iHolder) const
const std::string nameSense_
const std::string nameDetector_
int iphi() const
get the phi index
int ring() const
get the eta index
~HGcalHitIdCheck() override
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_calo_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const std::string caloHitSource_
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > geomToken_
auto const good
min quality of good
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const override
Get a list of valid detector ids (for the given subdetector)
HGcalHitIdCheck(const edm::ParameterSet &ps)
int layer() const
get the layer #
const std::string g4Label_