32 CompositeTECWedge::CompositeTECWedge(vector<const GeomDet*>& innerDets, vector<const GeomDet*>& outerDets)
33 : theFrontDets(innerDets.
begin(), innerDets.
end()), theBackDets(outerDets.
begin(), outerDets.
end()) {
34 theDets.assign(theFrontDets.begin(), theFrontDets.end());
35 theDets.insert(theDets.end(), theBackDets.begin(), theBackDets.end());
38 std::sort(theFrontDets.begin(), theFrontDets.end(), DetPhiLess());
39 std::sort(theBackDets.begin(), theBackDets.end(), DetPhiLess());
46 LogDebug(
"TkDetLayers") <<
"DEBUG INFO for CompositeTECWedge"
48 <<
"TECWedge z, perp,innerRadius,outerR: " << this->
position().z() <<
" , "
49 << this->
position().perp() <<
" , " << theDiskSector->innerRadius() <<
" , "
50 << theDiskSector->outerRadius();
52 for (vector<const GeomDet*>::const_iterator it = theFrontDets.begin(); it != theFrontDets.end(); it++) {
53 LogDebug(
"TkDetLayers") <<
"frontDet phi,z,r: " << (*it)->surface().position().phi() <<
" , "
54 << (*it)->surface().position().z() <<
" , " << (*it)->surface().position().perp();
57 for (vector<const GeomDet*>::const_iterator it = theBackDets.begin(); it != theBackDets.end(); it++) {
58 LogDebug(
"TkDetLayers") <<
"backDet phi,z,r: " << (*it)->surface().phi() <<
" , " << (*it)->surface().position().z()
59 <<
" , " << (*it)->surface().position().perp();
67 throw DetLayerException(
"CompositeTECWedge doesn't have GeometricSearchDet components");
73 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of CompositeTECWedge::compatible()!!";
74 return pair<bool, TrajectoryStateOnSurface>();
80 std::vector<DetGroup>&
result)
const {
85 std::vector<DetGroup> closestResult;
88 LogDebug(
"TkDetLayers") <<
"in CompositeTECWedge::groupedCompatibleDets,closestResult.size(): "
89 << closestResult.size();
91 if (closestResult.empty())
99 std::vector<DetGroup> nextResult;
118 pair<bool, double> frontPath = crossing.
pathLength(*theFrontSector);
119 if (!frontPath.first)
129 LogDebug(
"TkDetLayers") <<
"in TECWedge,front crossing r,z,phi: (" << gFrontPoint.perp() <<
"," << gFrontPoint.z()
130 <<
"," << gFrontPoint.phi() <<
")";
132 LogDebug(
"TkDetLayers") <<
"in TECWedge,back crossing r,z,phi: (" << gBackPoint.perp() <<
"," << gBackPoint.z() <<
","
133 << gBackPoint.phi() <<
")" << endl;
154 if (frontDist < backDist) {
165 vector<DetGroup>&
result)
const {
168 LogDebug(
"TkDetLayers") <<
"in CompositeTECWedge,adding GeomDet at r,z,phi: ("
182 bool checkClosest)
const {
188 int negStartIndex = closestIndex - 1;
189 int posStartIndex = closestIndex + 1;
193 posStartIndex = closestIndex;
195 negStartIndex = closestIndex;
200 for (
int idet = negStartIndex; idet >= 0; idet--) {
204 if (!
Adder::add(*sWedge[idet], tsos, prop, est, result))
207 for (
int idet = posStartIndex; idet < static_cast<int>(sWedge.size()); idet++) {
211 if (!
Adder::add(*sWedge[idet], tsos, prop, est, result))
220 auto closeDist =
std::abs((myDets.front()->toLocal(startPos)).
x());
221 for (
unsigned int i = 1;
i < myDets.size();
i++) {
223 if (dist < closeDist) {
int closestDetIndex() const
void groupedCompatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const override __attribute__((hot))
GlobalPoint globalPosition() const
virtual PropagationDirection propagationDirection() const final
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &tsos, PropagationDirection propDir) const __attribute__((hot))
Log< level::Error, false > LogError
~CompositeTECWedge() override __attribute__((cold))
bool overlapInPhi(float phi, const GeomDet &det, float phiWindow)
const Plane & surface() const
The nominal surface of the GeomDet.
const GlobalPoint & position() const
std::vector< const GeomDet * > theFrontDets
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est)
std::pair< bool, double > pathLength(const Plane &plane) override
int findClosestDet(const GlobalPoint &startPos, int sectorId) const
const std::vector< const GeomDet * > & subWedge(int ind) const
std::vector< const GeomDet * > theBackDets
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
int subLayerIndex() const
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const override __attribute__((cold))
Abs< T >::type abs(const T &t)
static int endcapSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
ReferenceCountingPointer< BoundDiskSector > theBackSector
bool phiLess(float phi1, float phi2)
const SubLayerCrossing & other() const
static bool add(const GeometricSearchDet &det, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) __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.
void searchNeighbors(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, float window, std::vector< DetGroup > &result, bool checkClosest) const __attribute__((hot))
const SubLayerCrossing & closest() const
GlobalVector globalMomentum() const
bool addClosest(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const __attribute__((hot))
static int position[264][3]
static void orderAndMergeTwoLevels(std::vector< DetGroup > &&one, std::vector< DetGroup > &&two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)
PositionType position(double s) const override
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
double transverseCurvature() const