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"};
81 std::ifstream fInput(
fileName.c_str());
86 while (fInput.getline(
buffer, 80)) {
88 if (
items.size() > 6) {
92 int thck =
static_cast<int>(
std::find(thick, thick + 4,
items[2]) - thick);
93 int type = (thck < 4) ? addType[thck] : 0;
105 edm::LogVerbatim(
"HGCalSim") <<
"HGCalTestGuardRing::Reads " <<
id <<
" Orientation:Partial " <<
orient <<
":" 121 desc.add<
double>(
"guardRingOffset", 1.0);
122 descriptions.
add(
"hgcalTestGuardRingEE",
desc);
129 double waferSize =
hgc.waferSize(
false);
131 const bool v17OrLess =
hgc.v17OrLess();
134 edm::LogVerbatim(
"HGCalSim") <<
"HGCalTestGuardRing: Wafer Szie " << waferSize <<
" v17OrLess " << v17OrLess;
138 for (std::map<HGCSiliconDetId, int>::const_iterator itr =
waferID_.begin(); itr !=
waferID_.end(); ++itr) {
145 int partial = ((itr->second) % 100);
146 int orient = (((itr->second) / 100) % 100);
147 int type =
id.type();
149 for (
int u = 0; u < 2 *
nCells; ++u) {
157 std::pair<double, double>
xy = wafer.cellUV2XY1(u,
v, placeIndex,
type);
158 std::vector<std::pair<double, double> > wxy1 =
161 std::ostringstream st1;
162 for (
unsigned int k1 = 0; k1 < wxy1.size(); ++k1)
163 st1 <<
" (" << wxy1[k1].
first <<
", " << wxy1[k1].
second <<
")";
165 <<
"First " << hid <<
" Type:Partial:Orient:Place " <<
type <<
":" << partial <<
":" <<
orient 166 <<
":" << placeIndex <<
" Boundary with " << wxy1.size() <<
" points: " << st1.str() <<
" check " 167 << check1 <<
" for (" <<
xy.first <<
", " <<
xy.second <<
")";
169 std::vector<std::pair<double, double> > wxy2 =
172 std::ostringstream st2;
173 for (
unsigned int k1 = 0; k1 < wxy2.size(); ++k1)
174 st2 <<
" (" << wxy2[k1].
first <<
", " << wxy2[k1].
second <<
")";
176 <<
" points: " << st2.str() <<
" check " << check2 <<
" for (" <<
xy.first
177 <<
", " <<
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)
static constexpr int32_t WaferHD200
static constexpr int32_t waferFrontBack(int32_t index)
int32_t waferU(const int32_t index)
std::map< HGCSiliconDetId, int > waferID_
const double guardRingOffset_
static constexpr int32_t WaferThree
static constexpr int32_t WaferLD300
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(const int &part, const int &orient, const int &zside, const double &waferSize, const double &offset, const double &xpos, const double &ypos, const bool &v17)
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
static constexpr int32_t WaferHD120
~HGCalTestGuardRing() override=default
#define DEFINE_FWK_MODULE(type)
const std::string nameSense_
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)
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t const uint32_t CACellT< TrackerTraits > uint32_t * nCells
int32_t waferV(const int32_t index)
static constexpr int32_t WaferFive
static constexpr int32_t WaferSemi
static constexpr int32_t WaferLD200