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_);
121 unsigned int nHitBefore = 0;
122 unsigned int nHitAfter = 0;
129 DetInfo detInfo(subDet, layer);
130 double maxRZ = rangeRorZ_[detInfo].second;
132 if (this->
barrel(subDet)) {
136 if (fabs(vert.
position().
z()) > maxRZ) nHitBefore++;
144 unsigned int nMissHitAfter = 0;
145 unsigned int nMissHitBefore = 0;
152 DetInfo detInfo(subDet, layer);
153 double minRZ = rangeRorZ_[detInfo].first;
157 if (this->
barrel(subDet)) {
159 else nMissHitBefore++;
161 if (fabs(vert.
position().
z()) < minRZ) nMissHitAfter++;
162 else nMissHitBefore++;
172 return pair< PFTrackHitInfo, PFTrackHitInfo>(trackToVertex, trackFromVertex);
180 cout<<
"=== Hits on Track ==="<<endl;
182 cout<<
"=== Hits before track ==="<<endl;
192 cout<<
"hit "<<
i<<
" subdet="<<subdet<<
" layer="<<layer<<
" type "<<hp.
getHitType(hit)<<endl;
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.
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
void init(edm::ESHandle< TrackerGeometry >)
Create map indicating r/z values of all layers/disks.
uint32_t getHitPattern(int position) const
std::vector< GeomDet const * > DetContainer
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