CMS 3D CMS Logo

HitResol.h
Go to the documentation of this file.
1 #ifndef CalibTracker_SiStripHitResolution_HitResol_H
2 #define CalibTracker_SiStripHitResolution_HitResol_H
3 
4 // system includes
5 #include <vector>
6 
7 // user includes
24 
25 // ROOT includes
26 #include "TTree.h"
27 #include "TROOT.h"
28 #include "TH1F.h"
29 #include "TH2F.h"
30 
31 class TrackerTopology;
32 
33 class HitResol : public edm::one::EDAnalyzer<edm::one::SharedResources> {
34 public:
35  explicit HitResol(const edm::ParameterSet& conf);
36  ~HitResol() override = default;
37  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
39  void getSimHitRes(const GeomDetUnit* det,
40  const LocalVector& trackdirection,
41  const TrackingRecHit& recHit,
42  float& trackWidth,
43  float* pitch,
45  double getSimpleRes(const TrajectoryMeasurement* traj1);
46  bool getPairParameters(const MagneticField* magField_,
48  const TrajectoryMeasurement* traj1,
49  const TrajectoryMeasurement* traj2,
50  float& pairPath,
51  float& hitDX,
52  float& trackDX,
53  float& trackDXE,
54  float& trackParamX,
55  float& trackParamY,
56  float& trackParamDXDZ,
57  float& trackParamDYDZ,
58  float& trackParamXE,
59  float& trackParamYE,
60  float& trackParamDXDZE,
61  float& trackParamDYDZE);
62  typedef std::vector<Trajectory> TrajectoryCollection;
63 
64 private:
65  void beginJob() override;
66  void endJob() override;
67  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
68 
69  // ----------member data ---------------------------
70 
71  // ED tokens
76 
77  // ES tokens
83 
84  // configuration parameters
85  const bool addLumi_;
86  const bool DEBUG_;
87  const bool cutOnTracks_;
88  const double momentumCut_;
89  const int compSettings_;
90  const unsigned int usePairsOnly_;
91  const unsigned int layers_;
92  const unsigned int trackMultiplicityCut_;
93 
94  // output file
95  TTree* reso;
96  TTree* treso;
97  std::map<TString, TH2F*> histos2d_;
98 
99  // conversion
100  static constexpr float cmToUm = 10000.f;
101 
102  // counters
104 
105  // Tree declarations
106  // Hit Resolution Ntuple Content
107  float mymom;
108  int numHits;
115  float uerr2;
116  float uerr2_2;
117  unsigned int clusterWidth;
118  unsigned int clusterWidth_2;
119  unsigned int clusterCharge;
120  unsigned int clusterCharge_2;
121  unsigned int iidd1;
122  unsigned int iidd2;
123  unsigned int pairsOnly;
124  float pairPath;
125  float mypitch1;
126  float mypitch2;
127  float expWidth;
128  float expWidth_2;
129  float driftAlpha;
131  float thickness;
132  float thickness_2;
133  float trackWidth;
135  float atEdge;
136  float atEdge_2;
137  float simpleRes;
138  float hitDX;
139  float trackDX;
140  float trackDXE;
141  float trackParamX;
142  float trackParamY;
150  float track_pt;
151  float track_eta;
152  float track_width;
153  float track_phi;
155  float N1;
156  float N2;
157  float N1uProj;
158  float N2uProj;
159  int Nstrips;
161 };
162 
163 #endif
std::pair< LocalPoint, LocalError > LocalValues
~HitResol() override=default
double checkConsistency(const StripClusterParameterEstimator::LocalValues &parameters, double xx, double xerr)
Definition: HitResol.cc:459
float uerr2
Definition: HitResol.h:115
int Nstrips_2
Definition: HitResol.h:160
float simpleRes
Definition: HitResol.h:137
int NumberOf_tracks
Definition: HitResol.h:109
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
Definition: HitResol.h:82
float StripErrorSquared1
Definition: HitResol.h:113
int Nstrips
Definition: HitResol.h:159
float uerr2_2
Definition: HitResol.h:116
float trackDX
Definition: HitResol.h:139
const edm::EDGetTokenT< reco::TrackCollection > tkToken_
Definition: HitResol.h:75
float trackParamDYDZE
Definition: HitResol.h:148
HitResol(const edm::ParameterSet &conf)
Definition: HitResol.cc:71
float N1
Definition: HitResol.h:155
float pairPath
Definition: HitResol.h:124
float track_trackChi2
Definition: HitResol.h:154
float trackParamDYDZ
Definition: HitResol.h:146
int EventTrackCKF
Definition: HitResol.h:103
int numHits
Definition: HitResol.h:108
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
Definition: ShallowTools.cc:36
void endJob() override
Definition: HitResol.cc:450
float atEdge
Definition: HitResol.h:135
float thickness
Definition: HitResol.h:131
const unsigned int usePairsOnly_
Definition: HitResol.h:90
const edm::EDGetTokenT< reco::TrackCollection > combinatorialTracks_token_
Definition: HitResol.h:73
const int compSettings_
Definition: HitResol.h:89
float mypitch2
Definition: HitResol.h:126
int events
Definition: HitResol.h:103
const edm::ESGetToken< SiStripQuality, SiStripQualityRcd > siStripQualityToken_
Definition: HitResol.h:81
float trackParamXE
Definition: HitResol.h:143
static constexpr float cmToUm
Definition: HitResol.h:100
float StripCPE1_smp_pos_error
Definition: HitResol.h:111
unsigned int clusterCharge_2
Definition: HitResol.h:120
float trackParamX
Definition: HitResol.h:141
const edm::EDGetTokenT< std::vector< Trajectory > > tjToken_
Definition: HitResol.h:74
float trackParamYE
Definition: HitResol.h:144
bool getPairParameters(const MagneticField *magField_, AnalyticalPropagator &propagator, const TrajectoryMeasurement *traj1, const TrajectoryMeasurement *traj2, float &pairPath, float &hitDX, float &trackDX, float &trackDXE, float &trackParamX, float &trackParamY, float &trackParamDXDZ, float &trackParamDYDZ, float &trackParamXE, float &trackParamYE, float &trackParamDXDZE, float &trackParamDYDZE)
Definition: HitResol.cc:511
float trackDXE
Definition: HitResol.h:140
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HitResol.cc:630
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: HitResol.h:79
float track_eta
Definition: HitResol.h:151
void beginJob() override
Definition: HitResol.cc:92
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: HitResol.cc:159
float trackWidth_2
Definition: HitResol.h:134
const bool DEBUG_
Definition: HitResol.h:86
float trackParamDXDZ
Definition: HitResol.h:145
const bool cutOnTracks_
Definition: HitResol.h:87
float StripErrorSquared2
Definition: HitResol.h:114
float driftAlpha_2
Definition: HitResol.h:130
unsigned int pairsOnly
Definition: HitResol.h:123
float expWidth
Definition: HitResol.h:127
double getSimpleRes(const TrajectoryMeasurement *traj1)
Definition: HitResol.cc:492
float thickness_2
Definition: HitResol.h:132
float N2uProj
Definition: HitResol.h:158
std::map< TString, TH2F * > histos2d_
Definition: HitResol.h:97
const bool addLumi_
Definition: HitResol.h:85
float track_momentum
Definition: HitResol.h:149
float StripCPE2_smp_pos_error
Definition: HitResol.h:112
const edm::EDGetTokenT< LumiScalersCollection > scalerToken_
Definition: HitResol.h:72
float expWidth_2
Definition: HitResol.h:128
std::vector< Trajectory > TrajectoryCollection
Definition: HitResol.h:62
TTree * treso
Definition: HitResol.h:96
float hitDX
Definition: HitResol.h:138
float trackWidth
Definition: HitResol.h:133
const edm::ESGetToken< StripClusterParameterEstimator, TkStripCPERecord > cpeToken_
Definition: HitResol.h:80
float N1uProj
Definition: HitResol.h:157
unsigned int iidd1
Definition: HitResol.h:121
float ProbTrackChi2
Definition: HitResol.h:110
float trackParamDXDZE
Definition: HitResol.h:147
float track_pt
Definition: HitResol.h:150
float N2
Definition: HitResol.h:156
float mymom
Definition: HitResol.h:107
float track_phi
Definition: HitResol.h:153
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: HitResol.h:78
unsigned int clusterWidth
Definition: HitResol.h:117
TTree * reso
Definition: HitResol.h:95
float track_width
Definition: HitResol.h:152
unsigned int iidd2
Definition: HitResol.h:122
float trackParamY
Definition: HitResol.h:142
float atEdge_2
Definition: HitResol.h:136
unsigned int clusterCharge
Definition: HitResol.h:119
const unsigned int layers_
Definition: HitResol.h:91
const unsigned int trackMultiplicityCut_
Definition: HitResol.h:92
unsigned int clusterWidth_2
Definition: HitResol.h:118
float mypitch1
Definition: HitResol.h:125
const double momentumCut_
Definition: HitResol.h:88
void getSimHitRes(const GeomDetUnit *det, const LocalVector &trackdirection, const TrackingRecHit &recHit, float &trackWidth, float *pitch, LocalVector &drift)
Definition: HitResol.cc:468
float driftAlpha
Definition: HitResol.h:129