31 std::vector< GetTrackTrajInfo::Result >
results;
63 bool posSide = track.
eta() > 0;
77 LogDebug(
"GTTI")<<
" hit in subdet="<<subDet<<
" layer="<<layer;
82 detLayer = tracker->tibLayers()[layer - 1];
84 detLayer = tracker->tobLayers()[layer - 1];
86 detLayer = posSide ? tracker->posTidLayers()[layer - 1] : tracker->negTidLayers()[layer - 1];
88 detLayer = posSide ? tracker->posTecLayers()[layer - 1] : tracker->negTecLayers()[layer - 1];
90 detLayer = tracker->pixelBarrelLayers()[layer - 1];
92 detLayer = posSide ? tracker->posPixelForwardLayers()[layer - 1] : tracker->negPixelForwardLayers()[layer - 1];
97 result.detLayer = detLayer;
100 std::pair<bool, TrajectoryStateOnSurface> layCross = detLayer->
compatible(initTSOS, propagator, estimator);
101 if (layCross.first) {
102 LogDebug(
"GTTI")<<
"crossed layer at "<<
" x="<<layCross.second.globalPosition().x()<<
" y="<<layCross.second.globalPosition().y()<<
" z="<<layCross.second.globalPosition().z();
107 propagator.setPropagationDirection(along);
108 std::vector< GeometricSearchDet::DetWithState > detWithState = detLayer->
compatibleDets(initTSOS, propagator, estimator);
110 if(detWithState.size() > 0) {
113 result.accurate =
true;
114 result.detTSOS = detWithState.front().second;
115 LogDebug(
"GTTI")<<
" Det in this layer compatible with TSOS: subdet="<<subDet<<
" layer="<<layer;
116 LogDebug(
"GTTI")<<
" crossed sensor at x="<<result.detTSOS.globalPosition().x()<<
" y="<<result.detTSOS.globalPosition().y()<<
" z="<<result.detTSOS.globalPosition().z();
121 result.accurate =
false;
122 result.detTSOS = layCross.second;
123 LogDebug(
"GTTI")<<
" WARNING: TSOS not compatible with any det in this layer, despite having a hit in it !";
128 result.valid =
false;
129 LogDebug(
"GTTI")<<
" WARNING: track failed to cross layer, despite having a hit in hit !";
132 results.push_back(result);
virtual std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const =0
static uint32_t getLayer(uint16_t pattern)
GlobalPoint globalPosition() const
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
static bool validHitFilter(uint16_t pattern)
double eta() const
pseudorapidity of momentum vector
edm::ESHandle< TransientTrackBuilder > trkTool_
static uint32_t getSubStructure(uint16_t pattern)
static bool trackerHitFilter(uint16_t pattern)
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
TrajectoryStateOnSurface impactPointState() const
uint16_t getHitPattern(HitCategory category, int position) const
int numberOfHits(HitCategory category) const