76 std::map<unsigned int, HGCHitTuple>&);
82 std::vector<const HGCalDDDConstants*>
hgcCons_;
117 geometrySource_ =
cfg.getUntrackedParameter<std::vector<std::string>>(
"geometrySource");
153 heedzVsZ = iB.
book2D(
"heedzVsZ",
"", 720, -360, 360, 100, -0.1, 0.1);
154 heedyVsY = iB.
book2D(
"heedyVsY",
"", 400, -200, 200, 100, -0.02, 0.02);
155 heedxVsX = iB.
book2D(
"heedxVsX",
"", 400, -200, 200, 100, -0.02, 0.02);
160 hefdzVsZ = iB.
book2D(
"hefdzVsZ",
"", 820, -410, 410, 100, -0.1, 0.1);
161 hefdyVsY = iB.
book2D(
"hefdyVsY",
"", 400, -200, 200, 100, -0.02, 0.02);
162 hefdxVsX = iB.
book2D(
"hefdxVsX",
"", 400, -200, 200, 100, -0.02, 0.02);
167 hebdzVsZ = iB.
book2D(
"hebdzVsZ",
"", 1080, -540, 540, 100, -1.0, 1.0);
235 std::map<unsigned int, HGCHitTuple> eeHitRefs, fhHitRefs, bhHitRefs;
244 for (std::map<unsigned int, HGCHitTuple>::iterator
itr = eeHitRefs.begin();
itr != eeHitRefs.end(); ++
itr) {
247 << std::get<0>(
itr->second) <<
"; Position (" << std::get<1>(
itr->second) <<
", "
248 << std::get<2>(
itr->second) <<
", " << std::get<3>(
itr->second) <<
")";
261 for (std::map<unsigned int, HGCHitTuple>::iterator
itr = fhHitRefs.begin();
itr != fhHitRefs.end(); ++
itr) {
264 << std::get<0>(
itr->second) <<
"; Position (" << std::get<1>(
itr->second) <<
", "
265 << std::get<2>(
itr->second) <<
", " << std::get<3>(
itr->second) <<
")";
283 double zp = cell.
rz / 10;
286 int sign = (
z == 0) ? (-1) : (1);
292 if (bhHitRefs.count(
id.rawId()) != 0)
293 energySum += std::get<0>(bhHitRefs[
id.rawId()]);
296 bhHitRefs[
id.rawId()] = std::make_tuple(
energySum, cell.
eta, cell.
phi, zp);
298 edm::LogInfo(
"HGCalValid") <<
"Accept " <<
id << std::endl;
300 edm::LogInfo(
"HGCalValid") <<
"Reject " <<
id << std::endl;
309 for (std::map<unsigned int, HGCHitTuple>::iterator
itr = bhHitRefs.begin();
itr != bhHitRefs.end(); ++
itr) {
312 << std::get<0>(
itr->second) <<
"; Position (" << std::get<1>(
itr->second) <<
", "
313 << std::get<2>(
itr->second) <<
", " << std::get<3>(
itr->second) <<
")";
326 double energy = it->energy();
328 std::map<unsigned int, HGCHitTuple>::const_iterator
itr = eeHitRefs.find(it->id().rawId());
329 if (
itr != eeHitRefs.end()) {
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() <<
")";
356 double energy = it->energy();
358 std::map<unsigned int, HGCHitTuple>::const_iterator
itr = fhHitRefs.find(it->id().rawId());
359 if (
itr != fhHitRefs.end()) {
371 << std::get<0>(
itr->second) <<
", " << std::get<1>(
itr->second) <<
", "
372 << std::get<2>(
itr->second) <<
", " << std::get<3>(
itr->second) <<
") Rec ("
373 <<
energy <<
"," << xyz.
x() <<
", " << xyz.
y() <<
", " << xyz.
z() <<
")";
406 std::map<unsigned int, HGCHitTuple>& hitRefs) {
409 int subdet,
zside, layer, wafer, celltype, cell;
411 std::pair<float, float>
xy =
hgcCons_[idet]->locateCell(cell, layer, wafer,
false);
412 float zp =
hgcCons_[idet]->waferZ(layer,
false);
415 float xp = (zp < 0) ? -
xy.first / 10 :
xy.first / 10;
416 float yp =
xy.second / 10.0;
419 std::pair<int, int> recoLayerCell =
hgcCons_[idet]->simToReco(cell, layer, wafer, hTopo.
detectorType());
420 cell = recoLayerCell.first;
421 layer = recoLayerCell.second;
424 if (layer < 0 || cell < 0) {
431 if (hitRefs.count(
id.rawId()) != 0)
432 energySum += std::get<0>(hitRefs[
id.rawId()]);
433 hitRefs[
id.rawId()] = std::make_tuple(
energySum, xp, yp, zp);
444 double energy = it->energy();
448 std::map<unsigned int, HGCHitTuple>::const_iterator
itr = hitRefs.find(
id.rawId());
449 if (
itr != hitRefs.end()) {
451 double fac = sinh(std::get<1>(
itr->second));
452 double pT = std::get<3>(
itr->second) / fac;
453 double xp =
pT *
cos(std::get<2>(
itr->second));
454 double yp =
pT *
sin(std::get<2>(
itr->second));
465 << std::get<0>(
itr->second) <<
", " << std::get<1>(
itr->second) <<
", "
466 << std::get<2>(
itr->second) <<
", " << std::get<3>(
itr->second) <<
") Rec ("
467 <<
energy <<
", " << xyz.
x() <<
", " << xyz.
y() <<
", " << xyz.
z() <<
")\n";