@@ -823,15 +823,15 @@ bool HGCalDDDConstants::isValidHex8(int layer, int modU, int modV, int cellU, in
823823bool HGCalDDDConstants::isValidTrap (int zside, int layer, int irad, int iphi) const {
824824 // Check validity for a layer|eta|phi of scintillator
825825 const auto & indx = getIndex (layer, true );
826- #ifdef EDM_ML_DEBUG
826+ // #ifdef EDM_ML_DEBUG
827827 edm::LogWarning (" HGCalGeomT" ) << " isValidTrap: Layer " << layer << " indx " << indx.first << " :"
828828 << hgpar_->firstLayer_ << " :" << hgpar_->firstMixedLayer_ ;
829- #endif
829+ // #endif
830830 if (indx.first < 0 )
831831 return false ;
832832 bool ok = ((hgpar_->scintValidRing (indx.first , irad)) && (iphi > 0 ) && (iphi <= hgpar_->scintCells (layer)));
833833 bool valid = ((ok && trapezoidFile ()) ? tileExist (zside, layer, irad, iphi) : ok);
834- #ifdef EDM_ML_DEBUG
834+ // #ifdef EDM_ML_DEBUG
835835 bool tileEx = trapezoidFile () ? tileExist (zside, layer, irad, iphi) : true ;
836836 if (!valid)
837837 edm::LogWarning (" HGCalGeomT" ) << " HGCalDDDConstants::isValidityTrap: Input " << zside << " :" << layer << " :" << irad
@@ -844,7 +844,7 @@ bool HGCalDDDConstants::isValidTrap(int zside, int layer, int irad, int iphi) co
844844 << hgpar_->scintValidRing (indx.first , irad)
845845 << " Range on phi 0:" << hgpar_->scintCells (layer) << " tileExist " << tileEx
846846 << " Valid " << ok << " :" << tileExist (zside, layer, irad, iphi) << " :" << valid;
847- #endif
847+ // #endif
848848 return valid;
849849}
850850
@@ -1564,17 +1564,18 @@ bool HGCalDDDConstants::tileExist(int zside, int layer, int ring, int phi) const
15641564 auto itr = hgpar_->tileInfoMap_ .find (indx);
15651565 ok = (itr == hgpar_->tileInfoMap_ .end ()) ? false : HGCalTileIndex::tileExist (itr->second .hex , zside, phi);
15661566#ifdef EDM_ML_DEBUG
1567- if (!ok)
1568- edm::LogWarning (" HGCalGeomT" ) << " TileExist:input " << zside << " :" << layer << " :" << ring << " :" << phi
1569- << " Index " << index.first << " :" << (itr != hgpar_->tileInfoMap_ .end ())
1570- << " ok " << ok;
1571- if (HGCalTileIndex::tileFineExist (itr->second .hex , zside, phi) !=
1572- HGCalTileIndex::tileExist (itr->second .hex , zside, phi))
1573- edm::LogVerbatim (" HGCalGeom" ) << " Zside:Layer:Ring:Phi " << zside << " :" << layer << " :" << ring << " :" << phi
1574- << " hex " << std::hex << itr->second .hex [0 ] << " :" << itr->second .hex [1 ] << " :"
1575- << itr->second .hex [2 ] << " :" << itr->second .hex [3 ] << " :" << itr->second .hex [4 ]
1576- << " :" << itr->second .hex [5 ] << std::dec << " OK " << ok << " :"
1577- << HGCalTileIndex::tileFineExist (itr->second .hex , zside, phi) << " CHECK" ;
1567+ if (!ok) {
1568+ if (itr == hgpar_->tileInfoMap_ .end ())
1569+ edm::LogWarning (" HGCalGeomT" ) << " TileExist:input " << zside << " :" << layer << " :" << ring << " :" << phi
1570+ << " Index " << index.first << " :" << (itr != hgpar_->tileInfoMap_ .end ())
1571+ << " ok " << ok << " CHECK" ;
1572+ else
1573+ edm::LogWarning (" HGCalGeomT" ) << " TileExist:input " << zside << " :" << layer << " :" << ring << " :" << phi
1574+ << " Index " << index.first << " :" << (itr != hgpar_->tileInfoMap_ .end ())
1575+ << " hex " << std::hex << itr->second .hex [0 ] << " :" << itr->second .hex [1 ] << " :"
1576+ << itr->second .hex [2 ] << " :" << itr->second .hex [3 ] << " :" << itr->second .hex [4 ]
1577+ << " :" << itr->second .hex [5 ] << std::dec << " OK " << ok << " CHECK" ;
1578+ }
15781579#endif
15791580 return ok;
15801581 }
0 commit comments