31 for (
unsigned int i = 0;
i < dets.size();
i++) {
33 auto detId = dets[
i]->geographicalId();
34 auto detInfo =
DetInfo(detId.subdetId(), tkerTopo->
layer(detId));
35 uint32_t subDet = detInfo.first;
39 if (this->
barrel(subDet)) {
40 r_or_z = dets[
i]->position().perp();
48 if (rangeRorZ_.find(detInfo) != rangeRorZ_.end()) {
49 minRZ = rangeRorZ_[detInfo].first;
50 maxRZ = rangeRorZ_[detInfo].second;
58 rangeRorZ_[detInfo] = pair<double, double>(minRZ, maxRZ);
63 RZrangeMap::const_iterator
d;
64 for (d = rangeRorZ_.begin(); d != rangeRorZ_.end(); d++) {
66 pair<double, double> rangeRZ = d->second;
89 this->
init(tkerTopo, tkerGeom);
96 unsigned int nHitBefore = 0;
97 unsigned int nHitAfter = 0;
104 DetInfo detInfo(subDet, layer);
105 double maxRZ = rangeRorZ_[detInfo].second;
107 if (this->
barrel(subDet)) {
123 unsigned int nMissHitAfter = 0;
124 unsigned int nMissHitBefore = 0;
131 DetInfo detInfo(subDet, layer);
132 double minRZ = rangeRorZ_[detInfo].first;
136 if (this->
barrel(subDet)) {
153 return pair<PFTrackHitInfo, PFTrackHitInfo>(trackToVertex, trackFromVertex);
160 cout <<
"=== Hits on Track ===" << endl;
162 cout <<
"=== Hits before track ===" << endl;
172 cout <<
"hit " <<
i <<
" subdet=" << subdet <<
" layer=" << layer <<
" type " << hp.
getHitType(hit) << endl;
value_type const * get() const
static uint32_t getLayer(uint16_t pattern)
static const char category[]
SiStripDetInfo::DetInfo DetInfo
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
void print(const reco::TrackBaseRef track) const
Print hit pattern on track.
static bool missingHitFilter(uint16_t pattern)
constexpr std::array< uint8_t, layerIndexSize > layer
static bool validHitFilter(uint16_t pattern)
std::pair< unsigned int, unsigned int > PFTrackHitInfo
std::vector< const GeomDet * > DetContainer
PFTrackHitFullInfo analyze(const TrackerTopology *tkerTopo, const TrackerGeometry *tkerGeom, const reco::TrackBaseRef track, const TransientVertex &vert)
static uint32_t getHitType(uint16_t pattern)
GlobalPoint position() const
int numberOfAllHits(HitCategory category) const
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
static constexpr auto TOB
void init(const TrackerTopology *, const TrackerGeometry *)
Create map indicating r/z values of all layers/disks.
static uint32_t getSubStructure(uint16_t pattern)
static bool trackerHitFilter(uint16_t pattern)
static constexpr auto TIB
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
unsigned int layer(const DetId &id) const
std::pair< uint32_t, uint32_t > DetInfo
static int position[264][3]
uint16_t getHitPattern(HitCategory category, int position) const
static bool barrel(uint32_t subDet)
Return a bool indicating if a given subdetector is in the barrel.