CMS 3D CMS Logo

FixTrackHitPattern.h
Go to the documentation of this file.
1 #ifndef RecoTracker_DebugTools_FixTrackHitPattern_H
2 #define RecoTracker_DebugTools_FixTrackHitPattern_H
3 
4 /*
5  * Recalculate the track HitPattern's, which one would usually get instead by calling
6  * Track::trackerExpectedHitsInner() and Track::trackerExpectedHitsOuter().
7  *
8  * Those functions inside the Track class only define a hit to be missing if the extrapolated
9  * track trajectory ALMOST CERTAINLY went through a functioning sensor in a given layer where no hit
10  * was found.
11  * This FixTrackHitPattern class does the same thing, except that it defines the hit to be missing if
12  * the extrapolated track trajectory MIGHT have gone through a functioning sensor in a given layer.
13  *
14  * If the uncertainty on the track trajectory is very small, the results should be very similar.
15  * (Although those returned by class FixTrackHitPattern will be less accurate, since it extrapolates
16  * the track trajectory from its point of closest approach to the beam spot, whereas the functions inside
17  * the Track class extrapolate it from from its point of closest approach to the inner/outermost valid
18  * hit on the track).
19  *
20  * However, if the uncertainty on the trajectory is large, then the functions inside the Track class
21  * will often return nothing, as because of this large uncertainty, they can't be certain if the
22  * track crosses a sensor in a given layer. In constrast, this class will continue to return useful
23  * information.
24  *
25  * For example, tracks with hits only in TOB/TEC can have a very large extrapolation uncertainty
26  * in towards the beam-spot. In consequence, the functions in the Track class will often indicate
27  * that they do not have missing hits in the Pixel or TIB/TID sensors, even though they actually do.
28  *
29  * It is recommended to compare the output of this class with that of the functions in the Track class.
30  * Which is best will depend on your analysis.
31  *
32  * See the hypernews thread https://hypernews.cern.ch/HyperNews/CMS/get/recoTracking/1123.html for details.
33  *
34  * To use: Just call function analyze(...) with your chosen track.
35  *
36  * N.B. Your _cfg.py must load RecoTracker.Configuration.RecoTracker_cff to use this.
37  *
38  * Author: Ian Tomalin
39  * Date: Oct. 2011
40  */
41 
42 #include <memory>
47 
51 
53 
54 public:
55 
56  struct Result {
57  reco::HitPattern innerHitPattern; // Info on missing hits inside innermost valid hit.
58  reco::HitPattern outerHitPattern; // Info on missing hits outside outermost valid hit.
59  };
60 
62 
64 
65  // Return the recalculated inner and outer HitPatterns on the track.
66  Result analyze(const edm::EventSetup& iSetup, const reco::Track& track);
67 
68 private:
69  // Create map indicating r/z values of all layers/disks.
70  void init (const edm::EventSetup& iSetup);
71 
72 private:
73  // Makes TransientTracks needed for vertex fitting.
75 };
76 
77 #endif
edm::ESHandle< TransientTrackBuilder > trkTool_
Result analyze(const edm::EventSetup &iSetup, const reco::Track &track)
reco::HitPattern outerHitPattern
void init(const edm::EventSetup &iSetup)
reco::HitPattern innerHitPattern