41 for (
unsigned int i = 0;
i < dets.size();
i++) {
44 DetInfo detInfo = this->interpretDetId(dets[
i]->geographicalId());
45 uint32_t subDet = detInfo.first;
49 if (this->
barrel(subDet)) {
50 r_or_z = dets[
i]->position().perp();
58 if (rangeRorZ_.find(detInfo) != rangeRorZ_.end()) {
59 minRZ = rangeRorZ_[detInfo].first;
60 maxRZ = rangeRorZ_[detInfo].second;
64 if (minRZ > r_or_z) minRZ = r_or_z;
65 if (maxRZ < r_or_z) maxRZ = r_or_z;
66 rangeRorZ_[detInfo] = pair<double, double>(minRZ, maxRZ);
71 RZrangeMap::const_iterator d;
72 for (d = rangeRorZ_.begin(); d != rangeRorZ_.end(); d++) {
74 pair<double, double> rangeRZ = d->second;
95 throw cms::Exception(
"RecoParticleFlow",
"Found DetId that is not in Tracker");
106 pair< PFCheckHitPattern::PFTrackHitInfo, PFCheckHitPattern::PFTrackHitInfo>
117 if (!geomInitDone_) this->
init(tkerGeomHandle_);
125 unsigned int nHitBefore = 0;
126 unsigned int nHitAfter = 0;
133 DetInfo detInfo(subDet, layer);
134 double maxRZ = rangeRorZ_[detInfo].second;
136 if (this->
barrel(subDet)) {
140 if (fabs(vert.
position().
z()) > maxRZ) nHitBefore++;
148 unsigned int nMissHitAfter = 0;
149 unsigned int nMissHitBefore = 0;
156 DetInfo detInfo(subDet, layer);
157 double minRZ = rangeRorZ_[detInfo].first;
161 if (this->
barrel(subDet)) {
163 else nMissHitBefore++;
165 if (fabs(vert.
position().
z()) < minRZ) nMissHitAfter++;
166 else nMissHitBefore++;
176 return pair< PFTrackHitInfo, PFTrackHitInfo>(trackToVertex, trackFromVertex);
184 cout<<
"=== Hits on Track ==="<<endl;
186 cout<<
"=== Hits before track ==="<<endl;
196 cout<<
"hit "<<
i<<
" subdet="<<subdet<<
" layer="<<layer<<
" type "<<hp.
getHitType(hit)<<endl;
static RZrangeMap rangeRorZ_
unsigned int layer() const
layer id
static uint32_t getLayer(uint32_t pattern)
static bool trackerHitFilter(uint32_t pattern)
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
static uint32_t getHitType(uint32_t pattern)
void print(const reco::TrackBaseRef track) const
Print hit pattern on track.
std::vector< GeomDet * > DetContainer
static int position[TOTALCHAMBERS][3]
unsigned int layer() const
layer id
PFTrackHitFullInfo analyze(edm::ESHandle< TrackerGeometry >, const reco::TrackBaseRef track, const TransientVertex &vert)
std::pair< unsigned int, unsigned int > PFTrackHitInfo
static DetInfo interpretDetId(DetId detId)
GlobalPoint position() const
static uint32_t getSubStructure(uint32_t pattern)
const HitPattern & trackerExpectedHitsInner() const
Access the hit pattern counting (in the Tracker) the number of expected crossed layers before the fir...
static bool validHitFilter(uint32_t pattern)
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
unsigned int disk() const
disk id
unsigned int wheel() const
wheel id
unsigned int layer() const
layer id
std::pair< uint32_t, uint32_t > DetInfo
std::map< DetInfo, std::pair< double, double > > RZrangeMap
void init(edm::ESHandle< TrackerGeometry >)
Create map indicating r/z values of all layers/disks.
uint32_t getHitPattern(int position) const
value_type const * get() const
static bool barrel(uint32_t subDet)
Return a bool indicating if a given subdetector is in the barrel.
unsigned int wheel() const
wheel id