99 }
else if (
x >
i->y) {
101 }
else if (x < i->
x) {
105 }
else if (
y >
i->y) {
127 for (
auto &itvl : m_coverage) {
134 auto i = m_coverage.begin();
135 while (
i != m_coverage.end()) {
138 if (
j != m_coverage.end()) {
139 if (
j->x -
i->y >
eps) {
152 auto i = m_coverage.begin();
153 while (
i != m_coverage.end()) {
156 if (
j != m_coverage.end()) {
157 ostr <<
"(" <<
i->y <<
", " <<
j->x <<
")->" <<
j->x -
i->y;
169 float r =
gp.perp2(),
z =
gp.z();
184 std::array<const float, 4>
const &par =
b2->parameters();
198 float dx =
b2->width() * 0.5;
199 float dy =
b2->length() * 0.5;
208 dz =
b2->thickness() * 0.5;
212 throw cms::Exception(
"UnimplementedFeature") <<
"unsupported Bounds class";
225 (*lgc_map)[lay].reset_current();
227 for (
int i = 0;
i < 4; ++
i) {
235 (*lgc_map)[lay].extend_current(gp1.
perp2());
236 (*lgc_map)[lay].extend_current(gp2.
perp2());
240 (*lgc_map)[lay].add_current();
306 std::ostringstream ostr;
307 ostr <<
"addTECGeometry() gap report:\n";
309 for (
auto &[
layer, gcol] : lgc_map) {
310 gcol.sqrt_elements();
311 if (gcol.find_gap(itvl, 0.5)) {
312 ostr <<
" layer: " <<
layer <<
", gap: " << itvl.
x <<
" -> " << itvl.
y <<
" width = " << itvl.
y - itvl.
x <<
"\n";
313 ostr <<
" all gaps: ";
314 gcol.print_gaps(ostr);
325 const float phase1QBins[] = {
327 2.0, 2.0, 2.0, 2.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 9.5, 9.5, 9.5, 9.5, 9.5, 9.5, 9.5, 9.5,
329 1.0, 1.0, 1.0, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5,
331 1.0, 1.0, 1.0, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5, 10.25, 7.5
338 auto trackerInfo = std::make_unique<mkfit::TrackerInfo>();
345 edm::LogInfo(
"MkFitGeometryESProducer") <<
"Extracting PhaseI geometry";
346 trackerInfo->create_layers(18, 27, 27);
349 throw cms::Exception(
"UnimplementedFeature") <<
"PhaseII geometry extraction";
351 throw cms::Exception(
"UnimplementedFeature") <<
"unsupported / unknowen geometry version";
355 for (
int i = 0;
i < trackerInfo->n_layers(); ++
i) {
356 auto &li = trackerInfo->layer_nc(
i);
359 li.reserve_modules(256);
370 for (
int i = 0;
i < trackerInfo->n_layers(); ++
i) {
371 auto &li = trackerInfo->layer_nc(
i);
373 li.set_propagate_to(li.is_barrel() ? li.r_mean() : li.z_mean());
374 li.set_q_bin(phase1QBins[
i]);
375 unsigned int maxsid = li.shrink_modules();
377 assert(maxsid < 1u << 11);
380 return std::make_unique<MkFitGeometry>(
void set_is_stereo(bool s)
const DetContainer & detsTIB() const
Log< level::Info, true > LogVerbatim
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
void extend_limits(float r, float z)
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
bool find_gap(Interval &itvl, float eps)
void addPixBGeometry(mkfit::TrackerInfo &trk_info)
void set_r_hole_range(float rh1, float rh2)
const DetContainer & detsPXB() const
void addTOBGeometry(mkfit::TrackerInfo &trk_info)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > trackerToken_
const DetContainer & detsPXF() const
bool isStereo(const DetId &id) const
const TrackerTopology * trackerTopo_
void print_gaps(std::ostream &ostr)
unsigned int side(const DetId &id) const
void add_interval(float x, float y)
MkFitGeometryESProducer(const edm::ParameterSet &iConfig)
std::list< Interval > m_coverage
LayerInfo & layer_nc(int l)
constexpr bool useMatched
unsigned int layer(const DetId &id) const
constexpr std::array< uint8_t, layerIndexSize > layer
const Surface::RotationType & rotation() const
The rotation defining the local R.F.
void extend_current(float q)
Basic3DVector< T > x() const
const DetContainer & detsTOB() const
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > ttopoToken_
const TrackerGeometry * trackerGeom_
bool isThere(GeomDetEnumerators::SubDetector subdet) const
void addTIDGeometry(mkfit::TrackerInfo &trk_info)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
unsigned int register_module(ModuleInfo &&mi)
Basic3DVector< T > z() const
void considerPoint(const GlobalPoint &gp, mkfit::LayerInfo &lay_info)
void set_is_pixel(bool p)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
DetId geographicalId() const
The label of this GeomDet.
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Log< level::Info, false > LogInfo
void fillShapeAndPlacement(const GeomDet *det, mkfit::TrackerInfo &trk_info, layer_gap_map_t *lgc_map=nullptr)
const Plane & surface() const
The nominal surface of the GeomDet.
constexpr uint32_t rawId() const
get the raw id
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
const Surface::PositionType & position() const
The position (origin of the R.F.)
void addPixEGeometry(mkfit::TrackerInfo &trk_info)
mkfit::LayerNumberConverter layerNrConv_
std::unique_ptr< MkFitGeometry > produce(const TrackerRecoGeometryRecord &iRecord)
const DetContainer & detsTEC() const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
static constexpr float b2
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
int convertLayerNumber(int det, int lay, bool useMatched, int isStereo, bool posZ) const
void addTIBGeometry(mkfit::TrackerInfo &trk_info)
const DetContainer & detsTID() const
void addTECGeometry(mkfit::TrackerInfo &trk_info)
std::unordered_map< int, GapCollector > layer_gap_map_t