23 theDets(theGeomDets.
begin(),theGeomDets.
end())
37 LogDebug(
"TkDetLayers") <<
"==== DEBUG TIBRing =====" ;
38 LogDebug(
"TkDetLayers") <<
"radius, thickness, lenght: "
39 << theCylinder->radius() <<
" , "
40 << theCylinder->bounds().thickness() <<
" , "
41 << theCylinder->bounds().length() ;
43 for (vector<const GeomDet*>::const_iterator
i=
theDets.begin();
45 LogDebug(
"TkDetLayers") <<
"Ring's Det pos z,perp,eta,phi: "
46 << (**i).position().z() <<
" , "
47 << (**i).position().perp() <<
" , "
48 << (**i).position().eta() <<
" , "
49 << (**i).position().phi() ;
51 LogDebug(
"TkDetLayers") <<
"==== end DEBUG TIBRing =====" ;
57 const vector<const GeometricSearchDet*>&
64 vector<const GeomDet*>::const_iterator
last)
69 for (vector<const GeomDet*>::const_iterator
i=first;
i!=
last;
i++) {
70 float r = (**i).surface().position().perp();
71 if (r < rMin) rMin =
r;
72 if (r > rMax) rMax =
r;
75 "TIBRing construction failed: detectors not at constant radius");
80 vector<const GeomDet*>::const_iterator
last)
82 vector<double> adj_diff(last-first-1);
83 for (
int i=0; i < static_cast<int>(adj_diff.size());
i++) {
84 vector<const GeomDet*>::const_iterator curent = first +
i;
85 adj_diff[
i] = (**(curent+1)).surface().position().phi() -
86 (**curent).surface().position().phi();
91 if (
std::abs(step-phi_step)/phi_step > 0.01) {
92 int ndets = last-
first;
93 edm::LogError(
"TkDetLayers") <<
"TIBRing Warning: not periodic. ndets=" << ndets ;
94 for (
int j=0;
j<ndets;
j++) {
96 <<
"," <<
theDets[
j]->surface().position().phi() <<
") " ;
107 if(normal.
dot(radial)<=0)normal*=-1;
124 pair<bool, TrajectoryStateOnSurface>
127 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of TIBRing::compatible()!!" ;
128 return pair<bool,TrajectoryStateOnSurface>();
136 vector<DetGroup> &
result)
const
138 vector<DetGroup> closestResult;
145 tsos, prop, est, closestResult);
147 if(closestResult.empty()){
156 float detWidth = closestGel.det()->surface().bounds().width();
158 vector<DetGroup> nextResult;
160 tsos, prop, est, nextResult)) {
174 result.swap(closestResult);
177 result.swap(closestResult);
181 if (window > 0.5
f*detWidth) {
191 vector<DetGroup>&
result)
const
200 int quarter =
theDets.size()/4;
201 for (
int idet=negStart; idet >= negStart - quarter+1; idet--) {
205 vector<DetGroup> tmp1;
206 if (!
Adder::add( *neighbor, tsos, prop, est, tmp1))
break;
207 vector<DetGroup> tmp2; tmp2.swap(result);
208 vector<DetGroup> newResult;
210 result.swap(newResult);
212 for (
int idet=posStart; idet < posStart + quarter-1; idet++) {
216 vector<DetGroup> tmp1;
217 if (!
Adder::add( *neighbor, tsos, prop, est, tmp1))
break;
218 vector<DetGroup> tmp2; tmp2.swap(result);
219 vector<DetGroup> newResult;
221 result.swap(newResult);
249 LocalPoint closestPos = Crossing::positionOnly( cylPoint, cylDir, rho, closestPlane);
250 float closestDist = closestPos.
x();
254 closestIndex+1 : closestIndex-1;
257 LocalPoint nextPos = Crossing::positionOnly( cylPoint, cylDir, rho, nextPlane);
258 float nextDist = nextPos.x();
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Local3DVector LocalVector
~TIBRing() __attribute__((cold))
static int barrelSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
returns 0 if barrel layer crossed from inside, 1 if from outside
BinFinderType theBinFinder
virtual const BoundSurface & surface() const
The surface of the GeometricSearchDet.
TIBRing(std::vector< const GeomDet * > &theGeomDets) __attribute__((cold))
void computeHelicity() __attribute__((cold))
virtual std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const __attribute__((cold))
Geom::Phi< T > phi() const
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
Global3DPoint GlobalPoint
std::vector< const GeomDet * > theDets
PositionType position() const
GlobalPoint globalPosition() const
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
Vector2DBase< float, LocalTag > Local2DVector
virtual PropagationDirection propagationDirection() const final
bool neighbor(int endcap, int sector, int SectIndex, int id, int sub, int station)
virtual const std::vector< const GeometricSearchDet * > & components() const __attribute__((cold))
Returns basic components, if any.
double stat_mean(const CONT &cont)
const Plane & surface() const
The nominal surface of the GeomDet.
void checkRadius(std::vector< const GeomDet * >::const_iterator first, std::vector< const GeomDet * >::const_iterator last) __attribute__((cold))
virtual int binIndex(T phi) const
returns an index in the valid range for the bin that contains phi
virtual void groupedCompatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const __attribute__((hot))
ReferenceCountingPointer< BoundCylinder > theCylinder
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const __attribute__((hot))
Abs< T >::type abs(const T &t)
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
void searchNeighbors(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubRingCrossings &crossings, float window, std::vector< DetGroup > &result) const __attribute__((hot))
PeriodicBinFinderInPhi< float > BinFinderType
virtual const BoundCylinder & specificSurface() const
Return the ring surface as a.
SubRingCrossings computeCrossings(const TrajectoryStateOnSurface &startingState, PropagationDirection propDir) const __attribute__((hot))
GlobalVector globalMomentum() const
DirectionType direction() const
void checkPeriodicity(std::vector< const GeomDet * >::const_iterator first, std::vector< const GeomDet * >::const_iterator last) __attribute__((cold))
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
static void orderAndMergeTwoLevels(std::vector< DetGroup > &&one, std::vector< DetGroup > &&two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)
const PositionType & position() const
double transverseCurvature() const