Go to the documentation of this file.00001 #ifndef PhysicsTools_RecoUtils_CheckHitPattern_H
00002 #define PhysicsTools_RecoUtils_CheckHitPattern_H
00003
00004
00005
00006
00007
00008
00009
00010 #include <memory>
00011 #include "FWCore/Framework/interface/Frameworkfwd.h"
00012 #include "FWCore/Framework/interface/EDAnalyzer.h"
00013 #include "FWCore/Framework/interface/Event.h"
00014 #include "FWCore/Framework/interface/MakerMacros.h"
00015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00016 #include "FWCore/Framework/interface/ESHandle.h"
00017
00018 #include "FWCore/Framework/interface/EventSetup.h"
00019 #include "DataFormats/TrackReco/interface/Track.h"
00020 #include "RecoVertex/VertexPrimitives/interface/VertexState.h"
00021 #include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h"
00022
00023 #include <utility>
00024 #include <map>
00025
00026 class DetId;
00027
00028 class CheckHitPattern {
00029
00030 public:
00031
00032 struct Result {
00033
00034 unsigned int hitsInFrontOfVert;
00035
00036 unsigned int missHitsAfterVert;
00037 };
00038
00039 CheckHitPattern() : geomInitDone_(false) {}
00040
00041 ~CheckHitPattern() {}
00042
00043
00044
00045
00046
00047
00048
00049 Result analyze(const edm::EventSetup& iSetup,
00050 const reco::Track& track, const VertexState& vert, bool fixHitPattern=true);
00051
00052
00053 void print(const reco::Track& track) const;
00054
00055 private:
00056
00057 void init (const edm::EventSetup& iSetup);
00058
00059
00060
00061 typedef std::pair<uint32_t, uint32_t> DetInfo;
00062 static DetInfo interpretDetId(DetId detId);
00063
00064
00065 static bool barrel(uint32_t subDet);
00066
00067 void print(const reco::HitPattern& hp) const;
00068
00069 private:
00070
00071 bool geomInitDone_;
00072
00073
00074
00075 typedef std::map< DetInfo, std::pair< double, double> > RZrangeMap;
00076 static RZrangeMap rangeRorZ_;
00077
00078
00079 edm::ESHandle<TransientTrackBuilder> trkTool_;
00080 };
00081
00082 #endif