43 for (
unsigned int i = 0;
i < dets.size();
i++) {
47 uint32_t subDet = detInfo.first;
51 if (this->
barrel(subDet)) {
52 r_or_z = dets[
i]->position().perp();
66 if (minRZ > r_or_z) minRZ = r_or_z;
67 if (maxRZ < r_or_z) maxRZ = r_or_z;
68 rangeRorZ_[detInfo] = std::pair<double, double>(minRZ, maxRZ);
71 #ifdef DEBUG_CHECKHITPATTERN
72 RZrangeMap::const_iterator d;
75 std::pair<double, double> rangeRZ = d->second;
76 std::std::cout<<
"CHECKHITPATTERN: Tracker subdetector type="<<detInfo.first<<
" layer="<<detInfo.second
77 <<
" has min r (or z) ="<<rangeRZ.first<<
" and max r (or z) = "<<rangeRZ.second<<std::std::endl;
98 throw cms::Exception(
"NotFound",
"Found DetId that is not in Tracker");
125 bool trkGoesInsideOut = fabs(reco::deltaPhi<const GlobalVector, const GlobalPoint>(p3_trk, vert.
position())) < 0.5*
M_PI;
143 unsigned int nHitBefore = 0;
149 DetInfo detInfo(subDet, layer);
152 if (this->
barrel(subDet)) {
154 if (vert.
position().
perp() > maxRZ && trkGoesInsideOut) nHitBefore++;
156 if (fabs(vert.
position().
z()) > maxRZ) nHitBefore++;
163 unsigned int nMissHitAfter = 0;
170 DetInfo detInfo(subDet, layer);
173 if (this->
barrel(subDet)) {
176 if (vert.
position().
perp() < minRZ || ! trkGoesInsideOut) nMissHitAfter++;
178 if (fabs(vert.
position().
z()) < minRZ) nMissHitAfter++;
194 std::cout<<
"=== Hits on Track ==="<<std::endl;
196 std::cout<<
"=== Hits before track ==="<<std::endl;
206 std::cout<<
"hit "<<
i<<
" subdet="<<subdet<<
" layer="<<layer<<
" type "<<hp.
getHitType(hit)<<std::endl;
std::map< DetInfo, std::pair< double, double > > RZrangeMap
unsigned int layer() const
layer id
Result analyze(const edm::EventSetup &iSetup, const reco::Track &track, const VertexState &vert, bool fixHitPattern=true)
static uint32_t getLayer(uint32_t pattern)
std::pair< uint32_t, uint32_t > DetInfo
static DetInfo interpretDetId(DetId detId)
static bool trackerHitFilter(uint32_t pattern)
static uint32_t getHitType(uint32_t pattern)
std::vector< GeomDet * > DetContainer
GlobalPoint position() const
int numberOfValidStripTOBHits() const
static int position[TOTALCHAMBERS][3]
unsigned int layer() const
layer id
unsigned int missHitsAfterVert
unsigned int hitsInFrontOfVert
double eta() const
pseudorapidity of momentum vector
Result analyze(const edm::EventSetup &iSetup, const reco::Track &track)
static bool type_1_HitFilter(uint32_t pattern)
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
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
void init(const edm::EventSetup &iSetup)
reco::HitPattern innerHitPattern
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const
int numberOfValidStripTIBHits() const
unsigned int wheel() const
wheel id
static RZrangeMap rangeRorZ_
unsigned int layer() const
layer id
int numberOfValidPixelHits() const
edm::ESHandle< TransientTrackBuilder > trkTool_
static bool barrel(uint32_t subDet)
uint32_t getHitPattern(int position) const
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
void print(const reco::Track &track) const
unsigned int wheel() const
wheel id