102 int firstLayer =
hgc.getLayerOffset();
105 bool getHits = (hitsCalo.
isValid());
106 uint32_t
nhits = (getHits) ? hitsCalo->size() : 0;
107 uint32_t
good(0), allSi(0),
all(0), allSc(0),
bad(0);
108 constexpr
double tol = 2.0;
109 edm::LogVerbatim(
"HGCalSim") <<
"HGCalTestPartialWaferHits: Input flags Hits " << getHits <<
" with " <<
nhits 110 <<
" hits: Layer Offset " << firstLayer;
113 std::vector<PCaloHit>
hits;
114 hits.insert(
hits.end(), hitsCalo->begin(), hitsCalo->end());
121 std::ostringstream st1;
128 std::string_view pid =
129 ((
hgc.cassetteShiftSilicon(hid.layer(), hid.waferU(), hid.waferV())) ?
"HGCSim" :
"HGCalSim");
130 const auto&
info =
hgc.waferInfo(hid.layer(), hid.waferU(), hid.waferV());
132 st1 <<
" Wafer Type:Part:Orient:Cassette " <<
info.type <<
":" <<
info.part <<
":" <<
info.orient <<
":" 150 bool valid1 =
geom->topology().valid(
id);
151 bool valid2 =
hgc.isValidHex8(hid.layer(), hid.waferU(), hid.waferV(), hid.cellU(), hid.cellV(),
false);
152 auto xy =
hgc.locateCell(hid,
false);
153 double xx = (hid.zside() > 0) ?
xy.first : -
xy.first;
155 double dy =
xy.second -
pos.y();
157 if ((
diff > tol) || (!valid1) || (!valid2))
160 <<
" Wafer Type:Part:Orient:Cassette " <<
info.type <<
":" <<
info.part <<
":" 161 <<
info.orient <<
":" <<
info.cassette <<
" at (" <<
pos.x() <<
":" <<
xx <<
":" 162 <<
dx <<
", " <<
pos.y() <<
":" <<
xy.second <<
":" <<
dy <<
", " <<
pos.z()
163 <<
") Valid " << valid1 <<
":" << valid2 <<
" Distance " <<
diff;
171 std::string_view pid = ((
hgc.cassetteShiftScintillator(hid.layer(), hid.iphi())) ?
"HGCSim" :
"HGCalSim");
173 bool valid1 =
geom->topology().valid(
id);
174 bool valid2 =
hgc.isValidTrap(hid.zside(), hid.layer(), hid.ring(), hid.iphi());
175 if ((!valid1) || (!valid2))
177 int cassette =
hgc.cassetteTile(hid.iphi());
178 edm::LogVerbatim(pid) <<
"Hit[" <<
all <<
":" << allSc <<
"] " << hid <<
" Cassette " << cassette <<
" at (" 179 <<
pos.x() <<
", " <<
pos.y() <<
", " <<
pos.z() <<
") Valid " << valid1 <<
":" 183 st1 << std::hex <<
id.rawId() <<
std::dec;
193 <<
good <<
" Scintitllator = " << allSc <<
" Invalid = " <<
bad;
Log< level::Info, true > LogVerbatim
auto const good
min quality of good
std::vector< int > wafers_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static constexpr int32_t WaferFull
int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
const std::string nameSense_
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_calo_
std::vector< int > dumpDets_
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > geomToken_