CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/RecoParticleFlow/PFTracking/interface/PFCheckHitPattern.h

Go to the documentation of this file.
00001 #ifndef PFCheckHitPattern_H
00002 #define PFCheckHitPattern_H
00003 
00004 // standard EDAnalyser include files
00005 #include <memory>
00006 #include "FWCore/Framework/interface/Frameworkfwd.h"
00007 #include "FWCore/Framework/interface/EDAnalyzer.h"
00008 #include "FWCore/Framework/interface/Event.h"
00009 #include "FWCore/Framework/interface/MakerMacros.h"
00010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00011 
00012 #include "FWCore/Framework/interface/EventSetup.h"
00013 #include "DataFormats/TrackReco/interface/Track.h"
00014 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00015 #include "RecoVertex/VertexPrimitives/interface/TransientVertex.h"
00016 #include "Geometry/CommonDetUnit/interface/TrackingGeometry.h"
00017 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00018 
00019 #define DEBUG_CHECKHITPATTERN
00020 
00021 class DetId;
00022 
00024 
00029 /*
00030  * Determine if a track has hits in front of its assumed production point.
00031  * Also determine if it misses hits between its assumed production point and its innermost hit.
00032  */
00033 
00034 class PFCheckHitPattern {
00035 
00036  public:
00037 
00038   PFCheckHitPattern() : geomInitDone_(false) {}
00039   
00040   ~PFCheckHitPattern() {}
00041 
00042   typedef std::pair <unsigned int, unsigned int> PFTrackHitInfo;
00043   typedef std::pair <PFTrackHitInfo, PFTrackHitInfo> PFTrackHitFullInfo;
00044 
00049 
00050   PFTrackHitFullInfo 
00051     analyze(edm::ESHandle<TrackerGeometry>, const reco::TrackBaseRef track, 
00052             const TransientVertex& vert);
00053 
00055   void print(const reco::TrackBaseRef track) const;
00056 
00057 
00058 
00059 private:
00061   void init (edm::ESHandle<TrackerGeometry>);
00062 
00065   typedef std::pair<uint32_t, uint32_t> DetInfo;
00066   static DetInfo interpretDetId(DetId detId);
00067 
00069   static bool barrel(uint32_t subDet);
00070 
00071   void print(const reco::HitPattern& hp) const;
00072 
00073 private:
00075   bool geomInitDone_;
00076 
00079   typedef std::map< DetInfo, std::pair< double, double> > RZrangeMap;
00080   static RZrangeMap rangeRorZ_;
00081 
00082 
00083 };
00084 
00085 #endif