65 printdebug_(iConfig.getUntrackedParameter<
bool>(
"printDebug",
false)),
66 useSimRcd_(iConfig.getParameter<
bool>(
"useSimRcd")) {
81 edm::LogInfo(
"SiPixelVCalReader") <<
"[SiPixelVCalReader::analyze] End Reading SiPixelVCal" << std::endl;
89 edm::LogPrint(
"SiPixelVCalReader") <<
" There are " << pDD->
detUnits().size() <<
" modules" << std::endl;
95 TTree*
tree =
new TTree(
"tree",
"tree");
98 tree->Branch(
"detid", &detid,
"detid/I");
99 tree->Branch(
"subdet", &subdet,
"subdet/I");
100 tree->Branch(
"layer", &
layer,
"layer/I");
102 tree->Branch(
"side", &side,
"side/I");
103 tree->Branch(
"disk", &disk,
"disk/I");
104 tree->Branch(
"ring", &
ring,
"ring/I");
105 tree->Branch(
"slope", &
slope,
"slope/D");
109 slopeBPix_ =
fs->make<TH1F>(
"VCalSlopeBarrelPixel",
"VCalSlopeBarrelPixel", 150, 0, 100);
110 slopeFPix_ =
fs->make<TH1F>(
"VCalSlopeForwardPixel",
"VCalSlopeForwardPixel", 150, 0, 100);
111 offsetBPix_ =
fs->make<TH1F>(
"VCalOffsetBarrelPixel",
"VCalOffsetBarrelPixel", 200, -900, 100);
112 offsetFPix_ =
fs->make<TH1F>(
"VCalOffsetForwardPixel",
"VCalOffsetForwardPixel", 200, -900, 100);
113 std::map<unsigned int, SiPixelVCal::VCal> vcal = siPixelVCal->
getSlopeAndOffset();
114 std::map<unsigned int, SiPixelVCal::VCal>::const_iterator it;
117 edm::LogPrint(
"SiPixelVCalReader") << std::setw(12) <<
"detid" << std::setw(8) <<
"subdet" << std::setw(8) <<
"layer" 118 << std::setw(8) <<
"disk" << std::setw(14) <<
"VCal slope" << std::setw(8)
119 <<
"offset" << std::endl;
120 for (it = vcal.begin(); it != vcal.end(); it++) {
122 slope = it->second.slope;
123 offset = it->second.offset;
124 const DetId detIdObj(detid);
129 side = tTopo->
pxfSide(detIdObj);
130 disk = tTopo->
pxfDisk(detIdObj);
132 edm::LogPrint(
"SiPixelVCalReader") << std::setw(12) << detid << std::setw(8) << subdet << std::setw(8) <<
layer 133 << std::setw(8) << disk << std::setw(14) <<
slope << std::setw(8) <<
offset static const std::string kSharedResource
const edm::ESGetToken< SiPixelVCal, SiPixelVCalRcd > siPixelVCalToken_
void analyze(const edm::Event &, const edm::EventSetup &) override
unsigned int pxbLayer(const DetId &id) const
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
int ringName() const
ring Id
~SiPixelVCalReader() override
static const double slope[3]
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
unsigned int pxbLadder(const DetId &id) const
constexpr std::array< uint8_t, layerIndexSize > layer
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tkTopoToken_
const edm::ESGetToken< SiPixelVCal, SiPixelVCalSimRcd > siPixelVCalSimToken_
unsigned int pxfDisk(const DetId &id) const
#define DEFINE_FWK_MODULE(type)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getData(T &iHolder) const
Log< level::Warning, true > LogPrint
Namespace of DDCMS conversion namespace.
Log< level::Info, false > LogInfo
unsigned int pxfSide(const DetId &id) const
const std::map< unsigned int, VCal > & getSlopeAndOffset() const
SiPixelVCalReader(const edm::ParameterSet &)