56 : nameSense_(ps.getParameter<
std::
string>(
"nameSense")),
57 waferFile_(ps.getParameter<
std::
string>(
"waferFile")),
58 guardRingOffset_(ps.getParameter<double>(
"guardRingOffset")),
62 <<
" for wafers read from file " <<
waferFile_;
64 std::string thick[4] = {
"h120",
"l200",
"l300",
"h200"};
84 std::ifstream fInput(
fileName.c_str());
89 while (fInput.getline(
buffer, 80)) {
91 if (
items.size() > 6) {
95 int thck =
static_cast<int>(
std::find(thick, thick + 4,
items[2]) - thick);
96 int type = (thck < 4) ? addType[thck] : 0;
108 edm::LogVerbatim(
"HGCalSim") <<
"HGCalTestGuardRing::Reads " <<
id <<
" Orientation:Partial " <<
orient <<
":" 124 desc.add<
double>(
"guardRingOffset", 1.0);
125 descriptions.
add(
"hgcalTestGuardRingEE",
desc);
132 double waferSize =
hgc.waferSize(
false);
135 edm::LogVerbatim(
"HGCalSim") <<
"HGCalTestGuardRing: Wafer Szie " << waferSize;
139 for (std::map<HGCSiliconDetId, int>::const_iterator itr =
waferID_.begin(); itr !=
waferID_.end(); ++itr) {
146 int partial = ((itr->second) % 100);
147 int orient = (((itr->second) / 100) % 100);
148 int type =
id.type();
150 for (
int u = 0; u < 2 *
nCells; ++u) {
158 std::pair<double, double>
xy = wafer.cellUV2XY1(u,
v, placeIndex,
type);
159 std::vector<std::pair<double, double> > wxy1 =
162 std::ostringstream st1;
163 for (
unsigned int k1 = 0; k1 < wxy1.size(); ++k1)
164 st1 <<
" (" << wxy1[k1].
first <<
", " << wxy1[k1].
second <<
")";
166 <<
"First " << hid <<
" Type:Partial:Orient:Place " <<
type <<
":" << partial <<
":" <<
orient 167 <<
":" << placeIndex <<
" Boundary with " << wxy1.size() <<
" points: " << st1.str() <<
" check " 168 << check1 <<
" for (" <<
xy.first <<
", " <<
xy.second <<
")";
170 std::vector<std::pair<double, double> > wxy2 =
173 std::ostringstream st2;
174 for (
unsigned int k1 = 0; k1 < wxy2.size(); ++k1)
175 st2 <<
" (" << wxy2[k1].
first <<
", " << wxy2[k1].
second <<
")";
177 <<
" points: " << st2.str() <<
" check " << check2 <<
" for (" <<
xy.first
178 <<
", " <<
xy.second <<
")";
Log< level::Info, true > LogVerbatim
static constexpr int32_t WaferHalf2
static constexpr int32_t WaferFive2
auto const good
min quality of good
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
int32_t waferU(const int32_t index)
std::map< HGCSiliconDetId, int > waferID_
const double guardRingOffset_
static constexpr int32_t WaferThree
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static constexpr int32_t WaferSemi2
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > geomToken_
static std::vector< std::pair< double, double > > waferXY(int part, int orient, int zside, double waferSize, double offset, double xpos, double ypos)
U second(std::pair< T, U > const &p)
static constexpr int32_t WaferFull
HGCalTestGuardRing(const edm::ParameterSet &ps)
static constexpr int32_t WaferHalf
std::vector< std::string > splitString(const std::string &)
void analyze(edm::Event const &, edm::EventSetup const &) override
~HGCalTestGuardRing() override=default
#define DEFINE_FWK_MODULE(type)
static int32_t waferFrontBack(int32_t index)
static constexpr int32_t WaferCoarseThin
const std::string nameSense_
TupleMultiplicity< TrackerTraits > const HitToTuple< TrackerTraits > const cms::cuda::AtomicPairCounter GPUCACellT< TrackerTraits > const *__restrict__ uint32_t const *__restrict__ nCells
const std::string waferFile_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static constexpr int32_t WaferChopTwoM
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static bool insidePolygon(double x, double y, const std::vector< std::pair< double, double > > &xyv)
int32_t waferV(const int32_t index)
static constexpr int32_t WaferCoarseThick
static constexpr int32_t WaferFive
static constexpr int32_t WaferFineThick
static constexpr int32_t WaferFineThin
static constexpr int32_t WaferSemi