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 Diff = new TH1F("Diff","Diff",20,0.,1.);
00060 PositionSHx = new TH1F("PositionSHx","PositionSHx",3200,0.,800.);
00061 SecondStrip = new TH1F("SecondStrip","SecondStrip",2,0.,2.);
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("RecoTrackV/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("RecoTrackV/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("RecoTrackV/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("RecoTrackV/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("RecoTrackV/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 float diff=0;
01273 float positionshx = 0;
01274 int secondstrip = 0;
01275
01276 int isrechitrphi = 0;
01277 int isrechitsas = 0;
01278 int isrechitmatched = 0;
01279
01280 float anglealpha;
01281 float anglebeta;
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* hit=dynamic_cast<const SiStripRecHit2D*>((*thit2).hit());
01364
01365
01366
01367 const TrackingRecHit *thit = (*thit2).hit();
01368
01369 detid = (thit)->geographicalId();
01370 myid=((thit)->geographicalId()).rawId();
01371
01372 StripSubdetector StripSubdet = (StripSubdetector) detid;
01373
01374 isrechitmatched = 0;
01375
01376 if(matchedhit){
01377
01378 isrechitmatched = 1;
01379
01380 position = (thit)->localPosition();
01381
01382 error = (thit)->localPositionError();
01383
01384 rechitmatchedx = position.x();
01385 rechitmatchedy = position.y();
01386 rechitmatchedz = position.z();
01387 rechitmatchederrxx = error.xx();
01388 rechitmatchederrxy = error.xy();
01389 rechitmatchederryy = error.yy();
01390
01391
01392 mindist = 999999;
01393 float distx, disty;
01394 std::pair<LocalPoint,LocalVector> closestPair;
01395 matched.clear();
01396 matched = associate.associateHit(*matchedhit);
01397 if(!matched.empty()){
01398
01399 const GluedGeomDet* gluedDet = (const GluedGeomDet*)tracker.idToDet(matchedhit->geographicalId());
01400 const StripGeomDetUnit* partnerstripdet =(StripGeomDetUnit*) gluedDet->stereoDet();
01401 std::pair<LocalPoint,LocalVector> hitPair;
01402 for(vector<PSimHit>::const_iterator m=matched.begin(); m<matched.end(); m++){
01403
01404 hitPair= projectHit((*m),partnerstripdet,gluedDet->surface());
01405 distx = fabs(rechitmatchedx - hitPair.first.x());
01406 disty = fabs(rechitmatchedy - hitPair.first.y());
01407 dist = distx*distx+disty*disty;
01408 if(sqrt(dist)<mindist){
01409 mindist = dist;
01410 closestPair = hitPair;
01411 }
01412 }
01413 rechitmatchedresx = rechitmatchedx - closestPair.first.x();
01414 rechitmatchedresy = rechitmatchedy - closestPair.first.y();
01415 rechitmatchedpullx = ((thit)->localPosition().x() - (closestPair.first.x()))/sqrt(error.xx());
01416 rechitmatchedpully = ((thit)->localPosition().y() - (closestPair.first.y()))/sqrt(error.yy());
01417 }
01418 }
01419
01420
01421
01422 if(isrechitmatched){
01423
01424 if (detid.subdetId() == int(StripSubdetector::TIB)){
01425 TIBDetId tibid(myid);
01426 int Tibisrechitmatched = isrechitmatched;
01427 int ilay = tibid.layer() - 1;
01428 if(Tibisrechitmatched>0){
01429 mePosxMatchedTIB[ilay]->Fill(rechitmatchedx);
01430 meErrxMatchedTIB[ilay]->Fill(sqrt(rechitmatchederrxx));
01431 meErryMatchedTIB[ilay]->Fill(sqrt(rechitmatchederryy));
01432 meResxMatchedTIB[ilay]->Fill(rechitmatchedresx);
01433 meResyMatchedTIB[ilay]->Fill(rechitmatchedresy);
01434 mePullxMatchedTIB[ilay]->Fill(rechitmatchedpullx);
01435 mePullyMatchedTIB[ilay]->Fill(rechitmatchedpully);
01436
01437 }
01438 }
01439
01440 if (detid.subdetId() == int(StripSubdetector::TOB)){
01441 TOBDetId tobid(myid);
01442 int Tobisrechitmatched = isrechitmatched;
01443 int ilay = tobid.layer() - 1;
01444 if(Tobisrechitmatched>0){
01445 mePosxMatchedTOB[ilay]->Fill(rechitmatchedx);
01446 mePosyMatchedTOB[ilay]->Fill(rechitmatchedy);
01447 meErrxMatchedTOB[ilay]->Fill(sqrt(rechitmatchederrxx));
01448 meErryMatchedTOB[ilay]->Fill(sqrt(rechitmatchederryy));
01449 meResxMatchedTOB[ilay]->Fill(rechitmatchedresx);
01450 meResyMatchedTOB[ilay]->Fill(rechitmatchedresy);
01451 mePullxMatchedTOB[ilay]->Fill(rechitmatchedpullx);
01452 mePullyMatchedTOB[ilay]->Fill(rechitmatchedpully);
01453 }
01454 }
01455 if (detid.subdetId() == int(StripSubdetector::TID)){
01456 TIDDetId tidid(myid);
01457 int Tidisrechitmatched = isrechitmatched;
01458 int ilay = tidid.ring() - 1;
01459 if(Tidisrechitmatched>0){
01460 mePosxMatchedTID[ilay]->Fill(rechitmatchedx);
01461 mePosyMatchedTID[ilay]->Fill(rechitmatchedy);
01462 meErrxMatchedTID[ilay]->Fill(sqrt(rechitmatchederrxx));
01463 meErryMatchedTID[ilay]->Fill(sqrt(rechitmatchederryy));
01464 meResxMatchedTID[ilay]->Fill(rechitmatchedresx);
01465 meResyMatchedTID[ilay]->Fill(rechitmatchedresy);
01466 mePullxMatchedTID[ilay]->Fill(rechitmatchedpullx);
01467 mePullyMatchedTID[ilay]->Fill(rechitmatchedpully);
01468 }
01469 }
01470 if (detid.subdetId() == int(StripSubdetector::TEC)){
01471 TECDetId tecid(myid);
01472 int Tecisrechitmatched = isrechitmatched;
01473 int ilay = tecid.ring() - 1;
01474 if(Tecisrechitmatched>0){
01475 mePosxMatchedTEC[ilay]->Fill(rechitmatchedx);
01476 mePosyMatchedTEC[ilay]->Fill(rechitmatchedy);
01477 meErrxMatchedTEC[ilay]->Fill(sqrt(rechitmatchederrxx));
01478 meErryMatchedTEC[ilay]->Fill(sqrt(rechitmatchederryy));
01479 meResxMatchedTEC[ilay]->Fill(rechitmatchedresx);
01480 meResyMatchedTEC[ilay]->Fill(rechitmatchedresy);
01481 mePullxMatchedTEC[ilay]->Fill(rechitmatchedpullx);
01482 mePullyMatchedTEC[ilay]->Fill(rechitmatchedpully);
01483 }
01484 }
01485
01486 }
01487
01488
01490
01492
01493
01494 isrechitrphi = 0;
01495 isrechitsas = 0;
01496 rechitrphix =0;
01497 rechitrphierrxLF =0;
01498 rechitrphierrxMF =0;
01499 rechitrphiy =0;
01500 rechitrphiz =0;
01501 rechitsasx =0;
01502 rechitsaserrxLF =0;
01503 rechitsaserrxMF =0;
01504 rechitsasy =0;
01505 rechitsasz =0;
01506 clusizrphi =0;
01507 clusizsas =0;
01508 cluchgrphi =0;
01509 cluchgsas =0;
01510 rechitrphiresLF=-999.;
01511 rechitrphiresMF=-999.;
01512 rechitrphipullLF=-999.;
01513 rechitrphipullMF=-999.;
01514 rechitrphitrackangle =0;
01515 rechitrphitrackanglebeta =0;
01516 rechitrphitrackangle2 =0;
01517 rechitrphitrackwidth =0;
01518 rechitrphiexpectedwidth =0;
01519 rechitrphicategory =0;
01520 rechitrphithickness = 0.;
01521 rechitsasresLF=-999.;
01522 rechitsasresMF=-999.;
01523 rechitsaspullLF=-999.;
01524 rechitsaspullMF=-999.;
01525 rechitsastrackangle =0;
01526 rechitsastrackanglebeta =0;
01527 rechitsasthickness = 0;
01528
01529 GluedGeomDet * gdet;
01530 const GeomDetUnit * monodet;
01531 const SiStripRecHit2D *monohit;
01532 const StripGeomDetUnit * stripdet;
01533
01534 if (matchedhit)
01535 {
01536 monohit=matchedhit->monoHit();
01537
01538 gdet=(GluedGeomDet *)tracker2->idToDet(matchedhit->geographicalId());
01539 monodet=gdet->monoDet();
01540 GlobalVector gtrkdir=gdet->toGlobal(trackdirection);
01541 LocalVector monotkdir=monodet->toLocal(gtrkdir);
01542
01543
01544 stripdet=(const StripGeomDetUnit*)(monodet);
01545
01546
01547 if(monotkdir.z()!=0){
01548 anglealpha = atan(monotkdir.x()/monotkdir.z())*180/TMath::Pi();
01549 anglebeta = atan(monotkdir.y()/monotkdir.z())*180/TMath::Pi();
01550 }
01551
01552 if(monohit){
01553
01554 const StripTopology &topol=(StripTopology&)stripdet->topology();
01555
01556 position = monohit->localPosition();
01557 error = monohit->localPositionError();
01558 Mposition = topol.measurementPosition(position);
01559 Merror = topol.measurementError(position,error);
01560
01561 LocalVector drift = stripcpe->driftDirection(stripdet);
01562 float thickness=stripdet->surface().bounds().thickness();
01563 rechitrphithickness = thickness;
01564
01565
01566 float pitch = topol.localPitch(position);
01567
01568 float tanalpha = tan(anglealpha/57.3);
01569
01570 float tanalphaL = drift.x()/drift.z();
01571
01572
01573
01574
01575
01576
01577
01578
01579 Wtrack = fabs((thickness/pitch)*tanalpha - (thickness/pitch)*tanalphaL);
01580
01581 float SLorentz = 0.5*(thickness/pitch)*tanalphaL;
01582
01583
01584 int Sp = int(position.x()/pitch+SLorentz+0.5*Wtrack);
01585 int Sm = int(position.x()/pitch+SLorentz-0.5*Wtrack);
01586 Wexp = 1+Sp-Sm;
01587
01588
01589 isrechitrphi = 1;
01590
01591
01592 SiStripRecHit2D::ClusterRef cluster=monohit->cluster();
01593 clusiz=0;
01594 totcharge=0;
01595 clusiz = cluster->amplitudes().size();
01596
01597 const std::vector<uint8_t> amplitudes=cluster->amplitudes();
01598 for(size_t ia=0; ia<amplitudes.size();ia++){
01599 totcharge+=amplitudes[ia];
01600 }
01601 rechitrphix = position.x();
01602 rechitrphiy = position.y();
01603 rechitrphiz = position.z();
01604 rechitrphierrxLF = error.xx();
01605 rechitrphierrxMF = Merror.uu();
01606
01607 clusizrphi = clusiz;
01608 cluchgrphi = totcharge;
01609
01610
01611 mindist = 999999;
01612 matched.clear();
01613
01614 matched = associate.associateHit(*monohit);
01615 if(!matched.empty()){
01616
01617
01618 for(vector<PSimHit>::const_iterator m=matched.begin(); m<matched.end(); m++){
01619 dist = abs((monohit)->localPosition().x() - (*m).localPosition().x());
01620 if(dist<mindist){
01621 mindist = dist;
01622 closest = (*m);
01623 }
01624 rechitrphiresLF = rechitrphix - closest.localPosition().x();
01625 rechitrphiresMF = Mposition.x() - (topol.measurementPosition(closest.localPosition())).x();
01626 rechitrphipullLF = rechitrphiresLF/sqrt(rechitrphierrxLF);
01627 rechitrphipullMF = rechitrphiresMF/sqrt(rechitrphierrxMF);
01628
01629
01630
01631
01632
01633 }
01634 }
01635 rechitrphitrackangle = anglealpha;
01636 rechitrphitrackanglebeta = anglebeta;
01637
01638
01639 rechitrphitrackwidth = Wtrack;
01640 rechitrphiexpectedwidth = Wexp;
01641 clusterWidth = clusiz;
01642 unsigned int iopt;
01643 if (clusterWidth > Wexp + 2) {
01644 iopt = 1;
01645 } else if (Wexp == 1) {
01646 iopt = 2;
01647 } else if (clusterWidth <= Wexp) {
01648 iopt = 3;
01649 } else {
01650 iopt = 4;
01651 }
01652 rechitrphicategory = iopt;
01653 }
01654
01655
01656 const SiStripRecHit2D *stereohit;
01657 stereohit=matchedhit->stereoHit();
01658 const GeomDetUnit * stereodet=gdet->stereoDet();
01659
01660 gtrkdir=gdet->toGlobal(trackdirection);
01661 LocalVector stereotkdir=stereodet->toLocal(gtrkdir);
01662 if(stereotkdir.z()!=0){
01663 anglealpha = atan(stereotkdir.x()/stereotkdir.z())*180/TMath::Pi();
01664 anglebeta = atan(stereotkdir.y()/stereotkdir.z())*180/TMath::Pi();
01665 }
01666
01667 if (stereohit)
01668 {
01669
01670 isrechitsas = 1;
01671 SiStripRecHit2D::ClusterRef cluster=stereohit->cluster();
01672
01673
01674 const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(stereodet);
01675 const StripTopology &topol=(StripTopology&)stripdet->topology();
01676
01677 position = stereohit->localPosition();
01678
01679 error = stereohit->localPositionError();
01680 Mposition = topol.measurementPosition(position);
01681 Merror = topol.measurementError(position,error);
01682
01683
01684 LocalVector drift = stripcpe->driftDirection(stripdet);
01685 float thickness=stripdet->surface().bounds().thickness();
01686 rechitsasthickness = thickness;
01687
01688 float pitch = topol.localPitch(position);
01689
01690 float tanalpha = tan(anglealpha/57.3);
01691
01692 float tanalphaL = drift.x()/drift.z();
01693
01694
01695
01696 Wtrack = fabs((thickness/pitch)*tanalpha - (thickness/pitch)*tanalphaL);
01697
01698 float SLorentz = 0.5*(thickness/pitch)*tanalphaL;
01699
01700 int Sp = int(position.x()/pitch+SLorentz+0.5*Wtrack);
01701 int Sm = int(position.x()/pitch+SLorentz-0.5*Wtrack);
01702 Wexp = 1+Sp-Sm;
01703
01704
01705 clusiz=0;
01706 totcharge=0;
01707 clusiz = cluster->amplitudes().size();
01708 const std::vector<uint8_t> amplitudes=cluster->amplitudes();
01709 for(size_t ia=0; ia<amplitudes.size();ia++){
01710 totcharge+=amplitudes[ia];
01711 }
01712 rechitsasx = position.x();
01713 rechitsasy = position.y();
01714 rechitsasz = position.z();
01715 rechitsaserrxLF = error.xx();
01716
01717 rechitsaserrxMF = Merror.uu();
01718
01719 clusizsas = clusiz;
01720 cluchgsas = totcharge;
01721
01722
01723 mindist = 999999;
01724 matched.clear();
01725 matched = associate.associateHit(*stereohit);
01726 if(!matched.empty()){
01727
01728 for(vector<PSimHit>::const_iterator m=matched.begin(); m<matched.end(); m++){
01729 dist = abs((stereohit)->localPosition().x() - (*m).localPosition().x());
01730 if(dist<mindist){
01731 mindist = dist;
01732 closest = (*m);
01733 }
01734
01735 rechitsasresLF = rechitsasx - closest.localPosition().x();
01736 rechitsasresMF = Mposition.x() - (topol.measurementPosition(closest.localPosition())).x();
01737 rechitsaspullLF = rechitsasresLF/sqrt(rechitsaserrxLF);
01738 rechitsaspullMF = rechitsasresMF/sqrt(rechitsaserrxMF);
01739
01740
01741
01742
01743
01744
01745 }
01746 }
01747 rechitsastrackangle = anglealpha;
01748 rechitsastrackanglebeta = anglebeta;
01749 rechitsastrackwidth = Wtrack;
01750 rechitsasexpectedwidth = Wexp;
01751
01752 clusterWidth = clusiz;
01753 unsigned int iopt;
01754 if (clusterWidth > Wexp + 2) {
01755 iopt = 1;
01756 } else if (Wexp == 1) {
01757 iopt = 2;
01758 } else if (clusterWidth <= Wexp) {
01759 iopt = 3;
01760 } else {
01761 iopt = 4;
01762 }
01763 rechitsascategory = iopt;
01764 }
01765 }
01766
01767
01768
01769
01770
01771
01772
01773
01774 if(hit){
01775
01776
01777 if (StripSubdet.stereo() == 0){
01778 isrechitrphi = 1;
01779
01780
01781 const GeomDetUnit * det = tracker.idToDetUnit(detid2);
01782 const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(det);
01783 const StripTopology &topol=(StripTopology&)stripdet->topology();
01784
01785 float anglealpha = atan(trackdirection.x()/trackdirection.z())*180/TMath::Pi();
01786 float anglebeta = atan(trackdirection.y()/trackdirection.z())*180/TMath::Pi();
01787
01788 SiStripRecHit2D::ClusterRef cluster=hit->cluster();
01789
01790 position = thit->localPosition();
01791 error = thit->localPositionError();
01792 Mposition = topol.measurementPosition(position);
01793 Merror = topol.measurementError(position,error);
01794
01795 LocalVector drift = stripcpe->driftDirection(stripdet);
01796 float thickness=stripdet->surface().bounds().thickness();
01797 rechitrphithickness = thickness;
01798
01799 float pitch = topol.localPitch(position);
01800
01801 float tanalpha = tan(anglealpha/57.3);
01802
01803 float tanalphaL = drift.x()/drift.z();
01804
01805
01806
01807
01808
01809
01810 Wtrack = fabs((thickness/pitch)*tanalpha - (thickness/pitch)*tanalphaL);
01811
01812
01813 float SLorentz = 0.5*(thickness/pitch)*tanalphaL;
01814
01815 int Sp = int(position.x()/pitch+SLorentz+0.5*Wtrack);
01816 int Sm = int(position.x()/pitch+SLorentz-0.5*Wtrack);
01817 Wexp = 1+Sp-Sm;
01818
01819 clusiz=0;
01820 totcharge=0;
01821 clusiz = cluster->amplitudes().size();
01822
01823 const std::vector<uint8_t> amplitudes=cluster->amplitudes();
01824 for(size_t ia=0; ia<amplitudes.size();ia++){
01825 totcharge+=amplitudes[ia];
01826 }
01827 rechitrphix = position.x();
01828 rechitrphiy = position.y();
01829 rechitrphiz = position.z();
01830 rechitrphierrx = error.xx();
01831 rechitrphierrxLF = error.xx();
01832 rechitrphierrxMF = Merror.uu();
01833
01834 clusizrphi = clusiz;
01835
01836 cluchgrphi = totcharge;
01837
01838
01839 mindist = 999999;
01840 matched.clear();
01841 matched = associate.associateHit(*hit);
01842 if(!matched.empty()){
01843
01844 for(vector<PSimHit>::const_iterator m=matched.begin(); m<matched.end(); m++){
01845 dist = abs((hit)->localPosition().x() - (*m).localPosition().x());
01846 if(dist<mindist){
01847 mindist = dist;
01848 closest = (*m);
01849 }
01850 rechitrphiresLF = rechitrphix - closest.localPosition().x();
01851 rechitrphiresMF = Mposition.x() - (topol.measurementPosition(closest.localPosition())).x();
01852 rechitrphipullLF = (thit->localPosition().x() - (closest).localPosition().x())/sqrt(error.xx());
01853 rechitrphipullMF = rechitrphiresMF/sqrt(rechitrphierrxMF);
01854 }
01855 }
01856 rechitrphitrackangle = anglealpha;
01857 rechitrphitrackanglebeta = anglebeta;
01858 rechitrphitrackwidth = Wtrack;
01859 rechitrphiexpectedwidth = Wexp;
01860
01861 clusterWidth = clusiz;
01862 unsigned int iopt;
01863 if (clusterWidth > Wexp + 2) {
01864 iopt = 1;
01865 } else if (Wexp == 1) {
01866 iopt = 2;
01867 } else if (clusterWidth <= Wexp) {
01868 iopt = 3;
01869 } else {
01870 iopt = 4;
01871 }
01872 rechitrphicategory = iopt;
01873
01874
01875
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 if (StripSubdet.stereo() == 1){
01950
01951
01952 isrechitsas = 1;
01953
01954 const GeomDetUnit * det = tracker.idToDetUnit(detid2);
01955 const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(det);
01956 const StripTopology &topol=(StripTopology&)stripdet->topology();
01957
01958 float anglealpha = atan(trackdirection.x()/trackdirection.z())*180/TMath::Pi();
01959 float anglebeta = atan(trackdirection.y()/trackdirection.z())*180/TMath::Pi();
01960
01961 SiStripRecHit2D::ClusterRef cluster=hit->cluster();
01962
01963
01964 position = thit->localPosition();
01965 error = thit->localPositionError();
01966 Mposition = topol.measurementPosition(position);
01967 Merror = topol.measurementError(position,error);
01968
01969
01970 LocalVector drift = stripcpe->driftDirection(stripdet);
01971 float thickness=stripdet->surface().bounds().thickness();
01972 rechitsasthickness = thickness;
01973
01974 float pitch = topol.localPitch(position);
01975
01976 float tanalpha = tan(anglealpha/57.3);
01977
01978 float tanalphaL = drift.x()/drift.z();
01979
01980
01981
01982 Wtrack = fabs((thickness/pitch)*tanalpha - (thickness/pitch)*tanalphaL);
01983
01984 float SLorentz = 0.5*(thickness/pitch)*tanalphaL;
01985
01986 int Sp = int(position.x()/pitch+SLorentz+0.5*Wtrack);
01987 int Sm = int(position.x()/pitch+SLorentz-0.5*Wtrack);
01988 Wexp = 1+Sp-Sm;
01989
01990 clusiz=0;
01991 totcharge=0;
01992 clusiz = cluster->amplitudes().size();
01993 const std::vector<uint8_t> amplitudes=cluster->amplitudes();
01994 for(size_t ia=0; ia<amplitudes.size();ia++){
01995 totcharge+=amplitudes[ia];
01996 }
01997 rechitsasx = position.x();
01998 rechitsasy = position.y();
01999 rechitsasz = position.z();
02000 rechitsaserrxLF = error.xx();
02001
02002 rechitsaserrxMF = Merror.uu();
02003
02004 clusizsas = clusiz;
02005 cluchgsas = totcharge;
02006
02007
02008 mindist = 999999;
02009 matched.clear();
02010 matched = associate.associateHit(*hit);
02011 if(!matched.empty()){
02012
02013 for(vector<PSimHit>::const_iterator m=matched.begin(); m<matched.end(); m++){
02014 dist = abs((hit)->localPosition().x() - (*m).localPosition().x());
02015 if(dist<mindist){
02016 mindist = dist;
02017 closest = (*m);
02018 }
02019
02020 rechitsasresLF = rechitsasx - closest.localPosition().x();
02021 rechitsasresMF = Mposition.x() - (topol.measurementPosition(closest.localPosition())).x();
02022 rechitsaspullLF = (thit->localPosition().x() - (closest).localPosition().x())/sqrt(error.xx());
02023 rechitsaspullMF = rechitsasresMF/sqrt(rechitsaserrxMF);
02024
02025 }
02026 }
02027 rechitsastrackangle = anglealpha;
02028 rechitsastrackanglebeta = anglebeta;
02029 rechitsastrackwidth = Wtrack;
02030 rechitsasexpectedwidth = Wexp;
02031
02032 clusterWidth = clusiz;
02033 unsigned int iopt;
02034 if (clusterWidth > Wexp + 2) {
02035 iopt = 1;
02036 } else if (Wexp == 1) {
02037 iopt = 2;
02038 } else if (clusterWidth <= Wexp) {
02039 iopt = 3;
02040 } else {
02041 iopt = 4;
02042 }
02043 rechitsascategory = iopt;
02044 }
02045
02046 }
02047
02048
02049
02050
02051
02052 float CutThickness=0.04;
02053 CutThickness=0.;
02054
02055 if(isrechitrphi>0 || isrechitsas>0){
02056
02057
02058 if (isrechitrphi>0) {
02059
02060
02061
02062
02063
02064
02065
02066
02067
02068
02069
02070
02071
02072
02073
02074
02075
02076
02077
02078
02079
02080
02081
02082
02083
02084
02085
02086
02087
02088
02089
02090 meCategory->Fill(rechitrphicategory);
02091 meTrackwidth->Fill(rechitrphitrackwidth);
02092 meExpectedwidth->Fill(rechitrphiexpectedwidth);
02093 meClusterwidth->Fill(clusizrphi);
02094 meTrackanglealpha->Fill(rechitrphitrackangle);
02095 meTrackanglebeta->Fill(rechitrphitrackanglebeta);
02096
02097 meErrxMFAngleProfile->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF));
02098 meErrxMFTrackwidthProfile->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02099
02100 if (clusizrphi == 1) {
02101 meErrxMFTrackwidthProfileWClus1->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02102 meResMFTrackwidthProfileWClus1->Fill(rechitrphitrackwidth,rechitrphiresMF);
02103 if (rechitrphithickness > CutThickness)
02104 {
02105
02106
02107
02108
02109
02110
02111
02112
02113
02114
02115
02116 }
02117 }
02118 if (clusizrphi == 2) {
02119 meErrxMFTrackwidthProfileWClus2->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02120 meResMFTrackwidthProfileWClus2->Fill(rechitrphitrackwidth,rechitrphiresMF);
02121 meResMFTrackwidthProfileWClus21->Fill(rechitrphitrackwidth,rechitrphiresMF);
02122 meResMFTrackwidthProfileWClus22->Fill(rechitrphitrackwidth,rechitrphiresMF);
02123 meResMFTrackwidthProfileWClus23->Fill(rechitrphitrackwidth,rechitrphiresMF);
02124 if (rechitrphithickness > CutThickness)
02125 {
02126
02127
02128 if ((detid.subdetId() == int(StripSubdetector::TID)) || (detid.subdetId() == int(StripSubdetector::TEC))){
02129
02130
02131
02132
02133
02134 }
02135
02136
02137
02138
02139
02140 }
02141 }
02142 if (clusizrphi == 3) {
02143 meErrxMFTrackwidthProfileWClus3->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02144 meResMFTrackwidthProfileWClus3->Fill(rechitrphitrackwidth,rechitrphiresMF);
02145 if (rechitrphithickness > CutThickness)
02146 {
02147
02148
02149
02150
02151
02152
02153
02154
02155
02156
02157
02158 }
02159 }
02160 if (clusizrphi == 4) {
02161 meErrxMFTrackwidthProfileWClus4->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02162 meResMFTrackwidthProfileWClus4->Fill(rechitrphitrackwidth,rechitrphiresMF);
02163 if (rechitrphithickness > CutThickness)
02164 {
02165
02166
02167
02168
02169
02170
02171
02172
02173
02174 }
02175 }
02176
02177 if (rechitrphicategory == 1) {
02178 meErrxMFTrackwidthProfileCategory1->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02179 meErrxMFClusterwidthProfileCategory1->Fill(clusizrphi,sqrt(rechitrphierrxMF));
02180 }
02181 if (rechitrphicategory == 2) {
02182 meErrxMFTrackwidthProfileCategory2->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02183
02184
02185 }
02186 if (rechitrphicategory == 3) {
02187 meErrxMFTrackwidthProfileCategory3->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02188
02189
02190 }
02191 if (rechitrphicategory == 4) {
02192 meErrxMFTrackwidthProfileCategory4->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02193
02194
02195 }
02196
02197
02198
02199 meErrxMF->Fill(sqrt(rechitrphierrxMF));
02200
02201
02202 meErrxLF->Fill(sqrt(rechitrphierrxLF));
02203 meResMF->Fill(rechitrphiresMF);
02204 meResLF->Fill(rechitrphiresLF);
02205 mePullMF->Fill(rechitrphipullMF);
02206 mePullLF->Fill(rechitrphipullLF);
02207
02208 }
02209
02210 if (isrechitsas>0) {
02211
02212 if (rechitsasthickness > CutThickness)
02213 {
02214
02215
02216
02217
02218
02219
02220
02221
02222
02223
02224
02225
02226
02227 }
02228
02229
02230 meCategory->Fill(rechitsascategory);
02231 meTrackwidth->Fill(rechitsastrackwidth);
02232 meExpectedwidth->Fill(rechitsasexpectedwidth);
02233 meClusterwidth->Fill(clusizsas);
02234 meTrackanglealpha->Fill(rechitsastrackangle);
02235 meTrackanglebeta->Fill(rechitsastrackanglebeta);
02236
02237 meErrxMFAngleProfile->Fill(rechitsastrackangle,sqrt(rechitsaserrxMF));
02238 meErrxMFTrackwidthProfile->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02239
02240 if (clusizsas == 1) {
02241 meErrxMFTrackwidthProfileWClus1->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02242 meResMFTrackwidthProfileWClus1->Fill(rechitsastrackwidth,rechitsasresMF);
02243 if (rechitsasthickness > CutThickness)
02244 {
02245
02246
02247
02248
02249
02250
02251
02252
02253
02254
02255
02256 }
02257 }
02258
02259 if (clusizsas == 2) {
02260 meErrxMFTrackwidthProfileWClus2->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02261 meResMFTrackwidthProfileWClus2->Fill(rechitsastrackwidth,rechitsasresMF);
02262 if (rechitsasthickness > CutThickness)
02263 {
02264
02265
02266
02267
02268
02269
02270
02271
02272
02273
02274
02275 }
02276 }
02277 if (clusizsas == 3) {
02278 meErrxMFTrackwidthProfileWClus3->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02279 meResMFTrackwidthProfileWClus3->Fill(rechitsastrackwidth,rechitsasresMF);
02280 if (rechitsasthickness > CutThickness)
02281 {
02282
02283
02284
02285
02286
02287
02288
02289
02290
02291
02292
02293 }
02294 }
02295 if (clusizsas == 4) {
02296 meErrxMFTrackwidthProfileWClus4->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02297 meResMFTrackwidthProfileWClus4->Fill(rechitsastrackwidth,rechitsasresMF);
02298 if (rechitsasthickness > CutThickness)
02299 {
02300
02301
02302
02303
02304
02305
02306
02307
02308
02309
02310
02311 }
02312 }
02313 if (rechitsascategory == 1) {
02314 meErrxMFTrackwidthProfileCategory1->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02315 meErrxMFClusterwidthProfileCategory1->Fill(clusizsas,sqrt(rechitsaserrxMF));
02316 }
02317 if (rechitsascategory == 2) {
02318 meErrxMFTrackwidthProfileCategory2->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02319
02320
02321 }
02322 if (rechitsascategory == 3) {
02323 meErrxMFTrackwidthProfileCategory3->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02324
02325
02326 }
02327 if (rechitsascategory == 4) {
02328 meErrxMFTrackwidthProfileCategory4->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02329
02330
02331 }
02332
02333 meErrxMF->Fill(sqrt(rechitsaserrxMF));
02334 meErrxLF->Fill(sqrt(rechitsaserrxLF));
02335 meResMF->Fill(rechitsasresMF);
02336 meResLF->Fill(rechitsasresLF);
02337 mePullMF->Fill(rechitsaspullMF);
02338 mePullLF->Fill(rechitsaspullLF);
02339
02340 }
02341
02342
02343 if (detid.subdetId() == int(StripSubdetector::TIB)){
02344 TIBDetId tibid(myid);
02345 int Tibisrechitrphi = isrechitrphi;
02346 int Tibisrechitsas = isrechitsas;
02347
02348 int ilay = tibid.layer() - 1;
02349
02350 if(Tibisrechitrphi!=0){
02351 if (rechitrphithickness > CutThickness)
02352 {
02353
02354
02355
02356
02357
02358 }
02359
02360
02361
02362 meNstpRphiTIB[ilay]->Fill(clusizrphi);
02363 meAdcRphiTIB[ilay]->Fill(cluchgrphi);
02364 mePosxRphiTIB[ilay]->Fill(rechitrphix);
02365 meErrxLFRphiTIB[ilay]->Fill(sqrt(rechitrphierrxLF));
02366 meErrxMFRphiTIB[ilay]->Fill(sqrt(rechitrphierrxMF));
02367 meResLFRphiTIB[ilay]->Fill(rechitrphiresLF);
02368 meResMFRphiTIB[ilay]->Fill(rechitrphiresMF);
02369 mePullLFRphiTIB[ilay]->Fill(rechitrphipullLF);
02370 mePullMFRphiTIB[ilay]->Fill(rechitrphipullMF);
02371 meTrackangleRphiTIB[ilay]->Fill(rechitrphitrackangle);
02372 mePullTrackangleProfileRphiTIB[ilay]->Fill(rechitrphitrackangle,rechitrphipullMF);
02373 mePullTrackwidthProfileRphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02374 if (clusizrphi == 1) {
02375 meErrxMFTrackwidthProfileWclus1RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02376 meResMFTrackwidthProfileWclus1RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02377 }
02378 if (clusizrphi == 2) {
02379 meErrxMFTrackwidthProfileWclus2RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02380 meResMFTrackwidthProfileWclus2RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02381 }
02382 if (clusizrphi == 3) {
02383 meErrxMFTrackwidthProfileWclus3RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02384 meResMFTrackwidthProfileWclus3RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02385 }
02386 if (clusizrphi == 4) {
02387 meErrxMFTrackwidthProfileWclus4RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02388 meResMFTrackwidthProfileWclus4RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02389 }
02390
02391
02392 if (rechitrphicategory == 1) {
02393 mePullTrackwidthProfileCategory1RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02394 meErrxMFTrackwidthProfileCategory1RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02395 meErrxMFClusterwidthProfileCategory1RphiTIB[ilay]->Fill(clusizrphi,sqrt(rechitrphierrxMF));
02396 }
02397 if (rechitrphicategory == 2) {
02398 mePullTrackwidthProfileCategory2RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02399 meErrxMFTrackwidthProfileCategory2RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02400 }
02401 if (rechitrphicategory == 3) {
02402 mePullTrackwidthProfileCategory3RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02403 meErrxMFTrackwidthProfileCategory3RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02404 }
02405 if (rechitrphicategory == 4) {
02406 mePullTrackwidthProfileCategory4RphiTIB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02407 meErrxMFTrackwidthProfileCategory4RphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02408 }
02409 meTrackwidthRphiTIB[ilay]->Fill(rechitrphitrackwidth);
02410 meExpectedwidthRphiTIB[ilay]->Fill(rechitrphiexpectedwidth);
02411 meClusterwidthRphiTIB[ilay]->Fill(clusizrphi);
02412 meCategoryRphiTIB[ilay]->Fill(rechitrphicategory);
02413 meErrxMFTrackwidthProfileRphiTIB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02414 meErrxMFAngleProfileRphiTIB[ilay]->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF));
02415 }
02416 if(Tibisrechitsas!=0){
02417 if (rechitsasthickness > CutThickness)
02418 {
02419
02420
02421
02422
02423
02424 }
02425 meNstpSasTIB[ilay]->Fill(clusizsas);
02426 meAdcSasTIB[ilay]->Fill(cluchgsas);
02427 mePosxSasTIB[ilay]->Fill(rechitsasx);
02428 meErrxLFSasTIB[ilay]->Fill(sqrt(rechitsaserrxLF));
02429 meResLFSasTIB[ilay]->Fill(rechitsasresLF);
02430 mePullLFSasTIB[ilay]->Fill(rechitsaspullLF);
02431 meErrxMFSasTIB[ilay]->Fill(sqrt(rechitsaserrxMF));
02432 meResMFSasTIB[ilay]->Fill(rechitsasresMF);
02433 mePullMFSasTIB[ilay]->Fill(rechitsaspullMF);
02434 meTrackangleSasTIB[ilay]->Fill(rechitsastrackangle);
02435 mePullTrackangleProfileSasTIB[ilay]->Fill(rechitsastrackangle,rechitsaspullMF);
02436 mePullTrackwidthProfileSasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02437 if (rechitsascategory == 1) {
02438 mePullTrackwidthProfileCategory1SasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02439 meErrxMFTrackwidthProfileCategory1SasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02440 meErrxMFClusterwidthProfileCategory1SasTIB[ilay]->Fill(clusizsas,sqrt(rechitsaserrxMF));
02441 }
02442 if (rechitsascategory == 2) {
02443 mePullTrackwidthProfileCategory2SasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02444 meErrxMFTrackwidthProfileCategory2SasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02445 }
02446 if (rechitsascategory == 3) {
02447 mePullTrackwidthProfileCategory3SasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02448 meErrxMFTrackwidthProfileCategory3SasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02449 }
02450 if (rechitsascategory == 4) {
02451 mePullTrackwidthProfileCategory4SasTIB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02452 meErrxMFTrackwidthProfileCategory4SasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02453 }
02454 meTrackwidthSasTIB[ilay]->Fill(rechitsastrackwidth);
02455 meExpectedwidthSasTIB[ilay]->Fill(rechitsasexpectedwidth);
02456 meClusterwidthSasTIB[ilay]->Fill(clusizsas);
02457 meCategorySasTIB[ilay]->Fill(rechitsascategory);
02458 meErrxMFTrackwidthProfileSasTIB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02459 meErrxMFAngleProfileSasTIB[ilay]->Fill(rechitsastrackangle,rechitsaserrxMF);
02460 }
02461 }
02462
02463 if (detid.subdetId() == int(StripSubdetector::TOB)){
02464 TOBDetId tobid(myid);
02465 int Tobisrechitrphi = isrechitrphi;
02466 int Tobisrechitsas = isrechitsas;
02467 int ilay = tobid.layer() - 1;
02468 if(Tobisrechitrphi!=0){
02469 if (rechitrphithickness > CutThickness)
02470 {
02471
02472
02473
02474
02475
02476 }
02477
02478 meNstpRphiTOB[ilay]->Fill(clusizrphi);
02479 meAdcRphiTOB[ilay]->Fill(cluchgrphi);
02480 mePosxRphiTOB[ilay]->Fill(rechitrphix);
02481 meErrxLFRphiTOB[ilay]->Fill(sqrt(rechitrphierrxLF));
02482 meResLFRphiTOB[ilay]->Fill(rechitrphiresLF);
02483 mePullLFRphiTOB[ilay]->Fill(rechitrphipullLF);
02484 meErrxMFRphiTOB[ilay]->Fill(sqrt(rechitrphierrxMF));
02485 meResMFRphiTOB[ilay]->Fill(rechitrphiresMF);
02486 mePullMFRphiTOB[ilay]->Fill(rechitrphipullMF);
02487 meTrackangleRphiTOB[ilay]->Fill(rechitrphitrackangle);
02488 mePullTrackangleProfileRphiTOB[ilay]->Fill(rechitrphitrackangle,rechitrphipullMF);
02489 mePullTrackwidthProfileRphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02490
02491 if (clusizrphi == 1) {
02492 meErrxMFTrackwidthProfileWclus1RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02493 meResMFTrackwidthProfileWclus1RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02494 }
02495 if (clusizrphi == 2) {
02496 meErrxMFTrackwidthProfileWclus2RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02497 meResMFTrackwidthProfileWclus2RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02498 }
02499 if (clusizrphi == 3) {
02500 meErrxMFTrackwidthProfileWclus3RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02501 meResMFTrackwidthProfileWclus3RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02502 }
02503 if (clusizrphi == 4) {
02504 meErrxMFTrackwidthProfileWclus4RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02505 meResMFTrackwidthProfileWclus4RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphiresMF);
02506 }
02507
02508
02509 if (rechitrphicategory == 1) {
02510 mePullTrackwidthProfileCategory1RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02511 meErrxMFTrackwidthProfileCategory1RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02512 meErrxMFClusterwidthProfileCategory1RphiTOB[ilay]->Fill(clusizrphi,sqrt(rechitrphierrxMF));
02513 }
02514 if (rechitrphicategory == 2) {
02515 mePullTrackwidthProfileCategory2RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02516 meErrxMFTrackwidthProfileCategory2RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02517 }
02518 if (rechitrphicategory == 3) {
02519 mePullTrackwidthProfileCategory3RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02520 meErrxMFTrackwidthProfileCategory3RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02521 }
02522 if (rechitrphicategory == 4) {
02523 mePullTrackwidthProfileCategory4RphiTOB[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02524 meErrxMFTrackwidthProfileCategory4RphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02525 }
02526 meTrackwidthRphiTOB[ilay]->Fill(rechitrphitrackwidth);
02527 meExpectedwidthRphiTOB[ilay]->Fill(rechitrphiexpectedwidth);
02528 meClusterwidthRphiTOB[ilay]->Fill(clusizrphi);
02529 meCategoryRphiTOB[ilay]->Fill(rechitrphicategory);
02530 meErrxMFTrackwidthProfileRphiTOB[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02531 meErrxMFAngleProfileRphiTOB[ilay]->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF));
02532 }
02533 if(Tobisrechitsas!=0){
02534 if (rechitsasthickness > CutThickness)
02535 {
02536
02537
02538
02539
02540
02541
02542 }
02543 meNstpSasTOB[ilay]->Fill(clusizsas);
02544 meAdcSasTOB[ilay]->Fill(cluchgsas);
02545 mePosxSasTOB[ilay]->Fill(rechitsasx);
02546 meErrxLFSasTOB[ilay]->Fill(sqrt(rechitsaserrxLF));
02547 meResLFSasTOB[ilay]->Fill(rechitsasresLF);
02548 mePullLFSasTOB[ilay]->Fill(rechitsaspullLF);
02549 meErrxMFSasTOB[ilay]->Fill(sqrt(rechitsaserrxMF));
02550 meResMFSasTOB[ilay]->Fill(rechitsasresMF);
02551 mePullMFSasTOB[ilay]->Fill(rechitsaspullMF);
02552 meTrackangleSasTOB[ilay]->Fill(rechitsastrackangle);
02553 mePullTrackangleProfileSasTOB[ilay]->Fill(rechitsastrackangle,rechitsaspullMF);
02554 mePullTrackwidthProfileSasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02555 if (rechitsascategory == 1) {
02556 mePullTrackwidthProfileCategory1SasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02557 meErrxMFTrackwidthProfileCategory1SasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02558 meErrxMFClusterwidthProfileCategory1SasTOB[ilay]->Fill(clusizsas,sqrt(rechitsaserrxMF));
02559 }
02560 if (rechitsascategory == 2) {
02561 mePullTrackwidthProfileCategory2SasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02562 meErrxMFTrackwidthProfileCategory2SasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02563 }
02564 if (rechitsascategory == 3) {
02565 mePullTrackwidthProfileCategory3SasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02566 meErrxMFTrackwidthProfileCategory3SasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02567 }
02568 if (rechitsascategory == 4) {
02569 mePullTrackwidthProfileCategory4SasTOB[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02570 meErrxMFTrackwidthProfileCategory4SasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02571 }
02572 meTrackwidthSasTOB[ilay]->Fill(rechitsastrackwidth);
02573 meExpectedwidthSasTOB[ilay]->Fill(rechitsasexpectedwidth);
02574 meClusterwidthSasTOB[ilay]->Fill(clusizsas);
02575 meCategorySasTOB[ilay]->Fill(rechitsascategory);
02576 meErrxMFTrackwidthProfileSasTOB[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02577 meErrxMFAngleProfileSasTOB[ilay]->Fill(rechitsastrackangle,rechitsaserrxMF);
02578 }
02579 }
02580
02581 if (detid.subdetId() == int(StripSubdetector::TID)){
02582 TIDDetId tidid(myid);
02583 int Tidisrechitrphi = isrechitrphi;
02584 int Tidisrechitsas = isrechitsas;
02585 int ilay = tidid.ring() - 1;
02586 if(Tidisrechitrphi!=0){
02587 if (rechitrphithickness > CutThickness)
02588 {
02589
02590
02591
02592
02593
02594 }
02595
02596 meNstpRphiTID[ilay]->Fill(clusizrphi);
02597 meAdcRphiTID[ilay]->Fill(cluchgrphi);
02598 mePosxRphiTID[ilay]->Fill(rechitrphix);
02599 meErrxLFRphiTID[ilay]->Fill(sqrt(rechitrphierrxLF));
02600 meResLFRphiTID[ilay]->Fill(rechitrphiresLF);
02601 mePullLFRphiTID[ilay]->Fill(rechitrphipullLF);
02602 meErrxMFRphiTID[ilay]->Fill(sqrt(rechitrphierrxMF));
02603 meResMFRphiTID[ilay]->Fill(rechitrphiresMF);
02604 mePullMFRphiTID[ilay]->Fill(rechitrphipullMF);
02605 meTrackangleRphiTID[ilay]->Fill(rechitrphitrackangle);
02606 mePullTrackangleProfileRphiTID[ilay]->Fill(rechitrphitrackangle,rechitrphipullMF);
02607 mePullTrackwidthProfileRphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02608 if (rechitrphicategory == 1) {
02609 mePullTrackwidthProfileCategory1RphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02610 meErrxMFTrackwidthProfileCategory1RphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02611 meErrxMFClusterwidthProfileCategory1RphiTID[ilay]->Fill(clusizrphi,sqrt(rechitrphierrxMF));
02612 }
02613 if (rechitrphicategory == 2) {
02614 mePullTrackwidthProfileCategory2RphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02615 meErrxMFTrackwidthProfileCategory2RphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02616 }
02617 if (rechitrphicategory == 3) {
02618 mePullTrackwidthProfileCategory3RphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02619 meErrxMFTrackwidthProfileCategory3RphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02620 }
02621 if (rechitrphicategory == 4) {
02622 mePullTrackwidthProfileCategory4RphiTID[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02623 meErrxMFTrackwidthProfileCategory4RphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02624 }
02625 meTrackwidthRphiTID[ilay]->Fill(rechitrphitrackwidth);
02626 meExpectedwidthRphiTID[ilay]->Fill(rechitrphiexpectedwidth);
02627 meClusterwidthRphiTID[ilay]->Fill(clusizrphi);
02628 meCategoryRphiTID[ilay]->Fill(rechitrphicategory);
02629 meErrxMFTrackwidthProfileRphiTID[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02630 meErrxMFAngleProfileRphiTID[ilay]->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF));
02631 }
02632 if(Tidisrechitsas!=0){
02633 if (rechitsasthickness > CutThickness)
02634 {
02635
02636
02637
02638
02639
02640 }
02641 meNstpSasTID[ilay]->Fill(clusizsas);
02642 meAdcSasTID[ilay]->Fill(cluchgsas);
02643 mePosxSasTID[ilay]->Fill(rechitsasx);
02644 meErrxLFSasTID[ilay]->Fill(sqrt(rechitsaserrxLF));
02645 meResLFSasTID[ilay]->Fill(rechitsasresLF);
02646 mePullLFSasTID[ilay]->Fill(rechitsaspullLF);
02647 meErrxMFSasTID[ilay]->Fill(sqrt(rechitsaserrxMF));
02648 meResMFSasTID[ilay]->Fill(rechitsasresMF);
02649 mePullMFSasTID[ilay]->Fill(rechitsaspullMF);
02650 meTrackangleSasTID[ilay]->Fill(rechitsastrackangle);
02651 mePullTrackangleProfileSasTID[ilay]->Fill(rechitsastrackangle,rechitsaspullMF);
02652 mePullTrackwidthProfileSasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02653 if (rechitsascategory == 1) {
02654 mePullTrackwidthProfileCategory1SasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02655 meErrxMFTrackwidthProfileCategory1SasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02656 meErrxMFClusterwidthProfileCategory1SasTID[ilay]->Fill(clusizsas,sqrt(rechitsaserrxMF));
02657 }
02658 if (rechitsascategory == 2) {
02659 mePullTrackwidthProfileCategory2SasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02660 meErrxMFTrackwidthProfileCategory2SasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02661 }
02662 if (rechitsascategory == 3) {
02663 mePullTrackwidthProfileCategory3SasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02664 meErrxMFTrackwidthProfileCategory3SasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02665 }
02666 if (rechitsascategory == 4) {
02667 mePullTrackwidthProfileCategory4SasTID[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02668 meErrxMFTrackwidthProfileCategory4SasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02669 }
02670 meTrackwidthSasTID[ilay]->Fill(rechitsastrackwidth);
02671 meExpectedwidthSasTID[ilay]->Fill(rechitsasexpectedwidth);
02672 meClusterwidthSasTID[ilay]->Fill(clusizsas);
02673 meCategorySasTID[ilay]->Fill(rechitsascategory);
02674 meErrxMFTrackwidthProfileSasTID[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02675 meErrxMFAngleProfileSasTID[ilay]->Fill(rechitsastrackangle,rechitsaserrxMF);
02676 }
02677 }
02678
02679 if (detid.subdetId() == int(StripSubdetector::TEC)){
02680 TECDetId tecid(myid);
02681 int Tecisrechitrphi = isrechitrphi;
02682 int Tecisrechitsas = isrechitsas;
02683 int ilay = tecid.ring() - 1;
02684 if(Tecisrechitrphi!=0){
02685 if (rechitrphithickness > CutThickness)
02686 {
02687
02688
02689
02690
02691
02692 }
02693
02694 meNstpRphiTEC[ilay]->Fill(clusizrphi);
02695 meAdcRphiTEC[ilay]->Fill(cluchgrphi);
02696 mePosxRphiTEC[ilay]->Fill(rechitrphix);
02697 meErrxLFRphiTEC[ilay]->Fill(sqrt(rechitrphierrxLF));
02698 meResLFRphiTEC[ilay]->Fill(rechitrphiresLF);
02699 mePullLFRphiTEC[ilay]->Fill(rechitrphipullLF);
02700 meErrxMFRphiTEC[ilay]->Fill(sqrt(rechitrphierrxMF));
02701 meResMFRphiTEC[ilay]->Fill(rechitrphiresMF);
02702 mePullMFRphiTEC[ilay]->Fill(rechitrphipullMF);
02703 meTrackangleRphiTEC[ilay]->Fill(rechitrphitrackangle);
02704 mePullTrackangleProfileRphiTEC[ilay]->Fill(rechitrphitrackangle,rechitrphipullMF);
02705 mePullTrackwidthProfileRphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02706 if (rechitrphicategory == 1) {
02707 mePullTrackwidthProfileCategory1RphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02708 meErrxMFTrackwidthProfileCategory1RphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02709 meErrxMFClusterwidthProfileCategory1RphiTEC[ilay]->Fill(clusizrphi,sqrt(rechitrphierrxMF));
02710 }
02711 if (rechitrphicategory == 2) {
02712 mePullTrackwidthProfileCategory2RphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02713 meErrxMFTrackwidthProfileCategory2RphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02714 }
02715 if (rechitrphicategory == 3) {
02716 mePullTrackwidthProfileCategory3RphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02717 meErrxMFTrackwidthProfileCategory3RphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02718 }
02719 if (rechitrphicategory == 4) {
02720 mePullTrackwidthProfileCategory4RphiTEC[ilay]->Fill(rechitrphitrackwidth,rechitrphipullMF);
02721 meErrxMFTrackwidthProfileCategory4RphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02722 }
02723 meTrackwidthRphiTEC[ilay]->Fill(rechitrphitrackwidth);
02724 meExpectedwidthRphiTEC[ilay]->Fill(rechitrphiexpectedwidth);
02725 meClusterwidthRphiTEC[ilay]->Fill(clusizrphi);
02726 meCategoryRphiTEC[ilay]->Fill(rechitrphicategory);
02727 meErrxMFTrackwidthProfileRphiTEC[ilay]->Fill(rechitrphitrackwidth,sqrt(rechitrphierrxMF));
02728 meErrxMFAngleProfileRphiTEC[ilay]->Fill(rechitrphitrackangle,sqrt(rechitrphierrxMF));
02729 }
02730 if(Tecisrechitsas!=0){
02731 if (rechitsasthickness > CutThickness)
02732 {
02733
02734
02735
02736
02737
02738 }
02739 meNstpSasTEC[ilay]->Fill(clusizsas);
02740 meAdcSasTEC[ilay]->Fill(cluchgsas);
02741 mePosxSasTEC[ilay]->Fill(rechitsasx);
02742 meErrxLFSasTEC[ilay]->Fill(sqrt(rechitsaserrxLF));
02743 meResLFSasTEC[ilay]->Fill(rechitsasresLF);
02744 mePullLFSasTEC[ilay]->Fill(rechitsaspullLF);
02745 meErrxMFSasTEC[ilay]->Fill(sqrt(rechitsaserrxMF));
02746 meResMFSasTEC[ilay]->Fill(rechitsasresMF);
02747 mePullMFSasTEC[ilay]->Fill(rechitsaspullMF);
02748 meTrackangleSasTEC[ilay]->Fill(rechitsastrackangle);
02749 mePullTrackangleProfileSasTEC[ilay]->Fill(rechitsastrackangle,rechitsaspullMF);
02750 mePullTrackwidthProfileSasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02751 if (rechitsascategory == 1) {
02752 mePullTrackwidthProfileCategory1SasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02753 meErrxMFTrackwidthProfileCategory1SasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02754 meErrxMFClusterwidthProfileCategory1SasTEC[ilay]->Fill(clusizsas,sqrt(rechitsaserrxMF));
02755 }
02756 if (rechitsascategory == 2) {
02757 mePullTrackwidthProfileCategory2SasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02758 meErrxMFTrackwidthProfileCategory2SasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02759 }
02760 if (rechitsascategory == 3) {
02761 mePullTrackwidthProfileCategory3SasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02762 meErrxMFTrackwidthProfileCategory3SasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02763 }
02764 if (rechitsascategory == 4) {
02765 mePullTrackwidthProfileCategory4SasTEC[ilay]->Fill(rechitsastrackwidth,rechitsaspullMF);
02766 meErrxMFTrackwidthProfileCategory4SasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02767 }
02768 meTrackwidthSasTEC[ilay]->Fill(rechitsastrackwidth);
02769 meExpectedwidthSasTEC[ilay]->Fill(rechitsasexpectedwidth);
02770 meClusterwidthSasTEC[ilay]->Fill(clusizsas);
02771 meCategorySasTEC[ilay]->Fill(rechitsascategory);
02772 meErrxMFTrackwidthProfileSasTEC[ilay]->Fill(rechitsastrackwidth,sqrt(rechitsaserrxMF));
02773 meErrxMFAngleProfileSasTEC[ilay]->Fill(rechitsastrackangle,rechitsaserrxMF);
02774 }
02775
02776 }
02777
02778 }
02779
02780
02781 }
02782
02783
02784 }
02785
02786
02787 }
02788
02789
02790
02791
02792 std::pair<LocalPoint,LocalVector> SiStripTrackingRecHitsValid::projectHit( const PSimHit& hit, const StripGeomDetUnit* stripDet, const BoundPlane& plane)
02793 {
02794
02795
02796
02797 const StripTopology& topol = stripDet->specificTopology();
02798 GlobalPoint globalpos= stripDet->surface().toGlobal(hit.localPosition());
02799 LocalPoint localHit = plane.toLocal(globalpos);
02800
02801 LocalVector locdir=hit.localDirection();
02802
02803
02804 GlobalVector globaldir= stripDet->surface().toGlobal(locdir);
02805 LocalVector dir=plane.toLocal(globaldir);
02806 float scale = -localHit.z() / dir.z();
02807
02808 LocalPoint projectedPos = localHit + scale*dir;
02809
02810
02811
02812 float selfAngle = topol.stripAngle( topol.strip( hit.localPosition()));
02813
02814 LocalVector stripDir( sin(selfAngle), cos(selfAngle), 0);
02815
02816 LocalVector localStripDir( plane.toLocal(stripDet->surface().toGlobal( stripDir)));
02817
02818 return std::pair<LocalPoint,LocalVector>( projectedPos, localStripDir);
02819 }