CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoTracker/DebugTools/interface/TestHits.h

Go to the documentation of this file.
00001 #ifndef TESTHITS_H
00002 #define TESTHITS_H
00003 
00004 
00005 // -*- C++ -*-
00006 //
00007 // Package:    TestHits
00008 // Class:      TestHits
00009 // 
00017 //
00018 // Original Author:  Giuseppe Cerati
00019 //         Created:  Tue Feb 13 17:29:10 CET 2007
00020 // $Id: TestHits.h,v 1.6 2010/02/11 00:14:35 wmtan Exp $
00021 //
00022 //
00023 #include <memory>
00024 #include <vector>
00025 #include <string>
00026 #include "FWCore/Framework/interface/Frameworkfwd.h"
00027 #include "FWCore/Framework/interface/EDAnalyzer.h"
00028 #include "FWCore/Framework/interface/Event.h"
00029 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00030 #include "FWCore/Utilities/interface/InputTag.h"
00031 #include "SimTracker/TrackerHitAssociation/interface/TrackerHitAssociator.h"
00032 #include "MagneticField/Engine/interface/MagneticField.h"
00033 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00034 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
00035 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" 
00036 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h" 
00037 #include "TrackingTools/Records/interface/TransientRecHitRecord.h" 
00038 #include "Geometry/CommonDetUnit/interface/TrackingGeometry.h"
00039 #include "DataFormats/TrackCandidate/interface/TrackCandidateCollection.h"
00040 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00041 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
00042 #include "RecoTracker/TransientTrackingRecHit/interface/TkTransientTrackingRecHitBuilder.h"
00043 #include "TrackingTools/PatternTools/interface/MeasurementExtractor.h"
00044 #include "TrackingTools/TrackFitters/interface/KFTrajectoryFitter.h"
00045 #include <sstream>
00046 #include <TFile.h>
00047 #include <TH1F.h>
00048 #include <TH2F.h>
00049 
00050 class TestHits : public edm::EDAnalyzer {
00051 public:
00052   explicit TestHits(const edm::ParameterSet&);
00053   ~TestHits();
00054 
00055 private:
00056   virtual void beginRun(edm::Run & run, const edm::EventSetup&) ;
00057   virtual void analyze(const edm::Event&, const edm::EventSetup&);
00058   virtual void endJob() ;
00059 
00060   std::pair<LocalPoint,LocalVector> projectHit(const PSimHit&, const StripGeomDetUnit*, const BoundPlane&);
00061 
00062   const edm::ParameterSet conf_;
00063   TrackerHitAssociator * hitAssociator;
00064 
00065   double mineta, maxeta;
00066 
00067   std::string propagatorName;
00068   std::string builderName;
00069   std::string srcName;
00070   std::string fname;
00071 
00072   edm::ESHandle<TrackerGeometry> theG;
00073   edm::ESHandle<MagneticField> theMF;
00074   edm::ESHandle<Propagator> thePropagator;
00075   edm::ESHandle<TransientTrackingRecHitBuilder> theBuilder;
00076   edm::ESHandle<TrajectoryFitter> fit;
00077   edm::Handle<TrackCandidateCollection> theTCCollection;
00078 
00079   TFile* file;
00080   std::stringstream title;
00081   std::map<std::string,TH1F*> hPullGP_X_ts;
00082   std::map<std::string,TH1F*> hPullGP_Y_ts;
00083   std::map<std::string,TH1F*> hPullGP_Z_ts;
00084   std::map<std::string,TH1F*> hPullGM_X_ts;
00085   std::map<std::string,TH1F*> hPullGM_Y_ts;
00086   std::map<std::string,TH1F*> hPullGM_Z_ts;
00087   std::map<std::string,TH1F*> hPullGP_X_rs;
00088   std::map<std::string,TH1F*> hPullGP_Y_rs;
00089   std::map<std::string,TH1F*> hPullGP_Z_rs;
00090   std::map<std::string,TH1F*> hPullGP_X_tr;
00091   std::map<std::string,TH1F*> hPullGP_Y_tr;
00092   std::map<std::string,TH1F*> hPullGP_Z_tr;
00093   std::map<std::string,TH1F*> hChi2Increment;
00094   TH1F * hTotChi2Increment;
00095   TH2F * hProcess_vs_Chi2, *hClsize_vs_Chi2;
00096 
00097   std::map<std::string,TH1F*> hPullGP_X_ts_mono;
00098   std::map<std::string,TH1F*> hPullGP_Y_ts_mono;
00099   std::map<std::string,TH1F*> hPullGP_Z_ts_mono;
00100   std::map<std::string,TH1F*> hPullGM_X_ts_mono;
00101   std::map<std::string,TH1F*> hPullGM_Y_ts_mono;
00102   std::map<std::string,TH1F*> hPullGM_Z_ts_mono;
00103   std::map<std::string,TH1F*> hPullGP_X_rs_mono;
00104   std::map<std::string,TH1F*> hPullGP_Y_rs_mono;
00105   std::map<std::string,TH1F*> hPullGP_Z_rs_mono;
00106   std::map<std::string,TH1F*> hPullGP_X_tr_mono;
00107   std::map<std::string,TH1F*> hPullGP_Y_tr_mono;
00108   std::map<std::string,TH1F*> hPullGP_Z_tr_mono;
00109 
00110   std::map<std::string,TH1F*> hPullGP_X_ts_stereo;
00111   std::map<std::string,TH1F*> hPullGP_Y_ts_stereo;
00112   std::map<std::string,TH1F*> hPullGP_Z_ts_stereo;
00113   std::map<std::string,TH1F*> hPullGM_X_ts_stereo;
00114   std::map<std::string,TH1F*> hPullGM_Y_ts_stereo;
00115   std::map<std::string,TH1F*> hPullGM_Z_ts_stereo;
00116   std::map<std::string,TH1F*> hPullGP_X_rs_stereo;
00117   std::map<std::string,TH1F*> hPullGP_Y_rs_stereo;
00118   std::map<std::string,TH1F*> hPullGP_Z_rs_stereo;
00119   std::map<std::string,TH1F*> hPullGP_X_tr_stereo;
00120   std::map<std::string,TH1F*> hPullGP_Y_tr_stereo;
00121   std::map<std::string,TH1F*> hPullGP_Z_tr_stereo;
00122 };
00123 
00124 #endif