CMS 3D CMS Logo

SiPixelErrorEstimation.h
Go to the documentation of this file.
1 
2 #ifndef CalibTracker_SiPixelerrorEstimation_SiPixelErrorEstimation_h
3 #define CalibTracker_SiPixelerrorEstimation_SiPixelErrorEstimation_h
4 
5 #include <memory>
6 
7 // user include files
17 
22 
30 
32 
34 
35 //--- for SimHit association
38 
48 
51 
52 #include <string>
53 
54 #include <TROOT.h>
55 #include <TTree.h>
56 #include <TFile.h>
57 #include <TH1F.h>
58 #include <TProfile.h>
59 
60 class TTree;
61 class TFile;
62 
64 public:
66  ~SiPixelErrorEstimation() override;
67 
68  void beginJob() override;
69  void analyze(const edm::Event&, const edm::EventSetup&) override;
70  void endJob() override;
71 
72  void computeAnglesFromDetPosition(const SiPixelCluster& cl, const GeomDetUnit& det, float& alpha, float& beta);
73 
74 private:
82  bool checkType_; // do we check that the simHit associated with recHit is of the expected particle type ?
83  int genType_; // the type of particle that the simHit associated with recHits should be
84  bool include_trk_hits_; // if set to false, take only hits directly from detector modules (don't ntuplize hits from tracks)
85 
86  // variables that go in the output ttree_track_hits_
87  float rechitx; // x position of hit
88  float rechity; // y position of hit
89  float rechitz; // z position of hit
90  float rechiterrx; // x position error of hit (error not squared)
91  float rechiterry; // y position error of hit (error not squared)
92  float rechitresx; // difference between reconstructed hit x position and 'true' x position
93  float rechitresy; // difference between reconstructed hit y position and 'true' y position
94  float rechitpullx; // x residual divideded by error
95  float rechitpully; // y residual divideded by error
96 
97  float strip_rechitx; // x position of hit
98  float strip_rechity; // y position of hit
99  float strip_rechitz; // z position of hit
100  float strip_rechiterrx; // x position error of hit (error not squared)
101  float strip_rechiterry; // y position error of hit (error not squared)
102  float strip_rechitresx; // difference between reconstructed hit x position and 'true' x position
103 
105 
106  float strip_rechitresy; // difference between reconstructed hit y position and 'true' y position
107  float strip_rechitpullx; // x residual divideded by error
108  float strip_rechitpully; // y residual divideded by error
110  int strip_hit_type; // matched=0, 1D=1 or 2D=2
111  int detector_type; //IB1=1, IB2=2, OB1=3, OB2=4
112 
116  float strip_locbx;
117  float strip_locby;
118  float strip_locbz;
122  int strip_nsimhit; // number of simhits associated with a rechit
123  int strip_pidhit; // PID of the particle that produced the simHit associated with the recHit
124  int strip_simproc; // procces type
125 
126  int strip_subdet_id; // enum SubDetector { UNKNOWN=0, TIB=3, TID=4, TOB=5, TEC=6 };
127 
142 
145  //int strip_tob_order ;
153 
156 
157  float strip_prob;
159 
161 
164 
167 
170 
173 
176 
180 
181  int npix; // number of pixel in the cluster
182  int nxpix; // size of cluster (number of pixels) along x direction
183  int nypix; // size of cluster (number of pixels) along y direction
184  float charge; // total charge in cluster
185 
186  int edgex; // edgex = 1 if the cluster is at the x edge of the module
187  int edgey; // edgey = 1 if the cluster is at the y edge of the module
188 
189  int bigx; // bigx = 1 if the cluster contains at least one big pixel in x
190  int bigy; // bigy = 1 if the cluster contains at least one big pixel in y
191 
192  float alpha; // track angle in the xz plane of the module local coordinate system
193  float beta; // track angle in the yz plane of the module local coordinate system
194 
195  float trk_alpha; // reconstructed track angle in the xz plane of the module local coordinate system
196  float trk_beta; // reconstructed track angle in the yz plane of the module local coordinate system
197 
198  float phi; // polar track angle
199  float eta; // pseudo-rapidity (function of theta, the azimuthal angle)
200 
201  int subdetId;
202  int layer;
203  int ladder;
204  int mod;
205  int side;
206  int disk;
207  int blade;
208  int panel;
209  int plaq;
210 
211  int half; // half = 1 if the barrel module is half size and 0 if it is full size (only defined for barrel)
212  int flipped; // flipped = 1 if the module is flipped and 0 if non-flipped (only defined for barrel)
213 
214  int nsimhit; // number of simhits associated with a rechit
215  int pidhit; // PID of the particle that produced the simHit associated with the recHit
216  int simproc; // procces tye
217 
218  float simhitx; // true x position of hit
219  float simhity; // true y position of hit
220 
221  int evt;
222  int run;
223 
224  float hit_probx;
225  float hit_proby;
226  float hit_cprob0;
227  float hit_cprob1;
228  float hit_cprob2;
229 
231 
234 
235  // variables that go in the output ttree_sll_hits_
236 
238 
241  int all_mod;
242 
243  int all_side;
244  int all_disk;
247  int all_plaq;
248 
249  int all_half;
251 
252  int all_cols;
253  int all_rows;
254 
255  float all_rechitx;
256  float all_rechity;
257  float all_rechitz;
258 
259  float all_simhitx;
260  float all_simhity;
261 
264 
267 
270 
271  int all_npix;
274 
277 
278  int all_bigx;
279  int all_bigy;
280 
281  float all_alpha;
282  float all_beta;
283 
284  float all_simphi;
286 
290 
291  float all_vtxr;
292  float all_vtxz;
293 
294  float all_simpx;
295  float all_simpy;
296  float all_simpz;
297 
298  float all_eloss;
299 
301 
302  float all_x1;
303  float all_x2;
304  float all_y1;
305  float all_y2;
306  float all_z1;
307  float all_z2;
308 
309  float all_row1;
310  float all_row2;
311  float all_col1;
312  float all_col2;
313 
314  float all_gx1;
315  float all_gx2;
316  float all_gy1;
317  float all_gy2;
318  float all_gz1;
319  float all_gz2;
320 
323 
326 
327  float all_clust_x;
328  float all_clust_y;
329 
330  float all_clust_q;
331 
336 
338 
341 
342  static const int maxpix = 10000;
346  // Just added
347  float all_pixx[maxpix];
348  float all_pixy[maxpix];
352 
358 
362 
363  // ----------------------------------
364 
365  TFile* tfile_;
368 
370 
372 };
373 
374 #endif
TrackerHitAssociator::Config trackerHitAssociatorConfig_
edm::EDGetTokenT< reco::TrackCollection > tTrackCollection
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< edm::SimTrackContainer > tSimTrackContainer
SiPixelErrorEstimation(const edm::ParameterSet &)
edm::EDGetTokenT< std::vector< Trajectory > > tTrajectory
void computeAnglesFromDetPosition(const SiPixelCluster &cl, const GeomDetUnit &det, float &alpha, float &beta)
Pixel cluster – collection of neighboring pixels above threshold.
edm::EDGetTokenT< SiPixelRecHitCollection > tPixRecHitCollection