CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/RecoTracker/DebugTools/interface/FixTrackHitPattern.h

Go to the documentation of this file.
00001 #ifndef RecoTracker_DebugTools_FixTrackHitPattern_H
00002 #define RecoTracker_DebugTools_FixTrackHitPattern_H
00003 
00004 /*
00005  * Recalculate the track HitPattern's, which one would usually get instead by calling 
00006  * Track::trackerExpectedHitsInner() and Track::trackerExpectedHitsOuter().
00007  * 
00008  * Those functions inside the Track class only define a hit to be missing if the extrapolated
00009  * track trajectory ALMOST CERTAINLY went through a functioning sensor in a given layer where no hit
00010  * was found.
00011  * This FixTrackHitPattern class does the same thing, except that it defines the hit to be missing if 
00012  * the extrapolated track trajectory MIGHT have gone through a functioning sensor in a given layer.
00013  *
00014  * If the uncertainty on the track trajectory is very small, the results should be very similar.
00015  * (Although those returned by class FixTrackHitPattern will be less accurate, since it extrapolates 
00016  * the track trajectory from its point of closest approach to the beam spot, whereas the functions inside
00017  * the Track class extrapolate it from from its point of closest approach to the inner/outermost valid
00018  * hit on the track).
00019  * 
00020  * However, if the uncertainty on the trajectory is large, then the functions inside the Track class
00021  * will often return nothing, as because of this large uncertainty, they can't be certain if the
00022  * track crosses a sensor in a given layer. In constrast, this class will continue to return useful
00023  * information.
00024  *
00025  * For example, tracks with hits only in TOB/TEC can have a very large extrapolation uncertainty 
00026  * in towards the beam-spot. In consequence, the functions in the Track class will often indicate
00027  * that they do not have missing hits in the Pixel or TIB/TID sensors, even though they actually do.
00028  *
00029  * It is recommended to compare the output of this class with that of the functions in the Track class.
00030  * Which is best will depend on your analysis.
00031  *
00032  * See the hypernews thread https://hypernews.cern.ch/HyperNews/CMS/get/recoTracking/1123.html for details.
00033  *
00034  * To use: Just call function analyze(...) with your chosen track.
00035  *
00036  * N.B. Your _cfg.py must load RecoTracker.Configuration.RecoTracker_cff to use this.
00037  * 
00038  * Author: Ian Tomalin
00039  * Date: Oct. 2011
00040  */
00041 
00042 #include <memory>
00043 #include "FWCore/Framework/interface/Frameworkfwd.h"
00044 #include "FWCore/Framework/interface/Event.h"
00045 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00046 #include "FWCore/Framework/interface/ESHandle.h"
00047 
00048 #include "FWCore/Framework/interface/EventSetup.h"
00049 #include "DataFormats/TrackReco/interface/Track.h"
00050 #include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h"
00051 
00052 class FixTrackHitPattern {
00053 
00054 public:
00055 
00056   struct Result {
00057     reco::HitPattern innerHitPattern; // Info on missing hits inside innermost valid hit.
00058     reco::HitPattern outerHitPattern; // Info on missing hits outside outermost valid hit.
00059   };
00060 
00061   FixTrackHitPattern() {}
00062   
00063   ~FixTrackHitPattern() {}
00064 
00065   // Return the recalculated inner and outer HitPatterns on the track.
00066   Result analyze(const edm::EventSetup& iSetup, const reco::Track& track);
00067 
00068 private:
00069   // Create map indicating r/z values of all layers/disks.
00070   void init (const edm::EventSetup& iSetup);
00071 
00072 private:
00073  // Makes TransientTracks needed for vertex fitting.
00074   edm::ESHandle<TransientTrackBuilder> trkTool_;
00075 };
00076 
00077 #endif