44 for (
unsigned int i = 0;
i < dets.size();
i++) {
48 uint32_t subDet = detInfo.first;
52 if (this->
barrel(subDet)) {
53 r_or_z = dets[
i]->position().perp();
67 if (minRZ > r_or_z) minRZ = r_or_z;
68 if (maxRZ < r_or_z) maxRZ = r_or_z;
69 rangeRorZ_[detInfo] = std::pair<double, double>(minRZ, maxRZ);
72 #ifdef DEBUG_CHECKHITPATTERN
73 RZrangeMap::const_iterator d;
76 std::pair<double, double> rangeRZ = d->second;
77 std::std::cout<<
"CHECKHITPATTERN: Tracker subdetector type="<<detInfo.first<<
" layer="<<detInfo.second
78 <<
" has min r (or z) ="<<rangeRZ.first<<
" and max r (or z) = "<<rangeRZ.second<<std::std::endl;
99 throw cms::Exception(
"NotFound",
"Found DetId that is not in Tracker");
126 bool trkGoesInsideOut = fabs(reco::deltaPhi<const GlobalVector, const GlobalPoint>(p3_trk, vert.
position())) < 0.5*
M_PI;
128 LogDebug(
"CHP") <<
"TRACK: in-->out ? "
130 <<
" dxy=" << track.
dxy()
131 <<
" sz=" <<track.
dz()
132 <<
" eta=" <<track.
eta()
145 ip = fixTrackHitPattern.
analyze(iSetup, track).innerHitPattern;
150 unsigned int nHitBefore = 0;
156 DetInfo detInfo(subDet, layer);
159 if (this->
barrel(subDet)) {
161 if (vert.
position().
perp() > maxRZ && trkGoesInsideOut) nHitBefore++;
163 if (fabs(vert.
position().
z()) > maxRZ) nHitBefore++;
170 unsigned int nMissHitAfter = 0;
177 DetInfo detInfo(subDet, layer);
180 if (this->
barrel(subDet)) {
183 if (vert.
position().
perp() < minRZ || ! trkGoesInsideOut) nMissHitAfter++;
185 if (fabs(vert.
position().
z()) < minRZ) nMissHitAfter++;
199 std::cout<<
"=== Hits on Track ==="<<std::endl;
201 std::cout<<
"=== Hits before track ==="<<std::endl;
211 std::cout<<
"hit "<<
i<<
" subdet="<<subdet<<
" layer="<<layer<<
" type "<<hp.
getHitType(hit)<<std::endl;
static uint32_t getLayer(uint16_t pattern)
std::map< DetInfo, std::pair< double, double > > RZrangeMap
unsigned int tibLayer(const DetId &id) const
Result analyze(const edm::EventSetup &iSetup, const reco::Track &track, const VertexState &vert, bool fixHitPattern=true)
std::pair< uint32_t, uint32_t > DetInfo
unsigned int pxfDisk(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
static bool missingHitFilter(uint16_t pattern)
GlobalPoint position() const
int numberOfValidStripTOBHits() const
static bool validHitFilter(uint16_t pattern)
unsigned int missHitsAfterVert
unsigned int hitsInFrontOfVert
double eta() const
pseudorapidity of momentum vector
Result analyze(const edm::EventSetup &iSetup, const reco::Track &track)
static uint32_t getHitType(uint16_t pattern)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static uint32_t getSubStructure(uint16_t pattern)
unsigned int pxbLayer(const DetId &id) const
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
T const * product() const
int numberOfValidStripTIBHits() const
static RZrangeMap rangeRorZ_
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...
unsigned int tecWheel(const DetId &id) const
std::vector< GeomDet const * > DetContainer
unsigned int tobLayer(const DetId &id) const
int numberOfHits(HitCategory category) const
void print(const reco::Track &track) const