37 for (
unsigned int i = 0;
i < dets.size();
i++) {
40 DetInfo detInfo = this->interpretDetId(dets[
i]->geographicalId());
41 uint32_t subDet = detInfo.first;
45 if (this->
barrel(subDet)) {
46 r_or_z = dets[
i]->position().perp();
54 if (rangeRorZ_.find(detInfo) != rangeRorZ_.end()) {
55 minRZ = rangeRorZ_[detInfo].first;
56 maxRZ = rangeRorZ_[detInfo].second;
60 if (minRZ > r_or_z) minRZ = r_or_z;
61 if (maxRZ < r_or_z) maxRZ = r_or_z;
62 rangeRorZ_[detInfo] = pair<double, double>(minRZ, maxRZ);
67 RZrangeMap::const_iterator
d;
68 for (d = rangeRorZ_.begin(); d != rangeRorZ_.end(); d++) {
70 pair<double, double> rangeRZ = d->second;
91 throw cms::Exception(
"RecoParticleFlow",
"Found DetId that is not in Tracker");
102 pair< PFCheckHitPattern::PFTrackHitInfo, PFCheckHitPattern::PFTrackHitInfo>
113 if (!geomInitDone_) this->
init(tkerGeomHandle_);
120 unsigned int nHitBefore = 0;
121 unsigned int nHitAfter = 0;
128 DetInfo detInfo(subDet, layer);
129 double maxRZ = rangeRorZ_[detInfo].second;
131 if (this->
barrel(subDet)) {
135 if (fabs(vert.
position().
z()) > maxRZ) nHitBefore++;
143 unsigned int nMissHitAfter = 0;
144 unsigned int nMissHitBefore = 0;
151 DetInfo detInfo(subDet, layer);
152 double minRZ = rangeRorZ_[detInfo].first;
156 if (this->
barrel(subDet)) {
158 else nMissHitBefore++;
160 if (fabs(vert.
position().
z()) < minRZ) nMissHitAfter++;
161 else nMissHitBefore++;
171 return pair< PFTrackHitInfo, PFTrackHitInfo>(trackToVertex, trackFromVertex);
178 cout<<
"=== Hits on Track ==="<<endl;
180 cout<<
"=== Hits before track ==="<<endl;
190 cout<<
"hit "<<
i<<
" subdet="<<subdet<<
" layer="<<layer<<
" type "<<hp.
getHitType(hit)<<endl;
value_type const * get() const
static uint32_t getLayer(uint16_t pattern)
unsigned int layer() const
layer id
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
void print(const reco::TrackBaseRef track) const
Print hit pattern on track.
unsigned int layer() const
layer id
static bool validHitFilter(uint16_t pattern)
PFTrackHitFullInfo analyze(edm::ESHandle< TrackerGeometry >, const reco::TrackBaseRef track, const TransientVertex &vert)
std::pair< unsigned int, unsigned int > PFTrackHitInfo
static DetInfo interpretDetId(DetId detId)
static uint32_t getHitType(uint16_t pattern)
GlobalPoint position() const
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
unsigned int disk() const
disk id
static uint32_t getSubStructure(uint16_t pattern)
static bool trackerHitFilter(uint16_t pattern)
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
unsigned int wheel() const
wheel id
unsigned int layer() const
layer id
std::pair< uint32_t, uint32_t > DetInfo
static int position[264][3]
void init(edm::ESHandle< TrackerGeometry >)
Create map indicating r/z values of all layers/disks.
uint16_t getHitPattern(HitCategory category, int position) const
std::vector< GeomDet const * > DetContainer
static bool barrel(uint32_t subDet)
Return a bool indicating if a given subdetector is in the barrel.
int numberOfHits(HitCategory category) const
unsigned int wheel() const
wheel id