CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TestTrackHits.h
Go to the documentation of this file.
1 #ifndef TESTTRACKHITS_H
2 #define TESTTRACKHITS_H
3 // -*- C++ -*-
4 //
5 // Package: TestTrackHits
6 // Class: TestTrackHits
7 //
15 //
16 // Original Author: Giuseppe Cerati
17 // Created: Tue Feb 13 17:29:10 CET 2007
18 // $Id: TestTrackHits.h,v 1.8 2010/02/11 00:14:37 wmtan Exp $
19 //
20 //
21 
22 
23 #include <memory>
24 #include <vector>
46 #include <TFile.h>
47 #include <TH1F.h>
48 #include <TH2F.h>
52 //#include "PhysicsTools/RecoAlgos/interface/RecoTrackSelector.h"
53 #include <sstream>
54 
56 public:
57  explicit TestTrackHits(const edm::ParameterSet&);
59 
60 private:
61  virtual void beginRun(edm::Run & run, const edm::EventSetup&) ;
62  virtual void analyze(const edm::Event&, const edm::EventSetup&);
63  virtual void endJob() ;
64 
65  std::pair<LocalPoint,LocalVector> projectHit(const PSimHit&, const StripGeomDetUnit*, const BoundPlane&);
66 
67  template<unsigned int D>
70  switch (hit->dimension()) {
71  case 1: return computeChi2Increment<1>(me,hit);
72  case 2: return computeChi2Increment<2>(me,hit);
73  case 3: return computeChi2Increment<3>(me,hit);
74  case 4: return computeChi2Increment<4>(me,hit);
75  case 5: return computeChi2Increment<5>(me,hit);
76  }
77  throw cms::Exception("CkfDebugger error: rechit of dimension not 1,2,3,4,5");
78  }
79 
82 
99  //RecoTrackSelector selectRecoTracks;
100 
101  TFile* file;
102  std::stringstream title;
103  std::map<std::string,TH1F*> hPullGP_X_ts;
104  std::map<std::string,TH1F*> hPullGP_Y_ts;
105  std::map<std::string,TH1F*> hPullGP_Z_ts;
106  std::map<std::string,TH1F*> hPullGM_X_ts;
107  std::map<std::string,TH1F*> hPullGM_Y_ts;
108  std::map<std::string,TH1F*> hPullGM_Z_ts;
109  std::map<std::string,TH1F*> hPullGP_X_rs;
110  std::map<std::string,TH1F*> hPullGP_Y_rs;
111  std::map<std::string,TH1F*> hPullGP_Z_rs;
112  std::map<std::string,TH1F*> hPullGP_X_tr;
113  std::map<std::string,TH1F*> hPullGP_Y_tr;
114  std::map<std::string,TH1F*> hPullGP_Z_tr;
115  std::map<std::string,TH1F*> hChi2Increment;
116  std::map<std::string,TH1F*> hChi2Increment_mono;
117  std::map<std::string,TH1F*> hChi2Increment_stereo;
118  std::map<std::string,TH2F*> hChi2IncrementVsEta;
119  std::map<std::string,TH1F*> hChi2GoodHit;
120  std::map<std::string,TH1F*> hChi2BadHit;
121  std::map<std::string,TH1F*> hChi2DeltaHit;
122  std::map<std::string,TH1F*> hChi2NSharedHit;
123  std::map<std::string,TH1F*> hChi2SharedHit;
132 
133  std::map<std::string,TH1F*> hPullGP_X_ts_mono;
134  std::map<std::string,TH1F*> hPullGP_Y_ts_mono;
135  std::map<std::string,TH1F*> hPullGP_Z_ts_mono;
136  std::map<std::string,TH1F*> hPullGM_X_ts_mono;
137  std::map<std::string,TH1F*> hPullGM_Y_ts_mono;
138  std::map<std::string,TH1F*> hPullGM_Z_ts_mono;
139  std::map<std::string,TH1F*> hPullGP_X_rs_mono;
140  std::map<std::string,TH1F*> hPullGP_Y_rs_mono;
141  std::map<std::string,TH1F*> hPullGP_Z_rs_mono;
142  std::map<std::string,TH1F*> hPullGP_X_tr_mono;
143  std::map<std::string,TH1F*> hPullGP_Y_tr_mono;
144  std::map<std::string,TH1F*> hPullGP_Z_tr_mono;
145 
146  std::map<std::string,TH1F*> hPullGP_X_ts_stereo;
147  std::map<std::string,TH1F*> hPullGP_Y_ts_stereo;
148  std::map<std::string,TH1F*> hPullGP_Z_ts_stereo;
149  std::map<std::string,TH1F*> hPullGM_X_ts_stereo;
150  std::map<std::string,TH1F*> hPullGM_Y_ts_stereo;
151  std::map<std::string,TH1F*> hPullGM_Z_ts_stereo;
152  std::map<std::string,TH1F*> hPullGP_X_rs_stereo;
153  std::map<std::string,TH1F*> hPullGP_Y_rs_stereo;
154  std::map<std::string,TH1F*> hPullGP_Z_rs_stereo;
155  std::map<std::string,TH1F*> hPullGP_X_tr_stereo;
156  std::map<std::string,TH1F*> hPullGP_Y_tr_stereo;
157  std::map<std::string,TH1F*> hPullGP_Z_tr_stereo;
158 };
159 
160 #endif
std::string out
Definition: TestTrackHits.h:88
TH1F * hPixSimHitVecSize
std::map< std::string, TH1F * > hPullGP_X_ts_mono
TH1F * probXnoshare
TH2F * hPrjClsize_vs_Chi2
double computeChi2Increment(MeasurementExtractor me, TransientTrackingRecHit::ConstRecHitPointer hit)
Definition: TestTrackHits.h:69
TH1F * hSt2ClusterSize
std::map< std::string, TH1F * > hPullGM_X_ts_mono
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
std::map< std::string, TH1F * > hPullGP_Y_ts_mono
TH1F * hTotChi2GoodHit
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
TH2F * hSt2Clsize_vs_Chi2
TrackerHitAssociator * hitAssociator
Definition: TestTrackHits.h:81
std::map< std::string, TH1F * > hPullGP_Y_rs_stereo
std::map< std::string, TH1F * > hPullGP_Z_ts_mono
TH1F * probYnoshare
std::map< std::string, TH1F * > hPullGP_Y_rs
std::map< std::string, TH1F * > hPullGP_Z_tr_mono
edm::Handle< std::vector< Trajectory > > trajCollectionHandle
Definition: TestTrackHits.h:95
const edm::ParameterSet conf_
Definition: TestTrackHits.h:80
std::map< std::string, TH1F * > hChi2Increment
std::map< std::string, TH1F * > hChi2BadHit
TH2F * hSt1Clsize_vs_Chi2
TH2F * hGoodHit_vs_Chi2
std::map< std::string, TH1F * > hChi2SharedHit
std::map< std::string, TH1F * > hChi2Increment_mono
std::map< std::string, TH1F * > hPullGP_Y_ts
std::map< std::string, TH1F * > hPullGP_X_rs
std::map< std::string, TH1F * > hPullGP_X_tr_stereo
TH1F * hSimHitVecSize
std::map< std::string, TH1F * > hPullGP_Y_tr
std::map< std::string, TH1F * > hChi2DeltaHit
TH2F * hPixClsize_vs_Chi2
std::stringstream title
TH1F * energyLossRatio
TH1F * probYshared
edm::ESHandle< Propagator > thePropagator
Definition: TestTrackHits.h:91
edm::Handle< edm::View< reco::Track > > trackCollectionHandle
Definition: TestTrackHits.h:96
std::map< std::string, TH1F * > hPullGM_Z_ts_stereo
std::map< std::string, TH1F * > hPullGP_Z_ts
edm::ESHandle< MagneticField > theMF
Definition: TestTrackHits.h:90
std::map< std::string, TH1F * > hPullGP_X_ts
TH2F * hProcess_vs_Chi2
std::map< std::string, TH1F * > hPullGP_Z_rs
TestTrackHits(const edm::ParameterSet &)
edm::ESHandle< TrajectoryStateUpdator > theUpdator
Definition: TestTrackHits.h:93
TH1F * hClusterSize
std::map< std::string, TH1F * > hChi2Increment_stereo
std::map< std::string, TH1F * > hChi2GoodHit
std::string srcName
Definition: TestTrackHits.h:85
std::map< std::string, TH1F * > hPullGM_Z_ts
TH1F * hTotChi2SharedHit
std::map< std::string, TH1F * > hPullGP_Z_tr
TH1F * goodbadmerged
std::map< std::string, TH1F * > hPullGP_X_ts_stereo
virtual void endJob()
virtual void beginRun(edm::Run &run, const edm::EventSetup &)
TH1F * hPrjSimHitVecSize
std::string builderName
Definition: TestTrackHits.h:84
std::string tpName
Definition: TestTrackHits.h:86
TH1F * hSt2SimHitVecSize
edm::ESHandle< TransientTrackingRecHitBuilder > theBuilder
Definition: TestTrackHits.h:92
edm::Handle< TrackingParticleCollection > trackingParticleCollectionHandle
Definition: TestTrackHits.h:98
std::map< std::string, TH1F * > hPullGP_Y_rs_mono
TH1F * hTotChi2NSharedHit
std::map< std::string, TH1F * > hPullGM_Y_ts_mono
TH2F * hClsize_vs_Chi2
TH1F * hTotChi2Increment
std::map< std::string, TH1F * > hPullGP_X_rs_mono
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
std::map< std::string, TH1F * > hPullGP_Z_tr_stereo
edm::ESHandle< TrackAssociatorBase > trackAssociator
Definition: TestTrackHits.h:94
TH1F * hSt1SimHitVecSize
std::map< std::string, TH1F * > hPullGP_X_tr
TH1F * hSt1ClusterSize
std::map< std::string, TH1F * > hPullGP_X_tr_mono
edm::ESHandle< TrackerGeometry > theG
Definition: TestTrackHits.h:89
TH1F * probXshared
std::map< std::string, TH1F * > hChi2NSharedHit
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &, const StripGeomDetUnit *, const BoundPlane &)
std::map< std::string, TH1F * > hPullGM_X_ts
std::map< std::string, TH1F * > hPullGP_Z_ts_stereo
std::map< std::string, TH1F * > hPullGP_X_rs_stereo
std::map< std::string, TH1F * > hPullGP_Y_ts_stereo
edm::Handle< TrajTrackAssociationCollection > trajTrackAssociationCollectionHandle
Definition: TestTrackHits.h:97
TH1F * hPrjClusterSize
TH1F * hTotChi2BadHit
std::map< std::string, TH1F * > hPullGM_Z_ts_mono
TH1F * hPixClusterSize
double computeChi2Increment(MeasurementExtractor, TransientTrackingRecHit::ConstRecHitPointer)
std::map< std::string, TH2F * > hChi2IncrementVsEta
TH1F * hTotChi2DeltaHit
std::string propagatorName
Definition: TestTrackHits.h:83
Definition: Run.h:36
std::map< std::string, TH1F * > hPullGM_X_ts_stereo
std::string updatorName
Definition: TestTrackHits.h:87
std::map< std::string, TH1F * > hPullGM_Y_ts
std::map< std::string, TH1F * > hPullGP_Y_tr_mono