42 for (
unsigned int i = 0;
i < dets.size();
i++) {
46 uint32_t subDet = detInfo.first;
50 if (this->
barrel(subDet)) {
51 r_or_z = dets[
i]->position().perp();
65 if (minRZ > r_or_z) minRZ = r_or_z;
66 if (maxRZ < r_or_z) maxRZ = r_or_z;
67 rangeRorZ_[detInfo] = std::pair<double, double>(minRZ, maxRZ);
70 #ifdef DEBUG_CHECKHITPATTERN 71 RZrangeMap::const_iterator
d;
74 std::pair<double, double> rangeRZ = d->second;
75 std::std::cout<<
"CHECKHITPATTERN: Tracker subdetector type="<<detInfo.first<<
" layer="<<detInfo.second
76 <<
" has min r (or z) ="<<rangeRZ.first<<
" and max r (or z) = "<<rangeRZ.second<<std::std::endl;
108 bool trkGoesInsideOut = fabs(reco::deltaPhi<const GlobalVector, const GlobalPoint>(p3_trk, vert.
position())) < 0.5*
M_PI;
110 LogDebug(
"CHP") <<
"TRACK: in-->out ? " 112 <<
" dxy=" << track.
dxy()
113 <<
" sz=" <<track.
dz()
114 <<
" eta=" <<track.
eta()
125 unsigned int nHitBefore = 0;
131 DetInfo detInfo(subDet, layer);
134 if (this->
barrel(subDet)) {
136 if (vert.
position().
perp() > maxRZ && trkGoesInsideOut) nHitBefore++;
138 if (fabs(vert.
position().
z()) > maxRZ) nHitBefore++;
145 unsigned int nMissHitAfter = 0;
152 DetInfo detInfo(subDet, layer);
155 if (this->
barrel(subDet)) {
158 if (vert.
position().
perp() < minRZ || ! trkGoesInsideOut) nMissHitAfter++;
160 if (fabs(vert.
position().
z()) < minRZ) nMissHitAfter++;
174 std::cout<<
"=== Hits on Track ==="<<std::endl;
176 std::cout<<
"=== Hits before track ==="<<std::endl;
186 std::cout<<
"hit "<<
i<<
" subdet="<<subdet<<
" layer="<<layer<<
" type "<<hp.
getHitType(hit)<<std::endl;
static uint32_t getLayer(uint16_t pattern)
std::pair< uint32_t, uint32_t > DetInfo
Result operator()(const reco::Track &track, const VertexState &vert) const
reco::TransientTrack build(const reco::Track *p) const
static bool missingHitFilter(uint16_t pattern)
GlobalPoint position() const
int numberOfValidStripTOBHits() const
static bool validHitFilter(uint16_t pattern)
U second(std::pair< T, U > const &p)
unsigned int missHitsAfterVert
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
unsigned int hitsInFrontOfVert
double eta() const
pseudorapidity of momentum vector
static uint32_t getHitType(uint16_t pattern)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int numberOfAllHits(HitCategory category) const
static uint32_t getSubStructure(uint16_t pattern)
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
void init(const edm::EventSetup &iSetup)
static bool trackerHitFilter(uint16_t pattern)
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
static DetInfo interpretDetId(DetId detId, const TrackerTopology *tTopo)
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const
static void print(const reco::Track &track)
int numberOfValidStripTIBHits() const
unsigned int layer(const DetId &id) const
std::vector< const GeomDet * > DetContainer
static int position[264][3]
int numberOfValidPixelHits() const
edm::ESHandle< TransientTrackBuilder > trkTool_
static bool barrel(uint32_t subDet)
uint16_t getHitPattern(HitCategory category, int position) const
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
T const * product() const