00001
00002
00003
00004
00005
00006
00007 #include <memory>
00008 #include <string>
00009 #include <iostream>
00010 #include <TMath.h>
00011 #include "Validation/RecoTrack/interface/SiStripTrackingRecHitsValid.h"
00012
00013 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
00014 #include "FWCore/Framework/interface/ESHandle.h"
00015 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00016
00017 #include "DataFormats/GeometryVector/interface/LocalVector.h"
00018
00019 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00020 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
00021 #include "TrackingTools/Records/interface/TransientRecHitRecord.h"
00022 #include "Geometry/TrackerGeometryBuilder/interface/GluedGeomDet.h"
00023
00024 #include "DataFormats/TrackReco/interface/Track.h"
00025 #include "DataFormats/TrackReco/interface/TrackExtra.h"
00026 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h"
00027 #include "DataFormats/DetId/interface/DetId.h"
00028 #include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
00029 #include "DataFormats/SiStripDetId/interface/TECDetId.h"
00030 #include "DataFormats/SiStripDetId/interface/TIBDetId.h"
00031 #include "DataFormats/SiStripDetId/interface/TIDDetId.h"
00032 #include "DataFormats/SiStripDetId/interface/TOBDetId.h"
00033
00034 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
00035 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00036
00037 #include "RecoLocalTracker/SiStripRecHitConverter/interface/StripCPE.h"
00038
00039 using namespace std;
00040
00041
00042 #include "TROOT.h"
00043 #include "TFile.h"
00044 #include "TTree.h"
00045 #include "TBranch.h"
00046 #include "TH1.h"
00047 #include "TH2.h"
00048 class TFile;
00049
00050 SiStripTrackingRecHitsValid::SiStripTrackingRecHitsValid(const edm::ParameterSet& ps):dbe_(0)
00051 {
00052
00053 conf_ = ps;
00054
00055
00056
00057
00058
00059 outputFile_ = ps.getUntrackedParameter<string>("outputFile", "striptrackingrechitshisto.root");
00060
00061
00062
00063
00064 dbe_ = edm::Service<DQMStore>().operator->();
00065
00066
00067 dbe_->setCurrentFolder("Tracking/TrackingRecHits/Strip/ALL");
00068
00069 Char_t histo[200];
00070
00071 sprintf(histo,"Errx_LF");
00072 meErrxLF = dbe_->book1D(histo,"RecHit err(x) Local Frame coord.",100,0,0.005);
00073
00074
00075 sprintf(histo,"Errx_MF");
00076 meErrxMF = dbe_->book1D(histo,"RecHit err(x) Meas. Frame coord.",100,0,0.5);
00077
00078 sprintf(histo,"Res_LF");
00079 meResLF = dbe_->book1D(histo,"RecHit Residual",100,-0.02,+0.02);
00080
00081 sprintf(histo,"Res_MF");
00082 meResMF = dbe_->book1D(histo,"RecHit Residual",100,-2,+2);
00083
00084 sprintf(histo,"Pull_LF");
00085 mePullLF = dbe_->book1D(histo,"Pull",100,-5.,5.);
00086
00087 sprintf(histo,"Pull_MF");
00088 mePullMF = dbe_->book1D(histo,"Pull",100,-5.,5.);
00089
00090 sprintf(histo,"Category");
00091 meCategory = dbe_->book1D(histo,"Cluster Category",10,0.,10.);
00092
00093 sprintf(histo,"Trackwidth");
00094 meTrackwidth = dbe_->book1D(histo,"Track width",100,0.,4.);
00095
00096 sprintf(histo,"Expectedwidth");
00097 meExpectedwidth = dbe_->book1D(histo,"Expected width",10,0.,10.);
00098
00099 sprintf(histo,"Clusterwidth");
00100 meClusterwidth = dbe_->book1D(histo,"Cluster width",10,0.,10.);
00101
00102 sprintf(histo,"Trackanglealpha");
00103 meTrackanglealpha = dbe_->book1D(histo,"Track angle alpha",100,-100.,100.);
00104
00105 sprintf(histo,"Trackanglebeta");
00106 meTrackanglebeta = dbe_->book1D(histo,"Track angle beta",100,-100.,100.);
00107
00108 sprintf(histo,"ErrxMFTrackwidthProfile_WClus1");
00109 meErrxMFTrackwidthProfileWClus1 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"s");
00110
00111 sprintf(histo,"ErrxMFTrackwidthProfile_WClus2");
00112 meErrxMFTrackwidthProfileWClus2 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"");
00113
00114 sprintf(histo,"ErrxMFTrackwidthProfile_WClus3");
00115 meErrxMFTrackwidthProfileWClus3 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"s");
00116
00117 sprintf(histo,"ErrxMFTrackwidthProfile_WClus4");
00118 meErrxMFTrackwidthProfileWClus4 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"s");
00119
00120 sprintf(histo,"ResMFTrackwidthProfile_WClus1");
00121 meResMFTrackwidthProfileWClus1 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"s");
00122
00123 sprintf(histo,"ResMFTrackwidthProfile_WClus2");
00124 meResMFTrackwidthProfileWClus2 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"");
00125 sprintf(histo,"ResMFTrackwidthProfile_WClus21");
00126 meResMFTrackwidthProfileWClus21 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, -2.,2.,"");
00127 sprintf(histo,"ResMFTrackwidthProfile_WClus22");
00128 meResMFTrackwidthProfileWClus22 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, -5.,5.,"");
00129 sprintf(histo,"ResMFTrackwidthProfile_WClus23");
00130 meResMFTrackwidthProfileWClus23 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, -0.5,0.5,"");
00131
00132
00133
00134 sprintf(histo,"ResMFTrackwidthProfile_WClus3");
00135 meResMFTrackwidthProfileWClus3 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"s");
00136
00137 sprintf(histo,"ResMFTrackwidthProfile_WClus4");
00138 meResMFTrackwidthProfileWClus4 = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"s");
00139
00140 sprintf(histo,"ErrxMFTrackwidthProfile");
00141 meErrxMFTrackwidthProfile = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, 0.,2.,"s");
00142
00143 sprintf(histo,"ErrxMFTrackwidthProfile_Category1");
00144 meErrxMFTrackwidthProfileCategory1 = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12, 0., 4.,100, -2.,2.,"s");
00145 sprintf(histo,"ErrxMFTrackwidthProfile_Category2");
00146 meErrxMFTrackwidthProfileCategory2 = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12, 0., 4.,100, -2.,2.,"s");
00147
00148 sprintf(histo,"ErrxMFTrackwidthProfile_Category3");
00149 meErrxMFTrackwidthProfileCategory3 = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12, 0., 4.,100, -2.,2.,"s");
00150
00151 sprintf(histo,"ErrxMFTrackwidthProfile_Category4");
00152 meErrxMFTrackwidthProfileCategory4 = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12, 0., 4.,100, -2.,2.,"s");
00153
00154 sprintf(histo,"ErrxMFClusterwidthProfile_Category1");
00155 meErrxMFClusterwidthProfileCategory1= dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s");
00156
00157 sprintf(histo,"ErrxMFAngleProfile");
00158 meErrxMFAngleProfile = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 60.,100, 0.,2.,"s");
00159
00160 dbe_->setCurrentFolder("Tracking/TrackingRecHits/Strip/TIB");
00161
00162 for(int i = 0 ;i<4 ; i++) {
00163 Char_t histo[200];
00164 sprintf(histo,"Nstp_rphi_layer%dtib",i+1);
00165 meNstpRphiTIB[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5);
00166 sprintf(histo,"Adc_rphi_layer%dtib",i+1);
00167 meAdcRphiTIB[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.);
00168 sprintf(histo,"Posx_rphi_layer%dtib",i+1);
00169 mePosxRphiTIB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0);
00170
00171 sprintf(histo,"Errx_LF_rphi_layer%dtib",i+1);
00172 meErrxLFRphiTIB[i] = dbe_->book1D(histo,"RecHit err(x) Local Frame coord.",100,0,0.005);
00173 sprintf(histo,"Errx_MF_rphi_layer%dtib",i+1);
00174 meErrxMFRphiTIB[i] = dbe_->book1D(histo,"RecHit err(x) Meas. Frame coord.",100,0,0.5);
00175
00176 sprintf(histo,"Res_LF_rphi_layer%dtib",i+1);
00177 meResLFRphiTIB[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.02,+0.02);
00178 sprintf(histo,"Res_MF_rphi_layer%dtib",i+1);
00179 meResMFRphiTIB[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,+2);
00180
00181 sprintf(histo,"Pull_LF_rphi_layer%dtib",i+1);
00182 mePullLFRphiTIB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00183 sprintf(histo,"Pull_MF_rphi_layer%dtib",i+1);
00184 mePullMFRphiTIB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00185
00186 sprintf(histo,"Trackangle_rphi_layer%dtib",i+1);
00187 meTrackangleRphiTIB[i] = dbe_->book1D(histo,"Track angle",100,-20.,20.);
00188
00189 sprintf(histo,"Trackanglebeta_rphi_layer%dtib",i+1);
00190 meTrackanglebetaRphiTIB[i] = dbe_->book1D(histo,"Track angle beta",100,-20.,20.);
00191
00192 sprintf(histo,"Trackangle2_rphi_layer%dtib",i+1);
00193 meTrackangle2RphiTIB[i] = dbe_->book1D(histo,"Track angle",100,-20.,20.);
00194
00195 sprintf(histo,"PullTrackangleProfile_rphi_layer%dtib",i+1);
00196 mePullTrackangleProfileRphiTIB[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -20., 20.,100, -2.,2.,"s");
00197
00198 sprintf(histo,"Trackwidth_rphi_layer%dtib",i+1);
00199 meTrackwidthRphiTIB[i] = dbe_->book1D(histo,"Track width",100,0.,1.);
00200
00201 sprintf(histo,"Expectedwidth_rphi_layer%dtib",i+1);
00202 meExpectedwidthRphiTIB[i] = dbe_->book1D(histo,"Expected width",10,0.,10.);
00203
00204 sprintf(histo,"Clusterwidth_rphi_layer%dtib",i+1);
00205 meClusterwidthRphiTIB[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.);
00206
00207 sprintf(histo,"Category_rphi_layer%dtib",i+1);
00208 meCategoryRphiTIB[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.);
00209
00210 sprintf(histo,"PullTrackwidthProfile_rphi_layer%dtib",i+1);
00211 mePullTrackwidthProfileRphiTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s");
00212
00213 sprintf(histo,"PullTrackwidthProfile_Category1_rphi_layer%dtib",i+1);
00214 mePullTrackwidthProfileCategory1RphiTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s");
00215
00216 sprintf(histo,"PullTrackwidthProfile_Category2_rphi_layer%dtib",i+1);
00217 mePullTrackwidthProfileCategory2RphiTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s");
00218
00219 sprintf(histo,"PullTrackwidthProfile_Category3_rphi_layer%dtib",i+1);
00220 mePullTrackwidthProfileCategory3RphiTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s");
00221
00222 sprintf(histo,"PullTrackwidthProfile_Category4_rphi_layer%dtib",i+1);
00223 mePullTrackwidthProfileCategory4RphiTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s");
00224
00225 sprintf(histo,"ErrxMFTrackwidthProfile_rphi_layer%dtib",i+1);
00226 meErrxMFTrackwidthProfileRphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12, 0., 4.,100, -2.,2.,"s");
00227
00228
00229 sprintf(histo,"ErrxMFTrackwidthProfile_WClus1_rphi_layer%dtib",i+1);
00230 meErrxMFTrackwidthProfileWclus1RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00231
00232 sprintf(histo,"ErrxMFTrackwidthProfile_WClus2_rphi_layer%dtib",i+1);
00233 meErrxMFTrackwidthProfileWclus2RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00234
00235 sprintf(histo,"ErrxMFTrackwidthProfile_WClus3_rphi_layer%dtib",i+1);
00236 meErrxMFTrackwidthProfileWclus3RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00237
00238 sprintf(histo,"ErrxMFTrackwidthProfile_WClus4_rphi_layer%dtib",i+1);
00239 meErrxMFTrackwidthProfileWclus4RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00240
00241 sprintf(histo,"ResMFTrackwidthProfile_WClus1_rphi_layer%dtib",i+1);
00242 meResMFTrackwidthProfileWclus1RphiTIB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00243 sprintf(histo,"ResMFTrackwidthProfile_WClus2_rphi_layer%dtib",i+1);
00244 meResMFTrackwidthProfileWclus2RphiTIB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00245
00246 sprintf(histo,"ResMFTrackwidthProfile_WClus3_rphi_layer%dtib",i+1);
00247 meResMFTrackwidthProfileWclus3RphiTIB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00248
00249 sprintf(histo,"ResMFTrackwidthProfile_WClus4_rphi_layer%dtib",i+1);
00250 meResMFTrackwidthProfileWclus4RphiTIB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00251
00252
00253
00254 sprintf(histo,"ErrxMFTrackwidthProfile_Category1_rphi_layer%dtib",i+1);
00255 meErrxMFTrackwidthProfileCategory1RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12, 0., 4.,100, -2.,2.,"s");
00256
00257 sprintf(histo,"ErrxMFTrackwidthProfile_Category2_rphi_layer%dtib",i+1);
00258 meErrxMFTrackwidthProfileCategory2RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12, 0., 4.,100, -2.,2.,"s");
00259
00260 sprintf(histo,"ErrxMFTrackwidthProfile_Category3_rphi_layer%dtib",i+1);
00261 meErrxMFTrackwidthProfileCategory3RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12, 0., 4.,100, -2.,2.,"s");
00262
00263 sprintf(histo,"ErrxMFTrackwidthProfile_Category4_rphi_layer%dtib",i+1);
00264 meErrxMFTrackwidthProfileCategory4RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12, 0., 4.,100, -2.,2.,"s");
00265
00266 sprintf(histo,"ErrxMFAngleProfile_rphi_layer%dtib",i+1);
00267 meErrxMFAngleProfileRphiTIB[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s");
00268
00269 sprintf(histo,"ErrxMFClusterwidthProfile_Category1_rphi_layer%dtib",i+1);
00270 meErrxMFClusterwidthProfileCategory1RphiTIB[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s");
00271
00272 }
00273
00274
00275 for(int i = 0 ;i<2 ; i++) {
00276 Char_t histo[200];
00277 sprintf(histo,"Nstp_sas_layer%dtib",i+1);
00278 meNstpSasTIB[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5);
00279 sprintf(histo,"Adc_sas_layer%dtib",i+1);
00280 meAdcSasTIB[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.);
00281 sprintf(histo,"Posx_sas_layer%dtib",i+1);
00282 mePosxSasTIB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0);
00283
00284 sprintf(histo,"Errx_LF_sas_layer%dtib",i+1);
00285 meErrxLFSasTIB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.005);
00286 sprintf(histo,"Errx_MF_sas_layer%dtib",i+1);
00287 meErrxMFSasTIB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.5);
00288
00289 sprintf(histo,"Res_LF_sas_layer%dtib",i+1);
00290 meResLFSasTIB[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.02,+0.02);
00291 sprintf(histo,"Res_MF_sas_layer%dtib",i+1);
00292 meResMFSasTIB[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,+2);
00293
00294 sprintf(histo,"Pull_LF_sas_layer%dtib",i+1);
00295 mePullLFSasTIB[i] = dbe_->book1D(histo,"Pull",100,-4.,4.);
00296 sprintf(histo,"Pull_MF_sas_layer%dtib",i+1);
00297 mePullMFSasTIB[i] = dbe_->book1D(histo,"Pull",100,-4.,4.);
00298
00299 sprintf(histo,"Trackangle_sas_layer%dtib",i+1);
00300 meTrackangleSasTIB[i] = dbe_->book1D(histo,"Track angle",100,-40.,40.);
00301
00302 sprintf(histo,"Trackanglebeta_sas_layer%dtib",i+1);
00303 meTrackanglebetaSasTIB[i] = dbe_->book1D(histo,"Track angle beta",100,-40.,40.);
00304
00305 sprintf(histo,"PullTrackangleProfile_sas_layer%dtib",i+1);
00306 mePullTrackangleProfileSasTIB[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -40., 40.,100,-4.,4.,"s");
00307
00308 sprintf(histo,"Trackwidth_sas_layer%dtib",i+1);
00309 meTrackwidthSasTIB[i] = dbe_->book1D(histo,"Track width",100,0.,1.);
00310
00311 sprintf(histo,"Expectedwidth_sas_layer%dtib",i+1);
00312 meExpectedwidthSasTIB[i] = dbe_->book1D(histo,"Expected width",10,0.,10.);
00313
00314 sprintf(histo,"Clusterwidth_sas_layer%dtib",i+1);
00315 meClusterwidthSasTIB[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.);
00316
00317 sprintf(histo,"Category_sas_layer%dtib",i+1);
00318 meCategorySasTIB[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.);
00319
00320 sprintf(histo,"PullTrackwidthProfile_sas_layer%dtib",i+1);
00321 mePullTrackwidthProfileSasTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s");
00322
00323 sprintf(histo,"PullTrackwidthProfile_Category1_sas_layer%dtib",i+1);
00324 mePullTrackwidthProfileCategory1SasTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s");
00325
00326 sprintf(histo,"PullTrackwidthProfile_Category2_sas_layer%dtib",i+1);
00327 mePullTrackwidthProfileCategory2SasTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s");
00328
00329 sprintf(histo,"PullTrackwidthProfile_Category3_sas_layer%dtib",i+1);
00330 mePullTrackwidthProfileCategory3SasTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s");
00331
00332 sprintf(histo,"PullTrackwidthProfile_Category4_sas_layer%dtib",i+1);
00333 mePullTrackwidthProfileCategory4SasTIB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s");
00334
00335 sprintf(histo,"ErrxMFTrackwidthProfile_sas_layer%dtib",i+1);
00336 meErrxMFTrackwidthProfileSasTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12,0.,4.,100, -2.,2.,"s");
00337
00338 sprintf(histo,"ErrxMFTrackwidthProfile_Category1_sas_layer%dtib",i+1);
00339 meErrxMFTrackwidthProfileCategory1SasTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12,0.,4.,100, -2.,2.,"s");
00340 sprintf(histo,"ErrxMFTrackwidthProfile_Category2_sas_layer%dtib",i+1);
00341 meErrxMFTrackwidthProfileCategory2SasTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12,0.,4.,100, -2.,2.,"s");
00342 sprintf(histo,"ErrxMFTrackwidthProfile_Category3_sas_layer%dtib",i+1);
00343 meErrxMFTrackwidthProfileCategory3SasTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12,0.,4.,100, -2.,2.,"s");
00344 sprintf(histo,"ErrxMFTrackwidthProfile_Category4_sas_layer%dtib",i+1);
00345 meErrxMFTrackwidthProfileCategory4SasTIB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12,0.,4.,100, -2.,2.,"s");
00346
00347 sprintf(histo,"ErrxMFAngleProfile_sas_layer%dtib",i+1);
00348 meErrxMFAngleProfileSasTIB[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s");
00349
00350 sprintf(histo,"ErrxMFClusterwidthProfile_Category1_sas_layer%dtib",i+1);
00351 meErrxMFClusterwidthProfileCategory1SasTIB[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s");
00352
00353
00354
00355 sprintf(histo,"Posx_matched_layer%dtib",i+1);
00356 mePosxMatchedTIB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0, +6.0);
00357 sprintf(histo,"Posy_matched_layer%dtib",i+1);
00358 mePosyMatchedTIB[i] = dbe_->book1D(histo,"RecHit y coord.",100,-6.0, +6.0);
00359 sprintf(histo,"Errx_matched_layer%dtib",i+1);
00360 meErrxMatchedTIB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0., 0.05);
00361 sprintf(histo,"Erry_matched_layer%dtib",i+1);
00362 meErryMatchedTIB[i] = dbe_->book1D(histo,"RecHit err(y) coord.",100,0., 0.05);
00363 sprintf(histo,"Resx_matched_layer%dtib",i+1);
00364 meResxMatchedTIB[i] = dbe_->book1D(histo,"RecHit Res(x) coord.",100,-0.02, +0.02);
00365 sprintf(histo,"Resy_matched_layer%dtib",i+1);
00366 meResyMatchedTIB[i] = dbe_->book1D(histo,"RecHit Res(y) coord.",100,-1., +1.);
00367 sprintf(histo,"Pullx_matched_layer%dtib",i+1);
00368 mePullxMatchedTIB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00369 sprintf(histo,"Pully_matched_layer%dtib",i+1);
00370 mePullyMatchedTIB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00371 }
00372
00373 dbe_->setCurrentFolder("Tracking/TrackingRecHits/Strip/TOB");
00374
00375 for(int i = 0 ;i<6 ; i++) {
00376 Char_t histo[200];
00377 sprintf(histo,"Nstp_rphi_layer%dtob",i+1);
00378 meNstpRphiTOB[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5);
00379 sprintf(histo,"Adc_rphi_layer%dtob",i+1);
00380 meAdcRphiTOB[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.);
00381 sprintf(histo,"Posx_rphi_layer%dtob",i+1);
00382 mePosxRphiTOB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0);
00383
00384 sprintf(histo,"Errx_LF_rphi_layer%dtob",i+1);
00385 meErrxLFRphiTOB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.01);
00386 sprintf(histo,"Errx_MF_rphi_layer%dtob",i+1);
00387 meErrxMFRphiTOB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.5);
00388
00389 sprintf(histo,"Res_LF_rphi_layer%dtob",i+1);
00390 meResLFRphiTOB[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.02,+0.02);
00391 sprintf(histo,"Res_MF_rphi_layer%dtob",i+1);
00392 meResMFRphiTOB[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,2);
00393
00394 sprintf(histo,"Pull_LF_rphi_layer%dtob",i+1);
00395 mePullLFRphiTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00396 sprintf(histo,"Pull_MF_rphi_layer%dtob",i+1);
00397 mePullMFRphiTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00398
00399 sprintf(histo,"Trackangle_rphi_layer%dtob",i+1);
00400 meTrackangleRphiTOB[i] = dbe_->book1D(histo,"Track angle",100,-20.,20.);
00401
00402 sprintf(histo,"Trackanglebeta_rphi_layer%dtob",i+1);
00403 meTrackanglebetaRphiTOB[i] = dbe_->book1D(histo,"Track angle beta",100,-20.,20.);
00404
00405 sprintf(histo,"PullTrackangleProfile_rphi_layer%dtob",i+1);
00406 mePullTrackangleProfileRphiTOB[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -20., 20.,100,-5.,5.,"s");
00407
00408 sprintf(histo,"Trackwidth_rphi_layer%dtob",i+1);
00409 meTrackwidthRphiTOB[i] = dbe_->book1D(histo,"Track width",100,0.,4.);
00410
00411 sprintf(histo,"Expectedwidth_rphi_layer%dtob",i+1);
00412 meExpectedwidthRphiTOB[i] = dbe_->book1D(histo,"Expected width",10,0.,10.);
00413
00414 sprintf(histo,"Clusterwidth_rphi_layer%dtob",i+1);
00415 meClusterwidthRphiTOB[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.);
00416
00417 sprintf(histo,"Category_rphi_layer%dtob",i+1);
00418 meCategoryRphiTOB[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.);
00419
00420 sprintf(histo,"PullTrackwidthProfile_rphi_layer%dtob",i+1);
00421 mePullTrackwidthProfileRphiTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s");
00422
00423 sprintf(histo,"PullTrackwidthProfile_Category1_rphi_layer%dtob",i+1);
00424 mePullTrackwidthProfileCategory1RphiTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s");
00425
00426 sprintf(histo,"PullTrackwidthProfile_Category2_rphi_layer%dtob",i+1);
00427 mePullTrackwidthProfileCategory2RphiTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s");
00428
00429 sprintf(histo,"PullTrackwidthProfile_Category3_rphi_layer%dtob",i+1);
00430 mePullTrackwidthProfileCategory3RphiTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s");
00431
00432 sprintf(histo,"PullTrackwidthProfile_Category4_rphi_layer%dtob",i+1);
00433 mePullTrackwidthProfileCategory4RphiTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s");
00434
00435 sprintf(histo,"ErrxMFTrackwidthProfile_rphi_layer%dtob",i+1);
00436 meErrxMFTrackwidthProfileRphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12,0.,4.,100, -2.,2.,"s");
00437
00438 sprintf(histo,"ErrxMFTrackwidthProfile_WClus1_rphi_layer%dtob",i+1);
00439 meErrxMFTrackwidthProfileWclus1RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00440
00441 sprintf(histo,"ErrxMFTrackwidthProfile_WClus2_rphi_layer%dtob",i+1);
00442 meErrxMFTrackwidthProfileWclus2RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00443
00444 sprintf(histo,"ErrxMFTrackwidthProfile_WClus3_rphi_layer%dtob",i+1);
00445 meErrxMFTrackwidthProfileWclus3RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00446
00447 sprintf(histo,"ErrxMFTrackwidthProfile_WClus4_rphi_layer%dtob",i+1);
00448 meErrxMFTrackwidthProfileWclus4RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00449
00450 sprintf(histo,"ResMFTrackwidthProfile_WClus1_rphi_layer%dtob",i+1);
00451 meResMFTrackwidthProfileWclus1RphiTOB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00452 sprintf(histo,"ResMFTrackwidthProfile_WClus2_rphi_layer%dtob",i+1);
00453 meResMFTrackwidthProfileWclus2RphiTOB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00454
00455 sprintf(histo,"ResMFTrackwidthProfile_WClus3_rphi_layer%dtob",i+1);
00456 meResMFTrackwidthProfileWclus3RphiTOB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00457
00458 sprintf(histo,"ResMFTrackwidthProfile_WClus4_rphi_layer%dtob",i+1);
00459 meResMFTrackwidthProfileWclus4RphiTOB[i] = dbe_->bookProfile(histo,"Residue Track width Profile Wclus1", 12, 0., 4.,100, -2.,2.,"s");
00460
00461
00462
00463 sprintf(histo,"ErrxMFTrackwidthProfile_Category1_rphi_layer%dtob",i+1);
00464 meErrxMFTrackwidthProfileCategory1RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12,0.,4.,100, -2.,2.,"s");
00465
00466 sprintf(histo,"ErrxMFTrackwidthProfile_Category2_rphi_layer%dtob",i+1);
00467 meErrxMFTrackwidthProfileCategory2RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12,0.,4.,100, -2.,2.,"s");
00468
00469 sprintf(histo,"ErrxMFTrackwidthProfile_Category3_rphi_layer%dtob",i+1);
00470 meErrxMFTrackwidthProfileCategory3RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12,0.,4.,100, -2.,2.,"s");
00471
00472 sprintf(histo,"ErrxMFTrackwidthProfile_Category4_rphi_layer%dtob",i+1);
00473 meErrxMFTrackwidthProfileCategory4RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12,0.,4.,100, -2.,2.,"s");
00474
00475 sprintf(histo,"ErrxMFAngleProfile_rphi_layer%dtob",i+1);
00476 meErrxMFAngleProfileRphiTOB[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s");
00477
00478 sprintf(histo,"ErrxMFClusterwidthProfile_Category1_rphi_layer%dtob",i+1);
00479 meErrxMFClusterwidthProfileCategory1RphiTOB[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s");
00480
00481 }
00482
00483
00484 for(int i = 0 ;i<2 ; i++) {
00485 Char_t histo[200];
00486 sprintf(histo,"Nstp_sas_layer%dtob",i+1);
00487 meNstpSasTOB[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5);
00488 sprintf(histo,"Adc_sas_layer%dtob",i+1);
00489 meAdcSasTOB[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.);
00490 sprintf(histo,"Posx_sas_layer%dtob",i+1);
00491 mePosxSasTOB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0);
00492
00493 sprintf(histo,"Errx_LF_sas_layer%dtob",i+1);
00494 meErrxLFSasTOB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.01);
00495 sprintf(histo,"Errx_MF_sas_layer%dtob",i+1);
00496 meErrxMFSasTOB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.5);
00497
00498 sprintf(histo,"Res_LF_sas_layer%dtob",i+1);
00499 meResLFSasTOB[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.02,+0.02);
00500 sprintf(histo,"Res_MF_sas_layer%dtob",i+1);
00501 meResMFSasTOB[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,2);
00502
00503 sprintf(histo,"Pull_LF_sas_layer%dtob",i+1);
00504 mePullLFSasTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00505 sprintf(histo,"Pull_MF_sas_layer%dtob",i+1);
00506 mePullMFSasTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00507
00508 sprintf(histo,"Trackangle_sas_layer%dtob",i+1);
00509 meTrackangleSasTOB[i] = dbe_->book1D(histo,"Track angle",100,-25.,25.);
00510
00511 sprintf(histo,"Trackanglebeta_sas_layer%dtob",i+1);
00512 meTrackanglebetaSasTOB[i] = dbe_->book1D(histo,"Track angle beta",100,-25.,25.);
00513
00514 sprintf(histo,"PullTrackangleProfile_sas_layer%dtob",i+1);
00515 mePullTrackangleProfileSasTOB[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -25., 25. ,100 , -5., 5.,"s");
00516
00517 sprintf(histo,"Trackwidth_sas_layer%dtob",i+1);
00518 meTrackwidthSasTOB[i] = dbe_->book1D(histo,"Track width",100,0.,1.);
00519
00520 sprintf(histo,"Expectedwidth_sas_layer%dtob",i+1);
00521 meExpectedwidthSasTOB[i] = dbe_->book1D(histo,"Expected width",10,0.,10.);
00522
00523 sprintf(histo,"Clusterwidth_sas_layer%dtob",i+1);
00524 meClusterwidthSasTOB[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.);
00525
00526 sprintf(histo,"Category_sas_layer%dtob",i+1);
00527 meCategorySasTOB[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.);
00528
00529 sprintf(histo,"PullTrackwidthProfile_sas_layer%dtob",i+1);
00530 mePullTrackwidthProfileSasTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s");
00531
00532 sprintf(histo,"PullTrackwidthProfile_Category1_sas_layer%dtob",i+1);
00533 mePullTrackwidthProfileCategory1SasTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s");
00534
00535 sprintf(histo,"PullTrackwidthProfile_Category2_sas_layer%dtob",i+1);
00536 mePullTrackwidthProfileCategory2SasTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s");
00537
00538 sprintf(histo,"PullTrackwidthProfile_Category3_sas_layer%dtob",i+1);
00539 mePullTrackwidthProfileCategory3SasTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s");
00540
00541 sprintf(histo,"PullTrackwidthProfile_Category4_sas_layer%dtob",i+1);
00542 mePullTrackwidthProfileCategory4SasTOB[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s");
00543
00544 sprintf(histo,"ErrxMFTrackwidthProfile_sas_layer%dtob",i+1);
00545 meErrxMFTrackwidthProfileSasTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12,0.,4.,100, -2.,2.,"s");
00546
00547 sprintf(histo,"ErrxMFTrackwidthProfile_Category1_sas_layer%dtob",i+1);
00548 meErrxMFTrackwidthProfileCategory1SasTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12,0.,4.,100, -2.,2.,"s");
00549 sprintf(histo,"ErrxMFTrackwidthProfile_Category2_sas_layer%dtob",i+1);
00550 meErrxMFTrackwidthProfileCategory2SasTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12,0.,4.,100, -2.,2.,"s");
00551 sprintf(histo,"ErrxMFTrackwidthProfile_Category3_sas_layer%dtob",i+1);
00552 meErrxMFTrackwidthProfileCategory3SasTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12,0.,4.,100, -2.,2.,"s");
00553 sprintf(histo,"ErrxMFTrackwidthProfile_Category4_sas_layer%dtob",i+1);
00554 meErrxMFTrackwidthProfileCategory4SasTOB[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12,0.,4.,100, -2.,2.,"s");
00555
00556 sprintf(histo,"ErrxMFAngleProfile_sas_layer%dtob",i+1);
00557 meErrxMFAngleProfileSasTOB[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s");
00558
00559 sprintf(histo,"ErrxMFClusterwidthProfile_Category1_sas_layer%dtob",i+1);
00560 meErrxMFClusterwidthProfileCategory1SasTOB[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s");
00561
00562 sprintf(histo,"Posx_matched_layer%dtob",i+1);
00563 mePosxMatchedTOB[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0, +6.0);
00564 sprintf(histo,"Posy_matched_layer%dtob",i+1);
00565 mePosyMatchedTOB[i] = dbe_->book1D(histo,"RecHit y coord.",100,-6.0, +6.0);
00566 sprintf(histo,"Errx_matched_layer%dtob",i+1);
00567 meErrxMatchedTOB[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0., 0.05);
00568 sprintf(histo,"Erry_matched_layer%dtob",i+1);
00569 meErryMatchedTOB[i] = dbe_->book1D(histo,"RecHit err(y) coord.",100,0., 0.05);
00570 sprintf(histo,"Resx_matched_layer%dtob",i+1);
00571 meResxMatchedTOB[i] = dbe_->book1D(histo,"RecHit Res(x) coord.",100,-0.02, +0.02);
00572 sprintf(histo,"Resy_matched_layer%dtob",i+1);
00573 meResyMatchedTOB[i] = dbe_->book1D(histo,"RecHit Res(y) coord.",100,-1., +1.);
00574 sprintf(histo,"Pullx_matched_layer%dtob",i+1);
00575 mePullxMatchedTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00576 sprintf(histo,"Pully_matched_layer%dtob",i+1);
00577 mePullyMatchedTOB[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00578 }
00579
00580 dbe_->setCurrentFolder("Tracking/TrackingRecHits/Strip/TID");
00581
00582 for(int i = 0 ;i<3 ; i++) {
00583 Char_t histo[200];
00584 sprintf(histo,"Nstp_rphi_layer%dtid",i+1);
00585 meNstpRphiTID[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5);
00586 sprintf(histo,"Adc_rphi_layer%dtid",i+1);
00587 meAdcRphiTID[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.);
00588 sprintf(histo,"Posx_rphi_layer%dtid",i+1);
00589 mePosxRphiTID[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0);
00590 sprintf(histo,"Errx_LF_rphi_layer%dtid",i+1);
00591 meErrxLFRphiTID[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.5);
00592 sprintf(histo,"Errx_MF_rphi_layer%dtid",i+1);
00593 meErrxMFRphiTID[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.5);
00594 sprintf(histo,"Res_LF_rphi_layer%dtid",i+1);
00595 meResLFRphiTID[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.5,+0.5);
00596 sprintf(histo,"Res_MF_rphi_layer%dtid",i+1);
00597 meResMFRphiTID[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,2);
00598 sprintf(histo,"Pull_LF_rphi_layer%dtid",i+1);
00599 mePullLFRphiTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00600 sprintf(histo,"Pull_MF_rphi_layer%dtid",i+1);
00601 mePullMFRphiTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00602 sprintf(histo,"Trackangle_rphi_layer%dtid",i+1);
00603 meTrackangleRphiTID[i] = dbe_->book1D(histo,"Track angle",100,-20.,20.);
00604
00605 sprintf(histo,"Trackanglebeta_rphi_layer%dtid",i+1);
00606 meTrackanglebetaRphiTID[i] = dbe_->book1D(histo,"Track angle beta",100,-20.,20.);
00607
00608 sprintf(histo,"PullTrackangleProfile_rphi_layer%dtid",i+1);
00609 mePullTrackangleProfileRphiTID[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -20., 20.,100, -5., 5.,"s");
00610
00611 sprintf(histo,"Trackwidth_rphi_layer%dtid",i+1);
00612 meTrackwidthRphiTID[i] = dbe_->book1D(histo,"Track width",100,0.,1.);
00613
00614 sprintf(histo,"Expectedwidth_rphi_layer%dtid",i+1);
00615 meExpectedwidthRphiTID[i] = dbe_->book1D(histo,"Expected width",10,0.,10.);
00616
00617 sprintf(histo,"Clusterwidth_rphi_layer%dtid",i+1);
00618 meClusterwidthRphiTID[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.);
00619
00620 sprintf(histo,"Category_rphi_layer%dtid",i+1);
00621 meCategoryRphiTID[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.);
00622
00623 sprintf(histo,"PullTrackwidthProfile_rphi_layer%dtid",i+1);
00624 mePullTrackwidthProfileRphiTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s");
00625
00626 sprintf(histo,"PullTrackwidthProfile_Category1_rphi_layer%dtid",i+1);
00627 mePullTrackwidthProfileCategory1RphiTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s");
00628
00629 sprintf(histo,"PullTrackwidthProfile_Category2_rphi_layer%dtid",i+1);
00630 mePullTrackwidthProfileCategory2RphiTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s");
00631
00632 sprintf(histo,"PullTrackwidthProfile_Category3_rphi_layer%dtid",i+1);
00633 mePullTrackwidthProfileCategory3RphiTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s");
00634
00635 sprintf(histo,"PullTrackwidthProfile_Category4_rphi_layer%dtid",i+1);
00636 mePullTrackwidthProfileCategory4RphiTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s");
00637
00638 sprintf(histo,"ErrxMFTrackwidthProfile_rphi_layer%dtid",i+1);
00639 meErrxMFTrackwidthProfileRphiTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12,0.,4.,100, -2.,2.,"s");
00640
00641 sprintf(histo,"ErrxMFTrackwidthProfile_Category1_rphi_layer%dtid",i+1);
00642 meErrxMFTrackwidthProfileCategory1RphiTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12,0.,4.,100, -2.,2.,"s");
00643 sprintf(histo,"ErrxMFTrackwidthProfile_Category2_rphi_layer%dtid",i+1);
00644 meErrxMFTrackwidthProfileCategory2RphiTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12,0.,4.,100, -2.,2.,"s");
00645 sprintf(histo,"ErrxMFTrackwidthProfile_Category3_rphi_layer%dtid",i+1);
00646 meErrxMFTrackwidthProfileCategory3RphiTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12,0.,4.,100, -2.,2.,"s");
00647 sprintf(histo,"ErrxMFTrackwidthProfile_Category4_rphi_layer%dtid",i+1);
00648 meErrxMFTrackwidthProfileCategory4RphiTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12,0.,4.,100, -2.,2.,"s");
00649
00650 sprintf(histo,"ErrxMFAngleProfile_rphi_layer%dtid",i+1);
00651 meErrxMFAngleProfileRphiTID[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s");
00652
00653 sprintf(histo,"ErrxMFClusterwidthProfile_Category1_rphi_layer%dtid",i+1);
00654 meErrxMFClusterwidthProfileCategory1RphiTID[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s");
00655
00656 }
00657
00658
00659 for(int i = 0 ;i<2 ; i++) {
00660 Char_t histo[200];
00661 sprintf(histo,"Nstp_sas_layer%dtid",i+1);
00662 meNstpSasTID[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5);
00663 sprintf(histo,"Adc_sas_layer%dtid",i+1);
00664 meAdcSasTID[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.);
00665 sprintf(histo,"Posx_sas_layer%dtid",i+1);
00666 mePosxSasTID[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0);
00667 sprintf(histo,"Errx_LF_sas_layer%dtid",i+1);
00668 meErrxLFSasTID[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.5);
00669 sprintf(histo,"Errx_MF_sas_layer%dtid",i+1);
00670 meErrxMFSasTID[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.5);
00671 sprintf(histo,"Res_LF_sas_layer%dtid",i+1);
00672 meResLFSasTID[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.5,+0.5);
00673 sprintf(histo,"Res_MF_sas_layer%dtid",i+1);
00674 meResMFSasTID[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,2);
00675 sprintf(histo,"Pull_LF_sas_layer%dtid",i+1);
00676 mePullLFSasTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00677 sprintf(histo,"Pull_MF_sas_layer%dtid",i+1);
00678 mePullMFSasTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00679 sprintf(histo,"Trackangle_sas_layer%dtid",i+1);
00680 meTrackangleSasTID[i] = dbe_->book1D(histo,"Track angle",100,-20.,20.);
00681 sprintf(histo,"Trackanglebeta_sas_layer%dtid",i+1);
00682 meTrackanglebetaSasTID[i] = dbe_->book1D(histo,"Track angle beta",100,-20.,20.);
00683
00684 sprintf(histo,"PullTrackangleProfile_sas_layer%dtid",i+1);
00685 mePullTrackangleProfileSasTID[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -20., 20.,100, -5., 5.,"s");
00686
00687 sprintf(histo,"Trackwidth_sas_layer%dtid",i+1);
00688 meTrackwidthSasTID[i] = dbe_->book1D(histo,"Track width",100,0.,1.);
00689
00690 sprintf(histo,"Expectedwidth_sas_layer%dtid",i+1);
00691 meExpectedwidthSasTID[i] = dbe_->book1D(histo,"Expected width",10,0.,10.);
00692
00693 sprintf(histo,"Clusterwidth_sas_layer%dtid",i+1);
00694 meClusterwidthSasTID[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.);
00695
00696 sprintf(histo,"Category_sas_layer%dtid",i+1);
00697 meCategorySasTID[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.);
00698
00699 sprintf(histo,"PullTrackwidthProfile_sas_layer%dtid",i+1);
00700 mePullTrackwidthProfileSasTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s");
00701
00702 sprintf(histo,"PullTrackwidthProfile_Category1_sas_layer%dtid",i+1);
00703 mePullTrackwidthProfileCategory1SasTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s");
00704
00705 sprintf(histo,"PullTrackwidthProfile_Category2_sas_layer%dtid",i+1);
00706 mePullTrackwidthProfileCategory2SasTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s");
00707
00708 sprintf(histo,"PullTrackwidthProfile_Category3_sas_layer%dtid",i+1);
00709 mePullTrackwidthProfileCategory3SasTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s");
00710
00711 sprintf(histo,"PullTrackwidthProfile_Category4_sas_layer%dtid",i+1);
00712 mePullTrackwidthProfileCategory4SasTID[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s");
00713
00714 sprintf(histo,"ErrxMFTrackwidthProfile_sas_layer%dtid",i+1);
00715 meErrxMFTrackwidthProfileSasTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12,0.,4.,100, -2.,2.,"s");
00716
00717 sprintf(histo,"ErrxMFTrackwidthProfile_Category1_sas_layer%dtid",i+1);
00718 meErrxMFTrackwidthProfileCategory1SasTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12,0.,4.,100, -2.,2.,"s");
00719 sprintf(histo,"ErrxMFTrackwidthProfile_Category2_sas_layer%dtid",i+1);
00720 meErrxMFTrackwidthProfileCategory2SasTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12,0.,4.,100, -2.,2.,"s");
00721 sprintf(histo,"ErrxMFTrackwidthProfile_Category3_sas_layer%dtid",i+1);
00722 meErrxMFTrackwidthProfileCategory3SasTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12,0.,4.,100, -2.,2.,"s");
00723 sprintf(histo,"ErrxMFTrackwidthProfile_Category4_sas_layer%dtid",i+1);
00724 meErrxMFTrackwidthProfileCategory4SasTID[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12,0.,4.,100, -2.,2.,"s");
00725
00726 sprintf(histo,"ErrxMFAngleProfile_sas_layer%dtid",i+1);
00727 meErrxMFAngleProfileSasTID[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s");
00728
00729 sprintf(histo,"ErrxMFClusterwidthProfile_Category1_sas_layer%dtid",i+1);
00730 meErrxMFClusterwidthProfileCategory1SasTID[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s");
00731
00732 sprintf(histo,"Posx_matched_layer%dtid",i+1);
00733 mePosxMatchedTID[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0, +6.0);
00734 sprintf(histo,"Posy_matched_layer%dtid",i+1);
00735 mePosyMatchedTID[i] = dbe_->book1D(histo,"RecHit y coord.",100,-6.0, +6.0);
00736 sprintf(histo,"Errx_matched_layer%dtid",i+1);
00737 meErrxMatchedTID[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0., 0.02);
00738 sprintf(histo,"Erry_matched_layer%dtid",i+1);
00739 meErryMatchedTID[i] = dbe_->book1D(histo,"RecHit err(y) coord.",100,0., 0.1);
00740 sprintf(histo,"Resx_matched_layer%dtid",i+1);
00741 meResxMatchedTID[i] = dbe_->book1D(histo,"RecHit Res(x) coord.",100,-0.2, +0.2);
00742 sprintf(histo,"Resy_matched_layer%dtid",i+1);
00743 meResyMatchedTID[i] = dbe_->book1D(histo,"RecHit Res(y) coord.",100,-1., +1.);
00744 sprintf(histo,"Pullx_matched_layer%dtid",i+1);
00745 mePullxMatchedTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00746 sprintf(histo,"Pully_matched_layer%dtid",i+1);
00747 mePullyMatchedTID[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00748 }
00749
00750 dbe_->setCurrentFolder("Tracking/TrackingRecHits/Strip/TEC");
00751
00752 for(int i = 0 ;i<7 ; i++) {
00753 Char_t histo[200];
00754 sprintf(histo,"Nstp_rphi_layer%dtec",i+1);
00755 meNstpRphiTEC[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5);
00756 sprintf(histo,"Adc_rphi_layer%dtec",i+1);
00757 meAdcRphiTEC[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.);
00758 sprintf(histo,"Posx_rphi_layer%dtec",i+1);
00759 mePosxRphiTEC[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0);
00760
00761 sprintf(histo,"Errx_LF_rphi_layer%dtec",i+1);
00762 meErrxLFRphiTEC[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.5);
00763 sprintf(histo,"Errx_MF_rphi_layer%dtec",i+1);
00764 meErrxMFRphiTEC[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0,0.5);
00765
00766 sprintf(histo,"Res_LF_rphi_layer%dtec",i+1);
00767 meResLFRphiTEC[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.5,+0.5);
00768 sprintf(histo,"Res_MF_rphi_layer%dtec",i+1);
00769 meResMFRphiTEC[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,2);
00770
00771 sprintf(histo,"Pull_LF_rphi_layer%dtec",i+1);
00772 mePullLFRphiTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00773 sprintf(histo,"Pull_MF_rphi_layer%dtec",i+1);
00774 mePullMFRphiTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00775
00776 sprintf(histo,"Trackangle_rphi_layer%dtec",i+1);
00777 meTrackangleRphiTEC[i] = dbe_->book1D(histo,"Track angle",100,-10.,10.);
00778
00779 sprintf(histo,"Trackanglebeta_rphi_layer%dtec",i+1);
00780 meTrackanglebetaRphiTEC[i] = dbe_->book1D(histo,"Track angle beta",100,-10.,10.);
00781
00782 sprintf(histo,"PullTrackangleProfile_rphi_layer%dtec",i+1);
00783 mePullTrackangleProfileRphiTEC[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -10., 10.,100, -5., 5.,"s");
00784
00785 sprintf(histo,"Trackwidth_rphi_layer%dtec",i+1);
00786 meTrackwidthRphiTEC[i] = dbe_->book1D(histo,"Track width",100,0.,1.);
00787
00788 sprintf(histo,"Expectedwidth_rphi_layer%dtec",i+1);
00789 meExpectedwidthRphiTEC[i] = dbe_->book1D(histo,"Expected width",10,0.,10.);
00790
00791 sprintf(histo,"Clusterwidth_rphi_layer%dtec",i+1);
00792 meClusterwidthRphiTEC[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.);
00793
00794 sprintf(histo,"Category_rphi_layer%dtec",i+1);
00795 meCategoryRphiTEC[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.);
00796
00797 sprintf(histo,"PullTrackwidthProfile_rphi_layer%dtec",i+1);
00798 mePullTrackwidthProfileRphiTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s");
00799
00800 sprintf(histo,"PullTrackwidthProfile_Category1_rphi_layer%dtec",i+1);
00801 mePullTrackwidthProfileCategory1RphiTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s");
00802
00803 sprintf(histo,"PullTrackwidthProfile_Category2_rphi_layer%dtec",i+1);
00804 mePullTrackwidthProfileCategory2RphiTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s");
00805
00806 sprintf(histo,"PullTrackwidthProfile_Category3_rphi_layer%dtec",i+1);
00807 mePullTrackwidthProfileCategory3RphiTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s");
00808
00809 sprintf(histo,"PullTrackwidthProfile_Category4_rphi_layer%dtec",i+1);
00810 mePullTrackwidthProfileCategory4RphiTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s");
00811
00812 sprintf(histo,"ErrxMFTrackwidthProfile_rphi_layer%dtec",i+1);
00813 meErrxMFTrackwidthProfileRphiTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12,0.,4.,100, -2.,2.,"s");
00814
00815 sprintf(histo,"ErrxMFTrackwidthProfile_Category1_rphi_layer%dtec",i+1);
00816 meErrxMFTrackwidthProfileCategory1RphiTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12,0.,4.,100, -2.,2.,"s");
00817 sprintf(histo,"ErrxMFTrackwidthProfile_Category2_rphi_layer%dtec",i+1);
00818 meErrxMFTrackwidthProfileCategory2RphiTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12,0.,4.,100, -2.,2.,"s");
00819 sprintf(histo,"ErrxMFTrackwidthProfile_Category3_rphi_layer%dtec",i+1);
00820 meErrxMFTrackwidthProfileCategory3RphiTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12,0.,4.,100, -2.,2.,"s");
00821 sprintf(histo,"ErrxMFTrackwidthProfile_Category4_rphi_layer%dtec",i+1);
00822 meErrxMFTrackwidthProfileCategory4RphiTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12,0.,4.,100, -2.,2.,"s");
00823
00824 sprintf(histo,"ErrxMFAngleProfile_rphi_layer%dtec",i+1);
00825 meErrxMFAngleProfileRphiTEC[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s");
00826
00827 sprintf(histo,"ErrxMFClusterwidthProfile_Category1_rphi_layer%dtec",i+1);
00828 meErrxMFClusterwidthProfileCategory1RphiTEC[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s");
00829
00830 }
00831
00832
00833 for(int i = 0 ;i<5 ; i++) {
00834 if(i == 0 || i == 1 || i == 4) {
00835 Char_t histo[200];
00836 sprintf(histo,"Nstp_sas_layer%dtec",i+1);
00837 meNstpSasTEC[i] = dbe_->book1D(histo,"RecHit Cluster Size",20,0.5,20.5);
00838 sprintf(histo,"Adc_sas_layer%dtec",i+1);
00839 meAdcSasTEC[i] = dbe_->book1D(histo,"RecHit Cluster Charge",100,0.,300.);
00840 sprintf(histo,"Posx_sas_layer%dtec",i+1);
00841 mePosxSasTEC[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0,+6.0);
00842 sprintf(histo,"Errx_LF_sas_layer%dtec",i+1);
00843 meErrxLFSasTEC[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.5);
00844 sprintf(histo,"Errx_MF_sas_layer%dtec",i+1);
00845 meErrxMFSasTEC[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0.,0.5);
00846 sprintf(histo,"Res_LF_sas_layer%dtec",i+1);
00847 meResLFSasTEC[i] = dbe_->book1D(histo,"RecHit Residual",100,-0.5,+0.5);
00848 sprintf(histo,"Res_MF_sas_layer%dtec",i+1);
00849 meResMFSasTEC[i] = dbe_->book1D(histo,"RecHit Residual",100,-2,+2);
00850 sprintf(histo,"Pull_LF_sas_layer%dtec",i+1);
00851 mePullLFSasTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00852 sprintf(histo,"Pull_MF_sas_layer%dtec",i+1);
00853 mePullMFSasTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00854 sprintf(histo,"Trackangle_sas_layer%dtec",i+1);
00855 meTrackangleSasTEC[i] = dbe_->book1D(histo,"Track angle",100,-10.,10.);
00856 sprintf(histo,"Trackanglebeta_sas_layer%dtec",i+1);
00857 meTrackanglebetaSasTEC[i] = dbe_->book1D(histo,"Track angle beta",100,-10.,10.);
00858
00859 sprintf(histo,"PullTrackangleProfile_sas_layer%dtec",i+1);
00860 mePullTrackangleProfileSasTEC[i] = dbe_->bookProfile(histo,"Pull Track angle Profile", 100, -10., 10.,100, -5., 5.,"s");
00861
00862 sprintf(histo,"Trackwidth_sas_layer%dtec",i+1);
00863 meTrackwidthSasTEC[i] = dbe_->book1D(histo,"Track width",100,0.,1.);
00864
00865 sprintf(histo,"Expectedwidth_sas_layer%dtec",i+1);
00866 meExpectedwidthSasTEC[i] = dbe_->book1D(histo,"Expected width",10,0.,10.);
00867
00868 sprintf(histo,"Clusterwidth_sas_layer%dtec",i+1);
00869 meClusterwidthSasTEC[i] = dbe_->book1D(histo,"Cluster width",10,0.,10.);
00870
00871 sprintf(histo,"Category_sas_layer%dtec",i+1);
00872 meCategorySasTEC[i] = dbe_->book1D(histo,"Cluster Category",10,0.,10.);
00873
00874 sprintf(histo,"PullTrackwidthProfile_sas_layer%dtec",i+1);
00875 mePullTrackwidthProfileSasTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile", 100, 0., 1.,100, -2.,2.,"s");
00876
00877 sprintf(histo,"PullTrackwidthProfile_Category1_sas_layer%dtec",i+1);
00878 mePullTrackwidthProfileCategory1SasTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category1", 100, 0., 1.,100, -2.,2.,"s");
00879
00880 sprintf(histo,"PullTrackwidthProfile_Category2_sas_layer%dtec",i+1);
00881 mePullTrackwidthProfileCategory2SasTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category2", 100, 0., 1.,100, -2.,2.,"s");
00882
00883 sprintf(histo,"PullTrackwidthProfile_Category3_sas_layer%dtec",i+1);
00884 mePullTrackwidthProfileCategory3SasTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category3", 100, 0., 1.,100, -2.,2.,"s");
00885
00886 sprintf(histo,"PullTrackwidthProfile_Category4_sas_layer%dtec",i+1);
00887 mePullTrackwidthProfileCategory4SasTEC[i] = dbe_->bookProfile(histo,"Pull Track width Profile Category4", 100, 0., 1.,100, -2.,2.,"s");
00888
00889 sprintf(histo,"ErrxMFTrackwidthProfile_sas_layer%dtec",i+1);
00890 meErrxMFTrackwidthProfileSasTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile", 12,0.,4.,100, -2.,2.,"s");
00891
00892 sprintf(histo,"ErrxMFTrackwidthProfile_Category1_sas_layer%dtec",i+1);
00893 meErrxMFTrackwidthProfileCategory1SasTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category1", 12,0.,4.,100, -2.,2.,"s");
00894 sprintf(histo,"ErrxMFTrackwidthProfile_Category2_sas_layer%dtec",i+1);
00895 meErrxMFTrackwidthProfileCategory2SasTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category2", 12,0.,4.,100, -2.,2.,"s");
00896 sprintf(histo,"ErrxMFTrackwidthProfile_Category3_sas_layer%dtec",i+1);
00897 meErrxMFTrackwidthProfileCategory3SasTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category3", 12,0.,4.,100, -2.,2.,"s");
00898 sprintf(histo,"ErrxMFTrackwidthProfile_Category4_sas_layer%dtec",i+1);
00899 meErrxMFTrackwidthProfileCategory4SasTEC[i] = dbe_->bookProfile(histo,"Resolution Track width Profile Category4", 12,0.,4.,100, -2.,2.,"s");
00900
00901 sprintf(histo,"ErrxMFAngleProfile_sas_layer%dtec",i+1);
00902 meErrxMFAngleProfileSasTEC[i] = dbe_->bookProfile(histo,"Resolution Angle Profile", 100, 0., 1.,100, -2.,2.,"s");
00903
00904 sprintf(histo,"ErrxMFClusterwidthProfile_Category1_sas_layer%dtec",i+1);
00905 meErrxMFClusterwidthProfileCategory1SasTEC[i] = dbe_->bookProfile(histo,"Resolution Cluster width Profile Category1", 100, 0., 10.,100, -2.,2.,"s");
00906
00907 sprintf(histo,"Posx_matched_layer%dtec",i+1);
00908 mePosxMatchedTEC[i] = dbe_->book1D(histo,"RecHit x coord.",100,-6.0, +6.0);
00909 sprintf(histo,"Posy_matched_layer%dtec",i+1);
00910 mePosyMatchedTEC[i] = dbe_->book1D(histo,"RecHit y coord.",100,-8.0, +8.0);
00911 sprintf(histo,"Errx_matched_layer%dtec",i+1);
00912 meErrxMatchedTEC[i] = dbe_->book1D(histo,"RecHit err(x) coord.",100,0., 0.02);
00913 sprintf(histo,"Erry_matched_layer%dtec",i+1);
00914 meErryMatchedTEC[i] = dbe_->book1D(histo,"RecHit err(y) coord.",100,0., 0.1);
00915 sprintf(histo,"Resx_matched_layer%dtec",i+1);
00916 meResxMatchedTEC[i] = dbe_->book1D(histo,"RecHit Res(x) coord.",100,-0.2, +0.2);
00917 sprintf(histo,"Resy_matched_layer%dtec",i+1);
00918 meResyMatchedTEC[i] = dbe_->book1D(histo,"RecHit Res(y) coord.",100,-1., +1.);
00919 sprintf(histo,"Pullx_matched_layer%dtec",i+1);
00920 mePullxMatchedTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00921 sprintf(histo,"Pully_matched_layer%dtec",i+1);
00922 mePullyMatchedTEC[i] = dbe_->book1D(histo,"Pull",100,-5.,5.);
00923 }
00924 }
00925
00926
00927 }
00928
00929 void SiStripTrackingRecHitsValid::endJob() {
00930
00931
00932
00933
00934
00935
00936
00937
00938
00939
00940
00941
00942
00943
00944
00945
00946
00947
00948
00949
00950
00951
00952
00953
00954
00955
00956
00957
00958
00959
00960
00961
00962
00963
00964
00965
00966
00967
00968
00969
00970
00971
00972
00973
00974
00975
00976
00977
00978
00979
00980
00981
00982
00983
00984
00985
00986
00987
00988
00989
00990
00991
00992
00993
00994
00995
00996
00997
00998
00999
01000
01001
01002
01003
01004
01005
01006
01007
01008
01009
01010
01011
01012
01013
01014
01015
01016
01017
01018
01019
01020
01021
01022
01023
01024
01025
01026
01027
01028
01029
01030
01031
01032
01033
01034
01035
01036
01037
01038
01039
01040
01041
01042
01043
01044
01045
01046
01047
01048
01049
01050
01051
01052
01053
01054
01055
01056
01057
01058
01059
01060
01061
01062
01063
01064
01065
01066
01067
01068
01069
01070
01071
01072
01073
01074
01075
01076
01077
01078
01079
01080
01081
01082
01083
01084
01085
01086
01087
01088
01089
01090
01091
01092
01093
01094
01095
01096
01097
01098
01099
01100
01101
01102
01103
01104
01105
01106
01107
01108
01109
01110
01111
01112
01113
01114
01115
01116
01117
01118
01119
01120
01121
01122
01123
01124
01125
01126
01127
01128
01129
01130
01131
01132
01133
01134
01135
01136
01137
01138
01139
01140
01141
01142
01143
01144
01145
01146
01147
01148
01149
01150
01151
01152
01153
01154
01155
01156
01157
01158
01159
01160
01161
01162
01163
01164
01165
01166
01167
01168
01169
01170
01171
01172
01173
01174
01175
01176
01177
01178
01179
01180
01181
01182
01183
01184 if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_);
01185 }
01186
01187
01188 SiStripTrackingRecHitsValid::~SiStripTrackingRecHitsValid() {
01189
01190 }
01191
01192
01193 void SiStripTrackingRecHitsValid::analyze(const edm::Event& e, const edm::EventSetup& es)
01194 {
01195
01196
01197
01198
01199
01200
01201
01202 int isrechitrphi = 0;
01203 int isrechitsas = 0;
01204 int isrechitmatched = 0;
01205
01206 float anglealpha=0;
01207 float anglebeta=0;
01208 float Wtrack;
01209 int Wexp;
01210 int clusterWidth;
01211 DetId detid;
01212 uint32_t myid;
01213
01214 LocalPoint position;
01215 LocalError error;
01216 MeasurementPoint Mposition;
01217 MeasurementError Merror;
01218
01219 int clusiz=0;
01220 int totcharge=0;
01221
01222
01223 float mindist = 999999;
01224 float dist;
01225 std::vector<PSimHit> matched;
01226
01227 TrackerHitAssociator associate(e, conf_);
01228 PSimHit closest;
01229
01230
01231
01232 edm::ESHandle<TrackerGeometry> pDD;
01233 es.get<TrackerDigiGeometryRecord> ().get (pDD);
01234 const TrackerGeometry &tracker(*pDD);
01235
01236 const TrackerGeometry * tracker2;
01237 edm::ESHandle<TrackerGeometry> estracker;
01238 es.get<TrackerDigiGeometryRecord>().get(estracker);
01239 tracker2=&(* estracker);
01240
01241 edm::ESHandle<MagneticField> magfield;
01242
01243 es.get<IdealMagneticFieldRecord>().get(magfield );
01244
01245
01246 const MagneticField & magfield_ (*magfield);
01247 magfield2_ = &magfield_;
01248
01249
01250 edm::ESHandle<StripClusterParameterEstimator> stripcpe;
01251 es.get<TkStripCPERecord>().get("SimpleStripCPE",stripcpe);
01252
01253
01254
01255
01256
01257
01258 edm::Handle<vector<Trajectory> > trajCollectionHandle;
01259 e.getByLabel(conf_.getParameter<string>("trajectoryInput"),trajCollectionHandle);
01260
01261 edm::LogVerbatim("TrajectoryAnalyzer") << "trajColl->size(): " << trajCollectionHandle->size() ;
01262
01263
01264
01265 for(vector<Trajectory>::const_iterator it = trajCollectionHandle->begin(); it!=trajCollectionHandle->end();it++){
01266
01267 edm::LogVerbatim("TrajectoryAnalyzer") << "this traj has " << it->foundHits() << " valid hits" << " , "
01268 << "isValid: " << it->isValid() ;
01269
01270 vector<TrajectoryMeasurement> tmColl = it->measurements();
01271 for(vector<TrajectoryMeasurement>::const_iterator itTraj = tmColl.begin(); itTraj!=tmColl.end(); itTraj++){
01272 if(! itTraj->updatedState().isValid()) continue;
01273
01274
01275
01276
01277
01278
01279
01280 if ( itTraj->updatedState().globalMomentum().perp() < 1.) continue;
01281
01282 TrajectoryStateOnSurface tsos=itTraj->updatedState();
01283 LocalVector trackdirection=tsos.localDirection();
01284
01285 DetId detid2 = itTraj->recHit()->geographicalId();
01286
01287 const TransientTrackingRecHit::ConstRecHitPointer thit2=itTraj->recHit();
01288 const SiStripMatchedRecHit2D* matchedhit=dynamic_cast<const SiStripMatchedRecHit2D*>((*thit2).hit());
01289 const SiStripRecHit2D* hit2d=dynamic_cast<const SiStripRecHit2D*>((*thit2).hit());
01290 const SiStripRecHit1D* hit1d=dynamic_cast<const SiStripRecHit1D*>((*thit2).hit());
01291
01292
01293
01294 const TrackingRecHit *thit = (*thit2).hit();
01295
01296 detid = (thit)->geographicalId();
01297 myid=((thit)->geographicalId()).rawId();
01298
01299 StripSubdetector StripSubdet = (StripSubdetector) detid;
01300
01301 isrechitmatched = 0;
01302
01303 if(matchedhit){
01304
01305 isrechitmatched = 1;
01306
01307 position = (thit)->localPosition();
01308
01309 error = (thit)->localPositionError();
01310
01311 rechitmatchedx = position.x();
01312 rechitmatchedy = position.y();
01313 rechitmatchedz = position.z();
01314 rechitmatchederrxx = error.xx();
01315 rechitmatchederrxy = error.xy();
01316 rechitmatchederryy = error.yy();
01317
01318
01319 mindist = 999999;
01320 float distx, disty;
01321 std::pair<LocalPoint,LocalVector> closestPair;
01322 matched.clear();
01323 matched = associate.associateHit(*matchedhit);
01324 if(!matched.empty()){
01325
01326 const GluedGeomDet* gluedDet = (const GluedGeomDet*)tracker.idToDet(matchedhit->geographicalId());
01327 const StripGeomDetUnit* partnerstripdet =(StripGeomDetUnit*) gluedDet->stereoDet();
01328 std::pair<LocalPoint,LocalVector> hitPair;
01329 for(vector<PSimHit>::const_iterator m=matched.begin(); m<matched.end(); m++){
01330
01331 hitPair= projectHit((*m),partnerstripdet,gluedDet->surface());
01332 distx = fabs(rechitmatchedx - hitPair.first.x());
01333 disty = fabs(rechitmatchedy - hitPair.first.y());
01334 dist = distx*distx+disty*disty;
01335 if(sqrt(dist)<mindist){
01336 mindist = dist;
01337 closestPair = hitPair;
01338 }
01339 }
01340 rechitmatchedresx = rechitmatchedx - closestPair.first.x();
01341 rechitmatchedresy = rechitmatchedy - closestPair.first.y();
01342 rechitmatchedpullx = ((thit)->localPosition().x() - (closestPair.first.x()))/sqrt(error.xx());
01343 rechitmatchedpully = ((thit)->localPosition().y() - (closestPair.first.y()))/sqrt(error.yy());
01344 }
01345 }
01346
01347
01348
01349 if(isrechitmatched){
01350
01351 if (detid.subdetId() == int(StripSubdetector::TIB)){
01352 TIBDetId tibid(myid);
01353 int Tibisrechitmatched = isrechitmatched;
01354 int ilay = tibid.layer() - 1;
01355 if(Tibisrechitmatched>0){
01356 mePosxMatchedTIB[ilay]->Fill(rechitmatchedx);
01357 meErrxMatchedTIB[ilay]->Fill(sqrt(rechitmatchederrxx));
01358 meErryMatchedTIB[ilay]->Fill(sqrt(rechitmatchederryy));
01359 meResxMatchedTIB[ilay]->Fill(rechitmatchedresx);
01360 meResyMatchedTIB[ilay]->Fill(rechitmatchedresy);
01361 mePullxMatchedTIB[ilay]->Fill(rechitmatchedpullx);
01362 mePullyMatchedTIB[ilay]->Fill(rechitmatchedpully);
01363
01364 }
01365 }
01366
01367 if (detid.subdetId() == int(StripSubdetector::TOB)){
01368 TOBDetId tobid(myid);
01369 int Tobisrechitmatched = isrechitmatched;
01370 int ilay = tobid.layer() - 1;
01371 if(Tobisrechitmatched>0){
01372 mePosxMatchedTOB[ilay]->Fill(rechitmatchedx);
01373 mePosyMatchedTOB[ilay]->Fill(rechitmatchedy);
01374 meErrxMatchedTOB[ilay]->Fill(sqrt(rechitmatchederrxx));
01375 meErryMatchedTOB[ilay]->Fill(sqrt(rechitmatchederryy));
01376 meResxMatchedTOB[ilay]->Fill(rechitmatchedresx);
01377 meResyMatchedTOB[ilay]->Fill(rechitmatchedresy);
01378 mePullxMatchedTOB[ilay]->Fill(rechitmatchedpullx);
01379 mePullyMatchedTOB[ilay]->Fill(rechitmatchedpully);
01380 }
01381 }
01382 if (detid.subdetId() == int(StripSubdetector::TID)){
01383 TIDDetId tidid(myid);
01384 int Tidisrechitmatched = isrechitmatched;
01385 int ilay = tidid.ring() - 1;
01386 if(Tidisrechitmatched>0){
01387 mePosxMatchedTID[ilay]->Fill(rechitmatchedx);
01388 mePosyMatchedTID[ilay]->Fill(rechitmatchedy);
01389 meErrxMatchedTID[ilay]->Fill(sqrt(rechitmatchederrxx));
01390 meErryMatchedTID[ilay]->Fill(sqrt(rechitmatchederryy));
01391 meResxMatchedTID[ilay]->Fill(rechitmatchedresx);
01392 meResyMatchedTID[ilay]->Fill(rechitmatchedresy);
01393 mePullxMatchedTID[ilay]->Fill(rechitmatchedpullx);
01394 mePullyMatchedTID[ilay]->Fill(rechitmatchedpully);
01395 }
01396 }
01397 if (detid.subdetId() == int(StripSubdetector::TEC)){
01398 TECDetId tecid(myid);
01399 int Tecisrechitmatched = isrechitmatched;
01400 int ilay = tecid.ring() - 1;
01401 if(Tecisrechitmatched>0){
01402 mePosxMatchedTEC[ilay]->Fill(rechitmatchedx);
01403 mePosyMatchedTEC[ilay]->Fill(rechitmatchedy);
01404 meErrxMatchedTEC[ilay]->Fill(sqrt(rechitmatchederrxx));
01405 meErryMatchedTEC[ilay]->Fill(sqrt(rechitmatchederryy));
01406 meResxMatchedTEC[ilay]->Fill(rechitmatchedresx);
01407 meResyMatchedTEC[ilay]->Fill(rechitmatchedresy);
01408 mePullxMatchedTEC[ilay]->Fill(rechitmatchedpullx);
01409 mePullyMatchedTEC[ilay]->Fill(rechitmatchedpully);
01410 }
01411 }
01412
01413 }
01414
01415
01417
01419
01420
01421 isrechitrphi = 0;
01422 isrechitsas = 0;
01423 rechitrphix =0;
01424 rechitrphierrxLF =0;
01425 rechitrphierrxMF =0;
01426 rechitrphiy =0;
01427 rechitrphiz =0;
01428 rechitsasx =0;
01429 rechitsaserrxLF =0;
01430 rechitsaserrxMF =0;
01431 rechitsasy =0;
01432 rechitsasz =0;
01433 clusizrphi =0;
01434 clusizsas =0;
01435 cluchgrphi =0;
01436 cluchgsas =0;
01437 rechitrphiresLF=-999.;
01438 rechitrphiresMF=-999.;
01439 rechitrphipullLF=-999.;
01440 rechitrphipullMF=-999.;
01441 rechitrphitrackangle =0;
01442 rechitrphitrackanglebeta =0;
01443 rechitrphitrackangle2 =0;
01444 rechitrphitrackwidth =0;
01445 rechitrphiexpectedwidth =0;
01446 rechitrphicategory =0;
01447 rechitrphithickness = 0.;
01448 rechitsasresLF=-999.;
01449 rechitsasresMF=-999.;
01450 rechitsaspullLF=-999.;
01451 rechitsaspullMF=-999.;
01452 rechitsastrackangle =0;
01453 rechitsastrackanglebeta =0;
01454 rechitsasthickness = 0;
01455
01456 GluedGeomDet * gdet;
01457 const GeomDetUnit * monodet;
01458 const SiStripRecHit2D *monohit;
01459 const StripGeomDetUnit * stripdet;
01460
01461 if (matchedhit)
01462 {
01463 auto hm =matchedhit->monoHit();
01464 monohit=&hm;
01465
01466 gdet=(GluedGeomDet *)tracker2->idToDet(matchedhit->geographicalId());
01467 monodet=gdet->monoDet();
01468 GlobalVector gtrkdir=gdet->toGlobal(trackdirection);
01469 LocalVector monotkdir=monodet->toLocal(gtrkdir);
01470
01471
01472 stripdet=(const StripGeomDetUnit*)(monodet);
01473
01474
01475 if(monotkdir.z()!=0){
01476 anglealpha = atan(monotkdir.x()/monotkdir.z())*180/TMath::Pi();
01477 anglebeta = atan(monotkdir.y()/monotkdir.z())*180/TMath::Pi();
01478 }
01479
01480 if(monohit){
01481
01482 const StripTopology &topol=(const StripTopology&)stripdet->topology();
01483
01484 position = monohit->localPosition();
01485 error = monohit->localPositionError();
01486 Mposition = topol.measurementPosition(position);
01487 Merror = topol.measurementError(position,error);
01488
01489 LocalVector drift = stripcpe->driftDirection(stripdet);
01490 float thickness=stripdet->surface().bounds().thickness();
01491 rechitrphithickness = thickness;
01492
01493
01494 float pitch = topol.localPitch(position);
01495
01496 float tanalpha = tan(anglealpha/57.3);
01497
01498 float tanalphaL = drift.x()/drift.z();
01499
01500
01501
01502
01503
01504
01505
01506
01507 Wtrack = fabs((thickness/pitch)*tanalpha - (thickness/pitch)*tanalphaL);
01508
01509 float SLorentz = 0.5*(thickness/pitch)*tanalphaL;
01510
01511
01512 int Sp = int(position.x()/pitch+SLorentz+0.5*Wtrack);
01513 int Sm = int(position.x()/pitch+SLorentz-0.5*Wtrack);
01514 Wexp = 1+Sp-Sm;
01515
01516
01517 isrechitrphi = 1;
01518
01519
01520 SiStripRecHit2D::ClusterRef cluster=monohit->cluster();
01521
01522 clusiz=0;
01523 totcharge=0;
01524 clusiz = cluster->amplitudes().size();
01525
01526 const std::vector<uint8_t> amplitudes=cluster->amplitudes();
01527 for(size_t ia=0; ia<amplitudes.size();ia++){
01528 totcharge+=amplitudes[ia];
01529 }
01530 rechitrphix = position.x();
01531 rechitrphiy = position.y();
01532 rechitrphiz = position.z();
01533 rechitrphierrxLF = error.xx();
01534 rechitrphierrxMF = Merror.uu();
01535
01536 clusizrphi = clusiz;
01537 cluchgrphi = totcharge;
01538
01539
01540 mindist = 999999;
01541 matched.clear();
01542
01543 matched = associate.associateHit(*monohit);
01544 if(!matched.empty()){
01545
01546
01547 for(vector<PSimHit>::const_iterator m=matched.begin(); m<matched.end(); m++){
01548 dist = abs((monohit)->localPosition().x() - (*m).localPosition().x());
01549 if(dist<mindist){
01550 mindist = dist;
01551 closest = (*m);
01552 }
01553 rechitrphiresLF = rechitrphix - closest.localPosition().x();
01554 rechitrphiresMF = Mposition.x() - (topol.measurementPosition(closest.localPosition())).x();
01555 rechitrphipullLF = rechitrphiresLF/sqrt(rechitrphierrxLF);
01556 rechitrphipullMF = rechitrphiresMF/sqrt(rechitrphierrxMF);
01557
01558
01559
01560
01561
01562 }
01563 }
01564 rechitrphitrackangle = anglealpha;
01565 rechitrphitrackanglebeta = anglebeta;
01566
01567
01568 rechitrphitrackwidth = Wtrack;
01569 rechitrphiexpectedwidth = Wexp;
01570 clusterWidth = clusiz;
01571 unsigned int iopt;
01572 if (clusterWidth > Wexp + 2) {
01573 iopt = 1;
01574 } else if (Wexp == 1) {
01575 iopt = 2;
01576 } else if (clusterWidth <= Wexp) {
01577 iopt = 3;
01578 } else {
01579 iopt = 4;
01580 }
01581 rechitrphicategory = iopt;
01582 }
01583
01584 auto s =matchedhit->stereoHit();
01585 const SiStripRecHit2D *stereohit=&s;
01586 const GeomDetUnit * stereodet=gdet->stereoDet();
01587
01588 gtrkdir=gdet->toGlobal(trackdirection);
01589 LocalVector stereotkdir=stereodet->toLocal(gtrkdir);
01590 if(stereotkdir.z()!=0){
01591 anglealpha = atan(stereotkdir.x()/stereotkdir.z())*180/TMath::Pi();
01592 anglebeta = atan(stereotkdir.y()/stereotkdir.z())*180/TMath::Pi();
01593 }
01594
01595 if (stereohit)
01596 {
01597
01598 isrechitsas = 1;
01599 SiStripRecHit2D::ClusterRef cluster=stereohit->cluster();
01600
01601
01602 const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(stereodet);
01603 const StripTopology &topol=(const StripTopology&)stripdet->topology();
01604
01605 position = stereohit->localPosition();
01606
01607 error = stereohit->localPositionError();
01608 Mposition = topol.measurementPosition(position);
01609 Merror = topol.measurementError(position,error);
01610
01611
01612 LocalVector drift = stripcpe->driftDirection(stripdet);
01613 float thickness=stripdet->surface().bounds().thickness();
01614 rechitsasthickness = thickness;
01615
01616 float pitch = topol.localPitch(position);
01617
01618 float tanalpha = tan(anglealpha/57.3);
01619
01620 float tanalphaL = drift.x()/drift.z();
01621
01622
01623
01624 Wtrack = fabs((thickness/pitch)*tanalpha - (thickness/pitch)*tanalphaL);
01625
01626 float SLorentz = 0.5*(thickness/pitch)*tanalphaL;
01627
01628 int Sp = int(position.x()/pitch+SLorentz+0.5*Wtrack);
01629 int Sm = int(position.x()/pitch+SLorentz-0.5*Wtrack);
01630 Wexp = 1+Sp-Sm;
01631
01632
01633 clusiz=0;
01634 totcharge=0;
01635 clusiz = cluster->amplitudes().size();
01636 const std::vector<uint8_t> amplitudes=cluster->amplitudes();
01637 for(size_t ia=0; ia<amplitudes.size();ia++){
01638 totcharge+=amplitudes[ia];
01639 }
01640 rechitsasx = position.x();
01641 rechitsasy = position.y();
01642 rechitsasz = position.z();
01643 rechitsaserrxLF = error.xx();
01644
01645 rechitsaserrxMF = Merror.uu();
01646
01647 clusizsas = clusiz;
01648 cluchgsas = totcharge;
01649
01650
01651 mindist = 999999;
01652 matched.clear();
01653 matched = associate.associateHit(*stereohit);
01654 if(!matched.empty()){
01655
01656 for(vector<PSimHit>::const_iterator m=matched.begin(); m<matched.end(); m++){
01657 dist = abs((stereohit)->localPosition().x() - (*m).localPosition().x());
01658 if(dist<mindist){
01659 mindist = dist;
01660 closest = (*m);
01661 }
01662
01663 rechitsasresLF = rechitsasx - closest.localPosition().x();
01664 rechitsasresMF = Mposition.x() - (topol.measurementPosition(closest.localPosition())).x();
01665 rechitsaspullLF = rechitsasresLF/sqrt(rechitsaserrxLF);
01666 rechitsaspullMF = rechitsasresMF/sqrt(rechitsaserrxMF);
01667
01668
01669
01670
01671
01672
01673 }
01674 }
01675 rechitsastrackangle = anglealpha;
01676 rechitsastrackanglebeta = anglebeta;
01677 rechitsastrackwidth = Wtrack;
01678 rechitsasexpectedwidth = Wexp;
01679
01680 clusterWidth = clusiz;
01681 unsigned int iopt;
01682 if (clusterWidth > Wexp + 2) {
01683 iopt = 1;
01684 } else if (Wexp == 1) {
01685 iopt = 2;
01686 } else if (clusterWidth <= Wexp) {
01687 iopt = 3;
01688 } else {
01689 iopt = 4;
01690 }
01691 rechitsascategory = iopt;
01692 }
01693 }
01694
01695
01696
01697
01698
01699
01700
01701
01702 if(hit1d){
01703
01704
01705 if (StripSubdet.stereo() == 0){
01706 isrechitrphi = 1;
01707
01708
01709 const GeomDetUnit * det = tracker.idToDetUnit(detid2);
01710 const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(det);
01711 const StripTopology &topol=(const StripTopology&)stripdet->topology();
01712
01713 float anglealpha = atan(trackdirection.x()/trackdirection.z())*180/TMath::Pi();
01714 float anglebeta = atan(trackdirection.y()/trackdirection.z())*180/TMath::Pi();
01715
01716
01717 SiStripRecHit1D::ClusterRef cluster=hit1d->cluster();
01718
01719 position = thit->localPosition();
01720 error = thit->localPositionError();
01721 Mposition = topol.measurementPosition(position);
01722 Merror = topol.measurementError(position,error);
01723
01724 LocalVector drift = stripcpe->driftDirection(stripdet);
01725 float thickness=stripdet->surface().bounds().thickness();
01726 rechitrphithickness = thickness;
01727
01728 float pitch = topol.localPitch(position);
01729
01730 float tanalpha = tan(anglealpha/57.3);
01731
01732 float tanalphaL = drift.x()/drift.z();
01733
01734
01735
01736
01737
01738
01739 Wtrack = fabs((thickness/pitch)*tanalpha - (thickness/pitch)*tanalphaL);
01740
01741
01742 float SLorentz = 0.5*(thickness/pitch)*tanalphaL;
01743
01744 int Sp = int(position.x()/pitch+SLorentz+0.5*Wtrack);
01745 int Sm = int(position.x()/pitch+SLorentz-0.5*Wtrack);
01746 Wexp = 1+Sp-Sm;
01747
01748 clusiz=0;
01749 totcharge=0;
01750 clusiz = cluster->amplitudes().size();
01751
01752 const std::vector<uint8_t> amplitudes=cluster->amplitudes();
01753 for(size_t ia=0; ia<amplitudes.size();ia++){
01754 totcharge+=amplitudes[ia];
01755 }
01756 rechitrphix = position.x();
01757 rechitrphiy = position.y();
01758 rechitrphiz = position.z();
01759 rechitrphierrx = error.xx();
01760 rechitrphierrxLF = error.xx();
01761 rechitrphierrxMF = Merror.uu();
01762
01763 clusizrphi = clusiz;
01764
01765 cluchgrphi = totcharge;
01766
01767
01768 mindist = 999999;
01769 matched.clear();
01770 matched = associate.associateHit(*hit1d);
01771 if(!matched.empty()){
01772
01773 for(vector<PSimHit>::const_iterator m=matched.begin(); m<matched.end(); m++){
01774 dist = abs((hit1d)->localPosition().x() - (*m).localPosition().x());
01775 if(dist<mindist){
01776 mindist = dist;
01777 closest = (*m);
01778 }
01779 rechitrphiresLF = rechitrphix - closest.localPosition().x();
01780 rechitrphiresMF = Mposition.x() - (topol.measurementPosition(closest.localPosition())).x();
01781 rechitrphipullLF = (thit->localPosition().x() - (closest).localPosition().x())/sqrt(error.xx());
01782 rechitrphipullMF = rechitrphiresMF/sqrt(rechitrphierrxMF);
01783 }
01784 }
01785 rechitrphitrackangle = anglealpha;
01786 rechitrphitrackanglebeta = anglebeta;
01787 rechitrphitrackwidth = Wtrack;
01788 rechitrphiexpectedwidth = Wexp;
01789
01790 clusterWidth = clusiz;
01791 unsigned int iopt;
01792 if (clusterWidth > Wexp + 2) {
01793 iopt = 1;
01794 } else if (Wexp == 1) {
01795 iopt = 2;
01796 } else if (clusterWidth <= Wexp) {
01797 iopt = 3;
01798 } else {
01799 iopt = 4;
01800 }
01801 rechitrphicategory = iopt;
01802
01803
01804
01805
01806
01807
01808
01809
01810
01811
01812
01813
01814
01815
01816
01817
01818
01819
01820
01821
01822
01823
01824
01825
01826
01827
01828
01829
01830
01831
01832
01833
01834
01835
01836
01837
01838
01839
01840
01841
01842
01843
01844
01845
01846
01847
01848
01849
01850
01851
01852
01853
01854
01855
01856
01857
01858
01859
01860
01861
01862
01863
01864
01865
01866
01867
01868
01869
01870
01871
01872
01873
01874
01875
01876 }
01877
01878 if (StripSubdet.stereo() == 1){
01879
01880
01881 isrechitsas = 1;
01882
01883 const GeomDetUnit * det = tracker.idToDetUnit(detid2);
01884 const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(det);
01885 const StripTopology &topol=(const StripTopology&)stripdet->topology();
01886
01887 float anglealpha = atan(trackdirection.x()/trackdirection.z())*180/TMath::Pi();
01888 float anglebeta = atan(trackdirection.y()/trackdirection.z())*180/TMath::Pi();
01889
01890
01891 SiStripRecHit1D::ClusterRef cluster=hit1d->cluster();
01892
01893
01894 position = thit->localPosition();
01895 error = thit->localPositionError();
01896 Mposition = topol.measurementPosition(position);
01897 Merror = topol.measurementError(position,error);
01898
01899
01900 LocalVector drift = stripcpe->driftDirection(stripdet);
01901 float thickness=stripdet->surface().bounds().thickness();
01902 rechitsasthickness = thickness;
01903
01904 float pitch = topol.localPitch(position);
01905
01906 float tanalpha = tan(anglealpha/57.3);
01907
01908 float tanalphaL = drift.x()/drift.z();
01909
01910
01911
01912 Wtrack = fabs((thickness/pitch)*tanalpha - (thickness/pitch)*tanalphaL);
01913
01914 float SLorentz = 0.5*(thickness/pitch)*tanalphaL;
01915
01916 int Sp = int(position.x()/pitch+SLorentz+0.5*Wtrack);
01917 int Sm = int(position.x()/pitch+SLorentz-0.5*Wtrack);
01918 Wexp = 1+Sp-Sm;
01919
01920 clusiz=0;
01921 totcharge=0;
01922 clusiz = cluster->amplitudes().size();
01923 const std::vector<uint8_t> amplitudes=cluster->amplitudes();
01924 for(size_t ia=0; ia<amplitudes.size();ia++){
01925 totcharge+=amplitudes[ia];
01926 }
01927 rechitsasx = position.x();
01928 rechitsasy = position.y();
01929 rechitsasz = position.z();
01930 rechitsaserrxLF = error.xx();
01931
01932 rechitsaserrxMF = Merror.uu();
01933
01934 clusizsas = clusiz;
01935 cluchgsas = totcharge;
01936
01937
01938 mindist = 999999;
01939 matched.clear();
01940 matched = associate.associateHit(*hit1d);
01941 if(!matched.empty()){
01942
01943 for(vector<PSimHit>::const_iterator m=matched.begin(); m<matched.end(); m++){
01944 dist = abs((hit1d)->localPosition().x() - (*m).localPosition().x());
01945 if(dist<mindist){
01946 mindist = dist;
01947 closest = (*m);
01948 }
01949
01950 rechitsasresLF = rechitsasx - closest.localPosition().x();
01951 rechitsasresMF = Mposition.x() - (topol.measurementPosition(closest.localPosition())).x();
01952 rechitsaspullLF = (thit->localPosition().x() - (closest).localPosition().x())/sqrt(error.xx());
01953 rechitsaspullMF = rechitsasresMF/sqrt(rechitsaserrxMF);
01954
01955 }
01956 }
01957 rechitsastrackangle = anglealpha;
01958 rechitsastrackanglebeta = anglebeta;
01959 rechitsastrackwidth = Wtrack;
01960 rechitsasexpectedwidth = Wexp;
01961
01962 clusterWidth = clusiz;
01963 unsigned int iopt;
01964 if (clusterWidth > Wexp + 2) {
01965 iopt = 1;
01966 } else if (Wexp == 1) {
01967 iopt = 2;
01968 } else if (clusterWidth <= Wexp) {
01969 iopt = 3;
01970 } else {
01971 iopt = 4;
01972 }
01973 rechitsascategory = iopt;
01974 }
01975
01976 }
01977
01978
01979 if(hit2d){
01980
01981
01982 if (StripSubdet.stereo() == 0){
01983 isrechitrphi = 1;
01984
01985
01986 const GeomDetUnit * det = tracker.idToDetUnit(detid2);
01987 const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(det);
01988 const StripTopology &topol=(const StripTopology&)stripdet->topology();
01989
01990 float anglealpha = atan(trackdirection.x()/trackdirection.z())*180/TMath::Pi();
01991 float anglebeta = atan(trackdirection.y()/trackdirection.z())*180/TMath::Pi();
01992
01993 SiStripRecHit2D::ClusterRef cluster=hit2d->cluster();
01994
01995 position = thit->localPosition();
01996 error = thit->localPositionError();
01997 Mposition = topol.measurementPosition(position);
01998 Merror = topol.measurementError(position,error);
01999
02000 LocalVector drift = stripcpe->driftDirection(stripdet);
02001 float thickness=stripdet->surface().bounds().thickness();
02002 rechitrphithickness = thickness;
02003
02004 float pitch = topol.localPitch(position);
02005
02006 float tanalpha = tan(anglealpha/57.3);
02007
02008 float tanalphaL = drift.x()/drift.z();
02009
02010
02011
02012
02013
02014
02015 Wtrack = fabs((thickness/pitch)*tanalpha - (thickness/pitch)*tanalphaL);
02016
02017
02018 float SLorentz = 0.5*(thickness/pitch)*tanalphaL;
02019
02020 int Sp = int(position.x()/pitch+SLorentz+0.5*Wtrack);
02021 int Sm = int(position.x()/pitch+SLorentz-0.5*Wtrack);
02022 Wexp = 1+Sp-Sm;
02023
02024 clusiz=0;
02025 totcharge=0;
02026 clusiz = cluster->amplitudes().size();
02027
02028 const std::vector<uint8_t> amplitudes=cluster->amplitudes();
02029 for(size_t ia=0; ia<amplitudes.size();ia++){
02030 totcharge+=amplitudes[ia];
02031 }
02032 rechitrphix = position.x();
02033 rechitrphiy = position.y();
02034 rechitrphiz = position.z();
02035 rechitrphierrx = error.xx();
02036 rechitrphierrxLF = error.xx();
02037 rechitrphierrxMF = Merror.uu();
02038
02039 clusizrphi = clusiz;
02040
02041 cluchgrphi = totcharge;
02042
02043
02044 mindist = 999999;
02045 matched.clear();
02046 matched = associate.associateHit(*hit2d);
02047 if(!matched.empty()){
02048
02049 for(vector<PSimHit>::const_iterator m=matched.begin(); m<matched.end(); m++){
02050 dist = abs((hit2d)->localPosition().x() - (*m).localPosition().x());
02051 if(dist<mindist){
02052 mindist = dist;
02053 closest = (*m);
02054 }
02055 rechitrphiresLF = rechitrphix - closest.localPosition().x();
02056 rechitrphiresMF = Mposition.x() - (topol.measurementPosition(closest.localPosition())).x();
02057 rechitrphipullLF = (thit->localPosition().x() - (closest).localPosition().x())/sqrt(error.xx());
02058 rechitrphipullMF = rechitrphiresMF/sqrt(rechitrphierrxMF);
02059 }
02060 }
02061 rechitrphitrackangle = anglealpha;
02062 rechitrphitrackanglebeta = anglebeta;
02063 rechitrphitrackwidth = Wtrack;
02064 rechitrphiexpectedwidth = Wexp;
02065
02066 clusterWidth = clusiz;
02067 unsigned int iopt;
02068 if (clusterWidth > Wexp + 2) {
02069 iopt = 1;
02070 } else if (Wexp == 1) {
02071 iopt = 2;
02072 } else if (clusterWidth <= Wexp) {
02073 iopt = 3;
02074 } else {
02075 iopt = 4;
02076 }
02077 rechitrphicategory = iopt;
02078
02079
02080
02081
02082
02083
02084
02085
02086
02087
02088
02089
02090
02091
02092
02093
02094
02095
02096
02097
02098
02099
02100
02101
02102
02103
02104
02105
02106
02107
02108
02109
02110
02111
02112
02113
02114
02115
02116
02117
02118
02119
02120
02121
02122
02123
02124
02125
02126
02127
02128
02129
02130
02131
02132
02133
02134
02135
02136
02137
02138
02139
02140
02141
02142
02143
02144
02145
02146
02147
02148
02149
02150
02151
02152 }
02153
02154 if (StripSubdet.stereo() == 1){
02155
02156
02157 isrechitsas = 1;
02158
02159 const GeomDetUnit * det = tracker.idToDetUnit(detid2);
02160 const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(det);
02161 const StripTopology &topol=(const StripTopology&)stripdet->topology();
02162
02163 float anglealpha = atan(trackdirection.x()/trackdirection.z())*180/TMath::Pi();
02164 float anglebeta = atan(trackdirection.y()/trackdirection.z())*180/TMath::Pi();
02165
02166 SiStripRecHit2D::ClusterRef cluster=hit2d->cluster();
02167
02168
02169 position = thit->localPosition();
02170 error = thit->localPositionError();
02171 Mposition = topol.measurementPosition(position);
02172 Merror = topol.measurementError(position,error);
02173
02174
02175 LocalVector drift = stripcpe->driftDirection(stripdet);
02176 float thickness=stripdet->surface().bounds().thickness();
02177 rechitsasthickness = thickness;
02178
02179 float pitch = topol.localPitch(position);
02180
02181 float tanalpha = tan(anglealpha/57.3);
02182
02183 float tanalphaL = drift.x()/drift.z();
02184
02185
02186
02187 Wtrack = fabs((thickness/pitch)*tanalpha - (thickness/pitch)*tanalphaL);
02188
02189 float SLorentz = 0.5*(thickness/pitch)*tanalphaL;
02190
02191 int Sp = int(position.x()/pitch+SLorentz+0.5*Wtrack);
02192 int Sm = int(position.x()/pitch+SLorentz-0.5*Wtrack);
02193 Wexp = 1+Sp-Sm;
02194
02195 clusiz=0;
02196 totcharge=0;
02197 clusiz = cluster->amplitudes().size();
02198 const std::vector<uint8_t> amplitudes=cluster->amplitudes();
02199 for(size_t ia=0; ia<amplitudes.size();ia++){
02200 totcharge+=amplitudes[ia];
02201 }
02202 rechitsasx = position.x();
02203 rechitsasy = position.y();
02204 rechitsasz = position.z();
02205 rechitsaserrxLF = error.xx();
02206
02207 rechitsaserrxMF = Merror.uu();
02208
02209 clusizsas = clusiz;
02210 cluchgsas = totcharge;
02211
02212
02213 mindist = 999999;
02214 matched.clear();
02215 matched = associate.associateHit(*hit2d);
02216 if(!matched.empty()){
02217
02218 for(vector<PSimHit>::const_iterator m=matched.begin(); m<matched.end(); m++){
02219 dist = abs((hit2d)->localPosition().x() - (*m).localPosition().x());
02220 if(dist<mindist){
02221 mindist = dist;
02222 closest = (*m);
02223 }
02224
02225 rechitsasresLF = rechitsasx - closest.localPosition().x();
02226 rechitsasresMF = Mposition.x() - (topol.measurementPosition(closest.localPosition())).x();
02227 rechitsaspullLF = (thit->localPosition().x() - (closest).localPosition().x())/sqrt(error.xx());
02228 rechitsaspullMF = rechitsasresMF/sqrt(rechitsaserrxMF);
02229
02230 }
02231 }
02232 rechitsastrackangle = anglealpha;
02233 rechitsastrackanglebeta = anglebeta;
02234 rechitsastrackwidth = Wtrack;
02235 rechitsasexpectedwidth = Wexp;
02236
02237 clusterWidth = clusiz;
02238 unsigned int iopt;
02239 if (clusterWidth > Wexp + 2) {
02240 iopt = 1;
02241 } else if (Wexp == 1) {
02242 iopt = 2;
02243 } else if (clusterWidth <= Wexp) {
02244 iopt = 3;
02245 } else {
02246 iopt = 4;
02247 }
02248 rechitsascategory = iopt;
02249 }
02250
02251
02252 }
02253
02254
02255
02256
02257 float CutThickness=0.04;
02258 CutThickness=0.;
02259
02260 if(isrechitrphi>0 || isrechitsas>0){
02261
02262
02263 if (isrechitrphi>0) {
02264
02265
02266
02267
02268
02269
02270
02271
02272
02273
02274
02275
02276
02277
02278
02279
02280
02281
02282
02283
02284
02285
02286
02287
02288
02289
02290
02291
02292
02293
02294
02295 meCategory->Fill(rechitrphicategory);
02296 meTrackwidth->Fill(rechitrphitrackwidth);
02297 meExpectedwidth->Fill(rechitrphiexpectedwidth);
02298 meClusterwidth->Fill(clusizrphi);
02299 meTrackanglealpha->Fill(rechitrphitrackangle);
02300 meTrackanglebeta->Fill(rechitrphitrackanglebeta);
02301
02302 meErrxMFAngleProfile->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF));
02303 meErrxMFTrackwidthProfile->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02304
02305 if (clusizrphi == 1) {
02306 meErrxMFTrackwidthProfileWClus1->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02307 meResMFTrackwidthProfileWClus1->Fill(rechitrphitrackwidth,rechitrphiresMF);
02308 if (rechitrphithickness > CutThickness)
02309 {
02310
02311
02312
02313
02314
02315
02316
02317
02318
02319
02320
02321 }
02322 }
02323 if (clusizrphi == 2) {
02324 meErrxMFTrackwidthProfileWClus2->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02325 meResMFTrackwidthProfileWClus2->Fill(rechitrphitrackwidth,rechitrphiresMF);
02326 meResMFTrackwidthProfileWClus21->Fill(rechitrphitrackwidth,rechitrphiresMF);
02327 meResMFTrackwidthProfileWClus22->Fill(rechitrphitrackwidth,rechitrphiresMF);
02328 meResMFTrackwidthProfileWClus23->Fill(rechitrphitrackwidth,rechitrphiresMF);
02329 if (rechitrphithickness > CutThickness)
02330 {
02331
02332
02333 if ((detid.subdetId() == int(StripSubdetector::TID)) || (detid.subdetId() == int(StripSubdetector::TEC))){
02334
02335
02336
02337
02338
02339 }
02340
02341
02342
02343
02344
02345 }
02346 }
02347 if (clusizrphi == 3) {
02348 meErrxMFTrackwidthProfileWClus3->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02349 meResMFTrackwidthProfileWClus3->Fill(rechitrphitrackwidth,rechitrphiresMF);
02350 if (rechitrphithickness > CutThickness)
02351 {
02352
02353
02354
02355
02356
02357
02358
02359
02360
02361
02362
02363 }
02364 }
02365 if (clusizrphi == 4) {
02366 meErrxMFTrackwidthProfileWClus4->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02367 meResMFTrackwidthProfileWClus4->Fill(rechitrphitrackwidth,rechitrphiresMF);
02368 if (rechitrphithickness > CutThickness)
02369 {
02370
02371
02372
02373
02374
02375
02376
02377
02378
02379 }
02380 }
02381
02382 if (rechitrphicategory == 1) {
02383 meErrxMFTrackwidthProfileCategory1->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02384 meErrxMFClusterwidthProfileCategory1->Fill(clusizrphi,sqrt(rechitrphierrxMF));
02385 }
02386 if (rechitrphicategory == 2) {
02387 meErrxMFTrackwidthProfileCategory2->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02388
02389
02390 }
02391 if (rechitrphicategory == 3) {
02392 meErrxMFTrackwidthProfileCategory3->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02393
02394
02395 }
02396 if (rechitrphicategory == 4) {
02397 meErrxMFTrackwidthProfileCategory4->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02398
02399
02400 }
02401
02402
02403
02404 meErrxMF->Fill(sqrt(rechitrphierrxMF));
02405
02406
02407 meErrxLF->Fill(sqrt(rechitrphierrxLF));
02408 meResMF->Fill(rechitrphiresMF);
02409 meResLF->Fill(rechitrphiresLF);
02410 mePullMF->Fill(rechitrphipullMF);
02411 mePullLF->Fill(rechitrphipullLF);
02412
02413 }
02414
02415 if (isrechitsas>0) {
02416
02417 if (rechitsasthickness > CutThickness)
02418 {
02419
02420
02421
02422
02423
02424
02425
02426
02427
02428
02429
02430
02431
02432 }
02433
02434
02435 meCategory->Fill(rechitsascategory);
02436 meTrackwidth->Fill(rechitsastrackwidth);
02437 meExpectedwidth->Fill(rechitsasexpectedwidth);
02438 meClusterwidth->Fill(clusizsas);
02439 meTrackanglealpha->Fill(rechitsastrackangle);
02440 meTrackanglebeta->Fill(rechitsastrackanglebeta);
02441
02442 meErrxMFAngleProfile->Fill(rechitsastrackangle,sqrt(rechitsaserrxMF));
02443 meErrxMFTrackwidthProfile->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02444
02445 if (clusizsas == 1) {
02446 meErrxMFTrackwidthProfileWClus1->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02447 meResMFTrackwidthProfileWClus1->Fill(rechitsastrackwidth,rechitsasresMF);
02448 if (rechitsasthickness > CutThickness)
02449 {
02450
02451
02452
02453
02454
02455
02456
02457
02458
02459
02460
02461 }
02462 }
02463
02464 if (clusizsas == 2) {
02465 meErrxMFTrackwidthProfileWClus2->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02466 meResMFTrackwidthProfileWClus2->Fill(rechitsastrackwidth,rechitsasresMF);
02467 if (rechitsasthickness > CutThickness)
02468 {
02469
02470
02471
02472
02473
02474
02475
02476
02477
02478
02479
02480 }
02481 }
02482 if (clusizsas == 3) {
02483 meErrxMFTrackwidthProfileWClus3->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02484 meResMFTrackwidthProfileWClus3->Fill(rechitsastrackwidth,rechitsasresMF);
02485 if (rechitsasthickness > CutThickness)
02486 {
02487
02488
02489
02490
02491
02492
02493
02494
02495
02496
02497
02498 }
02499 }
02500 if (clusizsas == 4) {
02501 meErrxMFTrackwidthProfileWClus4->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02502 meResMFTrackwidthProfileWClus4->Fill(rechitsastrackwidth,rechitsasresMF);
02503 if (rechitsasthickness > CutThickness)
02504 {
02505
02506
02507
02508
02509
02510
02511
02512
02513
02514
02515
02516 }
02517 }
02518 if (rechitsascategory == 1) {
02519 meErrxMFTrackwidthProfileCategory1->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02520 meErrxMFClusterwidthProfileCategory1->Fill(clusizsas,sqrt(rechitsaserrxMF));
02521 }
02522 if (rechitsascategory == 2) {
02523 meErrxMFTrackwidthProfileCategory2->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02524
02525
02526 }
02527 if (rechitsascategory == 3) {
02528 meErrxMFTrackwidthProfileCategory3->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02529
02530
02531 }
02532 if (rechitsascategory == 4) {
02533 meErrxMFTrackwidthProfileCategory4->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02534
02535
02536 }
02537
02538 meErrxMF->Fill(sqrt(rechitsaserrxMF));
02539 meErrxLF->Fill(sqrt(rechitsaserrxLF));
02540 meResMF->Fill(rechitsasresMF);
02541 meResLF->Fill(rechitsasresLF);
02542 mePullMF->Fill(rechitsaspullMF);
02543 mePullLF->Fill(rechitsaspullLF);
02544
02545 }
02546
02547
02548 if (detid.subdetId() == int(StripSubdetector::TIB)){
02549 TIBDetId tibid(myid);
02550 int Tibisrechitrphi = isrechitrphi;
02551 int Tibisrechitsas = isrechitsas;
02552
02553 int ilay = tibid.layer() - 1;
02554
02555 if(Tibisrechitrphi!=0){
02556 if (rechitrphithickness > CutThickness)
02557 {
02558
02559
02560
02561
02562
02563 }
02564
02565
02566
02567 meNstpRphiTIB[ilay]->Fill(clusizrphi);
02568 meAdcRphiTIB[ilay]->Fill(cluchgrphi);
02569 mePosxRphiTIB[ilay]->Fill(rechitrphix);
02570 meErrxLFRphiTIB[ilay]->Fill(sqrt(rechitrphierrxLF));
02571 meErrxMFRphiTIB[ilay]->Fill(sqrt(rechitrphierrxMF));
02572 meResLFRphiTIB[ilay]->Fill(rechitrphiresLF);
02573 meResMFRphiTIB[ilay]->Fill(rechitrphiresMF);
02574 mePullLFRphiTIB[ilay]->Fill(rechitrphipullLF);
02575 mePullMFRphiTIB[ilay]->Fill(rechitrphipullMF);
02576 meTrackangleRphiTIB[ilay]->Fill(rechitrphitrackangle);
02577 mePullTrackangleProfileRphiTIB[ilay]->Fill(rechitrphitrackangle,rechitrphipullMF);
02578 mePullTrackwidthProfileRphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02579 if (clusizrphi == 1) {
02580 meErrxMFTrackwidthProfileWclus1RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02581 meResMFTrackwidthProfileWclus1RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02582 }
02583 if (clusizrphi == 2) {
02584 meErrxMFTrackwidthProfileWclus2RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02585 meResMFTrackwidthProfileWclus2RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02586 }
02587 if (clusizrphi == 3) {
02588 meErrxMFTrackwidthProfileWclus3RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02589 meResMFTrackwidthProfileWclus3RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02590 }
02591 if (clusizrphi == 4) {
02592 meErrxMFTrackwidthProfileWclus4RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02593 meResMFTrackwidthProfileWclus4RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02594 }
02595
02596
02597 if (rechitrphicategory == 1) {
02598 mePullTrackwidthProfileCategory1RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02599 meErrxMFTrackwidthProfileCategory1RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02600 meErrxMFClusterwidthProfileCategory1RphiTIB[ilay]->Fill(clusizrphi,sqrt(rechitrphierrxMF));
02601 }
02602 if (rechitrphicategory == 2) {
02603 mePullTrackwidthProfileCategory2RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02604 meErrxMFTrackwidthProfileCategory2RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02605 }
02606 if (rechitrphicategory == 3) {
02607 mePullTrackwidthProfileCategory3RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02608 meErrxMFTrackwidthProfileCategory3RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02609 }
02610 if (rechitrphicategory == 4) {
02611 mePullTrackwidthProfileCategory4RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02612 meErrxMFTrackwidthProfileCategory4RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02613 }
02614 meTrackwidthRphiTIB[ilay]->Fill(rechitrphitrackwidth);
02615 meExpectedwidthRphiTIB[ilay]->Fill(rechitrphiexpectedwidth);
02616 meClusterwidthRphiTIB[ilay]->Fill(clusizrphi);
02617 meCategoryRphiTIB[ilay]->Fill(rechitrphicategory);
02618 meErrxMFTrackwidthProfileRphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02619 meErrxMFAngleProfileRphiTIB[ilay]->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF));
02620 }
02621 if(Tibisrechitsas!=0){
02622 if (rechitsasthickness > CutThickness)
02623 {
02624
02625
02626
02627
02628
02629 }
02630 meNstpSasTIB[ilay]->Fill(clusizsas);
02631 meAdcSasTIB[ilay]->Fill(cluchgsas);
02632 mePosxSasTIB[ilay]->Fill(rechitsasx);
02633 meErrxLFSasTIB[ilay]->Fill(sqrt(rechitsaserrxLF));
02634 meResLFSasTIB[ilay]->Fill(rechitsasresLF);
02635 mePullLFSasTIB[ilay]->Fill(rechitsaspullLF);
02636 meErrxMFSasTIB[ilay]->Fill(sqrt(rechitsaserrxMF));
02637 meResMFSasTIB[ilay]->Fill(rechitsasresMF);
02638 mePullMFSasTIB[ilay]->Fill(rechitsaspullMF);
02639 meTrackangleSasTIB[ilay]->Fill(rechitsastrackangle);
02640 mePullTrackangleProfileSasTIB[ilay]->Fill(rechitsastrackangle,rechitsaspullMF);
02641 mePullTrackwidthProfileSasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02642 if (rechitsascategory == 1) {
02643 mePullTrackwidthProfileCategory1SasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02644 meErrxMFTrackwidthProfileCategory1SasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02645 meErrxMFClusterwidthProfileCategory1SasTIB[ilay]->Fill(clusizsas,sqrt(rechitsaserrxMF));
02646 }
02647 if (rechitsascategory == 2) {
02648 mePullTrackwidthProfileCategory2SasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02649 meErrxMFTrackwidthProfileCategory2SasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02650 }
02651 if (rechitsascategory == 3) {
02652 mePullTrackwidthProfileCategory3SasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02653 meErrxMFTrackwidthProfileCategory3SasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02654 }
02655 if (rechitsascategory == 4) {
02656 mePullTrackwidthProfileCategory4SasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02657 meErrxMFTrackwidthProfileCategory4SasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02658 }
02659 meTrackwidthSasTIB[ilay]->Fill(rechitsastrackwidth);
02660 meExpectedwidthSasTIB[ilay]->Fill(rechitsasexpectedwidth);
02661 meClusterwidthSasTIB[ilay]->Fill(clusizsas);
02662 meCategorySasTIB[ilay]->Fill(rechitsascategory);
02663 meErrxMFTrackwidthProfileSasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02664 meErrxMFAngleProfileSasTIB[ilay]->Fill(rechitsastrackangle,rechitsaserrxMF);
02665 }
02666 }
02667
02668 if (detid.subdetId() == int(StripSubdetector::TOB)){
02669 TOBDetId tobid(myid);
02670 int Tobisrechitrphi = isrechitrphi;
02671 int Tobisrechitsas = isrechitsas;
02672 int ilay = tobid.layer() - 1;
02673 if(Tobisrechitrphi!=0){
02674 if (rechitrphithickness > CutThickness)
02675 {
02676
02677
02678
02679
02680
02681 }
02682
02683 meNstpRphiTOB[ilay]->Fill(clusizrphi);
02684 meAdcRphiTOB[ilay]->Fill(cluchgrphi);
02685 mePosxRphiTOB[ilay]->Fill(rechitrphix);
02686 meErrxLFRphiTOB[ilay]->Fill(sqrt(rechitrphierrxLF));
02687 meResLFRphiTOB[ilay]->Fill(rechitrphiresLF);
02688 mePullLFRphiTOB[ilay]->Fill(rechitrphipullLF);
02689 meErrxMFRphiTOB[ilay]->Fill(sqrt(rechitrphierrxMF));
02690 meResMFRphiTOB[ilay]->Fill(rechitrphiresMF);
02691 mePullMFRphiTOB[ilay]->Fill(rechitrphipullMF);
02692 meTrackangleRphiTOB[ilay]->Fill(rechitrphitrackangle);
02693 mePullTrackangleProfileRphiTOB[ilay]->Fill(rechitrphitrackangle,rechitrphipullMF);
02694 mePullTrackwidthProfileRphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02695
02696 if (clusizrphi == 1) {
02697 meErrxMFTrackwidthProfileWclus1RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02698 meResMFTrackwidthProfileWclus1RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02699 }
02700 if (clusizrphi == 2) {
02701 meErrxMFTrackwidthProfileWclus2RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02702 meResMFTrackwidthProfileWclus2RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02703 }
02704 if (clusizrphi == 3) {
02705 meErrxMFTrackwidthProfileWclus3RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02706 meResMFTrackwidthProfileWclus3RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02707 }
02708 if (clusizrphi == 4) {
02709 meErrxMFTrackwidthProfileWclus4RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02710 meResMFTrackwidthProfileWclus4RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02711 }
02712
02713
02714 if (rechitrphicategory == 1) {
02715 mePullTrackwidthProfileCategory1RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02716 meErrxMFTrackwidthProfileCategory1RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02717 meErrxMFClusterwidthProfileCategory1RphiTOB[ilay]->Fill(clusizrphi,sqrt(rechitrphierrxMF));
02718 }
02719 if (rechitrphicategory == 2) {
02720 mePullTrackwidthProfileCategory2RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02721 meErrxMFTrackwidthProfileCategory2RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02722 }
02723 if (rechitrphicategory == 3) {
02724 mePullTrackwidthProfileCategory3RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02725 meErrxMFTrackwidthProfileCategory3RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02726 }
02727 if (rechitrphicategory == 4) {
02728 mePullTrackwidthProfileCategory4RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02729 meErrxMFTrackwidthProfileCategory4RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02730 }
02731 meTrackwidthRphiTOB[ilay]->Fill(rechitrphitrackwidth);
02732 meExpectedwidthRphiTOB[ilay]->Fill(rechitrphiexpectedwidth);
02733 meClusterwidthRphiTOB[ilay]->Fill(clusizrphi);
02734 meCategoryRphiTOB[ilay]->Fill(rechitrphicategory);
02735 meErrxMFTrackwidthProfileRphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02736 meErrxMFAngleProfileRphiTOB[ilay]->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF));
02737 }
02738 if(Tobisrechitsas!=0){
02739 if (rechitsasthickness > CutThickness)
02740 {
02741
02742
02743
02744
02745
02746
02747 }
02748 meNstpSasTOB[ilay]->Fill(clusizsas);
02749 meAdcSasTOB[ilay]->Fill(cluchgsas);
02750 mePosxSasTOB[ilay]->Fill(rechitsasx);
02751 meErrxLFSasTOB[ilay]->Fill(sqrt(rechitsaserrxLF));
02752 meResLFSasTOB[ilay]->Fill(rechitsasresLF);
02753 mePullLFSasTOB[ilay]->Fill(rechitsaspullLF);
02754 meErrxMFSasTOB[ilay]->Fill(sqrt(rechitsaserrxMF));
02755 meResMFSasTOB[ilay]->Fill(rechitsasresMF);
02756 mePullMFSasTOB[ilay]->Fill(rechitsaspullMF);
02757 meTrackangleSasTOB[ilay]->Fill(rechitsastrackangle);
02758 mePullTrackangleProfileSasTOB[ilay]->Fill(rechitsastrackangle,rechitsaspullMF);
02759 mePullTrackwidthProfileSasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02760 if (rechitsascategory == 1) {
02761 mePullTrackwidthProfileCategory1SasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02762 meErrxMFTrackwidthProfileCategory1SasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02763 meErrxMFClusterwidthProfileCategory1SasTOB[ilay]->Fill(clusizsas,sqrt(rechitsaserrxMF));
02764 }
02765 if (rechitsascategory == 2) {
02766 mePullTrackwidthProfileCategory2SasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02767 meErrxMFTrackwidthProfileCategory2SasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02768 }
02769 if (rechitsascategory == 3) {
02770 mePullTrackwidthProfileCategory3SasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02771 meErrxMFTrackwidthProfileCategory3SasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02772 }
02773 if (rechitsascategory == 4) {
02774 mePullTrackwidthProfileCategory4SasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02775 meErrxMFTrackwidthProfileCategory4SasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02776 }
02777 meTrackwidthSasTOB[ilay]->Fill(rechitsastrackwidth);
02778 meExpectedwidthSasTOB[ilay]->Fill(rechitsasexpectedwidth);
02779 meClusterwidthSasTOB[ilay]->Fill(clusizsas);
02780 meCategorySasTOB[ilay]->Fill(rechitsascategory);
02781 meErrxMFTrackwidthProfileSasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02782 meErrxMFAngleProfileSasTOB[ilay]->Fill(rechitsastrackangle,rechitsaserrxMF);
02783 }
02784 }
02785
02786 if (detid.subdetId() == int(StripSubdetector::TID)){
02787 TIDDetId tidid(myid);
02788 int Tidisrechitrphi = isrechitrphi;
02789 int Tidisrechitsas = isrechitsas;
02790 int ilay = tidid.ring() - 1;
02791 if(Tidisrechitrphi!=0){
02792 if (rechitrphithickness > CutThickness)
02793 {
02794
02795
02796
02797
02798
02799 }
02800
02801 meNstpRphiTID[ilay]->Fill(clusizrphi);
02802 meAdcRphiTID[ilay]->Fill(cluchgrphi);
02803 mePosxRphiTID[ilay]->Fill(rechitrphix);
02804 meErrxLFRphiTID[ilay]->Fill(sqrt(rechitrphierrxLF));
02805 meResLFRphiTID[ilay]->Fill(rechitrphiresLF);
02806 mePullLFRphiTID[ilay]->Fill(rechitrphipullLF);
02807 meErrxMFRphiTID[ilay]->Fill(sqrt(rechitrphierrxMF));
02808 meResMFRphiTID[ilay]->Fill(rechitrphiresMF);
02809 mePullMFRphiTID[ilay]->Fill(rechitrphipullMF);
02810 meTrackangleRphiTID[ilay]->Fill(rechitrphitrackangle);
02811 mePullTrackangleProfileRphiTID[ilay]->Fill(rechitrphitrackangle,rechitrphipullMF);
02812 mePullTrackwidthProfileRphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02813 if (rechitrphicategory == 1) {
02814 mePullTrackwidthProfileCategory1RphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02815 meErrxMFTrackwidthProfileCategory1RphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02816 meErrxMFClusterwidthProfileCategory1RphiTID[ilay]->Fill(clusizrphi,sqrt(rechitrphierrxMF));
02817 }
02818 if (rechitrphicategory == 2) {
02819 mePullTrackwidthProfileCategory2RphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02820 meErrxMFTrackwidthProfileCategory2RphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02821 }
02822 if (rechitrphicategory == 3) {
02823 mePullTrackwidthProfileCategory3RphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02824 meErrxMFTrackwidthProfileCategory3RphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02825 }
02826 if (rechitrphicategory == 4) {
02827 mePullTrackwidthProfileCategory4RphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02828 meErrxMFTrackwidthProfileCategory4RphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02829 }
02830 meTrackwidthRphiTID[ilay]->Fill(rechitrphitrackwidth);
02831 meExpectedwidthRphiTID[ilay]->Fill(rechitrphiexpectedwidth);
02832 meClusterwidthRphiTID[ilay]->Fill(clusizrphi);
02833 meCategoryRphiTID[ilay]->Fill(rechitrphicategory);
02834 meErrxMFTrackwidthProfileRphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02835 meErrxMFAngleProfileRphiTID[ilay]->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF));
02836 }
02837 if(Tidisrechitsas!=0){
02838 if (rechitsasthickness > CutThickness)
02839 {
02840
02841
02842
02843
02844
02845 }
02846 meNstpSasTID[ilay]->Fill(clusizsas);
02847 meAdcSasTID[ilay]->Fill(cluchgsas);
02848 mePosxSasTID[ilay]->Fill(rechitsasx);
02849 meErrxLFSasTID[ilay]->Fill(sqrt(rechitsaserrxLF));
02850 meResLFSasTID[ilay]->Fill(rechitsasresLF);
02851 mePullLFSasTID[ilay]->Fill(rechitsaspullLF);
02852 meErrxMFSasTID[ilay]->Fill(sqrt(rechitsaserrxMF));
02853 meResMFSasTID[ilay]->Fill(rechitsasresMF);
02854 mePullMFSasTID[ilay]->Fill(rechitsaspullMF);
02855 meTrackangleSasTID[ilay]->Fill(rechitsastrackangle);
02856 mePullTrackangleProfileSasTID[ilay]->Fill(rechitsastrackangle,rechitsaspullMF);
02857 mePullTrackwidthProfileSasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02858 if (rechitsascategory == 1) {
02859 mePullTrackwidthProfileCategory1SasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02860 meErrxMFTrackwidthProfileCategory1SasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02861 meErrxMFClusterwidthProfileCategory1SasTID[ilay]->Fill(clusizsas,sqrt(rechitsaserrxMF));
02862 }
02863 if (rechitsascategory == 2) {
02864 mePullTrackwidthProfileCategory2SasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02865 meErrxMFTrackwidthProfileCategory2SasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02866 }
02867 if (rechitsascategory == 3) {
02868 mePullTrackwidthProfileCategory3SasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02869 meErrxMFTrackwidthProfileCategory3SasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02870 }
02871 if (rechitsascategory == 4) {
02872 mePullTrackwidthProfileCategory4SasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02873 meErrxMFTrackwidthProfileCategory4SasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02874 }
02875 meTrackwidthSasTID[ilay]->Fill(rechitsastrackwidth);
02876 meExpectedwidthSasTID[ilay]->Fill(rechitsasexpectedwidth);
02877 meClusterwidthSasTID[ilay]->Fill(clusizsas);
02878 meCategorySasTID[ilay]->Fill(rechitsascategory);
02879 meErrxMFTrackwidthProfileSasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02880 meErrxMFAngleProfileSasTID[ilay]->Fill(rechitsastrackangle,rechitsaserrxMF);
02881 }
02882 }
02883
02884 if (detid.subdetId() == int(StripSubdetector::TEC)){
02885 TECDetId tecid(myid);
02886 int Tecisrechitrphi = isrechitrphi;
02887 int Tecisrechitsas = isrechitsas;
02888 int ilay = tecid.ring() - 1;
02889 if(Tecisrechitrphi!=0){
02890 if (rechitrphithickness > CutThickness)
02891 {
02892
02893
02894
02895
02896
02897 }
02898
02899 meNstpRphiTEC[ilay]->Fill(clusizrphi);
02900 meAdcRphiTEC[ilay]->Fill(cluchgrphi);
02901 mePosxRphiTEC[ilay]->Fill(rechitrphix);
02902 meErrxLFRphiTEC[ilay]->Fill(sqrt(rechitrphierrxLF));
02903 meResLFRphiTEC[ilay]->Fill(rechitrphiresLF);
02904 mePullLFRphiTEC[ilay]->Fill(rechitrphipullLF);
02905 meErrxMFRphiTEC[ilay]->Fill(sqrt(rechitrphierrxMF));
02906 meResMFRphiTEC[ilay]->Fill(rechitrphiresMF);
02907 mePullMFRphiTEC[ilay]->Fill(rechitrphipullMF);
02908 meTrackangleRphiTEC[ilay]->Fill(rechitrphitrackangle);
02909 mePullTrackangleProfileRphiTEC[ilay]->Fill(rechitrphitrackangle,rechitrphipullMF);
02910 mePullTrackwidthProfileRphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02911 if (rechitrphicategory == 1) {
02912 mePullTrackwidthProfileCategory1RphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02913 meErrxMFTrackwidthProfileCategory1RphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02914 meErrxMFClusterwidthProfileCategory1RphiTEC[ilay]->Fill(clusizrphi,sqrt(rechitrphierrxMF));
02915 }
02916 if (rechitrphicategory == 2) {
02917 mePullTrackwidthProfileCategory2RphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02918 meErrxMFTrackwidthProfileCategory2RphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02919 }
02920 if (rechitrphicategory == 3) {
02921 mePullTrackwidthProfileCategory3RphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02922 meErrxMFTrackwidthProfileCategory3RphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02923 }
02924 if (rechitrphicategory == 4) {
02925 mePullTrackwidthProfileCategory4RphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02926 meErrxMFTrackwidthProfileCategory4RphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02927 }
02928 meTrackwidthRphiTEC[ilay]->Fill(rechitrphitrackwidth);
02929 meExpectedwidthRphiTEC[ilay]->Fill(rechitrphiexpectedwidth);
02930 meClusterwidthRphiTEC[ilay]->Fill(clusizrphi);
02931 meCategoryRphiTEC[ilay]->Fill(rechitrphicategory);
02932 meErrxMFTrackwidthProfileRphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02933 meErrxMFAngleProfileRphiTEC[ilay]->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF));
02934 }
02935 if(Tecisrechitsas!=0){
02936 if (rechitsasthickness > CutThickness)
02937 {
02938
02939
02940
02941
02942
02943 }
02944 meNstpSasTEC[ilay]->Fill(clusizsas);
02945 meAdcSasTEC[ilay]->Fill(cluchgsas);
02946 mePosxSasTEC[ilay]->Fill(rechitsasx);
02947 meErrxLFSasTEC[ilay]->Fill(sqrt(rechitsaserrxLF));
02948 meResLFSasTEC[ilay]->Fill(rechitsasresLF);
02949 mePullLFSasTEC[ilay]->Fill(rechitsaspullLF);
02950 meErrxMFSasTEC[ilay]->Fill(sqrt(rechitsaserrxMF));
02951 meResMFSasTEC[ilay]->Fill(rechitsasresMF);
02952 mePullMFSasTEC[ilay]->Fill(rechitsaspullMF);
02953 meTrackangleSasTEC[ilay]->Fill(rechitsastrackangle);
02954 mePullTrackangleProfileSasTEC[ilay]->Fill(rechitsastrackangle,rechitsaspullMF);
02955 mePullTrackwidthProfileSasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02956 if (rechitsascategory == 1) {
02957 mePullTrackwidthProfileCategory1SasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02958 meErrxMFTrackwidthProfileCategory1SasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02959 meErrxMFClusterwidthProfileCategory1SasTEC[ilay]->Fill(clusizsas,sqrt(rechitsaserrxMF));
02960 }
02961 if (rechitsascategory == 2) {
02962 mePullTrackwidthProfileCategory2SasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02963 meErrxMFTrackwidthProfileCategory2SasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02964 }
02965 if (rechitsascategory == 3) {
02966 mePullTrackwidthProfileCategory3SasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02967 meErrxMFTrackwidthProfileCategory3SasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02968 }
02969 if (rechitsascategory == 4) {
02970 mePullTrackwidthProfileCategory4SasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02971 meErrxMFTrackwidthProfileCategory4SasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02972 }
02973 meTrackwidthSasTEC[ilay]->Fill(rechitsastrackwidth);
02974 meExpectedwidthSasTEC[ilay]->Fill(rechitsasexpectedwidth);
02975 meClusterwidthSasTEC[ilay]->Fill(clusizsas);
02976 meCategorySasTEC[ilay]->Fill(rechitsascategory);
02977 meErrxMFTrackwidthProfileSasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02978 meErrxMFAngleProfileSasTEC[ilay]->Fill(rechitsastrackangle,rechitsaserrxMF);
02979 }
02980
02981 }
02982
02983 }
02984
02985
02986 }
02987
02988
02989 }
02990
02991
02992 }
02993
02994
02995
02996
02997 std::pair<LocalPoint,LocalVector> SiStripTrackingRecHitsValid::projectHit( const PSimHit& hit, const StripGeomDetUnit* stripDet, const BoundPlane& plane)
02998 {
02999
03000
03001
03002 const StripTopology& topol = stripDet->specificTopology();
03003 GlobalPoint globalpos= stripDet->surface().toGlobal(hit.localPosition());
03004 LocalPoint localHit = plane.toLocal(globalpos);
03005
03006 LocalVector locdir=hit.localDirection();
03007
03008
03009 GlobalVector globaldir= stripDet->surface().toGlobal(locdir);
03010 LocalVector dir=plane.toLocal(globaldir);
03011 float scale = -localHit.z() / dir.z();
03012
03013 LocalPoint projectedPos = localHit + scale*dir;
03014
03015
03016
03017 float selfAngle = topol.stripAngle( topol.strip( hit.localPosition()));
03018
03019 LocalVector stripDir( sin(selfAngle), cos(selfAngle), 0);
03020
03021 LocalVector localStripDir( plane.toLocal(stripDet->surface().toGlobal( stripDir)));
03022
03023 return std::pair<LocalPoint,LocalVector>( projectedPos, localStripDir);
03024 }