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;
122 if (closestResult.empty()) {
130 float detWidth = closestGel.det()->surface().bounds().width();
132 vector<DetGroup> nextResult;
143 result.swap(closestResult);
146 result.swap(closestResult);
150 if (
window > 0.5
f * detWidth) {
160 vector<DetGroup>&
result)
const {
168 int quarter =
theDets.size() / 4;
169 for (
int idet = negStart; idet >= negStart - quarter + 1; idet--) {
173 vector<DetGroup> tmp1;
174 if (!
Adder::add(*neighbor, tsos, prop, est, tmp1))
176 vector<DetGroup> tmp2;
178 vector<DetGroup> newResult;
182 for (
int idet = posStart; idet < posStart + quarter - 1; idet++) {
186 vector<DetGroup> tmp1;
187 if (!
Adder::add(*neighbor, tsos, prop, est, tmp1))
189 vector<DetGroup> tmp2;
191 vector<DetGroup> newResult;
218 LocalPoint closestPos = Crossing::positionOnly(cylPoint, cylDir,
rho, closestPlane);
219 float closestDist = closestPos.
x();
226 LocalPoint nextPos = Crossing::positionOnly(cylPoint, cylDir,
rho, nextPlane);
227 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
void computeHelicity() __attribute__((cold))
GeometricSearchDet::DetWithState DetWithState
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
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))
SubRingCrossings computeCrossings(const TrajectoryStateOnSurface &startingState, PropagationDirection propDir) const __attribute__((hot))
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