83 : conf_(conf), tkGeomToken_(
esConsumes()), SiPixelGainCalibrationService_(conf, consumesCollector()) {
94 unsigned int nmodules = 0;
95 uint32_t nchannels = 0;
101 edm::LogInfo(
"SiPixelCondObjReader") <<
"[SiPixelCondObjReader::beginJob] End Reading CondObjects" << std::endl;
105 edm::LogInfo(
"SiPixelCondObjReader") <<
" There are " << tkgeom->
dets().size() <<
" detectors" << std::endl;
112 "Summary_dead",
"Dead pixel fraction (0=dead, 1=alive)", vdetId_.size() + 1, 0, vdetId_.size() + 1);
114 "Dead pixel fraction (0=dead, 1=alive)",
119 "Summary_noisy",
"Noisy pixel fraction (0=noisy, 1=alive)", vdetId_.size() + 1, 0, vdetId_.size() + 1);
121 "Noisy pixel fraction (0=noisy, 1=alive)",
125 _TH1F_Gains_sum =
fs->make<TH1F>(
"Summary_Gain",
"Gain Summary", vdetId_.size() + 1, 0, vdetId_.size() + 1);
127 fs->make<TH1F>(
"Summary_Pedestal",
"Pedestal Summary", vdetId_.size() + 1, 0, vdetId_.size() + 1);
135 TTree *
tree =
new TTree(
"tree",
"tree");
137 double gainmeanfortree, gainrmsfortree, pedmeanfortree, pedrmsfortree;
138 tree->Branch(
"detid", &detid,
"detid/I");
139 tree->Branch(
"ped_mean", &pedmeanfortree,
"ped_mean/D");
140 tree->Branch(
"ped_rms", &pedrmsfortree,
"ped_rms/D");
141 tree->Branch(
"gain_mean", &gainmeanfortree,
"gain_mean/D");
142 tree->Branch(
"gain_rms", &gainrmsfortree,
"gain_rms/D");
146 for (std::vector<uint32_t>::const_iterator detid_iter = vdetId_.begin(); detid_iter != vdetId_.end();
150 sprintf(
name,
"Pedestals_%d", detid);
152 sprintf(
name,
"Gains_%d", detid);
155 DetId detIdObject(detid);
158 if (_PixelGeomDetUnit ==
nullptr) {
159 edm::LogError(
"SiPixelCondObjDisplay") <<
"[SiPixelCondObjReader::beginJob] the detID " << detid
160 <<
" doesn't seem to belong to Tracker" << std::endl;
174 int nrows = topol.
nrows();
176 float nchannelspermod = 0;
178 for (
int col_iter = 0; col_iter <
ncols; col_iter++) {
179 for (
int row_iter = 0; row_iter < nrows; row_iter++) {
234 <<
"DetId " << detid <<
" GainMean " << gainmeanfortree <<
" RMS " << gainrmsfortree <<
" PedMean " 235 << pedmeanfortree <<
" RMS " << pedrmsfortree << std::endl;
241 edm::LogInfo(
"SiPixelCondObjReader") <<
"[SiPixelCondObjReader::analyze] ---> PIXEL Modules " << nmodules
243 edm::LogInfo(
"SiPixelCondObjReader") <<
"[SiPixelCondObjReader::analyze] ---> PIXEL Channels " << nchannels
246 edm::LogPrint(
"SiPixelCondObjReader") <<
" ---> SUMMARY :" << std::endl;
247 edm::LogPrint(
"SiPixelCondObjReader") <<
"Encounted " << ndead <<
" dead pixels" << std::endl;
248 edm::LogPrint(
"SiPixelCondObjReader") <<
"Encounted " << nnoisy <<
" noisy pixels" << std::endl;
static const std::string kSharedResource
TH1F * _TH1F_Pedestals_sum
TH1F * _TH1F_Pedestals_fpix
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
virtual int ncolumns() const =0
#define DEFINE_FWK_MODULE(type)
std::vector< uint32_t > getDetIds() override
std::map< uint32_t, double > _noisyfrac_m
virtual int nrows() const =0
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Log< level::Error, false > LogError
T getUntrackedParameter(std::string const &, T const &) const
T * make(const Args &...args) const
make new ROOT object
float getGain(const uint32_t &detID, const int &col, const int &row) override
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
SiPixelCondObjReader(const edm::ParameterSet &iConfig)
void setESObjects(const edm::EventSetup &es) override
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
std::map< uint32_t, TH1F * > _TH1F_Gains_m
Namespace of DDCMS conversion namespace.
Log< level::Info, false > LogInfo
TH1F * _TH1F_Pedestals_bpix
~SiPixelCondObjReader() override=default
TH1F * _TH1F_Pedestals_all
std::map< uint32_t, TH1F * > _TH1F_Pedestals_m
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
float getPedestal(const uint32_t &detID, const int &col, const int &row) override
std::map< uint32_t, double > _deadfrac_m
bool isDead(const uint32_t &detID, const int &col, const int &row) override
void analyze(const edm::Event &, const edm::EventSetup &) override
SiPixelGainCalibrationService SiPixelGainCalibrationService_
bool isNoisy(const uint32_t &detID, const int &col, const int &row) override