101 unsigned int nmodules = 0;
102 uint32_t nchannels = 0;
109 <<
"[SiPixelCondObjForHLTReader::beginJob] End Reading CondObjForHLTects" << std::endl;
113 edm::LogInfo(
"SiPixelCondObjForHLTReader") <<
" There are " << tkgeom->
dets().size() <<
" detectors" << std::endl;
120 "Summary_dead",
"Dead pixel fraction (0=dead, 1=alive)", vdetId_.size() + 1, 0, vdetId_.size() + 1);
122 "Dead pixel fraction (0=dead, 1=alive)",
127 "Summary_noisy",
"Noisy pixel fraction (0=noisy, 1=alive)", vdetId_.size() + 1, 0, vdetId_.size() + 1);
129 "Noisy pixel fraction (0=noisy, 1=alive)",
133 _TH1F_Gains_sum = fs->
make<TH1F>(
"Summary_Gain",
"Gain Summary", vdetId_.size() + 1, 0, vdetId_.size() + 1);
135 fs->
make<TH1F>(
"Summary_Pedestal",
"Pedestal Summary", vdetId_.size() + 1, 0, vdetId_.size() + 1);
143 TTree *
tree =
new TTree(
"tree",
"tree");
145 double gainmeanfortree, gainrmsfortree, pedmeanfortree, pedrmsfortree;
146 tree->Branch(
"detid", &detid,
"detid/I");
147 tree->Branch(
"ped_mean", &pedmeanfortree,
"ped_mean/D");
148 tree->Branch(
"ped_rms", &pedrmsfortree,
"ped_rms/D");
149 tree->Branch(
"gain_mean", &gainmeanfortree,
"gain_mean/D");
150 tree->Branch(
"gain_rms", &gainrmsfortree,
"gain_rms/D");
154 for (std::vector<uint32_t>::const_iterator detid_iter = vdetId_.begin(); detid_iter != vdetId_.end();
158 sprintf(name,
"Pedestals_%d", detid);
160 sprintf(name,
"Gains_%d", detid);
163 DetId detIdObject(detid);
166 if (_PixelGeomDetUnit ==
nullptr) {
167 edm::LogError(
"SiPixelCondObjHLTDisplay") <<
"[SiPixelCondObjHLTReader::beginJob] the detID " << detid
168 <<
" doesn't seem to belong to Tracker" << std::endl;
182 int nrows = topol.
nrows();
184 float nchannelspermod = 0;
186 for (
int col_iter = 0; col_iter < ncols; col_iter++) {
187 for (
int row_iter = 0; row_iter < nrows; row_iter++) {
205 _TH1F_Gains_all->Fill(gain);
208 _TH1F_Gains_bpix->Fill(gain);
210 _TH1F_Gains_fpix->Fill(gain);
214 _TH1F_Pedestals_all->Fill(ped);
218 _TH1F_Pedestals_bpix->Fill(ped);
220 _TH1F_Pedestals_fpix->Fill(ped);
230 _TH1F_Noisy_sum->SetBinContent(ibin,
_noisyfrac_m[detid]);
232 _TH1F_Gains_sum->SetBinContent(ibin,
_TH1F_Gains_m[detid]->GetMean());
233 _TH1F_Gains_sum->SetBinError(ibin,
_TH1F_Gains_m[detid]->GetRMS());
248 <<
"[SiPixelCondObjForHLTReader::analyze] ---> PIXEL Modules " << nmodules << std::endl;
250 <<
"[SiPixelCondObjForHLTReader::analyze] ---> PIXEL Channels (i.e. Number of Columns)" << nchannels
253 edm::LogPrint(
"SiPixelCondObjForHLTReader") <<
" ---> SUMMARY :" << std::endl;
254 edm::LogPrint(
"SiPixelCondObjForHLTReader") <<
"Encounted " << ndead <<
" dead pixels" << std::endl;
255 edm::LogPrint(
"SiPixelCondObjForHLTReader") <<
"Encounted " << nnoisy <<
" noisy pixels" << std::endl;
257 <<
"The Gain Mean is " << _TH1F_Gains_all->GetMean() <<
" with rms " << _TH1F_Gains_all->GetRMS() << std::endl;
258 edm::LogPrint(
"SiPixelCondObjForHLTReader") <<
" in BPIX " << _TH1F_Gains_bpix->GetMean() <<
" with rms "
259 << _TH1F_Gains_bpix->GetRMS() << std::endl;
260 edm::LogPrint(
"SiPixelCondObjForHLTReader") <<
" in FPIX " << _TH1F_Gains_fpix->GetMean() <<
" with rms "
261 << _TH1F_Gains_fpix->GetRMS() << std::endl;
262 edm::LogPrint(
"SiPixelCondObjForHLTReader") <<
"The Ped Mean is " << _TH1F_Pedestals_all->GetMean() <<
" with rms "
263 << _TH1F_Pedestals_all->GetRMS() << std::endl;
264 edm::LogPrint(
"SiPixelCondObjForHLTReader") <<
" in BPIX " << _TH1F_Pedestals_bpix->GetMean()
265 <<
" with rms " << _TH1F_Pedestals_bpix->GetRMS() << std::endl;
266 edm::LogPrint(
"SiPixelCondObjForHLTReader") <<
" in FPIX " << _TH1F_Pedestals_fpix->GetMean()
267 <<
" with rms " << _TH1F_Pedestals_fpix->GetRMS() << std::endl;
272 edm::LogPrint(
"SiPixelCondObjForHLTReader") <<
" ---> End job " << std::endl;
T getUntrackedParameter(std::string const &, T const &) const
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::map< uint32_t, double > _deadfrac_m
virtual int nrows() const =0
T * make(const Args &...args) const
make new ROOT object
TH1F * _TH1F_Pedestals_fpix
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Log< level::Error, false > LogError
TH1F * _TH1F_Pedestals_bpix
TH1F * _TH1F_Pedestals_sum
bool getData(T &iHolder) const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
SiPixelCondObjForHLTReader(const edm::ParameterSet &iConfig)
std::map< uint32_t, TH1F * > _TH1F_Gains_m
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
T * make(const Args &...args) const
make new ROOT object
Log< level::Warning, true > LogPrint
void analyze(const edm::Event &, const edm::EventSetup &) override
Log< level::Info, false > LogInfo
std::unique_ptr< SiPixelGainCalibrationServiceBase > SiPixelGainCalibrationService_
TH1F * _TH1F_Pedestals_all
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
T getParameter(std::string const &) const
std::map< uint32_t, TH1F * > _TH1F_Pedestals_m
std::map< uint32_t, double > _noisyfrac_m