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 
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 {
65  public:
66 
68  virtual ~SiPixelErrorEstimation();
69 
70  virtual void beginJob() ;
71  virtual void analyze(const edm::Event&, const edm::EventSetup&);
72  virtual void endJob() ;
73 
75  const GeomDetUnit & det,
76  float& alpha, float& beta );
77 
78  private:
79 
87  bool checkType_; // do we check that the simHit associated with recHit is of the expected particle type ?
88  int genType_; // the type of particle that the simHit associated with recHits should be
89  bool include_trk_hits_; // if set to false, take only hits directly from detector modules (don't ntuplize hits from tracks)
90 
91  // variables that go in the output ttree_track_hits_
92  float rechitx; // x position of hit
93  float rechity; // y position of hit
94  float rechitz; // z position of hit
95  float rechiterrx; // x position error of hit (error not squared)
96  float rechiterry; // y position error of hit (error not squared)
97  float rechitresx; // difference between reconstructed hit x position and 'true' x position
98  float rechitresy; // difference between reconstructed hit y position and 'true' y position
99  float rechitpullx; // x residual divideded by error
100  float rechitpully; // y residual divideded by error
101 
102 
103 
104 
105 
106  float strip_rechitx; // x position of hit
107  float strip_rechity; // y position of hit
108  float strip_rechitz; // z position of hit
109  float strip_rechiterrx; // x position error of hit (error not squared)
110  float strip_rechiterry; // y position error of hit (error not squared)
111  float strip_rechitresx; // difference between reconstructed hit x position and 'true' x position
112 
113 
115 
116  float strip_rechitresy; // difference between reconstructed hit y position and 'true' y position
117  float strip_rechitpullx; // x residual divideded by error
118  float strip_rechitpully; // y residual divideded by error
120  int strip_hit_type; // matched=0, 1D=1 or 2D=2
121  int detector_type; //IB1=1, IB2=2, OB1=3, OB2=4
122 
126  float strip_locbx;
127  float strip_locby;
128  float strip_locbz;
132  int strip_nsimhit; // number of simhits associated with a rechit
133  int strip_pidhit; // PID of the particle that produced the simHit associated with the recHit
134  int strip_simproc; // procces type
135 
136  int strip_subdet_id; // enum SubDetector { UNKNOWN=0, TIB=3, TID=4, TOB=5, TEC=6 };
137 
152 
155  //int strip_tob_order ;
163 
166 
167  float strip_prob;
169 
171 
174 
177 
180 
183 
186 
190 
191  int npix; // number of pixel in the cluster
192  int nxpix; // size of cluster (number of pixels) along x direction
193  int nypix; // size of cluster (number of pixels) along y direction
194  float charge; // total charge in cluster
195 
196  int edgex; // edgex = 1 if the cluster is at the x edge of the module
197  int edgey; // edgey = 1 if the cluster is at the y edge of the module
198 
199  int bigx; // bigx = 1 if the cluster contains at least one big pixel in x
200  int bigy; // bigy = 1 if the cluster contains at least one big pixel in y
201 
202  float alpha; // track angle in the xz plane of the module local coordinate system
203  float beta; // track angle in the yz plane of the module local coordinate system
204 
205  float trk_alpha; // reconstructed track angle in the xz plane of the module local coordinate system
206  float trk_beta; // reconstructed track angle in the yz plane of the module local coordinate system
207 
208  float phi; // polar track angle
209  float eta; // pseudo-rapidity (function of theta, the azimuthal angle)
210 
211  int subdetId;
212  int layer;
213  int ladder;
214  int mod;
215  int side;
216  int disk;
217  int blade;
218  int panel;
219  int plaq;
220 
221  int half; // half = 1 if the barrel module is half size and 0 if it is full size (only defined for barrel)
222  int flipped; // flipped = 1 if the module is flipped and 0 if non-flipped (only defined for barrel)
223 
224  int nsimhit; // number of simhits associated with a rechit
225  int pidhit; // PID of the particle that produced the simHit associated with the recHit
226  int simproc; // procces tye
227 
228  float simhitx; // true x position of hit
229  float simhity; // true y position of hit
230 
231  int evt;
232  int run;
233 
234  float hit_probx;
235  float hit_proby;
236  float hit_cprob0;
237  float hit_cprob1;
238  float hit_cprob2;
239 
241 
244 
245 
246  // variables that go in the output ttree_sll_hits_
247 
249 
252  int all_mod;
253 
254  int all_side;
255  int all_disk;
258  int all_plaq;
259 
260  int all_half;
262 
263  int all_cols;
264  int all_rows;
265 
266  float all_rechitx;
267  float all_rechity;
268  float all_rechitz;
269 
270  float all_simhitx;
271  float all_simhity;
272 
275 
278 
281 
282  int all_npix;
285 
288 
289  int all_bigx;
290  int all_bigy;
291 
292  float all_alpha;
293  float all_beta;
294 
295  float all_simphi;
297 
301 
302  float all_vtxr;
303  float all_vtxz;
304 
305  float all_simpx;
306  float all_simpy;
307  float all_simpz;
308 
309  float all_eloss;
310 
312 
313  float all_x1;
314  float all_x2;
315  float all_y1;
316  float all_y2;
317  float all_z1;
318  float all_z2;
319 
320  float all_row1;
321  float all_row2;
322  float all_col1;
323  float all_col2;
324 
325  float all_gx1;
326  float all_gx2;
327  float all_gy1;
328  float all_gy2;
329  float all_gz1;
330  float all_gz2;
331 
334 
337 
338  float all_clust_x;
339  float all_clust_y;
340 
341  float all_clust_q;
342 
347 
349 
352 
353  static const int maxpix = 10000;
357  // Just added
358  float all_pixx[maxpix];
359  float all_pixy[maxpix];
363 
369 
373 
374 
375  // ----------------------------------
376 
377  TFile * tfile_;
380 
382 
384 };
385 
386 #endif
TrackerHitAssociator::Config trackerHitAssociatorConfig_
edm::EDGetTokenT< reco::TrackCollection > tTrackCollection
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
virtual void analyze(const edm::Event &, const edm::EventSetup &)