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