103 unsigned int nmodules = 0;
104 uint32_t nchannels = 0;
111 <<
"[SiPixelCondObjOfflineReader::beginJob] End Reading CondObjOfflineects" << std::endl;
115 edm::LogInfo(
"SiPixelCondObjOfflineReader") <<
" There are " << tkgeom->
dets().size() <<
" detectors" << std::endl;
122 "Summary_dead",
"Dead pixel fraction (0=dead, 1=alive)", vdetId_.size() + 1, 0, vdetId_.size() + 1);
124 "Dead pixel fraction (0=dead, 1=alive)",
129 "Summary_noisy",
"Noisy pixel fraction (0=noisy, 1=alive)", vdetId_.size() + 1, 0, vdetId_.size() + 1);
131 "Noisy pixel fraction (0=noisy, 1=alive)",
135 _TH1F_Gains_sum =
fs->make<TH1F>(
"Summary_Gain",
"Gain Summary", vdetId_.size() + 1, 0, vdetId_.size() + 1);
137 fs->make<TH1F>(
"Summary_Pedestal",
"Pedestal Summary", vdetId_.size() + 1, 0, vdetId_.size() + 1);
145 TTree *
tree =
new TTree(
"tree",
"tree");
147 double gainmeanfortree, gainrmsfortree, pedmeanfortree, pedrmsfortree;
148 tree->Branch(
"detid", &detid,
"detid/I");
149 tree->Branch(
"ped_mean", &pedmeanfortree,
"ped_mean/D");
150 tree->Branch(
"ped_rms", &pedrmsfortree,
"ped_rms/D");
151 tree->Branch(
"gain_mean", &gainmeanfortree,
"gain_mean/D");
152 tree->Branch(
"gain_rms", &gainrmsfortree,
"gain_rms/D");
156 for (std::vector<uint32_t>::const_iterator detid_iter = vdetId_.begin(); detid_iter != vdetId_.end();
160 sprintf(
name,
"Pedestals_%d", detid);
162 sprintf(
name,
"Gains_%d", detid);
165 DetId detIdObject(detid);
168 if (_PixelGeomDetUnit ==
nullptr) {
169 edm::LogError(
"SiPixelCondObjOfflineDisplay") <<
"[SiPixelCondObjOfflineReader::beginJob] the detID " << detid
170 <<
" doesn't seem to belong to Tracker" << std::endl;
184 int nrows = topol.
nrows();
186 float nchannelspermod = 0;
188 for (
int col_iter = 0; col_iter <
ncols; col_iter++) {
189 for (
int row_iter = 0; row_iter < nrows; row_iter++) {
244 <<
"DetId " << detid <<
" GainMean " << gainmeanfortree <<
" RMS " << gainrmsfortree <<
" PedMean " 245 << pedmeanfortree <<
" RMS " << pedrmsfortree << std::endl;
248 if (pedmeanfortree == 0)
249 edm::LogPrint(
"SiPixelCondObjOfflineReader") << detid << std::endl;
255 <<
"[SiPixelCondObjOfflineReader::analyze] ---> PIXEL Modules " << nmodules << std::endl;
257 <<
"[SiPixelCondObjOfflineReader::analyze] ---> PIXEL Channels (i.e. Number of Columns)" << nchannels
260 edm::LogPrint(
"SiPixelCondObjOfflineReader") <<
" ---> SUMMARY :" << std::endl;
261 edm::LogPrint(
"SiPixelCondObjOfflineReader") <<
"Encounted " << ndead <<
" dead pixels" << std::endl;
262 edm::LogPrint(
"SiPixelCondObjOfflineReader") <<
"Encounted " << nnoisy <<
" noisy pixels" << std::endl;
279 edm::LogPrint(
"SiPixelCondObjOfflineReader") <<
" ---> End job " << std::endl;
284 desc.setComment(
"EDAnalyzer to read per-module SiPixelGainCalibrationForOffline payloads in the EventSetup");
285 desc.add<
bool>(
"useSimRcd",
false);
286 desc.addUntracked<
double>(
"maxRangeDeadPixHist", 0.001);
static const std::string kSharedResource
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
virtual int ncolumns() const =0
TH1F * _TH1F_Pedestals_fpix
virtual int nrows() const =0
~SiPixelCondObjOfflineReader() override=default
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
std::map< uint32_t, double > _deadfrac_m
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
TH1F * _TH1F_Pedestals_bpix
std::map< uint32_t, TH1F * > _TH1F_Pedestals_m
#define DEFINE_FWK_MODULE(type)
TH1F * _TH1F_Pedestals_all
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
SiPixelCondObjOfflineReader(const edm::ParameterSet &iConfig)
std::unique_ptr< SiPixelGainCalibrationServiceBase > SiPixelGainCalibrationService_
Log< level::Warning, true > LogPrint
TH1F * _TH1F_Pedestals_sum
Namespace of DDCMS conversion namespace.
std::map< uint32_t, TH1F * > _TH1F_Gains_m
Log< level::Info, false > LogInfo
const std::string recordName_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
std::map< uint32_t, double > _noisyfrac_m
void analyze(const edm::Event &, const edm::EventSetup &) override