36 sprintf(sTileIndex,
"Tile(=moduleZ*16+sector#phi)");
43 h2digierr=ibooker.
bookProfile2D(s2,s2,14,0.,14., 16,0.,16.,100,0,1.e10,
"");
50 sprintf(s,
"CASTORreportSummaryMap");
51 h2repsum=ibooker.
bookProfile2D(s,s,14,0.,14., 16,0.,16.,100,0,1.e10,
"");
58 sprintf(s,
"CASTOR DeadChannelsMap");
64 sprintf(s,
"CASTOR TSmax Significance Map");
70 sprintf(s,
"CASTOR TSmax Significance All chan");
73 sprintf(s,
"DigiSize");
75 sprintf(s,
"ModuleZ(fC)_allTS");
79 sprintf(s,
"Sector #phi(fC)_allTS");
84 sprintf(s,
"QfC=f(x=Tile y=TS) (cumulative)");
90 sprintf(s,
"QmeanfC=f(Tile TS)");
96 sprintf(s,
"QrmsfC=f(Tile TS)");
102 sprintf(s,
"CASTOR data quality");
110 sprintf(s,
"QmeanfC_map(allTS)");
116 for(
int ts=0; ts<=1; ts++) {
117 sprintf(s,
"QIErms_TS=%d",ts);
122 for(
int ind=0; ind<224; ind++)
for(
int ts=0; ts<10; ts++)
126 std::cout<<
"CastorDigiMonitor::bookingHist(end)"<<std::endl;
135 if(castorDigis.
empty()) {
136 for(
int mod=0;
mod<14;
mod++)
for(
int sec=0; sec<16; sec++)
143 j!=castorDigis.
end(); j++)
153 for (
int i=0;
i<digi.
size();
i++) {
159 err |= (capid != capid1) | er<<1 | (!dv)<<2;
160 err2 += (capid != capid1) | er | (!dv);
170 capid <<
"="<< capid1 <<
" "<< dv <<
" "<< er<<
" "<< err << std::endl;
171 if(capid1 < 3) capid1 = capid+1;
181 const float repChanBAD = 0.9;
182 const float repChanWarning = 0.95;
183 if(
ievt_ %100 != 0)
return;
184 float ModuleSum[14], SectorSum[16];
185 for(
int m=0;
m<14;
m++) ModuleSum[
m]=0.;
186 for(
int s=0;
s<16;
s++) SectorSum[
s]=0.;
187 for(
int mod=0;
mod<14;
mod++)
for(
int sec=0; sec<16; sec++) {
188 for(
int ts=0; ts<=1; ts++) {
196 for(
int ts=1; ts<=
TS_MAX; ts++) {
202 double Qrms =
QrmsTS[ind-1][ts-1]/
ievt_ - Qmean*Qmean;
205 sum /= double(
ievt_);
206 ModuleSum[
mod] += sum;
207 SectorSum[sec] += sum;
208 float isum =
float(
int(sum*10.+0.5))/10.;
214 for(
int sec=0; sec<16; sec++)
218 for(
int mod=0; mod<14; mod++)
for(
int sec=0; sec<16;sec++) {
222 float ChanStatus = 0.;
227 float am=0., amin = 10000.;
228 for(
int ts=0; ts<
TS_MAX; ts++) {
230 if(am < a) {am =
a; tsm = ts;}
231 if(a < amin) amin =
a;
235 for(
int ts=0; ts<
TS_MAX; ts++)
if(ts != tsm)
239 if(am > amin) r = (sum/(TS_MAX-1)-amin)/(am - amin);
242 float statusTS = 1.0;
244 else if(r > 0.99) statusTS = repChanBAD;
245 float gChanStatus = statusTS;
246 if(ChanStatus > 0.) gChanStatus = repChanBAD;
249 if(gChanStatus > repChanBAD) ++nGoodCh;
256 int ind = sector + module*16;
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * h2TSratio
TProfile2D * getTProfile2D() const
MonitorElement * h2qualityMap
int sector() const
get the sector (1-16)
MonitorElement * hTSratio
constexpr bool er() const
is the error bit set?
const HcalQIESample & sample(int i) const
access a sample
std::vector< CastorDataFrame >::const_iterator const_iterator
int module() const
get the module (1-2 for EM, 1-12 for HAD)
MonitorElement * h2status
CastorDigiMonitor(const edm::ParameterSet &ps)
MonitorElement * h2digierr
MonitorElement * bookProfile2D(Args &&...args)
MonitorElement * book1D(Args &&...args)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
MonitorElement * h2QmeanMap
MonitorElement * h2QtsvsCh
constexpr int adc() const
get the ADC sample
std::string subsystemname_
const_iterator end() const
MonitorElement * h2QrmsTSvsCh
void setCurrentFolder(const std::string &fullpath)
static const float LedMonAdc2fc[128]
MonitorElement * book2D(Args &&...args)
int ModSecToIndex(int module, int sector)
constexpr bool dv() const
is the Data Valid bit set?
MonitorElement * hdigisize
constexpr int capid() const
get the Capacitor id
void processEvent(const CastorDigiCollection &cast, const CastorDbService &cond)
MonitorElement * h2repsum
MonitorElement * bookFloat(Args &&...args)
MonitorElement * hQIErms[10]
const HcalCastorDetId & id() const
T mod(const T &a, const T &b)
int size() const
total number of samples in the digi
const_iterator begin() const
MonitorElement * h2QmeantsvsCh