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 #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
Propagator.h
TestTrackHits::hPullGP_X_tr_mono
std::map< std::string, TH1F * > hPullGP_X_tr_mono
Definition: TestTrackHits.h:146
TestTrackHits::probYnoshare
TH1F * probYnoshare
Definition: TestTrackHits.h:135
TestTrackHits::hClusterSize
TH1F * hClusterSize
Definition: TestTrackHits.h:131
StripGeomDetUnit.h
TestTrackHits::propagatorName
std::string propagatorName
Definition: TestTrackHits.h:86
TestTrackHits::hSt1Clsize_vs_Chi2
TH2F * hSt1Clsize_vs_Chi2
Definition: TestTrackHits.h:130
TrackerGeometry.h
TestTrackHits::hPullGP_Y_tr
std::map< std::string, TH1F * > hPullGP_Y_tr
Definition: TestTrackHits.h:116
TestTrackHits::hPullGP_X_rs_stereo
std::map< std::string, TH1F * > hPullGP_X_rs_stereo
Definition: TestTrackHits.h:156
TestTrackHits::probYbad
TH1F * probYbad
Definition: TestTrackHits.h:135
TestTrackHits::hChi2BadHit
std::map< std::string, TH1F * > hChi2BadHit
Definition: TestTrackHits.h:123
TestTrackHits::hPullGM_X_ts_mono
std::map< std::string, TH1F * > hPullGM_X_ts_mono
Definition: TestTrackHits.h:140
TestTrackHits
Definition: TestTrackHits.h:54
edm::Run
Definition: Run.h:45
TestTrackHits::hPullGP_X_ts_stereo
std::map< std::string, TH1F * > hPullGP_X_ts_stereo
Definition: TestTrackHits.h:150
TestTrackHits::probYdelta
TH1F * probYdelta
Definition: TestTrackHits.h:135
TestTrackHits::TestTrackHits
TestTrackHits(const edm::ParameterSet &)
Definition: TestTrackHits.cc:18
TestTrackHits::probXbad
TH1F * probXbad
Definition: TestTrackHits.h:134
TestTrackHits::trackerHitAssociatorConfig_
TrackerHitAssociator::Config trackerHitAssociatorConfig_
Definition: TestTrackHits.h:84
TestTrackHits::hPixSimHitVecSize
TH1F * hPixSimHitVecSize
Definition: TestTrackHits.h:132
MeasurementExtractor.h
TransientRecHitRecord.h
TestTrackHits::thePropagator
edm::ESHandle< Propagator > thePropagator
Definition: TestTrackHits.h:94
TestTrackHits::hChi2Increment
std::map< std::string, TH1F * > hChi2Increment
Definition: TestTrackHits.h:118
TestTrackHits::hPullGP_Z_ts
std::map< std::string, TH1F * > hPullGP_Z_ts
Definition: TestTrackHits.h:108
TestTrackHits::hPullGM_X_ts
std::map< std::string, TH1F * > hPullGM_X_ts
Definition: TestTrackHits.h:109
TestTrackHits::hPullGP_Y_rs
std::map< std::string, TH1F * > hPullGP_Y_rs
Definition: TestTrackHits.h:113
TestTrackHits::theG
edm::ESHandle< TrackerGeometry > theG
Definition: TestTrackHits.h:92
TestTrackHits::hPrjClsize_vs_Chi2
TH2F * hPrjClsize_vs_Chi2
Definition: TestTrackHits.h:130
TestTrackHits::computeChi2Increment
double computeChi2Increment(MeasurementExtractor, TransientTrackingRecHit::ConstRecHitPointer)
Definition: TestTrackHits.cc:1306
TestTrackHits::hPullGP_Y_ts
std::map< std::string, TH1F * > hPullGP_Y_ts
Definition: TestTrackHits.h:107
TestTrackHits::hPullGP_X_tr
std::map< std::string, TH1F * > hPullGP_X_tr
Definition: TestTrackHits.h:115
GluedGeomDet.h
TrackingGeometry.h
TrackerHitAssociator.h
TestTrackHits::hSt1SimHitVecSize
TH1F * hSt1SimHitVecSize
Definition: TestTrackHits.h:132
TestTrackHits::builderName
std::string builderName
Definition: TestTrackHits.h:87
EDAnalyzer.h
TestTrackHits::hTotChi2SharedHit
TH1F * hTotChi2SharedHit
Definition: TestTrackHits.h:127
TrackerHitAssociator::Config
Definition: TrackerHitAssociator.h:57
TestTrackHits::hTotChi2GoodHit
TH1F * hTotChi2GoodHit
Definition: TestTrackHits.h:127
edm::Handle< reco::TrackToTrackingParticleAssociator >
TrajectoryStateUpdator.h
TestTrackHits::trackingParticleCollectionHandle
edm::Handle< TrackingParticleCollection > trackingParticleCollectionHandle
Definition: TestTrackHits.h:101
TkTransientTrackingRecHitBuilder.h
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
TestTrackHits::hChi2IncrementVsEta
std::map< std::string, TH2F * > hChi2IncrementVsEta
Definition: TestTrackHits.h:121
MakerMacros.h
TestTrackHits::computeChi2Increment
double computeChi2Increment(MeasurementExtractor me, TransientTrackingRecHit::ConstRecHitPointer hit)
Definition: TestTrackHits.h:68
TestTrackHits::hPullGP_Z_tr_stereo
std::map< std::string, TH1F * > hPullGP_Z_tr_stereo
Definition: TestTrackHits.h:161
Track.h
TestTrackHits::hPullGP_X_tr_stereo
std::map< std::string, TH1F * > hPullGP_X_tr_stereo
Definition: TestTrackHits.h:159
TestTrackHits::hPullGP_Y_rs_mono
std::map< std::string, TH1F * > hPullGP_Y_rs_mono
Definition: TestTrackHits.h:144
TestTrackHits::hPixClusterSize
TH1F * hPixClusterSize
Definition: TestTrackHits.h:131
TestTrackHits::hSt2Clsize_vs_Chi2
TH2F * hSt2Clsize_vs_Chi2
Definition: TestTrackHits.h:130
TestTrackHits::hChi2GoodHit
std::map< std::string, TH1F * > hChi2GoodHit
Definition: TestTrackHits.h:122
TestTrackHits::hPullGP_X_ts
std::map< std::string, TH1F * > hPullGP_X_ts
Definition: TestTrackHits.h:106
IdealMagneticFieldRecord.h
edm::ESHandle< TrackerGeometry >
TestTrackHits::hPullGP_Y_rs_stereo
std::map< std::string, TH1F * > hPullGP_Y_rs_stereo
Definition: TestTrackHits.h:157
TestTrackHits::theUpdator
edm::ESHandle< TrajectoryStateUpdator > theUpdator
Definition: TestTrackHits.h:96
TestTrackHits::hPullGP_Y_tr_stereo
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
Definition: TestTrackHits.h:160
TestTrackHits::hTotChi2BadHit
TH1F * hTotChi2BadHit
Definition: TestTrackHits.h:127
TestTrackHits::probXgood
TH1F * probXgood
Definition: TestTrackHits.h:134
TestTrackHits::hPullGP_Z_tr
std::map< std::string, TH1F * > hPullGP_Z_tr
Definition: TestTrackHits.h:117
TestTrackHits::theBuilder
edm::ESHandle< TransientTrackingRecHitBuilder > theBuilder
Definition: TestTrackHits.h:95
MeasurementExtractor
Definition: MeasurementExtractor.h:11
TrajTrackAssociation.h
TestTrackHits::theMF
edm::ESHandle< MagneticField > theMF
Definition: TestTrackHits.h:93
TestTrackHits::hPullGP_Z_rs_stereo
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
Definition: TestTrackHits.h:158
TestTrackHits::updatorName
std::string updatorName
Definition: TestTrackHits.h:90
TestTrackHits::beginRun
void beginRun(edm::Run const &run, const edm::EventSetup &) override
Definition: TestTrackHits.cc:38
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TestTrackHits::hChi2DeltaHit
std::map< std::string, TH1F * > hChi2DeltaHit
Definition: TestTrackHits.h:124
TrackerDigiGeometryRecord.h
TestTrackHits::hPullGP_Z_rs_mono
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
Definition: TestTrackHits.h:145
TrackToTrackingParticleAssociator.h
TestTrackHits::hPullGM_Y_ts_mono
std::map< std::string, TH1F * > hPullGM_Y_ts_mono
Definition: TestTrackHits.h:141
edm::ParameterSet
Definition: ParameterSet.h:47
TestTrackHits::hPullGP_Z_ts_stereo
std::map< std::string, TH1F * > hPullGP_Z_ts_stereo
Definition: TestTrackHits.h:152
TestTrackHits::probXnoshare
TH1F * probXnoshare
Definition: TestTrackHits.h:134
Event.h
TestTrackHits::hTotChi2Increment
TH1F * hTotChi2Increment
Definition: TestTrackHits.h:127
TestTrackHits::hPullGP_Y_tr_mono
std::map< std::string, TH1F * > hPullGP_Y_tr_mono
Definition: TestTrackHits.h:147
TestTrackHits::hSt1ClusterSize
TH1F * hSt1ClusterSize
Definition: TestTrackHits.h:131
TestTrackHits::hSt2ClusterSize
TH1F * hSt2ClusterSize
Definition: TestTrackHits.h:131
TestTrackHits::trackAssociator
edm::Handle< reco::TrackToTrackingParticleAssociator > trackAssociator
Definition: TestTrackHits.h:97
TestTrackHits::hPullGP_Z_rs
std::map< std::string, TH1F * > hPullGP_Z_rs
Definition: TestTrackHits.h:114
TestTrackHits::hPullGM_Z_ts_stereo
std::map< std::string, TH1F * > hPullGM_Z_ts_stereo
Definition: TestTrackHits.h:155
TrackingRecHit::ConstRecHitPointer
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
Definition: TrackingRecHit.h:25
TestTrackHits::mergedPull
TH1F * mergedPull
Definition: TestTrackHits.h:133
TestTrackHits::hChi2Increment_stereo
std::map< std::string, TH1F * > hChi2Increment_stereo
Definition: TestTrackHits.h:120
TestTrackHits::probXshared
TH1F * probXshared
Definition: TestTrackHits.h:134
TestTrackHits::probYshared
TH1F * probYshared
Definition: TestTrackHits.h:135
TestTrackHits::hClsize_vs_Chi2
TH2F * hClsize_vs_Chi2
Definition: TestTrackHits.h:129
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:57
TestTrackHits::hSt2SimHitVecSize
TH1F * hSt2SimHitVecSize
Definition: TestTrackHits.h:132
TestTrackHits::hPullGP_Z_ts_mono
std::map< std::string, TH1F * > hPullGP_Z_ts_mono
Definition: TestTrackHits.h:139
TestTrackHits::trajCollectionHandle
edm::Handle< std::vector< Trajectory > > trajCollectionHandle
Definition: TestTrackHits.h:98
TestTrackHits::energyLossRatio
TH1F * energyLossRatio
Definition: TestTrackHits.h:133
TestTrackHits::hPullGM_Z_ts
std::map< std::string, TH1F * > hPullGM_Z_ts
Definition: TestTrackHits.h:111
TestTrackHits::hPrjSimHitVecSize
TH1F * hPrjSimHitVecSize
Definition: TestTrackHits.h:132
TestTrackHits::title
std::stringstream title
Definition: TestTrackHits.h:105
InputTag.h
TestTrackHits::hPrjClusterSize
TH1F * hPrjClusterSize
Definition: TestTrackHits.h:131
TestTrackHits::hTotChi2DeltaHit
TH1F * hTotChi2DeltaHit
Definition: TestTrackHits.h:127
TestTrackHits::hProcess_vs_Chi2
TH2F * hProcess_vs_Chi2
Definition: TestTrackHits.h:129
TestTrackHits::hSimHitVecSize
TH1F * hSimHitVecSize
Definition: TestTrackHits.h:132
TestTrackHits::file
TFile * file
Definition: TestTrackHits.h:104
TestTrackHits::probXdelta
TH1F * probXdelta
Definition: TestTrackHits.h:134
TestTrackHits::hPullGM_Z_ts_mono
std::map< std::string, TH1F * > hPullGM_Z_ts_mono
Definition: TestTrackHits.h:142
Trajectory.h
TestTrackHits::srcName
std::string srcName
Definition: TestTrackHits.h:88
TestTrackHits::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: TestTrackHits.cc:254
TestTrackHits::hGoodHit_vs_Chi2
TH2F * hGoodHit_vs_Chi2
Definition: TestTrackHits.h:129
TestTrackHits::hChi2NSharedHit
std::map< std::string, TH1F * > hChi2NSharedHit
Definition: TestTrackHits.h:125
TestTrackHits::probYgood
TH1F * probYgood
Definition: TestTrackHits.h:135
TestTrackHits::trackCollectionHandle
edm::Handle< edm::View< reco::Track > > trackCollectionHandle
Definition: TestTrackHits.h:99
writedatasetfile.run
run
Definition: writedatasetfile.py:27
TestTrackHits::hChi2SharedHit
std::map< std::string, TH1F * > hChi2SharedHit
Definition: TestTrackHits.h:126
Frameworkfwd.h
TrackingComponentsRecord.h
Exception
Definition: hltDiff.cc:246
TestTrackHits::hTotChi2NSharedHit
TH1F * hTotChi2NSharedHit
Definition: TestTrackHits.h:127
BoundPlane
TestTrackHits::~TestTrackHits
~TestTrackHits() override
Definition: TestTrackHits.cc:36
TestTrackHits::projectHit
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &, const StripGeomDetUnit *, const BoundPlane &)
Definition: TestTrackHits.cc:1280
TransientTrackingRecHitBuilder.h
TestTrackHits::out
std::string out
Definition: TestTrackHits.h:91
TestTrackHits::tpName
std::string tpName
Definition: TestTrackHits.h:89
TestTrackHits::hPullGM_X_ts_stereo
std::map< std::string, TH1F * > hPullGM_X_ts_stereo
Definition: TestTrackHits.h:153
ParameterSet.h
TestTrackHits::hPullGM_Y_ts
std::map< std::string, TH1F * > hPullGM_Y_ts
Definition: TestTrackHits.h:110
TestTrackHits::trajTrackAssociationCollectionHandle
edm::Handle< TrajTrackAssociationCollection > trajTrackAssociationCollectionHandle
Definition: TestTrackHits.h:100
TestTrackHits::hPullGP_Y_ts_mono
std::map< std::string, TH1F * > hPullGP_Y_ts_mono
Definition: TestTrackHits.h:138
TestTrackHits::hPullGP_Y_ts_stereo
std::map< std::string, TH1F * > hPullGP_Y_ts_stereo
Definition: TestTrackHits.h:151
PSimHit
Definition: PSimHit.h:15
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
edm::Event
Definition: Event.h:73
TestTrackHits::hPullGP_X_rs_mono
std::map< std::string, TH1F * > hPullGP_X_rs_mono
Definition: TestTrackHits.h:143
TestTrackHits::hPullGP_Z_tr_mono
std::map< std::string, TH1F * > hPullGP_Z_tr_mono
Definition: TestTrackHits.h:148
TestTrackHits::hPullGP_X_ts_mono
std::map< std::string, TH1F * > hPullGP_X_ts_mono
Definition: TestTrackHits.h:137
TestTrackHits::hPullGM_Y_ts_stereo
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
Definition: TestTrackHits.h:154
TestTrackHits::goodbadmerged
TH1F * goodbadmerged
Definition: TestTrackHits.h:133
TestTrackHits::hPullGP_X_rs
std::map< std::string, TH1F * > hPullGP_X_rs
Definition: TestTrackHits.h:112
hit
Definition: SiStripHitEffFromCalibTree.cc:88
TestTrackHits::endJob
void endJob() override
Definition: TestTrackHits.cc:973
StripGeomDetUnit
Definition: StripGeomDetUnit.h:15
TestTrackHits::hChi2Increment_mono
std::map< std::string, TH1F * > hChi2Increment_mono
Definition: TestTrackHits.h:119
TestTrackHits::hPixClsize_vs_Chi2
TH2F * hPixClsize_vs_Chi2
Definition: TestTrackHits.h:130