100 unsigned int nmodules = 0;
101 uint32_t nchannels = 0;
108 <<
"[SiPixelCondObjOfflineReader::beginJob] End Reading CondObjOfflineects" << std::endl;
112 edm::LogInfo(
"SiPixelCondObjOfflineReader") <<
" There are " << tkgeom->
dets().size() <<
" detectors" << std::endl;
119 "Summary_dead",
"Dead pixel fraction (0=dead, 1=alive)", vdetId_.size() + 1, 0, vdetId_.size() + 1);
121 "Dead pixel fraction (0=dead, 1=alive)",
126 "Summary_noisy",
"Noisy pixel fraction (0=noisy, 1=alive)", vdetId_.size() + 1, 0, vdetId_.size() + 1);
128 "Noisy pixel fraction (0=noisy, 1=alive)",
132 _TH1F_Gains_sum = fs->
make<TH1F>(
"Summary_Gain",
"Gain Summary", vdetId_.size() + 1, 0, vdetId_.size() + 1);
134 fs->
make<TH1F>(
"Summary_Pedestal",
"Pedestal Summary", vdetId_.size() + 1, 0, vdetId_.size() + 1);
142 TTree *
tree =
new TTree(
"tree",
"tree");
144 double gainmeanfortree, gainrmsfortree, pedmeanfortree, pedrmsfortree;
145 tree->Branch(
"detid", &detid,
"detid/I");
146 tree->Branch(
"ped_mean", &pedmeanfortree,
"ped_mean/D");
147 tree->Branch(
"ped_rms", &pedrmsfortree,
"ped_rms/D");
148 tree->Branch(
"gain_mean", &gainmeanfortree,
"gain_mean/D");
149 tree->Branch(
"gain_rms", &gainrmsfortree,
"gain_rms/D");
153 for (std::vector<uint32_t>::const_iterator detid_iter = vdetId_.begin(); detid_iter != vdetId_.end();
157 sprintf(name,
"Pedestals_%d", detid);
159 sprintf(name,
"Gains_%d", detid);
162 DetId detIdObject(detid);
165 if (_PixelGeomDetUnit ==
nullptr) {
166 edm::LogError(
"SiPixelCondObjOfflineDisplay") <<
"[SiPixelCondObjOfflineReader::beginJob] the detID " << detid
167 <<
" doesn't seem to belong to Tracker" << std::endl;
181 int nrows = topol.
nrows();
183 float nchannelspermod = 0;
185 for (
int col_iter = 0; col_iter < ncols; col_iter++) {
186 for (
int row_iter = 0; row_iter < nrows; row_iter++) {
204 _TH1F_Gains_all->Fill(gain);
207 _TH1F_Gains_bpix->Fill(gain);
209 _TH1F_Gains_fpix->Fill(gain);
213 _TH1F_Pedestals_all->Fill(ped);
217 _TH1F_Pedestals_bpix->Fill(ped);
219 _TH1F_Pedestals_fpix->Fill(ped);
229 _TH1F_Noisy_sum->SetBinContent(ibin,
_noisyfrac_m[detid]);
231 _TH1F_Gains_sum->SetBinContent(ibin,
_TH1F_Gains_m[detid]->GetMean());
232 _TH1F_Gains_sum->SetBinError(ibin,
_TH1F_Gains_m[detid]->GetRMS());
241 <<
"DetId " << detid <<
" GainMean " << gainmeanfortree <<
" RMS " << gainrmsfortree <<
" PedMean "
242 << pedmeanfortree <<
" RMS " << pedrmsfortree << std::endl;
245 if (pedmeanfortree == 0)
246 edm::LogPrint(
"SiPixelCondObjOfflineReader") << detid << std::endl;
252 <<
"[SiPixelCondObjOfflineReader::analyze] ---> PIXEL Modules " << nmodules << std::endl;
254 <<
"[SiPixelCondObjOfflineReader::analyze] ---> PIXEL Channels (i.e. Number of Columns)" << nchannels
257 edm::LogPrint(
"SiPixelCondObjOfflineReader") <<
" ---> SUMMARY :" << std::endl;
258 edm::LogPrint(
"SiPixelCondObjOfflineReader") <<
"Encounted " << ndead <<
" dead pixels" << std::endl;
259 edm::LogPrint(
"SiPixelCondObjOfflineReader") <<
"Encounted " << nnoisy <<
" noisy pixels" << std::endl;
261 <<
"The Gain Mean is " << _TH1F_Gains_all->GetMean() <<
" with rms " << _TH1F_Gains_all->GetRMS() << std::endl;
262 edm::LogPrint(
"SiPixelCondObjOfflineReader") <<
" in BPIX " << _TH1F_Gains_bpix->GetMean() <<
" with rms "
263 << _TH1F_Gains_bpix->GetRMS() << std::endl;
264 edm::LogPrint(
"SiPixelCondObjOfflineReader") <<
" in FPIX " << _TH1F_Gains_fpix->GetMean() <<
" with rms "
265 << _TH1F_Gains_fpix->GetRMS() << std::endl;
266 edm::LogPrint(
"SiPixelCondObjOfflineReader") <<
"The Ped Mean is " << _TH1F_Pedestals_all->GetMean() <<
" with rms "
267 << _TH1F_Pedestals_all->GetRMS() << std::endl;
268 edm::LogPrint(
"SiPixelCondObjOfflineReader") <<
" in BPIX " << _TH1F_Pedestals_bpix->GetMean()
269 <<
" with rms " << _TH1F_Pedestals_bpix->GetRMS() << std::endl;
270 edm::LogPrint(
"SiPixelCondObjOfflineReader") <<
" in FPIX " << _TH1F_Pedestals_fpix->GetMean()
271 <<
" with rms " << _TH1F_Pedestals_fpix->GetRMS() << std::endl;
276 edm::LogPrint(
"SiPixelCondObjOfflineReader") <<
" ---> End job " << std::endl;
static const std::string kSharedResource
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)
TH1F * _TH1F_Pedestals_fpix
virtual int nrows() const =0
T * make(const Args &...args) const
make new ROOT object
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Log< level::Error, false > LogError
bool getData(T &iHolder) const
std::map< uint32_t, double > _deadfrac_m
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
TH1F * _TH1F_Pedestals_bpix
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::map< uint32_t, TH1F * > _TH1F_Pedestals_m
TH1F * _TH1F_Pedestals_all
T * make(const Args &...args) const
make new ROOT object
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
std::map< uint32_t, TH1F * > _TH1F_Gains_m
Log< level::Info, false > LogInfo
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
const std::string recordName_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
T getParameter(std::string const &) const
std::map< uint32_t, double > _noisyfrac_m
void analyze(const edm::Event &, const edm::EventSetup &) override