46 for (
int i = 0;
i < 18;
i++) {
73 name =
"CertificationSummaryMap";
80 for (
int i = 0;
i < 18;
i++) {
107 for (
int i = 0;
i < 18;
i++) {
114 if( ! map )
edm::LogWarning(
"EEDaqInfoTask") <<
"EcalElectronicsMapping not available";
119 me =
dqmStore_->
get(
prefixME_ +
"/EEStatusFlagsTask/FEStatus/EESFT weighted frontend errors by lumi" );
127 float integrityErrSum = 0.;
128 float integrityQual = 1.0;
129 float frontendErrSum = 0.;
130 float frontendQual = 1.0;
131 float synchronizationErrSum = 0.;
132 float synchronizationQual = 1.0;
134 for (
int i=0;
i<18;
i++) {
135 float ismIntegrityQual = 1.0;
139 integrityErrSum +=
errors;
141 float ismFrontendQual = 1.0;
147 float ismSynchronizationQual = 1.0;
151 synchronizationErrSum +=
errors;
153 float minVal=
std::min(ismIntegrityQual,ismFrontendQual);
154 DQMVal[
i] =
std::min(minVal,ismSynchronizationQual);
160 float minVal =
std::min(integrityQual,frontendQual);
161 float totDQMVal =
std::min(minVal,synchronizationQual);
164 if( me ) me->
Fill(totDQMVal);
166 for (
int i=0;
i<18;
i++) {
168 if( me ) me->
Fill(DQMVal[
i]);
175 for(
unsigned u=0 ; u<scs.size() ; u++){
176 int jx = scs[u].ix() + (scs[u].zside()<0 ? 0 : 20);
177 int jy = scs[u].iy();
178 me->setBinContent(jx,jy, DQMVal[i]);
195 int nValidChannels = 0;
196 int nValidChannelsEE[18];
206 for (
int i = 0;
i < 18;
i++) {
208 nValidChannelsEE[
i] = 0;
213 if(!crystals.size())
continue;
216 for(
unsigned u=0 ; u<scs.size() ; u++){
218 int jx = scs[u].ix() + (scs[u].zside()<0 ? 0 : 20);
219 int jy = scs[u].iy();
221 float xvalDQM = DQMVal[
i];
223 float xvalDAQ, xvalDCS;
224 xvalDAQ = xvalDCS = -1.;
227 if (
hDAQ_ ) xvalDAQ =
hDAQ_->GetBinContent( jx, jy );
228 if (
hDCS_ ) xvalDCS =
hDCS_->GetBinContent( jx, jy );
230 if ( xvalDQM == -1 || ( xvalDAQ == -1 && xvalDCS == -1 ) ) {
242 for(std::vector<DetId>::const_iterator it=crystals.begin() ; it!=crystals.end() ; ++it){
244 if(
id.zside() == scs[u].zside() && (
id.ix()-1)/5+1 == scs[u].ix() && (
id.iy()-1)/5+1 == scs[u].iy() ) ncrystals++;
247 sumCertEE[
i] += xcert * ncrystals;
248 nValidChannelsEE[
i] += ncrystals;
250 sumCert += xcert * ncrystals;
251 nValidChannels += ncrystals;
283 edm::LogWarning(
"EEDaqInfoTask") <<
"EcalElectronicsMapping not available";
300 int nValidChannels = 0;
301 int nValidChannelsEE[18];
311 for (
int i = 0;
i < 18;
i++) {
313 nValidChannelsEE[
i] = 0;
318 if(!crystals.size())
continue;
321 for(
unsigned u=0 ; u<scs.size() ; u++){
323 int jx = scs[u].ix() + (scs[u].zside()<0 ? 0 : 20);
324 int jy = scs[u].iy();
326 float xvalDQM, xvalDAQ, xvalDCS;
327 xvalDQM = xvalDAQ = xvalDCS = -1.;
330 if (
hDQM_ ) xvalDQM =
hDQM_->GetBinContent( jx, jy );
331 if (
hDAQ_ ) xvalDAQ =
hDAQ_->GetBinContent( jx, jy );
332 if (
hDCS_ ) xvalDCS =
hDCS_->GetBinContent( jx, jy );
334 if ( xvalDQM == -1 || ( xvalDAQ == -1 && xvalDCS == -1 ) ) {
346 for(std::vector<DetId>::const_iterator it=crystals.begin() ; it!=crystals.end() ; ++it){
348 if(
id.zside() == scs[u].zside() && (
id.ix()-1)/5+1 == scs[u].ix() && (
id.iy()-1)/5+1 == scs[u].iy() ) ncrystals++;
351 sumCertEE[
i] += xcert * ncrystals;
352 nValidChannelsEE[
i] += ncrystals;
354 sumCert += xcert * ncrystals;
355 nValidChannels += ncrystals;
377 for (
int i = 0;
i < 18;
i++) {
411 for (
int i = 0;
i < 18;
i++) {
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
static std::string sEE(const unsigned ism)
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * meEEDataCertification_[18]
Some "id" conversions.
static const int nTowerMax_
static const int DccId_[18]
MonitorElement * bookFloat(const char *name)
Book float.
virtual ~EEDataCertificationTask()
Destructor.
int getNbinsY(void) const
get # of bins in Y-axis
TH1F * hSynchronizationByLumi_
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
void removeElement(const std::string &name)
MonitorElement * meEEDataCertificationSummaryMap_
void endLuminosityBlock(const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup)
EndLuminosityBlock.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
std::vector< EcalScDetId > getEcalScDetId(int DCCid, int DCC_Channel, bool ignoreSingleCrystal=true) const
Ecal Monitor Utils for Client.
void beginJob(void)
BeginJob.
T const * product() const
EEDataCertificationTask(const edm::ParameterSet &ps)
Constructor.
void beginLuminosityBlock(const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup)
BeginLuminosityBlock.
int getNbinsX(void) const
get # of bins in X-axis
void cleanup(void)
Cleanup.
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * meEEDataCertificationSummary_
void setCurrentFolder(const std::string &fullpath)
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.