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 
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 endJob() override;
63 
64  std::pair<LocalPoint, LocalVector> projectHit(const PSimHit &, const StripGeomDetUnit *, const BoundPlane &);
65 
66  template <unsigned int D>
69  switch (hit->dimension()) {
70  case 1:
71  return computeChi2Increment<1>(me, hit);
72  case 2:
73  return computeChi2Increment<2>(me, hit);
74  case 3:
75  return computeChi2Increment<3>(me, hit);
76  case 4:
77  return computeChi2Increment<4>(me, hit);
78  case 5:
79  return computeChi2Increment<5>(me, hit);
80  }
81  throw cms::Exception("CkfDebugger error: rechit of dimension not 1,2,3,4,5");
82  }
83 
85 
102  //RecoTrackSelector selectRecoTracks;
103 
104  TFile *file;
105  std::stringstream title;
106  std::map<std::string, TH1F *> hPullGP_X_ts;
107  std::map<std::string, TH1F *> hPullGP_Y_ts;
108  std::map<std::string, TH1F *> hPullGP_Z_ts;
109  std::map<std::string, TH1F *> hPullGM_X_ts;
110  std::map<std::string, TH1F *> hPullGM_Y_ts;
111  std::map<std::string, TH1F *> hPullGM_Z_ts;
112  std::map<std::string, TH1F *> hPullGP_X_rs;
113  std::map<std::string, TH1F *> hPullGP_Y_rs;
114  std::map<std::string, TH1F *> hPullGP_Z_rs;
115  std::map<std::string, TH1F *> hPullGP_X_tr;
116  std::map<std::string, TH1F *> hPullGP_Y_tr;
117  std::map<std::string, TH1F *> hPullGP_Z_tr;
118  std::map<std::string, TH1F *> hChi2Increment;
119  std::map<std::string, TH1F *> hChi2Increment_mono;
120  std::map<std::string, TH1F *> hChi2Increment_stereo;
121  std::map<std::string, TH2F *> hChi2IncrementVsEta;
122  std::map<std::string, TH1F *> hChi2GoodHit;
123  std::map<std::string, TH1F *> hChi2BadHit;
124  std::map<std::string, TH1F *> hChi2DeltaHit;
125  std::map<std::string, TH1F *> hChi2NSharedHit;
126  std::map<std::string, TH1F *> hChi2SharedHit;
136 
137  std::map<std::string, TH1F *> hPullGP_X_ts_mono;
138  std::map<std::string, TH1F *> hPullGP_Y_ts_mono;
139  std::map<std::string, TH1F *> hPullGP_Z_ts_mono;
140  std::map<std::string, TH1F *> hPullGM_X_ts_mono;
141  std::map<std::string, TH1F *> hPullGM_Y_ts_mono;
142  std::map<std::string, TH1F *> hPullGM_Z_ts_mono;
143  std::map<std::string, TH1F *> hPullGP_X_rs_mono;
144  std::map<std::string, TH1F *> hPullGP_Y_rs_mono;
145  std::map<std::string, TH1F *> hPullGP_Z_rs_mono;
146  std::map<std::string, TH1F *> hPullGP_X_tr_mono;
147  std::map<std::string, TH1F *> hPullGP_Y_tr_mono;
148  std::map<std::string, TH1F *> hPullGP_Z_tr_mono;
149 
150  std::map<std::string, TH1F *> hPullGP_X_ts_stereo;
151  std::map<std::string, TH1F *> hPullGP_Y_ts_stereo;
152  std::map<std::string, TH1F *> hPullGP_Z_ts_stereo;
153  std::map<std::string, TH1F *> hPullGM_X_ts_stereo;
154  std::map<std::string, TH1F *> hPullGM_Y_ts_stereo;
155  std::map<std::string, TH1F *> hPullGM_Z_ts_stereo;
156  std::map<std::string, TH1F *> hPullGP_X_rs_stereo;
157  std::map<std::string, TH1F *> hPullGP_Y_rs_stereo;
158  std::map<std::string, TH1F *> hPullGP_Z_rs_stereo;
159  std::map<std::string, TH1F *> hPullGP_X_tr_stereo;
160  std::map<std::string, TH1F *> hPullGP_Y_tr_stereo;
161  std::map<std::string, TH1F *> hPullGP_Z_tr_stereo;
162 };
163 
164 #endif
std::map< std::string, TH2F * > hChi2IncrementVsEta
std::string out
Definition: TestTrackHits.h:91
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
std::map< std::string, TH1F * > hPullGM_Z_ts
TH1F * hPixSimHitVecSize
TH1F * probXnoshare
TH2F * hPrjClsize_vs_Chi2
double computeChi2Increment(MeasurementExtractor me, TransientTrackingRecHit::ConstRecHitPointer hit)
Definition: TestTrackHits.h:68
TH1F * hSt2ClusterSize
std::map< std::string, TH1F * > hPullGP_X_tr
std::map< std::string, TH1F * > hPullGP_Z_rs
TrackerHitAssociator::Config trackerHitAssociatorConfig_
Definition: TestTrackHits.h:84
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
edm::Handle< std::vector< Trajectory > > trajCollectionHandle
Definition: TestTrackHits.h:98
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
Definition: TestTrackHits.h:97
TH1F * hSimHitVecSize
std::map< std::string, TH1F * > hChi2Increment_mono
std::map< std::string, TH1F * > hChi2Increment
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:94
std::map< std::string, TH1F * > hPullGP_X_rs_mono
edm::Handle< edm::View< reco::Track > > trackCollectionHandle
Definition: TestTrackHits.h:99
edm::ESHandle< MagneticField > theMF
Definition: TestTrackHits.h:93
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:96
TH1F * hClusterSize
std::string srcName
Definition: TestTrackHits.h:88
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:87
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
std::map< std::string, TH1F * > hPullGP_Y_tr
std::string tpName
Definition: TestTrackHits.h:89
std::map< std::string, TH1F * > hPullGP_Z_tr_mono
TH1F * hSt2SimHitVecSize
std::map< std::string, TH1F * > hPullGP_X_tr_mono
std::map< std::string, TH1F * > hPullGP_X_ts_stereo
edm::ESHandle< TransientTrackingRecHitBuilder > theBuilder
Definition: TestTrackHits.h:95
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
std::map< std::string, TH1F * > hPullGM_X_ts
edm::ESHandle< TrackerGeometry > theG
Definition: TestTrackHits.h:92
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
TH1F * hTotChi2DeltaHit
std::string propagatorName
Definition: TestTrackHits.h:86
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
std::map< std::string, TH1F * > hPullGP_Y_ts_mono
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:90