CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
49 #include <string>
50 
51 #include <TROOT.h>
52 #include <TTree.h>
53 #include <TFile.h>
54 #include <TH1F.h>
55 #include <TProfile.h>
56 
57 class TTree;
58 class TFile;
59 
61 {
62  public:
63 
65  virtual ~SiPixelErrorEstimation();
66 
67  virtual void beginJob() ;
68  virtual void analyze(const edm::Event&, const edm::EventSetup&);
69  virtual void endJob() ;
70 
72  const GeomDetUnit & det,
73  float& alpha, float& beta );
74 
75  private:
76 
80  bool checkType_; // do we check that the simHit associated with recHit is of the expected particle type ?
81  int genType_; // the type of particle that the simHit associated with recHits should be
82  bool include_trk_hits_; // if set to false, take only hits directly from detector modules (don't ntuplize hits from tracks)
83 
84  // variables that go in the output ttree_track_hits_
85  float rechitx; // x position of hit
86  float rechity; // y position of hit
87  float rechitz; // z position of hit
88  float rechiterrx; // x position error of hit (error not squared)
89  float rechiterry; // y position error of hit (error not squared)
90  float rechitresx; // difference between reconstructed hit x position and 'true' x position
91  float rechitresy; // difference between reconstructed hit y position and 'true' y position
92  float rechitpullx; // x residual divideded by error
93  float rechitpully; // y residual divideded by error
94 
95 
96 
97 
98 
99  float strip_rechitx; // x position of hit
100  float strip_rechity; // y position of hit
101  float strip_rechitz; // z position of hit
102  float strip_rechiterrx; // x position error of hit (error not squared)
103  float strip_rechiterry; // y position error of hit (error not squared)
104  float strip_rechitresx; // difference between reconstructed hit x position and 'true' x position
105 
106 
108 
109  float strip_rechitresy; // difference between reconstructed hit y position and 'true' y position
110  float strip_rechitpullx; // x residual divideded by error
111  float strip_rechitpully; // y residual divideded by error
113  int strip_hit_type; // matched=0, 1D=1 or 2D=2
114  int detector_type; //IB1=1, IB2=2, OB1=3, OB2=4
115 
119  float strip_locbx;
120  float strip_locby;
121  float strip_locbz;
125  int strip_nsimhit; // number of simhits associated with a rechit
126  int strip_pidhit; // PID of the particle that produced the simHit associated with the recHit
127  int strip_simproc; // procces type
128 
129  int strip_subdet_id; // enum SubDetector { UNKNOWN=0, TIB=3, TID=4, TOB=5, TEC=6 };
130 
145 
148  //int strip_tob_order ;
156 
159 
160  float strip_prob;
162 
164 
167 
170 
173 
176 
179 
183 
184  int npix; // number of pixel in the cluster
185  int nxpix; // size of cluster (number of pixels) along x direction
186  int nypix; // size of cluster (number of pixels) along y direction
187  float charge; // total charge in cluster
188 
189  int edgex; // edgex = 1 if the cluster is at the x edge of the module
190  int edgey; // edgey = 1 if the cluster is at the y edge of the module
191 
192  int bigx; // bigx = 1 if the cluster contains at least one big pixel in x
193  int bigy; // bigy = 1 if the cluster contains at least one big pixel in y
194 
195  float alpha; // track angle in the xz plane of the module local coordinate system
196  float beta; // track angle in the yz plane of the module local coordinate system
197 
198  float trk_alpha; // reconstructed track angle in the xz plane of the module local coordinate system
199  float trk_beta; // reconstructed track angle in the yz plane of the module local coordinate system
200 
201  float phi; // polar track angle
202  float eta; // pseudo-rapidity (function of theta, the azimuthal angle)
203 
204  int subdetId;
205  int layer;
206  int ladder;
207  int mod;
208  int side;
209  int disk;
210  int blade;
211  int panel;
212  int plaq;
213 
214  int half; // half = 1 if the barrel module is half size and 0 if it is full size (only defined for barrel)
215  int flipped; // flipped = 1 if the module is flipped and 0 if non-flipped (only defined for barrel)
216 
217  int nsimhit; // number of simhits associated with a rechit
218  int pidhit; // PID of the particle that produced the simHit associated with the recHit
219  int simproc; // procces tye
220 
221  float simhitx; // true x position of hit
222  float simhity; // true y position of hit
223 
224  int evt;
225  int run;
226 
227  float hit_probx;
228  float hit_proby;
229  float hit_cprob0;
230  float hit_cprob1;
231  float hit_cprob2;
232 
234 
237 
238 
239  // variables that go in the output ttree_sll_hits_
240 
242 
245  int all_mod;
246 
247  int all_side;
248  int all_disk;
251  int all_plaq;
252 
253  int all_half;
255 
256  int all_cols;
257  int all_rows;
258 
259  float all_rechitx;
260  float all_rechity;
261  float all_rechitz;
262 
263  float all_simhitx;
264  float all_simhity;
265 
268 
271 
274 
275  int all_npix;
278 
281 
282  int all_bigx;
283  int all_bigy;
284 
285  float all_alpha;
286  float all_beta;
287 
288  float all_simphi;
290 
294 
295  float all_vtxr;
296  float all_vtxz;
297 
298  float all_simpx;
299  float all_simpy;
300  float all_simpz;
301 
302  float all_eloss;
303 
305 
306  float all_x1;
307  float all_x2;
308  float all_y1;
309  float all_y2;
310  float all_z1;
311  float all_z2;
312 
313  float all_row1;
314  float all_row2;
315  float all_col1;
316  float all_col2;
317 
318  float all_gx1;
319  float all_gx2;
320  float all_gy1;
321  float all_gy2;
322  float all_gz1;
323  float all_gz2;
324 
327 
330 
331  float all_clust_x;
332  float all_clust_y;
333 
334  float all_clust_q;
335 
340 
342 
345 
346  static const int maxpix = 10000;
350  // Just added
351  float all_pixx[maxpix];
352  float all_pixy[maxpix];
356 
362 
366 
367 
368  // ----------------------------------
369 
370  TFile * tfile_;
373 
375 
376 };
377 
378 #endif
SiPixelErrorEstimation(const edm::ParameterSet &)
void computeAnglesFromDetPosition(const SiPixelCluster &cl, const GeomDetUnit &det, float &alpha, float &beta)
Pixel cluster – collection of neighboring pixels above threshold.
virtual void analyze(const edm::Event &, const edm::EventSetup &)