CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TestHits.h
Go to the documentation of this file.
1 #ifndef TESTHITS_H
2 #define TESTHITS_H
3 
4 // -*- C++ -*-
5 //
6 // Package: TestHits
7 // Class: TestHits
8 //
16 //
17 // Original Author: Giuseppe Cerati
18 // Created: Tue Feb 13 17:29:10 CET 2007
19 //
20 //
21 #include <memory>
22 #include <vector>
23 #include <string>
44 #include <sstream>
45 #include <TFile.h>
46 #include <TH1F.h>
47 #include <TH2F.h>
48 
49 class TestHits : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
50 public:
51  explicit TestHits(const edm::ParameterSet&);
52  ~TestHits() override;
53 
54 private:
55  void beginRun(edm::Run const& run, const edm::EventSetup&) override;
56  void analyze(const edm::Event&, const edm::EventSetup&) override;
57  void endRun(edm::Run const& run, const edm::EventSetup&) override {}
58  void endJob() override;
59 
60  std::pair<LocalPoint, LocalVector> projectHit(const PSimHit&, const StripGeomDetUnit*, const BoundPlane&);
61 
63 
64  double mineta, maxeta;
65 
70 
77 
85 
86  TFile* file;
87  std::stringstream title;
88  std::map<std::string, TH1F*> hPullGP_X_ts;
89  std::map<std::string, TH1F*> hPullGP_Y_ts;
90  std::map<std::string, TH1F*> hPullGP_Z_ts;
91  std::map<std::string, TH1F*> hPullGM_X_ts;
92  std::map<std::string, TH1F*> hPullGM_Y_ts;
93  std::map<std::string, TH1F*> hPullGM_Z_ts;
94  std::map<std::string, TH1F*> hPullGP_X_rs;
95  std::map<std::string, TH1F*> hPullGP_Y_rs;
96  std::map<std::string, TH1F*> hPullGP_Z_rs;
97  std::map<std::string, TH1F*> hPullGP_X_tr;
98  std::map<std::string, TH1F*> hPullGP_Y_tr;
99  std::map<std::string, TH1F*> hPullGP_Z_tr;
100  std::map<std::string, TH1F*> hChi2Increment;
103 
104  std::map<std::string, TH1F*> hPullGP_X_ts_mono;
105  std::map<std::string, TH1F*> hPullGP_Y_ts_mono;
106  std::map<std::string, TH1F*> hPullGP_Z_ts_mono;
107  std::map<std::string, TH1F*> hPullGM_X_ts_mono;
108  std::map<std::string, TH1F*> hPullGM_Y_ts_mono;
109  std::map<std::string, TH1F*> hPullGM_Z_ts_mono;
110  std::map<std::string, TH1F*> hPullGP_X_rs_mono;
111  std::map<std::string, TH1F*> hPullGP_Y_rs_mono;
112  std::map<std::string, TH1F*> hPullGP_Z_rs_mono;
113  std::map<std::string, TH1F*> hPullGP_X_tr_mono;
114  std::map<std::string, TH1F*> hPullGP_Y_tr_mono;
115  std::map<std::string, TH1F*> hPullGP_Z_tr_mono;
116 
117  std::map<std::string, TH1F*> hPullGP_X_ts_stereo;
118  std::map<std::string, TH1F*> hPullGP_Y_ts_stereo;
119  std::map<std::string, TH1F*> hPullGP_Z_ts_stereo;
120  std::map<std::string, TH1F*> hPullGM_X_ts_stereo;
121  std::map<std::string, TH1F*> hPullGM_Y_ts_stereo;
122  std::map<std::string, TH1F*> hPullGM_Z_ts_stereo;
123  std::map<std::string, TH1F*> hPullGP_X_rs_stereo;
124  std::map<std::string, TH1F*> hPullGP_Y_rs_stereo;
125  std::map<std::string, TH1F*> hPullGP_Z_rs_stereo;
126  std::map<std::string, TH1F*> hPullGP_X_tr_stereo;
127  std::map<std::string, TH1F*> hPullGP_Y_tr_stereo;
128  std::map<std::string, TH1F*> hPullGP_Z_tr_stereo;
129 };
130 
131 #endif
edm::Handle< TrackCandidateCollection > theTCCollection
Definition: TestHits.h:76
std::map< std::string, TH1F * > hPullGP_Y_tr_mono
Definition: TestHits.h:114
std::map< std::string, TH1F * > hPullGM_Z_ts_stereo
Definition: TestHits.h:122
std::map< std::string, TH1F * > hPullGM_X_ts_mono
Definition: TestHits.h:107
std::map< std::string, TH1F * > hPullGP_X_tr
Definition: TestHits.h:97
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &, const StripGeomDetUnit *, const BoundPlane &)
Definition: TestHits.cc:1203
std::map< std::string, TH1F * > hPullGP_X_ts
Definition: TestHits.h:88
std::map< std::string, TH1F * > hPullGM_Z_ts
Definition: TestHits.h:93
std::map< std::string, TH1F * > hPullGP_X_rs_mono
Definition: TestHits.h:110
TH1F * hTotChi2Increment
Definition: TestHits.h:101
std::map< std::string, TH1F * > hPullGP_Z_tr
Definition: TestHits.h:99
std::map< std::string, TH1F * > hPullGM_X_ts_stereo
Definition: TestHits.h:120
std::map< std::string, TH1F * > hPullGP_Z_tr_mono
Definition: TestHits.h:115
edm::ESHandle< TransientTrackingRecHitBuilder > theBuilder
Definition: TestHits.h:74
std::map< std::string, TH1F * > hPullGM_Z_ts_mono
Definition: TestHits.h:109
std::map< std::string, TH1F * > hPullGP_Y_rs_stereo
Definition: TestHits.h:124
std::string builderName
Definition: TestHits.h:67
double mineta
Definition: TestHits.h:64
edm::ESGetToken< TrajectoryFitter, TrajectoryFitter::Record > fitToken
Definition: TestHits.h:82
std::map< std::string, TH1F * > hPullGP_Z_rs
Definition: TestHits.h:96
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
Definition: TestHits.h:125
void beginRun(edm::Run const &run, const edm::EventSetup &) override
Definition: TestHits.cc:45
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theMFToken
Definition: TestHits.h:79
void endRun(edm::Run const &run, const edm::EventSetup &) override
Definition: TestHits.h:57
std::map< std::string, TH1F * > hPullGP_X_tr_mono
Definition: TestHits.h:113
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken
Definition: TestHits.h:84
TrackerHitAssociator::Config trackerHitAssociatorConfig_
Definition: TestHits.h:62
std::map< std::string, TH1F * > hPullGP_Y_rs_mono
Definition: TestHits.h:111
edm::ESHandle< Propagator > thePropagator
Definition: TestHits.h:73
edm::ESGetToken< Propagator, TrackingComponentsRecord > thePropagatorToken
Definition: TestHits.h:80
std::map< std::string, TH1F * > hPullGP_Y_tr
Definition: TestHits.h:98
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theBuilderToken
Definition: TestHits.h:81
std::map< std::string, TH1F * > hPullGP_X_rs
Definition: TestHits.h:94
std::map< std::string, TH1F * > hPullGP_X_rs_stereo
Definition: TestHits.h:123
std::map< std::string, TH1F * > hPullGP_X_tr_stereo
Definition: TestHits.h:126
std::map< std::string, TH1F * > hPullGP_X_ts_stereo
Definition: TestHits.h:117
std::string propagatorName
Definition: TestHits.h:66
std::map< std::string, TH1F * > hPullGP_Y_ts
Definition: TestHits.h:89
std::map< std::string, TH1F * > hPullGP_Y_ts_mono
Definition: TestHits.h:105
std::map< std::string, TH1F * > hPullGP_Z_ts_mono
Definition: TestHits.h:106
edm::ESHandle< TrackerGeometry > theG
Definition: TestHits.h:71
edm::ESHandle< TrajectoryFitter > fit
Definition: TestHits.h:75
std::map< std::string, TH1F * > hPullGP_Z_ts
Definition: TestHits.h:90
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
Definition: TestHits.h:121
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
Definition: TestHits.h:127
edm::EDGetTokenT< TrackCandidateCollection > theTCCollectionToken
Definition: TestHits.h:83
~TestHits() override
Definition: TestHits.cc:43
TH2F * hProcess_vs_Chi2
Definition: TestHits.h:102
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
Definition: TestHits.h:112
std::map< std::string, TH1F * > hPullGM_Y_ts
Definition: TestHits.h:92
edm::ESHandle< MagneticField > theMF
Definition: TestHits.h:72
std::map< std::string, TH1F * > hChi2Increment
Definition: TestHits.h:100
TH2F * hClsize_vs_Chi2
Definition: TestHits.h:102
std::map< std::string, TH1F * > hPullGM_X_ts
Definition: TestHits.h:91
std::map< std::string, TH1F * > hPullGP_Y_rs
Definition: TestHits.h:95
TFile * file
Definition: TestHits.h:86
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > theGToken
Definition: TestHits.h:78
std::map< std::string, TH1F * > hPullGM_Y_ts_mono
Definition: TestHits.h:108
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: TestHits.cc:199
std::string fname
Definition: TestHits.h:69
std::map< std::string, TH1F * > hPullGP_Y_ts_stereo
Definition: TestHits.h:118
std::string srcName
Definition: TestHits.h:68
std::map< std::string, TH1F * > hPullGP_Z_ts_stereo
Definition: TestHits.h:119
TestHits(const edm::ParameterSet &)
Definition: TestHits.cc:24
std::map< std::string, TH1F * > hPullGP_X_ts_mono
Definition: TestHits.h:104
Definition: Run.h:45
std::stringstream title
Definition: TestHits.h:87
std::map< std::string, TH1F * > hPullGP_Z_tr_stereo
Definition: TestHits.h:128
double maxeta
Definition: TestHits.h:64
void endJob() override
Definition: TestHits.cc:954