22 vector<const GeomDet*>::const_iterator
last,
42 edm::LogError(
"MTDDetLayers") <<
"temporary dummy implementation of MTDDetSector::components()!!";
43 static const vector<const GeometricSearchDet*>
result;
53 LogTrace(
"MTDDetLayers") <<
"MTDDetSector::compatible, sector: \n" 62 LogTrace(
"MTDDetLayers") <<
" DEST: not valid";
72 LogTrace(
"MTDDetLayers") <<
"MTDDetSector::compatibleDets, sector: \n" 73 << (*this) <<
"\n TS at Z,R,phi: " <<
std::fixed << std::setw(14)
78 vector<DetWithState>
result;
81 pair<bool, TrajectoryStateOnSurface> compat =
compatible(startingState, prop, est);
83 LogTrace(
"MTDDetLayers") <<
" MTDDetSector::compatibleDets: not compatible" 84 <<
" (should not have been selected!)";
98 std::vector<std::pair<double, size_t> > tmpDets;
102 double dist2 = (startPos -
theDets[idet]->position()).
mag2();
103 tmpDets.emplace_back(dist2, idet);
104 if (dist2 < dist2Min) {
112 if (
add(idetMin,
result, tsos, prop, est)) {
115 for (
int iside = -1; iside <= 1; iside += 2) {
116 bool isCompatible(
true);
117 size_t idetNew(idetMin);
120 while (isCompatible) {
122 if (idetNew >=
theDets.size()) {
129 isCompatible =
add(idetNew,
result, tsos, prop, est);
139 LogTrace(
"MTDDetLayers") <<
"MTDDetSector::compatibleDets, closest not compatible!";
141 LogTrace(
"MTDDetLayers") <<
"MTDDetSector::compatibleDets, found " <<
result.size() <<
" compatible dets";
151 std::vector<DetWithState>&)
const {
152 edm::LogError(
"MTDDetLayers") <<
"At the moment not a real implementation";
160 edm::LogInfo(
"MTDDetLayers") <<
"dummy implementation of MTDDetSector::groupedCompatibleDets()";
166 vector<DetWithState>&
result,
174 LogTrace(
"MTDDetLayers") <<
"MTDDetSector::compatibleDets found compatible det idetMin " << idet
175 <<
" detId = " <<
theDets[idet]->geographicalId().rawId() <<
" at " 184 auto fround = [&](
double in) {
185 std::stringstream
ss;
192 <<
" L/W/T : " << fround(
id.specificSurface().
bounds().length()) <<
" / " 195 <<
" rmin : " << fround(
id.specificSurface().
innerRadius()) << std::endl
196 <<
" rmax : " << fround(
id.specificSurface().
outerRadius()) << std::endl
197 <<
" phi ref : " << fround(
id.specificSurface().
position().
phi()) << std::endl
198 <<
" phi w/2 : " << fround(
id.specificSurface().phiHalfExtension()) << std::endl;
203 vector<DetWithState>&
result,
207 for (
int iside = -1; iside <= 1; iside += 2) {
208 bool isCompatible(
true);
209 size_t idetNew(idetMin);
211 while (isCompatible) {
213 if (idetNew >=
theDets.size()) {
216 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
constexpr valType roundVecIfNear0(valType value, double tolerance=1.e-7)
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
constexpr valType roundIfNear0(valType value, double tolerance=1.e-7)
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
static int position[264][3]
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