33 LogDebug(
"TkDetLayers") <<
"==== DEBUG TIBRing =====";
37 for (vector<const GeomDet*>::const_iterator
i =
theDets.begin();
i !=
theDets.end();
i++) {
38 LogDebug(
"TkDetLayers") <<
"Ring's Det pos z,perp,eta,phi: " << (**i).position().z() <<
" , " 39 << (**i).position().perp() <<
" , " << (**i).position().eta() <<
" , " 40 << (**i).position().phi();
42 LogDebug(
"TkDetLayers") <<
"==== end DEBUG TIBRing =====";
53 for (vector<const GeomDet*>::const_iterator
i =
first;
i !=
last;
i++) {
54 float r = (**i).surface().position().perp();
61 throw DetLayerException(
"TIBRing construction failed: detectors not at constant radius");
65 vector<const GeomDet*>::const_iterator
last) {
66 vector<double> adj_diff(
last -
first - 1);
67 for (
int i = 0; i < static_cast<int>(adj_diff.size());
i++) {
68 vector<const GeomDet*>::const_iterator curent =
first +
i;
69 adj_diff[
i] = (**(curent + 1)).surface().position().phi() - (**curent).surface().position().phi();
76 edm::LogError(
"TkDetLayers") <<
"TIBRing Warning: not periodic. ndets=" << ndets;
77 for (
int j = 0;
j < ndets;
j++) {
79 <<
theDets[
j]->surface().position().phi() <<
") ";
89 if (
normal.dot(radial) <= 0)
105 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of TIBRing::compatible()!!";
106 return pair<bool, TrajectoryStateOnSurface>();
112 vector<DetGroup>&
result)
const {
113 vector<DetGroup> closestResult;
121 if (closestResult.empty()) {
129 float detWidth = closestGel.det()->surface().bounds().width();
130 if (crossings->nextDistance < detWidth +
window) {
131 vector<DetGroup> nextResult;
134 if (crossings->closestIndex < crossings->nextIndex) {
142 result.swap(closestResult);
145 result.swap(closestResult);
149 if (
window > 0.5
f * detWidth) {
159 vector<DetGroup>&
result)
const {
167 int quarter =
theDets.size() / 4;
168 for (
int idet = negStart; idet >= negStart - quarter + 1; idet--) {
172 vector<DetGroup> tmp1;
173 if (!
Adder::add(*neighbor, tsos, prop, est, tmp1))
175 vector<DetGroup> tmp2;
177 vector<DetGroup> newResult;
181 for (
int idet = posStart; idet < posStart + quarter - 1; idet++) {
185 vector<DetGroup> tmp1;
186 if (!
Adder::add(*neighbor, tsos, prop, est, tmp1))
188 vector<DetGroup> tmp2;
190 vector<DetGroup> newResult;
217 LocalPoint closestPos = Crossing::positionOnly(cylPoint, cylDir,
rho, closestPlane);
218 float closestDist = closestPos.
x();
225 LocalPoint nextPos = Crossing::positionOnly(cylPoint, cylDir,
rho, nextPlane);
226 float nextDist = nextPos.x();
const BoundSurface & surface() const override
The surface of the GeometricSearchDet.
TIBRing(std::vector< const GeomDet *> &theGeomDets) __attribute__((cold))
Local3DVector LocalVector
static int barrelSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
returns 0 if barrel layer crossed from inside, 1 if from outside
BinFinderType theBinFinder
int binIndex(T phi) const override
returns an index in the valid range for the bin that contains phi
static const char * normal
void computeHelicity() __attribute__((cold))
GeometricSearchDet::DetWithState DetWithState
std::optional< SubRingCrossings > computeCrossings(const TrajectoryStateOnSurface &startingState, PropagationDirection propDir) const __attribute__((hot))
Geom::Phi< T > phi() const
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
Global3DPoint GlobalPoint
std::vector< const GeomDet * > theDets
virtual PropagationDirection propagationDirection() const final
DirectionType direction() const
Log< level::Error, false > LogError
void checkPeriodicity(std::vector< const GeomDet *>::const_iterator first, std::vector< const GeomDet *>::const_iterator last) __attribute__((cold))
double stat_mean(const CONT &cont)
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const override __attribute__((cold))
ReferenceCountingPointer< BoundCylinder > theCylinder
GlobalPoint globalPosition() const
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const __attribute__((hot))
void checkRadius(std::vector< const GeomDet *>::const_iterator first, std::vector< const GeomDet *>::const_iterator last) __attribute__((cold))
Abs< T >::type abs(const T &t)
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
void searchNeighbors(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubRingCrossings &crossings, float window, std::vector< DetGroup > &result) const __attribute__((hot))
bool phiLess(float phi1, float phi2)
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
virtual const BoundCylinder & specificSurface() const
Return the ring surface as a.
const Plane & surface() const
The nominal surface of the GeomDet.
const PositionType & position() const
double transverseCurvature() const
PeriodicBinFinderInPhi< float > BinFinderType
GlobalVector globalMomentum() const
~TIBRing() override __attribute__((cold))
void add(std::map< std::string, TH1 *> &h, TH1 *hist)
const std::vector< const GeometricSearchDet * > & components() const override __attribute__((cold))
Returns basic components, if any.
PositionType position() const
void groupedCompatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const override __attribute__((hot))
Vector2DBase< float, LocalTag > Local2DVector
static void orderAndMergeTwoLevels(std::vector< DetGroup > &&one, std::vector< DetGroup > &&two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState