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 
25 
27 
28 public:
29 
30  struct Result {
31  // Number of hits track has in front of the vertex.
32  unsigned int hitsInFrontOfVert;
33  // Number of missing hits between the vertex position and the innermost valid hit on the track.
34  unsigned int missHitsAfterVert;
35  };
36 
37  // Check if hit pattern of this track is consistent with it being produced
38  // at given vertex. See comments above for "Result" struct for details of returned information.
39  Result operator()(const reco::Track& track, const VertexState& vert) const;
40 
41  // Print hit pattern on track
42  static void print(const reco::Track& track);
43 
44 
45  // Create map indicating r/z values of all layers/disks.
46  void init (const edm::EventSetup& iSetup);
47 
48 
49  // Return a pair<uint32, uint32> consisting of the numbers used by HitPattern to
50  // identify subdetector and layer number respectively.
51  typedef std::pair<uint32_t, uint32_t> DetInfo;
52  static DetInfo interpretDetId(DetId detId, const TrackerTopology* tTopo);
53 
54  // Return a bool indicating if a given subdetector is in the barrel.
55  static bool barrel(uint32_t subDet);
56 
58 
59 private:
60  // Note if geometry info is already initialized.
61  bool geomInitDone_=false;
62 
63  // For a given subdetector & layer number, this stores the minimum and maximum
64  // r (or z) values if it is barrel (or endcap) respectively.
65  typedef std::map< DetInfo, std::pair< double, double> > RZrangeMap;
66  RZrangeMap rangeRorZ_;
67 
68  // Makes TransientTracks needed for vertex fitting.
70 };
71 
72 #endif
std::map< DetInfo, std::pair< double, double > > RZrangeMap
std::pair< uint32_t, uint32_t > DetInfo
Result operator()(const reco::Track &track, const VertexState &vert) const
unsigned int missHitsAfterVert
unsigned int hitsInFrontOfVert
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
Definition: DetId.h:18
void init(const edm::EventSetup &iSetup)
static DetInfo interpretDetId(DetId detId, const TrackerTopology *tTopo)
static void print(const reco::Track &track)
edm::ESHandle< TransientTrackBuilder > trkTool_
static bool barrel(uint32_t subDet)
RZrangeMap rangeRorZ_