19 vector<const GeomDet*>::const_iterator
last,
39 edm::LogError(
"MTDDetLayers") <<
"temporary dummy implementation of MTDDetSector::components()!!";
40 static const vector<const GeometricSearchDet*>
result;
50 LogTrace(
"MTDDetLayers") <<
"MTDDetSector::compatible, sector: \n" 59 LogTrace(
"MTDDetLayers") <<
" DEST: not valid";
69 LogTrace(
"MTDDetLayers") <<
"MTDDetSector::compatibleDets, sector: \n" 70 << (*this) <<
"\n TS at Z,R,phi: " <<
std::fixed << std::setw(14)
75 vector<DetWithState>
result;
78 pair<bool, TrajectoryStateOnSurface> compat =
compatible(startingState, prop, est);
80 LogTrace(
"MTDDetLayers") <<
" MTDDetSector::compatibleDets: not compatible" 81 <<
" (should not have been selected!)";
95 std::vector<std::pair<double, size_t> > tmpDets;
99 double dist2 = (startPos -
theDets[idet]->position()).
mag2();
100 tmpDets.emplace_back(dist2, idet);
101 if (dist2 < dist2Min) {
109 if (
add(idetMin,
result, tsos, prop, est)) {
112 for (
int iside = -1; iside <= 1; iside += 2) {
113 bool isCompatible(
true);
114 size_t idetNew(idetMin);
117 while (isCompatible) {
119 if (idetNew >=
theDets.size()) {
126 isCompatible =
add(idetNew,
result, tsos, prop, est);
136 LogTrace(
"MTDDetLayers") <<
"MTDDetSector::compatibleDets, closest not compatible!";
138 LogTrace(
"MTDDetLayers") <<
"MTDDetSector::compatibleDets, found " <<
result.size() <<
" compatible dets";
148 std::vector<DetWithState>&)
const {
149 edm::LogError(
"MTDDetLayers") <<
"At the moment not a real implementation";
157 edm::LogInfo(
"MTDDetLayers") <<
"dummy implementation of MTDDetSector::groupedCompatibleDets()";
163 vector<DetWithState>&
result,
171 LogTrace(
"MTDDetLayers") <<
"MTDDetSector::compatibleDets found compatible det idetMin " << idet
172 <<
" detId = " <<
theDets[idet]->geographicalId().rawId() <<
" at " 181 os <<
" MTDDetSector at " <<
std::fixed <<
id.specificSurface().position() << std::endl
182 <<
" L/W/T : " << std::setw(14) <<
id.specificSurface().bounds().length() <<
" / " << std::setw(14)
183 <<
id.specificSurface().bounds().width() <<
" / " << std::setw(14) <<
id.specificSurface().bounds().thickness()
185 <<
" rmin : " << std::setw(14) <<
id.specificSurface().innerRadius() << std::endl
186 <<
" rmax : " << std::setw(14) <<
id.specificSurface().outerRadius() << std::endl
187 <<
" phi ref : " << std::setw(14) <<
id.specificSurface().position().phi() << std::endl
188 <<
" phi w/2 : " << std::setw(14) <<
id.specificSurface().phiHalfExtension() << std::endl;
193 vector<DetWithState>&
result,
197 for (
int iside = -1; iside <= 1; iside += 2) {
198 bool isCompatible(
true);
199 size_t idetNew(idetMin);
201 while (isCompatible) {
203 if (idetNew >=
theDets.size()) {
206 isCompatible =
add(idetNew,
result, tsos, prop, est);
size_t hshiftETL(const uint32_t detid, const int horizontalShift) const
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &prop, const MeasurementEstimator &est) const override
LocalPoint localPosition() const
Geom::Phi< T > phi() const
int closest(std::vector< int > const &vec, int value)
const BoundDiskSector & specificSurface() const
const std::vector< const GeometricSearchDet * > & components() const override
Returns basic components, if any.
std::vector< const GeomDet * > theDets
void compatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetWithState > &result) const override
Log< level::Error, false > LogError
GeomDetCompatibilityChecker theCompatibilityChecker
void setDisk(BoundDiskSector *diskS)
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
MTDDetSector(std::vector< const GeomDet *>::const_iterator first, std::vector< const GeomDet *>::const_iterator last, const MTDTopology &topo)
Construct from iterators on GeomDet*.
size_t vshift(const uint32_t detid, const int verticalShift, size_t &closest) const
GlobalPoint globalPosition() const
static std::pair< bool, TrajectoryStateOnSurface > isCompatible(const GeomDet *theDet, const TrajectoryStateOnSurface &ts, const Propagator &prop, const MeasurementEstimator &est)
std::ostream & operator<<(std::ostream &os, const MTDDetSector &id)
std::vector< DetGroup > groupedCompatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const override
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const override
Log< level::Info, false > LogInfo
const std::vector< const GeomDet * > & basicComponents() const override
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
const MTDTopology * topo_
GlobalVector globalMomentum() const
size_t vshiftETL(const uint32_t detid, const int verticalShift, size_t &closest) const
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
bool add(size_t idet, std::vector< DetWithState > &result, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est) const
void compatibleDetsLine(const size_t idetMin, std::vector< DetWithState > &result, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est) const
size_t hshift(const uint32_t detid, const int horizontalShift) const