45 << inner.
eta() <<
'/' << outer.
eta() << std::endl;
47 std::vector<const TrackingRecHit *> hits;
49 DPRINT(
"TrackMerger") <<
"Inner track hits: " << std::endl;
51 hits.push_back(&**it);
53 DetId id(hits.back()->geographicalId());
54 PRINT <<
" subdet " <<
id.subdetId() <<
" layer " <<
theTrkTopo->layer(
id) <<
" valid "
55 << hits.back()->
isValid() <<
" detid: " <<
id() << std::endl;
58 DPRINT(
"TrackMerger") <<
"Outer track hits: " << std::endl;
62 DetId lastId(hits.back()->geographicalId());
64 unsigned int lastLayer =
theTrkTopo->layer(lastId);
68 int thisSubdet =
id.subdetId();
69 if (thisSubdet > lastSubdet || (thisSubdet == lastSubdet &&
theTrkTopo->layer(
id) > lastLayer)) {
71 PRINT <<
" adding subdet " <<
id.subdetId() <<
" layer " <<
theTrkTopo->layer(
id) <<
" valid "
72 << hit->
isValid() <<
" detid: " <<
id() << std::endl;
74 PRINT <<
" skipping subdet " << thisSubdet <<
" layer " <<
theTrkTopo->layer(
id) <<
" valid "
75 << hit->
isValid() <<
" detid: " <<
id() << std::endl;
91 unsigned int nhits = hits.size();
97 std::reverse(hits.begin(), hits.end());
102 std::sort(hits.begin(), hits.end(), MomentumSort(
v, &*
theGeometry));
103 for (
auto hit : hits)
edm::ESHandle< TrackerTopology > theTrkTopo
tuple ret
prodAgent to be discontinued
uint16_t *__restrict__ id
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
void sortByHitPosition(const GlobalVector &v, const std::vector< const TrackingRecHit * > &hits, TrackCandidate::RecHitContainer &ownHits) const
const Vector & momentum() const
track momentum vector
const math::XYZPoint & outerPosition() const
position of the outermost hit
void addSecondTrackHits(std::vector< const TrackingRecHit * > &hits, const reco::Track &outer) const
const math::XYZPoint & innerPosition() const
position of the innermost hit
TrackAlgorithm algo() const
double eta() const
pseudorapidity of momentum vector
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
Abs< T >::type abs(const T &t)
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
XYZVectorD XYZVector
spatial vector with cartesian internal representation
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
DetId geographicalId() const
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
edm::ESHandle< MagneticField > theMagField
edm::ESHandle< TrackerGeometry > theGeometry
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.