CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 //
19 //
20 
21 #include <memory>
22 #include <vector>
45 #include <TFile.h>
46 #include <TH1F.h>
47 #include <TH2F.h>
51 //#include "PhysicsTools/RecoAlgos/interface/RecoTrackSelector.h"
52 #include <sstream>
53 
54 class TestTrackHits : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
55 public:
56  explicit TestTrackHits(const edm::ParameterSet &);
57  ~TestTrackHits() override;
58 
59 private:
60  void beginRun(edm::Run const &run, const edm::EventSetup &) override;
61  void analyze(const edm::Event &, const edm::EventSetup &) override;
62  void endRun(edm::Run const &run, const edm::EventSetup &) override {}
63  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:
72  return computeChi2Increment<1>(me, hit);
73  case 2:
74  return computeChi2Increment<2>(me, hit);
75  case 3:
76  return computeChi2Increment<3>(me, hit);
77  case 4:
78  return computeChi2Increment<4>(me, hit);
79  case 5:
80  return computeChi2Increment<5>(me, hit);
81  }
82  throw cms::Exception("CkfDebugger error: rechit of dimension not 1,2,3,4,5");
83  }
84 
86 
109  //RecoTrackSelector selectRecoTracks;
110 
111  TFile *file;
112  std::stringstream title;
113  std::map<std::string, TH1F *> hPullGP_X_ts;
114  std::map<std::string, TH1F *> hPullGP_Y_ts;
115  std::map<std::string, TH1F *> hPullGP_Z_ts;
116  std::map<std::string, TH1F *> hPullGM_X_ts;
117  std::map<std::string, TH1F *> hPullGM_Y_ts;
118  std::map<std::string, TH1F *> hPullGM_Z_ts;
119  std::map<std::string, TH1F *> hPullGP_X_rs;
120  std::map<std::string, TH1F *> hPullGP_Y_rs;
121  std::map<std::string, TH1F *> hPullGP_Z_rs;
122  std::map<std::string, TH1F *> hPullGP_X_tr;
123  std::map<std::string, TH1F *> hPullGP_Y_tr;
124  std::map<std::string, TH1F *> hPullGP_Z_tr;
125  std::map<std::string, TH1F *> hChi2Increment;
126  std::map<std::string, TH1F *> hChi2Increment_mono;
127  std::map<std::string, TH1F *> hChi2Increment_stereo;
128  std::map<std::string, TH2F *> hChi2IncrementVsEta;
129  std::map<std::string, TH1F *> hChi2GoodHit;
130  std::map<std::string, TH1F *> hChi2BadHit;
131  std::map<std::string, TH1F *> hChi2DeltaHit;
132  std::map<std::string, TH1F *> hChi2NSharedHit;
133  std::map<std::string, TH1F *> hChi2SharedHit;
143 
144  std::map<std::string, TH1F *> hPullGP_X_ts_mono;
145  std::map<std::string, TH1F *> hPullGP_Y_ts_mono;
146  std::map<std::string, TH1F *> hPullGP_Z_ts_mono;
147  std::map<std::string, TH1F *> hPullGM_X_ts_mono;
148  std::map<std::string, TH1F *> hPullGM_Y_ts_mono;
149  std::map<std::string, TH1F *> hPullGM_Z_ts_mono;
150  std::map<std::string, TH1F *> hPullGP_X_rs_mono;
151  std::map<std::string, TH1F *> hPullGP_Y_rs_mono;
152  std::map<std::string, TH1F *> hPullGP_Z_rs_mono;
153  std::map<std::string, TH1F *> hPullGP_X_tr_mono;
154  std::map<std::string, TH1F *> hPullGP_Y_tr_mono;
155  std::map<std::string, TH1F *> hPullGP_Z_tr_mono;
156 
157  std::map<std::string, TH1F *> hPullGP_X_ts_stereo;
158  std::map<std::string, TH1F *> hPullGP_Y_ts_stereo;
159  std::map<std::string, TH1F *> hPullGP_Z_ts_stereo;
160  std::map<std::string, TH1F *> hPullGM_X_ts_stereo;
161  std::map<std::string, TH1F *> hPullGM_Y_ts_stereo;
162  std::map<std::string, TH1F *> hPullGM_Z_ts_stereo;
163  std::map<std::string, TH1F *> hPullGP_X_rs_stereo;
164  std::map<std::string, TH1F *> hPullGP_Y_rs_stereo;
165  std::map<std::string, TH1F *> hPullGP_Z_rs_stereo;
166  std::map<std::string, TH1F *> hPullGP_X_tr_stereo;
167  std::map<std::string, TH1F *> hPullGP_Y_tr_stereo;
168  std::map<std::string, TH1F *> hPullGP_Z_tr_stereo;
169 };
170 
171 #endif
std::map< std::string, TH2F * > hChi2IncrementVsEta
std::string out
Definition: TestTrackHits.h:92
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
std::map< std::string, TH1F * > hPullGM_Z_ts
TH1F * hPixSimHitVecSize
TH1F * probXnoshare
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theBuilderToken
TH2F * hPrjClsize_vs_Chi2
double computeChi2Increment(MeasurementExtractor me, TransientTrackingRecHit::ConstRecHitPointer hit)
Definition: TestTrackHits.h:69
TH1F * hSt2ClusterSize
std::map< std::string, TH1F * > hPullGP_X_tr
std::map< std::string, TH1F * > hPullGP_Z_rs
TrackerHitAssociator::Config trackerHitAssociatorConfig_
Definition: TestTrackHits.h:85
std::map< std::string, TH1F * > hChi2Increment_stereo
std::map< std::string, TH1F * > hPullGM_Y_ts_mono
TH1F * hTotChi2GoodHit
void endJob() override
std::map< std::string, TH1F * > hChi2BadHit
std::map< std::string, TH1F * > hPullGP_Y_ts
TH2F * hSt2Clsize_vs_Chi2
std::map< std::string, TH1F * > hPullGP_X_ts_mono
TH1F * probYnoshare
void endRun(edm::Run const &run, const edm::EventSetup &) override
Definition: TestTrackHits.h:62
edm::Handle< std::vector< Trajectory > > trajCollectionHandle
std::map< std::string, TH1F * > hPullGP_Y_ts_stereo
void analyze(const edm::Event &, const edm::EventSetup &) override
std::map< std::string, TH1F * > hChi2DeltaHit
TH2F * hSt1Clsize_vs_Chi2
TH2F * hGoodHit_vs_Chi2
void beginRun(edm::Run const &run, const edm::EventSetup &) override
edm::Handle< reco::TrackToTrackingParticleAssociator > trackAssociator
TH1F * hSimHitVecSize
std::map< std::string, TH1F * > hChi2Increment_mono
std::map< std::string, TH1F * > hChi2Increment
edm::ESGetToken< TrajectoryStateUpdator, TrackingComponentsRecord > theUpdatorToken
std::map< std::string, TH1F * > hPullGP_X_rs_stereo
TH2F * hPixClsize_vs_Chi2
std::map< std::string, TH1F * > hPullGP_X_ts
std::stringstream title
TH1F * energyLossRatio
TH1F * probYshared
edm::ESHandle< Propagator > thePropagator
Definition: TestTrackHits.h:95
std::map< std::string, TH1F * > hPullGP_X_rs_mono
edm::Handle< edm::View< reco::Track > > trackCollectionHandle
edm::ESHandle< MagneticField > theMF
Definition: TestTrackHits.h:94
std::map< std::string, TH1F * > hPullGP_Y_tr_mono
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
TH2F * hProcess_vs_Chi2
std::map< std::string, TH1F * > hPullGP_Z_ts
TestTrackHits(const edm::ParameterSet &)
edm::ESHandle< TrajectoryStateUpdator > theUpdator
Definition: TestTrackHits.h:97
TH1F * hClusterSize
std::string srcName
Definition: TestTrackHits.h:89
TH1F * hTotChi2SharedHit
std::map< std::string, TH1F * > hPullGP_Y_rs_mono
TH1F * goodbadmerged
std::map< std::string, TH1F * > hPullGM_Y_ts
std::map< std::string, TH1F * > hPullGM_Z_ts_stereo
TH1F * hPrjSimHitVecSize
std::string builderName
Definition: TestTrackHits.h:88
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
std::map< std::string, TH1F * > hPullGP_Y_tr
std::string tpName
Definition: TestTrackHits.h:90
std::map< std::string, TH1F * > hPullGP_Z_tr_mono
TH1F * hSt2SimHitVecSize
std::map< std::string, TH1F * > hPullGP_X_tr_mono
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > theGToken
Definition: TestTrackHits.h:98
std::map< std::string, TH1F * > hPullGP_X_ts_stereo
edm::ESHandle< TransientTrackingRecHitBuilder > theBuilder
Definition: TestTrackHits.h:96
edm::Handle< TrackingParticleCollection > trackingParticleCollectionHandle
std::map< std::string, TH1F * > hChi2SharedHit
TH1F * hTotChi2NSharedHit
TH2F * hClsize_vs_Chi2
TH1F * hTotChi2Increment
std::map< std::string, TH1F * > hChi2GoodHit
TH1F * hSt1SimHitVecSize
TH1F * hSt1ClusterSize
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > theTopoToken
std::map< std::string, TH1F * > hPullGM_X_ts
edm::ESHandle< TrackerGeometry > theG
Definition: TestTrackHits.h:93
std::map< std::string, TH1F * > hPullGP_Y_rs_stereo
std::map< std::string, TH1F * > hPullGP_Z_tr
TH1F * probXshared
std::map< std::string, TH1F * > hPullGP_Z_tr_stereo
std::map< std::string, TH1F * > hPullGP_Z_ts_stereo
std::map< std::string, TH1F * > hPullGM_Z_ts_mono
std::map< std::string, TH1F * > hPullGP_Z_ts_mono
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &, const StripGeomDetUnit *, const BoundPlane &)
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
std::map< std::string, TH1F * > hPullGP_X_rs
edm::Handle< TrajTrackAssociationCollection > trajTrackAssociationCollectionHandle
TH1F * hPrjClusterSize
std::map< std::string, TH1F * > hPullGM_X_ts_stereo
std::map< std::string, TH1F * > hChi2NSharedHit
TH1F * hTotChi2BadHit
~TestTrackHits() override
TH1F * hPixClusterSize
double computeChi2Increment(MeasurementExtractor, TransientTrackingRecHit::ConstRecHitPointer)
std::map< std::string, TH1F * > hPullGP_X_tr_stereo
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theMFToken
Definition: TestTrackHits.h:99
TH1F * hTotChi2DeltaHit
std::string propagatorName
Definition: TestTrackHits.h:87
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
std::map< std::string, TH1F * > hPullGP_Y_ts_mono
edm::ESGetToken< Propagator, TrackingComponentsRecord > thePropagatorToken
std::map< std::string, TH1F * > hPullGP_Y_rs
std::map< std::string, TH1F * > hPullGM_X_ts_mono
Definition: Run.h:45
std::string updatorName
Definition: TestTrackHits.h:91