CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SiPixelErrorEstimation.h
Go to the documentation of this file.
1 #ifndef CalibTracker_SiPixelerrorEstimation_SiPixelErrorEstimation_h
2 #define CalibTracker_SiPixelerrorEstimation_SiPixelErrorEstimation_h
3 
4 #include <memory>
5 
6 // user include files
16 
21 
29 
31 
33 
34 //--- for SimHit association
37 
47 
50 
51 #include <string>
52 
53 #include <TROOT.h>
54 #include <TTree.h>
55 #include <TFile.h>
56 #include <TH1F.h>
57 #include <TProfile.h>
58 
59 class TTree;
60 class TFile;
61 
63 public:
65  ~SiPixelErrorEstimation() override;
66 
67  void beginJob() override;
68  void analyze(const edm::Event&, const edm::EventSetup&) override;
69  void endJob() override;
70 
71  void computeAnglesFromDetPosition(const SiPixelCluster& cl, const GeomDetUnit& det, float& alpha, float& beta);
72 
73 private:
84  bool checkType_; // do we check that the simHit associated with recHit is of the expected particle type ?
85  int genType_; // the type of particle that the simHit associated with recHits should be
86  bool include_trk_hits_; // if set to false, take only hits directly from detector modules (don't ntuplize hits from tracks)
87 
88  // variables that go in the output ttree_track_hits_
89  float rechitx; // x position of hit
90  float rechity; // y position of hit
91  float rechitz; // z position of hit
92  float rechiterrx; // x position error of hit (error not squared)
93  float rechiterry; // y position error of hit (error not squared)
94  float rechitresx; // difference between reconstructed hit x position and 'true' x position
95  float rechitresy; // difference between reconstructed hit y position and 'true' y position
96  float rechitpullx; // x residual divideded by error
97  float rechitpully; // y residual divideded by error
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 
107 
108  float strip_rechitresy; // difference between reconstructed hit y position and 'true' y position
109  float strip_rechitpullx; // x residual divideded by error
110  float strip_rechitpully; // y residual divideded by error
112  int strip_hit_type; // matched=0, 1D=1 or 2D=2
113  int detector_type; //IB1=1, IB2=2, OB1=3, OB2=4
114 
118  float strip_locbx;
119  float strip_locby;
120  float strip_locbz;
124  int strip_nsimhit; // number of simhits associated with a rechit
125  int strip_pidhit; // PID of the particle that produced the simHit associated with the recHit
126  int strip_simproc; // procces type
127 
128  int strip_subdet_id; // enum SubDetector { UNKNOWN=0, TIB=3, TID=4, TOB=5, TEC=6 };
129 
144 
147  //int strip_tob_order ;
155 
158 
159  float strip_prob;
161 
163 
166 
169 
172 
175 
178 
182 
183  int npix; // number of pixel in the cluster
184  int nxpix; // size of cluster (number of pixels) along x direction
185  int nypix; // size of cluster (number of pixels) along y direction
186  float charge; // total charge in cluster
187 
188  int edgex; // edgex = 1 if the cluster is at the x edge of the module
189  int edgey; // edgey = 1 if the cluster is at the y edge of the module
190 
191  int bigx; // bigx = 1 if the cluster contains at least one big pixel in x
192  int bigy; // bigy = 1 if the cluster contains at least one big pixel in y
193 
194  float alpha; // track angle in the xz plane of the module local coordinate system
195  float beta; // track angle in the yz plane of the module local coordinate system
196 
197  float trk_alpha; // reconstructed track angle in the xz plane of the module local coordinate system
198  float trk_beta; // reconstructed track angle in the yz plane of the module local coordinate system
199 
200  float phi; // polar track angle
201  float eta; // pseudo-rapidity (function of theta, the azimuthal angle)
202 
203  int subdetId;
204  int layer;
205  int ladder;
206  int mod;
207  int side;
208  int disk;
209  int blade;
210  int panel;
211  int plaq;
212 
213  int half; // half = 1 if the barrel module is half size and 0 if it is full size (only defined for barrel)
214  int flipped; // flipped = 1 if the module is flipped and 0 if non-flipped (only defined for barrel)
215 
216  int nsimhit; // number of simhits associated with a rechit
217  int pidhit; // PID of the particle that produced the simHit associated with the recHit
218  int simproc; // procces tye
219 
220  float simhitx; // true x position of hit
221  float simhity; // true y position of hit
222 
223  int evt;
224  int run;
225 
226  float hit_probx;
227  float hit_proby;
228  float hit_cprob0;
229  float hit_cprob1;
230  float hit_cprob2;
231 
233 
236 
237  // variables that go in the output ttree_sll_hits_
238 
240 
243  int all_mod;
244 
245  int all_side;
246  int all_disk;
249  int all_plaq;
250 
251  int all_half;
253 
254  int all_cols;
255  int all_rows;
256 
257  float all_rechitx;
258  float all_rechity;
259  float all_rechitz;
260 
261  float all_simhitx;
262  float all_simhity;
263 
266 
269 
272 
273  int all_npix;
276 
279 
280  int all_bigx;
281  int all_bigy;
282 
283  float all_alpha;
284  float all_beta;
285 
286  float all_simphi;
288 
292 
293  float all_vtxr;
294  float all_vtxz;
295 
296  float all_simpx;
297  float all_simpy;
298  float all_simpz;
299 
300  float all_eloss;
301 
303 
304  float all_x1;
305  float all_x2;
306  float all_y1;
307  float all_y2;
308  float all_z1;
309  float all_z2;
310 
311  float all_row1;
312  float all_row2;
313  float all_col1;
314  float all_col2;
315 
316  float all_gx1;
317  float all_gx2;
318  float all_gy1;
319  float all_gy2;
320  float all_gz1;
321  float all_gz2;
322 
325 
328 
329  float all_clust_x;
330  float all_clust_y;
331 
332  float all_clust_q;
333 
338 
340 
343 
344  static const int maxpix = 10000;
348  // Just added
349  float all_pixx[maxpix];
350  float all_pixy[maxpix];
354 
360 
364 
365  // ----------------------------------
366 
367  TFile* tfile_;
370 
372 
374 };
375 
376 #endif
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeomToken_
TrackerHitAssociator::Config trackerHitAssociatorConfig_
edm::EDGetTokenT< reco::TrackCollection > tTrackCollection
void analyze(const edm::Event &, const edm::EventSetup &) override
tuple cl
Definition: haddnano.py:49
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)
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
Pixel cluster – collection of neighboring pixels above threshold.
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopoToken_
edm::EDGetTokenT< SiPixelRecHitCollection > tPixRecHitCollection