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 
78  std::string outputFile_;
79  std::string src_;
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  int npix; // number of pixel in the cluster
96  int nxpix; // size of cluster (number of pixels) along x direction
97  int nypix; // size of cluster (number of pixels) along y direction
98  float charge; // total charge in cluster
99 
100  int edgex; // edgex = 1 if the cluster is at the x edge of the module
101  int edgey; // edgey = 1 if the cluster is at the y edge of the module
102 
103  int bigx; // bigx = 1 if the cluster contains at least one big pixel in x
104  int bigy; // bigy = 1 if the cluster contains at least one big pixel in y
105 
106  float alpha; // track angle in the xz plane of the module local coordinate system
107  float beta; // track angle in the yz plane of the module local coordinate system
108 
109  float trk_alpha; // reconstructed track angle in the xz plane of the module local coordinate system
110  float trk_beta; // reconstructed track angle in the yz plane of the module local coordinate system
111 
112  float phi; // polar track angle
113  float eta; // pseudo-rapidity (function of theta, the azimuthal angle)
114 
115  int subdetId;
116  int layer;
117  int ladder;
118  int mod;
119  int side;
120  int disk;
121  int blade;
122  int panel;
123  int plaq;
124 
125  int half; // half = 1 if the barrel module is half size and 0 if it is full size (only defined for barrel)
126  int flipped; // flipped = 1 if the module is flipped and 0 if non-flipped (only defined for barrel)
127 
128  int nsimhit; // number of simhits associated with a rechit
129  int pidhit; // PID of the particle that produced the simHit associated with the recHit
130  int simproc; // procces tye
131 
132  float simhitx; // true x position of hit
133  float simhity; // true y position of hit
134 
135  int evt;
136  int run;
137 
138  float hit_probx;
139  float hit_proby;
140  float hit_cprob0;
141  float hit_cprob1;
142  float hit_cprob2;
143 
144  // variables that go in the output ttree_sll_hits_
145 
147 
150  int all_mod;
151 
152  int all_side;
153  int all_disk;
156  int all_plaq;
157 
158  int all_half;
160 
161  int all_cols;
162  int all_rows;
163 
164  float all_rechitx;
165  float all_rechity;
166  float all_rechitz;
167 
168  float all_simhitx;
169  float all_simhity;
170 
173 
176 
179 
180  int all_npix;
183 
186 
187  int all_bigx;
188  int all_bigy;
189 
190  float all_alpha;
191  float all_beta;
192 
193  float all_simphi;
195 
199 
200  float all_vtxr;
201  float all_vtxz;
202 
203  float all_simpx;
204  float all_simpy;
205  float all_simpz;
206 
207  float all_eloss;
208 
210 
211  float all_x1;
212  float all_x2;
213  float all_y1;
214  float all_y2;
215  float all_z1;
216  float all_z2;
217 
218  float all_row1;
219  float all_row2;
220  float all_col1;
221  float all_col2;
222 
223  float all_gx1;
224  float all_gx2;
225  float all_gy1;
226  float all_gy2;
227  float all_gz1;
228  float all_gz2;
229 
232 
235 
236  float all_clust_x;
237  float all_clust_y;
238 
239  float all_clust_q;
240 
245 
247 
250 
251  static const int maxpix = 10000;
255  // Just added
256  float all_pixx[maxpix];
257  float all_pixy[maxpix];
261 
267 
268  // ----------------------------------
269 
270  TFile * tfile_;
273 
274 };
275 
276 #endif
SiPixelErrorEstimation(const edm::ParameterSet &)
float cl
Definition: Combine.cc:71
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 &)