#include <Validation/TrackerRecHits/interface/SiPixelRecHitsValid.h>
Definition at line 50 of file SiPixelRecHitsValid.h.
SiPixelRecHitsValid::SiPixelRecHitsValid | ( | const edm::ParameterSet & | conf | ) |
Definition at line 37 of file SiPixelRecHitsValid.cc.
References clustChargeDisk1Plaquettes, clustChargeDisk2Plaquettes, clustChargeLayer1Modules, clustChargeLayer2Modules, clustChargeLayer3Modules, clustXSizeDisk1Plaquettes, clustXSizeDisk2Plaquettes, clustXSizeLayer, clustYSizeDisk1Plaquettes, clustYSizeDisk2Plaquettes, clustYSizeModule, dbe_, edm::ParameterSet::getUntrackedParameter(), histo, i, outputFile_, recHitXFullModules, recHitXHalfModules, recHitXPlaquetteSize1, recHitXPlaquetteSize2, recHitXPullAllB, recHitXPullAllF, recHitXPullDisk1Plaquettes, recHitXPullDisk2Plaquettes, recHitXPullFlippedLadderLayers, recHitXPullNonFlippedLadderLayers, recHitXResAllB, recHitXResAllF, recHitXResDisk1Plaquettes, recHitXResDisk2Plaquettes, recHitXResFlippedLadderLayers, recHitXResNonFlippedLadderLayers, recHitYAllModules, recHitYPlaquetteSize2, recHitYPlaquetteSize3, recHitYPlaquetteSize4, recHitYPlaquetteSize5, recHitYPullAllB, recHitYPullAllF, recHitYPullDisk1Plaquettes, recHitYPullDisk2Plaquettes, recHitYPullLayer1Modules, recHitYPullLayer2Modules, recHitYPullLayer3Modules, recHitYResAllB, recHitYResAllF, recHitYResDisk1Plaquettes, recHitYResDisk2Plaquettes, recHitYResLayer1Modules, recHitYResLayer2Modules, and recHitYResLayer3Modules.
00037 : 00038 dbe_(0), 00039 conf_(ps), 00040 src_( ps.getParameter<edm::InputTag>( "src" ) ) 00041 { 00042 outputFile_ = ps.getUntrackedParameter<string>("outputFile", "pixelrechitshisto.root"); 00043 dbe_ = Service<DQMStore>().operator->(); 00044 // dbe_->showDirStructure(); 00045 dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Pixel/clustBPIX"); 00046 00047 Char_t histo[200]; 00048 00049 // --------------------------------------------------------------- 00050 // All histograms that depend on plaquette number have 7 indexes. 00051 // The first 4 (0-3) correspond to Panel 1 plaquettes 1-4. 00052 // The last 3 (4-6) correspond to Panel 2 plaquettes 1-3. 00053 // --------------------------------------------------------------- 00054 00055 //Cluster y-size by module number for barrel 00056 for (int i=0; i<8; i++) { 00057 sprintf(histo, "Clust_y_size_Module%d", i+1); 00058 clustYSizeModule[i] = dbe_->book1D(histo,"Cluster y-size by Module", 20, 0.5, 20.5); 00059 } // end for 00060 00061 //Cluster x-size by layer for barrel 00062 for (int i=0; i<3; i++) { 00063 sprintf(histo, "Clust_x_size_Layer%d", i+1); 00064 clustXSizeLayer[i] = dbe_->book1D(histo,"Cluster x-size by Layer", 20, 0.5, 20.5); 00065 } // end for 00066 00067 //Cluster charge by module for 3 layers of barrel 00068 for (int i=0; i<8; i++) { 00069 //Cluster charge by module for Layer1 00070 sprintf(histo, "Clust_charge_Layer1_Module%d", i+1); 00071 clustChargeLayer1Modules[i] = dbe_->book1D(histo, "Cluster charge Layer 1 by Module", 50, 0., 200000.); 00072 00073 //Cluster charge by module for Layer2 00074 sprintf(histo, "Clust_charge_Layer2_Module%d", i+1); 00075 clustChargeLayer2Modules[i] = dbe_->book1D(histo, "Cluster charge Layer 2 by Module", 50, 0., 200000.); 00076 00077 //Cluster charge by module for Layer3 00078 sprintf(histo, "Clust_charge_Layer3_Module%d", i+1); 00079 clustChargeLayer3Modules[i] = dbe_->book1D(histo, "Cluster charge Layer 3 by Module",50, 0., 200000.); 00080 } // end for 00081 00082 dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Pixel/clustFPIX"); 00083 //Cluster x-size, y-size, and charge by plaquette for Disks in Forward 00084 for (int i=0; i<7; i++) { 00085 //Cluster x-size for Disk1 by Plaquette 00086 sprintf(histo, "Clust_x_size_Disk1_Plaquette%d", i+1); 00087 clustXSizeDisk1Plaquettes[i] = dbe_->book1D(histo, "Cluster X-size for Disk1 by Plaquette", 20, 0.5, 20.5); 00088 00089 //Cluster x-size for Disk2 by Plaquette 00090 sprintf(histo, "Clust_x_size_Disk2_Plaquette%d", i+1); 00091 clustXSizeDisk2Plaquettes[i] = dbe_->book1D(histo, "Cluster X-size for Disk2 by Plaquette", 20, 0.5, 20.5); 00092 00093 //Cluster y-size for Disk1 by Plaquette 00094 sprintf(histo, "Clust_y_size_Disk1_Plaquette%d", i+1); 00095 clustYSizeDisk1Plaquettes[i] = dbe_->book1D(histo, "Cluster Y-size for Disk1 by Plaquette", 20, 0.5, 20.5); 00096 00097 //Cluster y-size for Disk2 by Plaquette 00098 sprintf(histo, "Clust_y_size_Disk2_Plaquette%d", i+1); 00099 clustYSizeDisk2Plaquettes[i] = dbe_->book1D(histo, "Cluster Y-size for Disk2 by Plaquette", 20, 0.5, 20.5); 00100 00101 //Cluster charge for Disk1 by Plaquette 00102 sprintf(histo, "Clust_charge_Disk1_Plaquette%d", i+1); 00103 clustChargeDisk1Plaquettes[i] = dbe_->book1D(histo, "Cluster charge for Disk1 by Plaquette", 50, 0., 200000.); 00104 00105 //Cluster charge for Disk2 by Plaquette 00106 sprintf(histo, "Clust_charge_Disk2_Plaquette%d", i+1); 00107 clustChargeDisk2Plaquettes[i] = dbe_->book1D(histo, "Cluster charge for Disk2 by Plaquette", 50, 0., 200000.); 00108 } // end for 00109 00110 00111 00112 dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Pixel/recHitBPIX"); 00113 //RecHit X Resolution all barrel hits 00114 recHitXResAllB = dbe_->book1D("RecHit_xres_b_All","RecHit X Res All Modules in Barrel", 100, -200., 200.); 00115 00116 //RecHit Y Resolution all barrel hits 00117 recHitYResAllB = dbe_->book1D("RecHit_yres_b_All","RecHit Y Res All Modules in Barrel", 100, -200., 200.); 00118 00119 //RecHit X distribution for full modules for barrel 00120 recHitXFullModules = dbe_->book1D("RecHit_x_FullModules", "RecHit X distribution for full modules", 100,-2., 2.); 00121 00122 //RecHit X distribution for half modules for barrel 00123 recHitXHalfModules = dbe_->book1D("RecHit_x_HalfModules", "RecHit X distribution for half modules", 100, -1., 1.); 00124 00125 //RecHit Y distribution all modules for barrel 00126 recHitYAllModules = dbe_->book1D("RecHit_y_AllModules", "RecHit Y distribution for all modules", 100, -4., 4.); 00127 00128 //RecHit X resolution for flipped and unflipped ladders by layer for barrel 00129 for (int i=0; i<3; i++) { 00130 //RecHit X resolution for flipped ladders by layer 00131 sprintf(histo, "RecHit_XRes_FlippedLadder_Layer%d", i+1); 00132 recHitXResFlippedLadderLayers[i] = dbe_->book1D(histo, "RecHit XRes Flipped Ladders by Layer", 100, -200., 200.); 00133 00134 //RecHit X resolution for unflipped ladders by layer 00135 sprintf(histo, "RecHit_XRes_UnFlippedLadder_Layer%d", i+1); 00136 recHitXResNonFlippedLadderLayers[i] = dbe_->book1D(histo, "RecHit XRes NonFlipped Ladders by Layer", 100, -200., 200.); 00137 } // end for 00138 00139 //RecHit Y resolutions for layers by module for barrel 00140 for (int i=0; i<8; i++) { 00141 //Rec Hit Y resolution by module for Layer1 00142 sprintf(histo, "RecHit_YRes_Layer1_Module%d", i+1); 00143 recHitYResLayer1Modules[i] = dbe_->book1D(histo, "RecHit YRes Layer1 by module", 100, -200., 200.); 00144 00145 //RecHit Y resolution by module for Layer2 00146 sprintf(histo, "RecHit_YRes_Layer2_Module%d", i+1); 00147 recHitYResLayer2Modules[i] = dbe_->book1D(histo, "RecHit YRes Layer2 by module", 100, -200., 200.); 00148 00149 //RecHit Y resolution by module for Layer3 00150 sprintf(histo, "RecHit_YRes_Layer3_Module%d", i+1); 00151 recHitYResLayer3Modules[i] = dbe_->book1D(histo, "RecHit YRes Layer3 by module", 100, -200., 200.); 00152 } // end for 00153 00154 dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Pixel/recHitFPIX"); 00155 //RecHit X resolution all plaquettes 00156 recHitXResAllF = dbe_->book1D("RecHit_xres_f_All", "RecHit X Res All in Forward", 100, -200., 200.); 00157 00158 //RecHit Y resolution all plaquettes 00159 recHitYResAllF = dbe_->book1D("RecHit_yres_f_All", "RecHit Y Res All in Forward", 100, -200., 200.); 00160 00161 //RecHit X distribution for plaquette with x-size 1 in forward 00162 recHitXPlaquetteSize1 = dbe_->book1D("RecHit_x_Plaquette_xsize1", "RecHit X Distribution for plaquette x-size1", 100, -2., 2.); 00163 00164 //RecHit X distribution for plaquette with x-size 2 in forward 00165 recHitXPlaquetteSize2 = dbe_->book1D("RecHit_x_Plaquette_xsize2", "RecHit X Distribution for plaquette x-size2", 100, -2., 2.); 00166 00167 //RecHit Y distribution for plaquette with y-size 2 in forward 00168 recHitYPlaquetteSize2 = dbe_->book1D("RecHit_y_Plaquette_ysize2", "RecHit Y Distribution for plaquette y-size2", 100, -4., 4.); 00169 00170 //RecHit Y distribution for plaquette with y-size 3 in forward 00171 recHitYPlaquetteSize3 = dbe_->book1D("RecHit_y_Plaquette_ysize3", "RecHit Y Distribution for plaquette y-size3", 100, -4., 4.); 00172 00173 //RecHit Y distribution for plaquette with y-size 4 in forward 00174 recHitYPlaquetteSize4 = dbe_->book1D("RecHit_y_Plaquette_ysize4", "RecHit Y Distribution for plaquette y-size4", 100, -4., 4.); 00175 00176 //RecHit Y distribution for plaquette with y-size 5 in forward 00177 recHitYPlaquetteSize5 = dbe_->book1D("RecHit_y_Plaquette_ysize5", "RecHit Y Distribution for plaquette y-size5", 100, -4., 4.); 00178 00179 //X and Y resolutions for both disks by plaquette in forward 00180 for (int i=0; i<7; i++) { 00181 //X resolution for Disk1 by plaquette 00182 sprintf(histo, "RecHit_XRes_Disk1_Plaquette%d", i+1); 00183 recHitXResDisk1Plaquettes[i] = dbe_->book1D(histo, "RecHit XRes Disk1 by plaquette", 100, -200., 200.); 00184 //X resolution for Disk2 by plaquette 00185 sprintf(histo, "RecHit_XRes_Disk2_Plaquette%d", i+1); 00186 recHitXResDisk2Plaquettes[i] = dbe_->book1D(histo, "RecHit XRes Disk2 by plaquette", 100, -200., 200.); 00187 00188 //Y resolution for Disk1 by plaquette 00189 sprintf(histo, "RecHit_YRes_Disk1_Plaquette%d", i+1); 00190 recHitYResDisk1Plaquettes[i] = dbe_->book1D(histo, "RecHit YRes Disk1 by plaquette", 100, -200., 200.); 00191 //Y resolution for Disk2 by plaquette 00192 sprintf(histo, "RecHit_YRes_Disk2_Plaquette%d", i+1); 00193 recHitYResDisk2Plaquettes[i] = dbe_->book1D(histo, "RecHit YRes Disk2 by plaquette", 100, -200., 200.); 00194 00195 } 00196 00197 00198 dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Pixel/recHitPullsBPIX"); 00199 recHitXPullAllB = dbe_->book1D("RecHit_xres_b_All" , "RecHit X Pull All Modules in Barrel" , 100, -10.0, 10.0); 00200 recHitYPullAllB = dbe_->book1D("RecHit_yres_b_All" , "RecHit Y Pull All Modules in Barrel" , 100, -10.0, 10.0); 00201 00202 for (int i=0; i<3; i++) 00203 { 00204 sprintf(histo, "RecHit_XPull_FlippedLadder_Layer%d", i+1); 00205 recHitXPullFlippedLadderLayers[i] = dbe_->book1D(histo, "RecHit XPull Flipped Ladders by Layer", 100, -10.0, 10.0); 00206 00207 sprintf(histo, "RecHit_XPull_UnFlippedLadder_Layer%d", i+1); 00208 recHitXPullNonFlippedLadderLayers[i] = dbe_->book1D(histo, "RecHit XPull NonFlipped Ladders by Layer", 100, -10.0, 10.0); 00209 } 00210 00211 for (int i=0; i<8; i++) 00212 { 00213 sprintf(histo, "RecHit_YPull_Layer1_Module%d", i+1); 00214 recHitYPullLayer1Modules[i] = dbe_->book1D(histo, "RecHit YPull Layer1 by module", 100, -10.0, 10.0); 00215 00216 sprintf(histo, "RecHit_YPull_Layer2_Module%d", i+1); 00217 recHitYPullLayer2Modules[i] = dbe_->book1D(histo, "RecHit YPull Layer2 by module", 100, -10.0, 10.0); 00218 00219 sprintf(histo, "RecHit_YPull_Layer3_Module%d", i+1); 00220 recHitYPullLayer3Modules[i] = dbe_->book1D(histo, "RecHit YPull Layer3 by module", 100, -10.0, 10.0); 00221 } 00222 00223 dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Pixel/recHitPullsFPIX"); 00224 recHitXPullAllF = dbe_->book1D("RecHit_XPull_f_All", "RecHit X Pull All in Forward", 100, -10.0, 10.0); 00225 00226 recHitYPullAllF = dbe_->book1D("RecHit_YPull_f_All", "RecHit Y Pull All in Forward", 100, -10.0, 10.0); 00227 00228 for (int i=0; i<7; i++) 00229 { 00230 sprintf(histo, "RecHit_XPull_Disk1_Plaquette%d", i+1); 00231 recHitXPullDisk1Plaquettes[i] = dbe_->book1D(histo, "RecHit XPull Disk1 by plaquette", 100, -10.0, 10.0); 00232 sprintf(histo, "RecHit_XPull_Disk2_Plaquette%d", i+1); 00233 recHitXPullDisk2Plaquettes[i] = dbe_->book1D(histo, "RecHit XPull Disk2 by plaquette", 100, -10.0, 10.0); 00234 00235 sprintf(histo, "RecHit_YPull_Disk1_Plaquette%d", i+1); 00236 recHitYPullDisk1Plaquettes[i] = dbe_->book1D(histo, "RecHit YPull Disk1 by plaquette", 100, -10.0, 10.0); 00237 00238 sprintf(histo, "RecHit_YPull_Disk2_Plaquette%d", i+1); 00239 recHitYPullDisk2Plaquettes[i] = dbe_->book1D(histo, "RecHit YPull Disk2 by plaquette", 100, -10.0, 10.0); 00240 } 00241 00242 }
SiPixelRecHitsValid::~SiPixelRecHitsValid | ( | ) |
void SiPixelRecHitsValid::analyze | ( | const edm::Event & | e, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
Implements edm::EDAnalyzer.
Definition at line 255 of file SiPixelRecHitsValid.cc.
References TrackerHitAssociator::associateHit(), conf_, GenMuonPlsPt100GeV_cfg::cout, detId, dist(), lat::endl(), edm::EventID::event(), fillBarrel(), fillForward(), edm::EventSetup::get(), edm::Event::getByLabel(), edm::Event::id(), TrackerGeometry::idToDet(), it, lp, m, edm::Handle< T >::product(), edm::EventID::run(), funct::sqrt(), src_, DetId::subdetId(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().
00256 { 00257 00258 LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " << e.id().event(); 00259 if ( (int) e.id().event() % 1000 == 0 ) 00260 cout << " Run = " << e.id().run() << " Event = " << e.id().event() << endl; 00261 00262 //Get RecHits 00263 edm::Handle<SiPixelRecHitCollection> recHitColl; 00264 e.getByLabel( src_, recHitColl); 00265 00266 //Get event setup 00267 edm::ESHandle<TrackerGeometry> geom; 00268 es.get<TrackerDigiGeometryRecord>().get(geom); 00269 const TrackerGeometry& theTracker(*geom); 00270 00271 TrackerHitAssociator associate( e, conf_ ); 00272 00273 //iterate over detunits 00274 for (TrackerGeometry::DetContainer::const_iterator it = geom->dets().begin(); it != geom->dets().end(); it++) 00275 { 00276 DetId detId = ((*it)->geographicalId()); 00277 unsigned int subid=detId.subdetId(); 00278 00279 if (! ((subid==1) || (subid==2))) continue; 00280 00281 const PixelGeomDetUnit * theGeomDet = dynamic_cast<const PixelGeomDetUnit*>(theTracker.idToDet(detId) ); 00282 00283 SiPixelRecHitCollection::range pixelrechitRange = (recHitColl.product())->get(detId); 00284 SiPixelRecHitCollection::const_iterator pixelrechitRangeIteratorBegin = pixelrechitRange.first; 00285 SiPixelRecHitCollection::const_iterator pixelrechitRangeIteratorEnd = pixelrechitRange.second; 00286 SiPixelRecHitCollection::const_iterator pixeliter = pixelrechitRangeIteratorBegin; 00287 std::vector<PSimHit> matched; 00288 00289 //----Loop over rechits for this detId 00290 for ( ; pixeliter != pixelrechitRangeIteratorEnd; pixeliter++) 00291 { 00292 matched.clear(); 00293 matched = associate.associateHit(*pixeliter); 00294 00295 if ( !matched.empty() ) 00296 { 00297 float closest = 9999.9; 00298 std::vector<PSimHit>::const_iterator closestit = matched.begin(); 00299 LocalPoint lp = pixeliter->localPosition(); 00300 float rechit_x = lp.x(); 00301 float rechit_y = lp.y(); 00302 00303 //loop over sim hits and fill closet 00304 for (std::vector<PSimHit>::const_iterator m = matched.begin(); m<matched.end(); m++) 00305 { 00306 float sim_x1 = (*m).entryPoint().x(); 00307 float sim_x2 = (*m).exitPoint().x(); 00308 float sim_xpos = 0.5*(sim_x1+sim_x2); 00309 00310 float sim_y1 = (*m).entryPoint().y(); 00311 float sim_y2 = (*m).exitPoint().y(); 00312 float sim_ypos = 0.5*(sim_y1+sim_y2); 00313 00314 float x_res = fabs(sim_xpos - rechit_x); 00315 float y_res = fabs(sim_ypos - rechit_y); 00316 00317 float dist = sqrt(x_res*x_res + y_res*y_res); 00318 00319 if ( dist < closest ) 00320 { 00321 closest = x_res; 00322 closestit = m; 00323 } 00324 } // end sim hit loop 00325 00326 if (subid==1) 00327 { //<----------barrel 00328 fillBarrel(*pixeliter, *closestit, detId, theGeomDet); 00329 } // end barrel 00330 if (subid==2) 00331 { // <-------forward 00332 fillForward(*pixeliter, *closestit, detId, theGeomDet); 00333 } 00334 00335 } // end matched emtpy 00336 } // <-----end rechit loop 00337 } // <------ end detunit loop 00338 }
void SiPixelRecHitsValid::beginJob | ( | const edm::EventSetup & | c | ) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 251 of file SiPixelRecHitsValid.cc.
References dbe_, outputFile_, and DQMStore::save().
00251 { 00252 if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_); 00253 }
void SiPixelRecHitsValid::fillBarrel | ( | const SiPixelRecHit & | recHit, | |
const PSimHit & | simHit, | |||
DetId | detId, | |||
const PixelGeomDetUnit * | theGeomDet | |||
) | [private] |
Definition at line 340 of file SiPixelRecHitsValid.cc.
References clustChargeLayer1Modules, clustChargeLayer2Modules, clustChargeLayer3Modules, SiPixelRecHit::cluster(), clustXSizeLayer, clustYSizeModule, PSimHit::entryPoint(), PSimHit::exitPoint(), MonitorElement::Fill(), i, BaseSiTrackerRecHit2DLocalPos::localPosition(), BaseSiTrackerRecHit2DLocalPos::localPositionError(), lp, module(), PixelTopology::nrows(), PV3DBase< T, PVType, FrameType >::perp(), PXBDetId::PXBDetId(), recHitXFullModules, recHitXHalfModules, recHitXPullAllB, recHitXPullFlippedLadderLayers, recHitXPullNonFlippedLadderLayers, recHitXResAllB, recHitXResFlippedLadderLayers, recHitXResNonFlippedLadderLayers, recHitYAllModules, recHitYPullAllB, recHitYPullLayer1Modules, recHitYPullLayer2Modules, recHitYPullLayer3Modules, recHitYResAllB, recHitYResLayer1Modules, recHitYResLayer2Modules, recHitYResLayer3Modules, rows, PixelGeomDetUnit::specificTopology(), funct::sqrt(), GeomDet::surface(), tmp1, tmp2, Surface::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().
Referenced by analyze().
00342 { 00343 const float cmtomicron = 10000.0; 00344 00345 LocalPoint lp = recHit.localPosition(); 00346 float lp_y = lp.y(); 00347 float lp_x = lp.x(); 00348 00349 LocalError lerr = recHit.localPositionError(); 00350 float lerr_x = sqrt(lerr.xx()); 00351 float lerr_y = sqrt(lerr.yy()); 00352 00353 recHitYAllModules->Fill(lp_y); 00354 00355 float sim_x1 = simHit.entryPoint().x(); 00356 float sim_x2 = simHit.exitPoint().x(); 00357 float sim_xpos = 0.5*(sim_x1 + sim_x2); 00358 float res_x = (lp.x() - sim_xpos)*cmtomicron; 00359 00360 recHitXResAllB->Fill(res_x); 00361 00362 float sim_y1 = simHit.entryPoint().y(); 00363 float sim_y2 = simHit.exitPoint().y(); 00364 float sim_ypos = 0.5*(sim_y1 + sim_y2); 00365 float res_y = (lp.y() - sim_ypos)*cmtomicron; 00366 00367 recHitYResAllB->Fill(res_y); 00368 00369 float pull_x = ( lp_x - sim_xpos ) / lerr_x; 00370 float pull_y = ( lp_y - sim_ypos ) / lerr_y; 00371 00372 recHitXPullAllB->Fill(pull_x); 00373 recHitYPullAllB->Fill(pull_y); 00374 00375 int rows = theGeomDet->specificTopology().nrows(); 00376 00377 if (rows == 160) 00378 { 00379 recHitXFullModules->Fill(lp_x); 00380 } 00381 else if (rows == 80) 00382 { 00383 recHitXHalfModules->Fill(lp_x); 00384 } 00385 00386 float tmp1 = theGeomDet->surface().toGlobal(Local3DPoint(0.,0.,0.)).perp(); 00387 float tmp2 = theGeomDet->surface().toGlobal(Local3DPoint(0.,0.,1.)).perp(); 00388 00389 if (tmp2<tmp1) 00390 { // flipped 00391 for (unsigned int i=0; i<3; i++) 00392 { 00393 if (PXBDetId::PXBDetId(detId).layer() == i+1) 00394 { 00395 recHitXResFlippedLadderLayers[i]->Fill(res_x); 00396 recHitXPullFlippedLadderLayers[i]->Fill(pull_x); 00397 } 00398 } 00399 } 00400 else 00401 { 00402 for (unsigned int i=0; i<3; i++) 00403 { 00404 if (PXBDetId::PXBDetId(detId).layer() == i+1) 00405 { 00406 recHitXResNonFlippedLadderLayers[i]->Fill(res_x); 00407 recHitXPullNonFlippedLadderLayers[i]->Fill(pull_x); 00408 } 00409 } 00410 } 00411 00412 //get cluster 00413 SiPixelRecHit::ClusterRef const& clust = recHit.cluster(); 00414 00415 // fill module dependent info 00416 for (unsigned int i=0; i<8; i++) 00417 { 00418 if (PXBDetId::PXBDetId(detId).module() == i+1) 00419 { 00420 int sizeY = (*clust).sizeY(); 00421 clustYSizeModule[i]->Fill(sizeY); 00422 00423 if (PXBDetId::PXBDetId(detId).layer() == 1) 00424 { 00425 float charge = (*clust).charge(); 00426 clustChargeLayer1Modules[i]->Fill(charge); 00427 recHitYResLayer1Modules[i]->Fill(res_y); 00428 recHitYPullLayer1Modules[i]->Fill(pull_y); 00429 } 00430 else if (PXBDetId::PXBDetId(detId).layer() == 2) 00431 { 00432 float charge = (*clust).charge(); 00433 clustChargeLayer2Modules[i]->Fill(charge); 00434 recHitYResLayer2Modules[i]->Fill(res_y); 00435 recHitYPullLayer2Modules[i]->Fill(pull_y); 00436 } 00437 else if (PXBDetId::PXBDetId(detId).layer() == 3) 00438 { 00439 float charge = (*clust).charge(); 00440 clustChargeLayer3Modules[i]->Fill(charge); 00441 recHitYResLayer3Modules[i]->Fill(res_y); 00442 recHitYPullLayer3Modules[i]->Fill(pull_y); 00443 } 00444 } 00445 } 00446 int sizeX = (*clust).sizeX(); 00447 if (PXBDetId::PXBDetId(detId).layer() == 1) clustXSizeLayer[0]->Fill(sizeX); 00448 if (PXBDetId::PXBDetId(detId).layer() == 2) clustXSizeLayer[1]->Fill(sizeX); 00449 if (PXBDetId::PXBDetId(detId).layer() == 3) clustXSizeLayer[2]->Fill(sizeX); 00450 }
void SiPixelRecHitsValid::fillForward | ( | const SiPixelRecHit & | recHit, | |
const PSimHit & | simHit, | |||
DetId | detId, | |||
const PixelGeomDetUnit * | theGeomDet | |||
) | [private] |
Definition at line 452 of file SiPixelRecHitsValid.cc.
References clustChargeDisk1Plaquettes, clustChargeDisk2Plaquettes, SiPixelRecHit::cluster(), clustXSizeDisk1Plaquettes, clustXSizeDisk2Plaquettes, clustYSizeDisk1Plaquettes, clustYSizeDisk2Plaquettes, cols, muonGeometry::disk, PSimHit::entryPoint(), PSimHit::exitPoint(), MonitorElement::Fill(), i, BaseSiTrackerRecHit2DLocalPos::localPosition(), BaseSiTrackerRecHit2DLocalPos::localPositionError(), lp, module(), PixelTopology::ncolumns(), PixelTopology::nrows(), PXFDetId::PXFDetId(), recHitXPlaquetteSize1, recHitXPlaquetteSize2, recHitXPullAllF, recHitXPullDisk1Plaquettes, recHitXPullDisk2Plaquettes, recHitXResAllF, recHitXResDisk1Plaquettes, recHitXResDisk2Plaquettes, recHitYPlaquetteSize2, recHitYPlaquetteSize3, recHitYPlaquetteSize4, recHitYPlaquetteSize5, recHitYPullAllF, recHitYPullDisk1Plaquettes, recHitYPullDisk2Plaquettes, recHitYResDisk1Plaquettes, recHitYResDisk2Plaquettes, rows, PixelGeomDetUnit::specificTopology(), funct::sqrt(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().
Referenced by analyze().
00454 { 00455 int rows = theGeomDet->specificTopology().nrows(); 00456 int cols = theGeomDet->specificTopology().ncolumns(); 00457 00458 const float cmtomicron = 10000.0; 00459 00460 LocalPoint lp = recHit.localPosition(); 00461 float lp_x = lp.x(); 00462 float lp_y = lp.y(); 00463 00464 LocalError lerr = recHit.localPositionError(); 00465 float lerr_x = sqrt(lerr.xx()); 00466 float lerr_y = sqrt(lerr.yy()); 00467 00468 float sim_x1 = simHit.entryPoint().x(); 00469 float sim_x2 = simHit.exitPoint().x(); 00470 float sim_xpos = 0.5*(sim_x1 + sim_x2); 00471 00472 float sim_y1 = simHit.entryPoint().y(); 00473 float sim_y2 = simHit.exitPoint().y(); 00474 float sim_ypos = 0.5*(sim_y1 + sim_y2); 00475 00476 float pull_x = ( lp_x - sim_xpos ) / lerr_x; 00477 float pull_y = ( lp_y - sim_ypos ) / lerr_y; 00478 00479 00480 if (rows == 80) 00481 { 00482 recHitXPlaquetteSize1->Fill(lp_x); 00483 } 00484 else if (rows == 160) 00485 { 00486 recHitXPlaquetteSize2->Fill(lp_x); 00487 } 00488 00489 if (cols == 104) 00490 { 00491 recHitYPlaquetteSize2->Fill(lp_y); 00492 } 00493 else if (cols == 156) 00494 { 00495 recHitYPlaquetteSize3->Fill(lp_y); 00496 } 00497 else if (cols == 208) 00498 { 00499 recHitYPlaquetteSize4->Fill(lp_y); 00500 } 00501 else if (cols == 260) 00502 { 00503 recHitYPlaquetteSize5->Fill(lp_y); 00504 } 00505 00506 float res_x = (lp.x() - sim_xpos)*cmtomicron; 00507 00508 recHitXResAllF->Fill(res_x); 00509 recHitXPullAllF->Fill(pull_x); 00510 00511 float res_y = (lp.y() - sim_ypos)*cmtomicron; 00512 00513 recHitYPullAllF->Fill(pull_y); 00514 00515 // get cluster 00516 SiPixelRecHit::ClusterRef const& clust = recHit.cluster(); 00517 00518 // fill plaquette dependent info 00519 for (unsigned int i=0; i<7; i++) 00520 { 00521 if (PXFDetId::PXFDetId(detId).module() == i+1) 00522 { 00523 if (PXFDetId::PXFDetId(detId).disk() == 1) 00524 { 00525 int sizeX = (*clust).sizeX(); 00526 clustXSizeDisk1Plaquettes[i]->Fill(sizeX); 00527 00528 int sizeY = (*clust).sizeY(); 00529 clustYSizeDisk1Plaquettes[i]->Fill(sizeY); 00530 00531 float charge = (*clust).charge(); 00532 clustChargeDisk1Plaquettes[i]->Fill(charge); 00533 00534 recHitXResDisk1Plaquettes[i]->Fill(res_x); 00535 recHitYResDisk1Plaquettes[i]->Fill(res_y); 00536 00537 recHitXPullDisk1Plaquettes[i]->Fill(pull_x); 00538 recHitYPullDisk1Plaquettes[i]->Fill(pull_y); 00539 } 00540 else 00541 { 00542 int sizeX = (*clust).sizeX(); 00543 clustXSizeDisk2Plaquettes[i]->Fill(sizeX); 00544 00545 int sizeY = (*clust).sizeY(); 00546 clustYSizeDisk2Plaquettes[i]->Fill(sizeY); 00547 00548 float charge = (*clust).charge(); 00549 clustChargeDisk2Plaquettes[i]->Fill(charge); 00550 00551 recHitXResDisk2Plaquettes[i]->Fill(res_x); 00552 recHitYResDisk2Plaquettes[i]->Fill(res_y); 00553 00554 recHitXPullDisk2Plaquettes[i]->Fill(pull_x); 00555 recHitYPullDisk2Plaquettes[i]->Fill(pull_y); 00556 00557 } // end else 00558 } // end if module 00559 else if (PXFDetId(detId).panel() == 2 && (PXFDetId(detId).module()+4) == i+1) 00560 { 00561 if (PXFDetId::PXFDetId(detId).disk() == 1) 00562 { 00563 int sizeX = (*clust).sizeX(); 00564 clustXSizeDisk1Plaquettes[i]->Fill(sizeX); 00565 00566 int sizeY = (*clust).sizeY(); 00567 clustYSizeDisk1Plaquettes[i]->Fill(sizeY); 00568 00569 float charge = (*clust).charge(); 00570 clustChargeDisk1Plaquettes[i]->Fill(charge); 00571 00572 recHitXResDisk1Plaquettes[i]->Fill(res_x); 00573 recHitYResDisk1Plaquettes[i]->Fill(res_y); 00574 00575 recHitXPullDisk1Plaquettes[i]->Fill(pull_x); 00576 recHitYPullDisk1Plaquettes[i]->Fill(pull_y); 00577 } 00578 else 00579 { 00580 int sizeX = (*clust).sizeX(); 00581 clustXSizeDisk2Plaquettes[i]->Fill(sizeX); 00582 00583 int sizeY = (*clust).sizeY(); 00584 clustYSizeDisk2Plaquettes[i]->Fill(sizeY); 00585 00586 float charge = (*clust).charge(); 00587 clustChargeDisk2Plaquettes[i]->Fill(charge); 00588 00589 recHitXResDisk2Plaquettes[i]->Fill(res_x); 00590 recHitYResDisk2Plaquettes[i]->Fill(res_y); 00591 00592 recHitXPullDisk2Plaquettes[i]->Fill(pull_x); 00593 recHitYPullDisk2Plaquettes[i]->Fill(pull_y); 00594 00595 } // end else 00596 } // end else 00597 } // end for 00598 }
Definition at line 86 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
Definition at line 87 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::clustChargeLayer1Modules[8] [private] |
Definition at line 77 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::clustChargeLayer2Modules[8] [private] |
Definition at line 78 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::clustChargeLayer3Modules[8] [private] |
Definition at line 79 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::clustXSizeDisk1Plaquettes[7] [private] |
Definition at line 82 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::clustXSizeDisk2Plaquettes[7] [private] |
Definition at line 83 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::clustXSizeLayer[3] [private] |
Definition at line 76 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::clustYSizeDisk1Plaquettes[7] [private] |
Definition at line 84 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::clustYSizeDisk2Plaquettes[7] [private] |
Definition at line 85 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::clustYSizeModule[8] [private] |
Definition at line 75 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
edm::ParameterSet SiPixelRecHitsValid::conf_ [private] |
DQMStore* SiPixelRecHitsValid::dbe_ [private] |
Definition at line 66 of file SiPixelRecHitsValid.h.
Referenced by endJob(), and SiPixelRecHitsValid().
std::string SiPixelRecHitsValid::outputFile_ [private] |
Definition at line 67 of file SiPixelRecHitsValid.h.
Referenced by endJob(), and SiPixelRecHitsValid().
Definition at line 92 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
Definition at line 93 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
Definition at line 104 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
Definition at line 105 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
Definition at line 117 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
Definition at line 127 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
Definition at line 130 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
Definition at line 131 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
Definition at line 120 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
Definition at line 121 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
Definition at line 90 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
Definition at line 102 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::recHitXResDisk1Plaquettes[7] [private] |
Definition at line 110 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::recHitXResDisk2Plaquettes[7] [private] |
Definition at line 111 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
Definition at line 95 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
Definition at line 96 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
Definition at line 94 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
Definition at line 106 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
Definition at line 107 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
Definition at line 108 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
Definition at line 109 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
Definition at line 118 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
Definition at line 128 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
Definition at line 132 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
Definition at line 133 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::recHitYPullLayer1Modules[8] [private] |
Definition at line 122 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::recHitYPullLayer2Modules[8] [private] |
Definition at line 123 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::recHitYPullLayer3Modules[8] [private] |
Definition at line 124 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
Definition at line 91 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::recHitYResDisk1Plaquettes[7] [private] |
Definition at line 112 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::recHitYResDisk2Plaquettes[7] [private] |
Definition at line 113 of file SiPixelRecHitsValid.h.
Referenced by fillForward(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::recHitYResLayer1Modules[8] [private] |
Definition at line 97 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::recHitYResLayer2Modules[8] [private] |
Definition at line 98 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
MonitorElement* SiPixelRecHitsValid::recHitYResLayer3Modules[8] [private] |
Definition at line 99 of file SiPixelRecHitsValid.h.
Referenced by fillBarrel(), and SiPixelRecHitsValid().
edm::InputTag SiPixelRecHitsValid::src_ [private] |