67 std::map<unsigned int, HGCHitTuple>&);
71 std::vector<const HGCalDDDConstants*>
hgcCons_;
83 std::vector<edm::ESGetToken<HGCalDDDConstants, IdealGeometryRecord>>
tok_ddd_;
84 std::vector<edm::ESGetToken<HGCalGeometry, IdealGeometryRecord>>
tok_geom_;
113 esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(
edm::ESInputTag{
"",
name}));
115 esConsumes<HGCalGeometry, IdealGeometryRecord, edm::Transition::BeginRun>(
edm::ESInputTag{
"",
name}));
129 std::vector<std::string>
source = {
"HGCalEESensitive",
"HGCalHESiliconSensitive",
"HGCalHEScintillatorSensitive"};
130 desc.add<std::vector<std::string>>(
"geometrySource",
source);
137 std::vector<int>
dummy;
138 desc.add<std::vector<int>>(
"ietaExcludeBH",
dummy);
139 descriptions.
add(
"hgcalHitValidation",
desc);
146 heedzVsZ = iB.
book2D(
"heedzVsZ",
"", 720, -360, 360, 100, -0.1, 0.1);
147 heedyVsY = iB.
book2D(
"heedyVsY",
"", 400, -200, 200, 100, -0.02, 0.02);
148 heedxVsX = iB.
book2D(
"heedxVsX",
"", 400, -200, 200, 100, -0.02, 0.02);
153 hefdzVsZ = iB.
book2D(
"hefdzVsZ",
"", 820, -410, 410, 100, -0.1, 0.1);
154 hefdyVsY = iB.
book2D(
"hefdyVsY",
"", 400, -200, 200, 100, -0.02, 0.02);
155 hefdxVsX = iB.
book2D(
"hefdxVsX",
"", 400, -200, 200, 100, -0.02, 0.02);
160 hebdzVsZ = iB.
book2D(
"hebdzVsZ",
"", 1080, -540, 540, 100, -1.0, 1.0);
199 std::map<unsigned int, HGCHitTuple> eeHitRefs, fhHitRefs, bhHitRefs;
208 for (std::map<unsigned int, HGCHitTuple>::iterator itr = eeHitRefs.begin(); itr != eeHitRefs.end(); ++itr) {
211 << std::get<0>(itr->second) <<
"; Position (" << std::get<1>(itr->second) <<
", "
212 << std::get<2>(itr->second) <<
", " << std::get<3>(itr->second) <<
")";
225 for (std::map<unsigned int, HGCHitTuple>::iterator itr = fhHitRefs.begin(); itr != fhHitRefs.end(); ++itr) {
228 << std::get<0>(itr->second) <<
"; Position (" << std::get<1>(itr->second) <<
", "
229 << std::get<2>(itr->second) <<
", " << std::get<3>(itr->second) <<
")";
242 for (std::map<unsigned int, HGCHitTuple>::iterator itr = bhHitRefs.begin(); itr != bhHitRefs.end(); ++itr) {
245 << std::get<0>(itr->second) <<
"; Position (" << std::get<1>(itr->second) <<
", "
246 << std::get<2>(itr->second) <<
", " << std::get<3>(itr->second) <<
")";
259 double energy = it->energy();
261 std::map<unsigned int, HGCHitTuple>::const_iterator itr = eeHitRefs.find(it->id().rawId());
262 if (itr != eeHitRefs.end()) {
267 heedxVsX->
Fill(std::get<1>(itr->second), (xyz.
x() - std::get<1>(itr->second)));
268 heedyVsY->
Fill(std::get<2>(itr->second), (xyz.
y() - std::get<2>(itr->second)));
269 heedzVsZ->
Fill(std::get<3>(itr->second), (xyz.
z() - std::get<3>(itr->second)));
273 << std::get<0>(itr->second) <<
", " << std::get<1>(itr->second) <<
", "
274 << std::get<2>(itr->second) <<
", " << std::get<3>(itr->second) <<
") Rec ("
275 <<
energy <<
", " << xyz.
x() <<
", " << xyz.
y() <<
", " << xyz.
z() <<
")";
289 double energy = it->energy();
291 std::map<unsigned int, HGCHitTuple>::const_iterator itr = fhHitRefs.find(it->id().rawId());
292 if (itr != fhHitRefs.end()) {
298 hefdxVsX->
Fill(std::get<1>(itr->second), (xyz.
x() - std::get<1>(itr->second)));
299 hefdyVsY->
Fill(std::get<2>(itr->second), (xyz.
y() - std::get<2>(itr->second)));
300 hefdzVsZ->
Fill(std::get<3>(itr->second), (xyz.
z() - std::get<3>(itr->second)));
304 << std::get<0>(itr->second) <<
", " << std::get<1>(itr->second) <<
", "
305 << std::get<2>(itr->second) <<
", " << std::get<3>(itr->second) <<
") Rec ("
306 <<
energy <<
"," << xyz.
x() <<
", " << xyz.
y() <<
", " << xyz.
z() <<
")";
320 double energy = it->energy();
322 std::map<unsigned int, HGCHitTuple>::const_iterator itr = bhHitRefs.find(it->id().rawId());
324 if (itr != bhHitRefs.end()) {
326 double fac = sinh(std::get<1>(itr->second));
327 double pT = std::get<3>(itr->second) / fac;
328 double xp =
pT *
cos(std::get<2>(itr->second));
329 double yp =
pT *
sin(std::get<2>(itr->second));
334 hebdPhiVsPhi->
Fill(std::get<2>(itr->second), (ang3 - std::get<2>(itr->second)));
335 hebdzVsZ->
Fill(std::get<3>(itr->second), (xyz.
z() - std::get<3>(itr->second)));
340 << std::get<0>(itr->second) <<
", " << std::get<1>(itr->second) <<
", "
341 << std::get<2>(itr->second) <<
", " << std::get<3>(itr->second) <<
") Rec ("
342 <<
energy <<
", " << xyz.
x() <<
", " << xyz.
y() <<
", " << xyz.
z() <<
")\n";
354 std::map<unsigned int, HGCHitTuple>& hitRefs) {
357 int subdet,
zside,
layer, wafer, celltype, cell;
359 std::pair<float, float>
xy =
hgcCons_[idet]->locateCell(cell,
layer, wafer,
false);
363 float xp = (zp < 0) ? -
xy.first / 10 :
xy.first / 10;
364 float yp =
xy.second / 10.0;
368 cell = recoLayerCell.first;
369 layer = recoLayerCell.second;
372 if (
layer < 0 || cell < 0) {
379 if (hitRefs.count(
id.rawId()) != 0)
380 energySum += std::get<0>(hitRefs[
id.rawId()]);
381 hitRefs[
id.rawId()] = std::make_tuple(
energySum, xp, yp, zp);