CMS 3D CMS Logo

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 //
19 //
20 
21 
22 #include <memory>
23 #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 const& run, const edm::EventSetup&) override;
62  virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
63  virtual void endJob() override;
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 
81 
98  //RecoTrackSelector selectRecoTracks;
99 
100  TFile* file;
101  std::stringstream title;
102  std::map<std::string,TH1F*> hPullGP_X_ts;
103  std::map<std::string,TH1F*> hPullGP_Y_ts;
104  std::map<std::string,TH1F*> hPullGP_Z_ts;
105  std::map<std::string,TH1F*> hPullGM_X_ts;
106  std::map<std::string,TH1F*> hPullGM_Y_ts;
107  std::map<std::string,TH1F*> hPullGM_Z_ts;
108  std::map<std::string,TH1F*> hPullGP_X_rs;
109  std::map<std::string,TH1F*> hPullGP_Y_rs;
110  std::map<std::string,TH1F*> hPullGP_Z_rs;
111  std::map<std::string,TH1F*> hPullGP_X_tr;
112  std::map<std::string,TH1F*> hPullGP_Y_tr;
113  std::map<std::string,TH1F*> hPullGP_Z_tr;
114  std::map<std::string,TH1F*> hChi2Increment;
115  std::map<std::string,TH1F*> hChi2Increment_mono;
116  std::map<std::string,TH1F*> hChi2Increment_stereo;
117  std::map<std::string,TH2F*> hChi2IncrementVsEta;
118  std::map<std::string,TH1F*> hChi2GoodHit;
119  std::map<std::string,TH1F*> hChi2BadHit;
120  std::map<std::string,TH1F*> hChi2DeltaHit;
121  std::map<std::string,TH1F*> hChi2NSharedHit;
122  std::map<std::string,TH1F*> hChi2SharedHit;
131 
132  std::map<std::string,TH1F*> hPullGP_X_ts_mono;
133  std::map<std::string,TH1F*> hPullGP_Y_ts_mono;
134  std::map<std::string,TH1F*> hPullGP_Z_ts_mono;
135  std::map<std::string,TH1F*> hPullGM_X_ts_mono;
136  std::map<std::string,TH1F*> hPullGM_Y_ts_mono;
137  std::map<std::string,TH1F*> hPullGM_Z_ts_mono;
138  std::map<std::string,TH1F*> hPullGP_X_rs_mono;
139  std::map<std::string,TH1F*> hPullGP_Y_rs_mono;
140  std::map<std::string,TH1F*> hPullGP_Z_rs_mono;
141  std::map<std::string,TH1F*> hPullGP_X_tr_mono;
142  std::map<std::string,TH1F*> hPullGP_Y_tr_mono;
143  std::map<std::string,TH1F*> hPullGP_Z_tr_mono;
144 
145  std::map<std::string,TH1F*> hPullGP_X_ts_stereo;
146  std::map<std::string,TH1F*> hPullGP_Y_ts_stereo;
147  std::map<std::string,TH1F*> hPullGP_Z_ts_stereo;
148  std::map<std::string,TH1F*> hPullGM_X_ts_stereo;
149  std::map<std::string,TH1F*> hPullGM_Y_ts_stereo;
150  std::map<std::string,TH1F*> hPullGM_Z_ts_stereo;
151  std::map<std::string,TH1F*> hPullGP_X_rs_stereo;
152  std::map<std::string,TH1F*> hPullGP_Y_rs_stereo;
153  std::map<std::string,TH1F*> hPullGP_Z_rs_stereo;
154  std::map<std::string,TH1F*> hPullGP_X_tr_stereo;
155  std::map<std::string,TH1F*> hPullGP_Y_tr_stereo;
156  std::map<std::string,TH1F*> hPullGP_Z_tr_stereo;
157 };
158 
159 #endif
std::string out
Definition: TestTrackHits.h:87
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
TrackerHitAssociator::Config trackerHitAssociatorConfig_
Definition: TestTrackHits.h:80
std::map< std::string, TH1F * > hPullGP_Y_ts_mono
TH1F * hTotChi2GoodHit
virtual void endJob() override
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
TH2F * hSt2Clsize_vs_Chi2
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:94
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
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
virtual void beginRun(edm::Run const &run, const edm::EventSetup &) override
std::map< std::string, TH1F * > hChi2Increment_mono
std::map< std::string, TH1F * > hPullGP_Y_ts
edm::Handle< reco::TrackToTrackingParticleAssociator > trackAssociator
Definition: TestTrackHits.h:93
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:90
edm::Handle< edm::View< reco::Track > > trackCollectionHandle
Definition: TestTrackHits.h:95
std::map< std::string, TH1F * > hPullGM_Z_ts_stereo
std::map< std::string, TH1F * > hPullGP_Z_ts
edm::ESHandle< MagneticField > theMF
Definition: TestTrackHits.h:89
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
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:92
TH1F * hClusterSize
std::map< std::string, TH1F * > hChi2Increment_stereo
std::map< std::string, TH1F * > hChi2GoodHit
std::string srcName
Definition: TestTrackHits.h:84
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
TH1F * hPrjSimHitVecSize
std::string builderName
Definition: TestTrackHits.h:83
std::string tpName
Definition: TestTrackHits.h:85
TH1F * hSt2SimHitVecSize
edm::ESHandle< TransientTrackingRecHitBuilder > theBuilder
Definition: TestTrackHits.h:91
edm::Handle< TrackingParticleCollection > trackingParticleCollectionHandle
Definition: TestTrackHits.h:97
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
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
std::map< std::string, TH1F * > hPullGP_Z_tr_stereo
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:88
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:96
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:82
Definition: Run.h:42
std::map< std::string, TH1F * > hPullGM_X_ts_stereo
std::string updatorName
Definition: TestTrackHits.h:86
std::map< std::string, TH1F * > hPullGM_Y_ts
std::map< std::string, TH1F * > hPullGP_Y_tr_mono