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;
101 if (
hp.trackerHitFilter(
hit) &&
hp.validHitFilter(
hit)) {
102 uint32_t subDet =
hp.getSubStructure(
hit);
103 uint32_t layer =
hp.getLayer(
hit);
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;
169 if (
hp.trackerHitFilter(
hit)) {
170 uint32_t subdet =
hp.getSubStructure(
hit);
171 uint32_t layer =
hp.getLayer(
hit);
172 cout <<
"hit " <<
i <<
" subdet=" << subdet <<
" layer=" << layer <<
" type " <<
hp.getHitType(
hit) << endl;
static uint32_t getLayer(uint16_t pattern)
GlobalPoint position() const
void print(const reco::TrackBaseRef track) const
Print hit pattern on track.
SiStripDetInfo::DetInfo DetInfo
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
static bool missingHitFilter(uint16_t pattern)
unsigned int layer(const DetId &id) const
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)
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
std::pair< uint32_t, uint32_t > DetInfo
static int position[264][3]
static bool barrel(uint32_t subDet)
Return a bool indicating if a given subdetector is in the barrel.