CMS 3D CMS Logo

CheckHitPattern.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_RecoUtils_CheckHitPattern_H
2 #define PhysicsTools_RecoUtils_CheckHitPattern_H
3 
4 /*
5  * Determine if a track has hits in front of its assumed production point.
6  * Also determine if it misses hits between its assumed production point and its innermost hit.
7  *
8  * FIXME: as it stands it is pretty inefficient for numerous reasons
9  * if used seriously it needs to be optimized and used properly...
10  */
11 
18 #include <utility>
19 #include <map>
20 
21 class DetId;
22 
23 class TrackerTopology;
24 
26 public:
27  struct Result {
28  // Number of hits track has in front of the vertex.
29  unsigned int hitsInFrontOfVert;
30  // Number of missing hits between the vertex position and the innermost valid hit on the track.
31  unsigned int missHitsAfterVert;
32  };
33 
34  // Check if hit pattern of this track is consistent with it being produced
35  // at given vertex. See comments above for "Result" struct for details of returned information.
36  Result operator()(const reco::Track& track, const VertexState& vert) const;
37 
38  // Print hit pattern on track
39  static void print(const reco::Track& track);
40 
41  // Create map indicating r/z values of all layers/disks.
42  void init(const edm::EventSetup& iSetup);
43 
44  // Return a pair<uint32, uint32> consisting of the numbers used by HitPattern to
45  // identify subdetector and layer number respectively.
46  typedef std::pair<uint32_t, uint32_t> DetInfo;
47  static DetInfo interpretDetId(DetId detId, const TrackerTopology* tTopo);
48 
49  // Return a bool indicating if a given subdetector is in the barrel.
50  static bool barrel(uint32_t subDet);
51 
53 
54 private:
55  // Note if geometry info is already initialized.
56  bool geomInitDone_ = false;
57 
58  // For a given subdetector & layer number, this stores the minimum and maximum
59  // r (or z) values if it is barrel (or endcap) respectively.
60  typedef std::map<DetInfo, std::pair<double, double> > RZrangeMap;
62 
63  // Makes TransientTracks needed for vertex fitting.
65 };
66 
67 #endif
taus_updatedMVAIds_cff.category
category
Definition: taus_updatedMVAIds_cff.py:31
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
ESHandle.h
CheckHitPattern::Result
Definition: CheckHitPattern.h:27
CheckHitPattern::barrel
static bool barrel(uint32_t subDet)
Definition: CheckHitPattern.cc:88
CheckHitPattern::rangeRorZ_
RZrangeMap rangeRorZ_
Definition: CheckHitPattern.h:61
CheckHitPattern::trkTool_
edm::ESHandle< TransientTrackBuilder > trkTool_
Definition: CheckHitPattern.h:64
TrackerTopology
Definition: TrackerTopology.h:16
CheckHitPattern::interpretDetId
static DetInfo interpretDetId(DetId detId, const TrackerTopology *tTopo)
Definition: CheckHitPattern.cc:82
DetId
Definition: DetId.h:17
CheckHitPattern::print
static void print(const reco::Track &track)
Definition: CheckHitPattern.cc:172
reco::HitPattern
Definition: HitPattern.h:147
Track.h
trackingPlots.hp
hp
Definition: trackingPlots.py:1248
reco::Track
Definition: Track.h:27
edm::ESHandle< TransientTrackBuilder >
VertexState.h
CheckHitPattern::Result::missHitsAfterVert
unsigned int missHitsAfterVert
Definition: CheckHitPattern.h:31
TransientTrackBuilder.h
CheckHitPattern::operator()
Result operator()(const reco::Track &track, const VertexState &vert) const
Definition: CheckHitPattern.cc:94
CheckHitPattern::DetInfo
std::pair< uint32_t, uint32_t > DetInfo
Definition: CheckHitPattern.h:46
edm::EventSetup
Definition: EventSetup.h:57
CheckHitPattern::RZrangeMap
std::map< DetInfo, std::pair< double, double > > RZrangeMap
Definition: CheckHitPattern.h:60
HitPattern.h
reco::HitPattern::HitCategory
HitCategory
Definition: HitPattern.h:155
VertexState
Definition: VertexState.h:13
CheckHitPattern::init
void init(const edm::EventSetup &iSetup)
Definition: CheckHitPattern.cc:21
CheckHitPattern::geomInitDone_
bool geomInitDone_
Definition: CheckHitPattern.h:56
EventSetup.h
CheckHitPattern
Definition: CheckHitPattern.h:25
CheckHitPattern::Result::hitsInFrontOfVert
unsigned int hitsInFrontOfVert
Definition: CheckHitPattern.h:29