Skip to content

Commit

Permalink
Merge pull request #21123 from makortel/pixelBadModuleReader
Browse files Browse the repository at this point in the history
Add coordinate printout to SiPixelBadModuleReader
  • Loading branch information
cmsbuild committed Nov 2, 2017
2 parents 98c369e + 19f62fe commit c22b23e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CondTools/SiPixel/test/SiPixelBadModuleReader.cc
Expand Up @@ -16,6 +16,7 @@
#include "DataFormats/SiPixelDetId/interface/PixelBarrelName.h"
#include "DataFormats/SiPixelDetId/interface/PixelEndcapName.h"
#include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"


#include "TStyle.h"
Expand Down Expand Up @@ -52,6 +53,10 @@ void SiPixelBadModuleReader::analyze( const edm::Event& e, const edm::EventSetup
edm::ESHandle<TrackerGeometry> geom;
iSetup.get<TrackerDigiGeometryRecord>().get(geom);

edm::ESHandle<TrackerTopology> httopo;
iSetup.get<TrackerTopologyRcd>().get(httopo);
const TrackerTopology& ttopo = *httopo;


edm::Service<TFileService> fs;
_TH2F_dead_modules_BPIX_lay1 = fs->make<TH2F>("dead_modules_BPIX_lay1","Dead modules in BPIX Layer 1",112,-28.,28.,100,-3.2,3.2);
Expand Down Expand Up @@ -100,6 +105,11 @@ void SiPixelBadModuleReader::analyze( const edm::Event& e, const edm::EventSetup
debugout << n <<", ";
}
debugout << std::endl;
debugout << ttopo.print(badmodule.DetID) << std::endl;
const auto& plane = geom->idToDet(badmodule.DetID)->surface();
debugout << "phiSpan " << plane.phiSpan().first << "," << plane.phiSpan().second << std::endl;
debugout << "rSpan " << plane.rSpan().first << "," << plane.rSpan().second << std::endl;
debugout << "zSpan " << plane.zSpan().first << "," << plane.zSpan().second << std::endl;
debugout <<" "<<std::endl;
debugout <<" "<<std::endl; //to make the reading easier

Expand Down

0 comments on commit c22b23e

Please sign in to comment.