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");
101 tree->Branch(
"ladder", &ladder,
"ladder/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");
106 tree->Branch(
"offset", &offset,
"offset/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
145 offsetBPix_->Fill(offset);
147 slopeFPix_->Fill(slope);
148 offsetFPix_->Fill(offset);
static const std::string kSharedResource
const edm::ESGetToken< SiPixelVCal, SiPixelVCalRcd > siPixelVCalToken_
void analyze(const edm::Event &, const edm::EventSetup &) override
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
~SiPixelVCalReader() override
#define DEFINE_FWK_MODULE(type)
unsigned int pxfDisk(const DetId &id) const
static const double slope[3]
unsigned int pxbLadder(const DetId &id) const
T * make(const Args &...args) const
make new ROOT object
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
const std::map< unsigned int, VCal > & getSlopeAndOffset() const
constexpr std::array< uint8_t, layerIndexSize > layer
bool getData(T &iHolder) const
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tkTopoToken_
const edm::ESGetToken< SiPixelVCal, SiPixelVCalSimRcd > siPixelVCalSimToken_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Log< level::Warning, true > LogPrint
unsigned int pxbLayer(const DetId &id) const
Log< level::Info, false > LogInfo
unsigned int pxfSide(const DetId &id) const
int ringName() const
ring Id
SiPixelVCalReader(const edm::ParameterSet &)