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