CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Attributes
EEDataCertificationTask Class Reference

#include <EEDataCertificationTask.h>

Inheritance diagram for EEDataCertificationTask:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 EEDataCertificationTask (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~EEDataCertificationTask ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void beginJob (void)
 BeginJob. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup)
 BeginLuminosityBlock. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void cleanup (void)
 Cleanup. More...
 
void endJob (void)
 EndJob. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup)
 EndLuminosityBlock. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun. More...
 
void reset (void)
 Reset. More...
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Static Protected Attributes

static const int DccId_ [18]
 
static const int nTowerMax_ = 44
 

Private Attributes

bool cloneME_
 
DQMStoredqmStore_
 
bool enableCleanup_
 
TH2F * hDAQ_
 
TH2F * hDCS_
 
TH2F * hDQM_
 
TH1F * hFrontendByLumi_
 
TH1F * hIntegrityByLumi_
 
TH1F * hSynchronizationByLumi_
 
MonitorElementmeEEDataCertification_ [18]
 
MonitorElementmeEEDataCertificationSummary_
 
MonitorElementmeEEDataCertificationSummaryMap_
 
MonitorElementmeEEReportSummary_
 
MonitorElementmeEEReportSummaryContents_ [36]
 
bool mergeRuns_
 
std::string prefixME_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 17 of file EEDataCertificationTask.h.

Constructor & Destructor Documentation

EEDataCertificationTask::EEDataCertificationTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 29 of file EEDataCertificationTask.cc.

References cloneME_, dqmStore_, enableCleanup_, edm::ParameterSet::getUntrackedParameter(), hDAQ_, hDQM_, hFrontendByLumi_, hIntegrityByLumi_, hSynchronizationByLumi_, i, meEEDataCertification_, meEEDataCertificationSummary_, meEEDataCertificationSummaryMap_, mergeRuns_, cppFunctionSkipper::operator, prefixME_, and AlCaHLTBitMon_QueryRunRegistry::string.

29  {
30 
31  // cloneME switch
32  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
33 
35 
36  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
37 
38  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
39 
40  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
41 
44  for (int i = 0; i < 18; i++) {
46  }
47 
48  hDQM_ = 0;
49  hDAQ_ = 0;
51  hFrontendByLumi_ = 0;
53 
54 }
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * meEEDataCertification_[18]
MonitorElement * meEEDataCertificationSummaryMap_
MonitorElement * meEEDataCertificationSummary_
EEDataCertificationTask::~EEDataCertificationTask ( )
virtual

Destructor.

Definition at line 56 of file EEDataCertificationTask.cc.

56  {
57 
58 }

Member Function Documentation

void EEDataCertificationTask::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Analyze.

Implements edm::EDAnalyzer.

Definition at line 416 of file EEDataCertificationTask.cc.

416  {
417 
418 }
void EEDataCertificationTask::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 60 of file EEDataCertificationTask.cc.

References DQMStore::book2D(), DQMStore::bookFloat(), dqmStore_, MonitorElement::Fill(), i, meEEDataCertification_, meEEDataCertificationSummary_, meEEDataCertificationSummaryMap_, mergeVDriftHistosByStation::name, prefixME_, Numbers::sEE(), MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

60  {
61 
62  if ( dqmStore_ ) {
63 
65 
66  dqmStore_->setCurrentFolder(prefixME_ + "/EventInfo");
67 
68  meEEDataCertificationSummary_ = dqmStore_->bookFloat( "CertificationSummary" );
70 
71  name = "CertificationSummaryMap";
72  meEEDataCertificationSummaryMap_ = dqmStore_->book2D(name, name, 40, 0., 200., 20, 0., 100.);
75 
76  dqmStore_->setCurrentFolder(prefixME_ + "/EventInfo/CertificationContents");
77 
78  for (int i = 0; i < 18; i++) {
79  meEEDataCertification_[i] = dqmStore_->bookFloat( "EcalEndcap_" + Numbers::sEE(i+1) );
81  }
82 
83  }
84 
85 }
static std::string sEE(const unsigned ism)
Definition: Numbers.cc:223
int i
Definition: DBlmapReader.cc:9
MonitorElement * meEEDataCertification_[18]
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:809
void Fill(long long x)
MonitorElement * meEEDataCertificationSummaryMap_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1000
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * meEEDataCertificationSummary_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
void EEDataCertificationTask::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
protectedvirtual

BeginLuminosityBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 93 of file EEDataCertificationTask.cc.

93  {
94 
95 }
void EEDataCertificationTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 267 of file EEDataCertificationTask.cc.

References mergeRuns_, and reset().

267  {
268 
269  if ( ! mergeRuns_ ) this->reset();
270 
271 }
void EEDataCertificationTask::cleanup ( void  )
protected

Cleanup.

Definition at line 386 of file EEDataCertificationTask.cc.

References cloneME_, dqmStore_, MonitorElement::getName(), hDAQ_, hDCS_, hDQM_, hFrontendByLumi_, hIntegrityByLumi_, hSynchronizationByLumi_, i, meEEDataCertification_, meEEDataCertificationSummary_, meEEDataCertificationSummaryMap_, prefixME_, DQMStore::removeElement(), and DQMStore::setCurrentFolder().

Referenced by endJob().

386  {
387 
388  if ( cloneME_ ) {
389  if( hDQM_ ) delete hDQM_;
390  if( hDAQ_ ) delete hDAQ_;
391  if( hDCS_ ) delete hDCS_;
393  if( hFrontendByLumi_ ) delete hFrontendByLumi_;
395  }
396  hDQM_ = 0;
397  hDAQ_ = 0;
398  hDCS_ = 0;
399  hIntegrityByLumi_ = 0;
400  hFrontendByLumi_ = 0;
402 
403  if ( dqmStore_ ) {
404  dqmStore_->setCurrentFolder(prefixME_ + "/EventInfo");
407 
408  dqmStore_->setCurrentFolder(prefixME_ + "/EventInfo/CertificationContents");
409  for (int i = 0; i < 18; i++) {
411  }
412  }
413 
414 }
const std::string & getName(void) const
get name of ME
int i
Definition: DBlmapReader.cc:9
MonitorElement * meEEDataCertification_[18]
void removeElement(const std::string &name)
Definition: DQMStore.cc:2772
MonitorElement * meEEDataCertificationSummaryMap_
MonitorElement * meEEDataCertificationSummary_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
void EEDataCertificationTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 87 of file EEDataCertificationTask.cc.

References cleanup(), and enableCleanup_.

87  {
88 
89  if ( enableCleanup_ ) this->cleanup();
90 
91 }
void EEDataCertificationTask::endLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
protectedvirtual

EndLuminosityBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 97 of file EEDataCertificationTask.cc.

References funct::abs(), cloneME_, DccId_, EcalElectronicsMapping::dccTowerConstituents(), dqmStore_, benchmark_cfg::errors, MonitorElement::Fill(), edm::EventSetup::get(), DQMStore::get(), EcalElectronicsMapping::getEcalScDetId(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), patZpeak::handle, hDAQ_, hDCS_, hFrontendByLumi_, hIntegrityByLumi_, hSynchronizationByLumi_, i, python.multivaluedict::map(), meEEDataCertification_, meEEDataCertificationSummary_, meEEDataCertificationSummaryMap_, bookConverter::min, nTowerMax_, prefixME_, edm::ESHandle< class >::product(), reset(), Numbers::sEE(), MonitorElement::setBinContent(), and lumiQTWidget::t.

97  {
98 
99  this->reset();
100 
101  MonitorElement* me;
102 
103  // evaluate the DQM quality of observables checked by lumi
104  float DQMVal[18];
105  for (int i = 0; i < 18; i++) {
106  DQMVal[i] = -1.;
107  }
108 
110  iSetup.get< EcalMappingRcd >().get(handle);
111  const EcalElectronicsMapping *map = handle.product();
112  if( ! map ) edm::LogWarning("EEDaqInfoTask") << "EcalElectronicsMapping not available";
113 
114  me = dqmStore_->get( prefixME_ + "/EEIntegrityTask/EEIT weighted integrity errors by lumi" );
115  hIntegrityByLumi_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hIntegrityByLumi_ );
116 
117  me = dqmStore_->get( prefixME_ + "/EEStatusFlagsTask/FEStatus/EESFT weighted frontend errors by lumi" );
118  hFrontendByLumi_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hFrontendByLumi_ );
119 
120  me = dqmStore_->get( prefixME_ + "/EERawDataTask/EERDT FE synchronization errors by lumi" );
121  hSynchronizationByLumi_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hSynchronizationByLumi_ );
122 
124 
125  float integrityErrSum = 0.;
126  float integrityQual = 1.0;
127  float frontendErrSum = 0.;
128  float frontendQual = 1.0;
129  float synchronizationErrSum = 0.;
130  float synchronizationQual = 1.0;
131 
132  for ( int i=0; i<18; i++) {
133  float ismIntegrityQual = 1.0;
134  if( hIntegrityByLumi_->GetBinContent(0) > 0 ) {
135  float errors = hIntegrityByLumi_->GetBinContent(i+1);
136  ismIntegrityQual = 1.0 - errors/hIntegrityByLumi_->GetBinContent(0);
137  integrityErrSum += errors;
138  }
139  float ismFrontendQual = 1.0;
140  if( hFrontendByLumi_->GetBinContent(0) > 0 ) {
141  float errors = hFrontendByLumi_->GetBinContent(i+1);
142  ismFrontendQual = 1.0 - errors/hFrontendByLumi_->GetBinContent(0);
143  frontendErrSum += errors;
144  }
145  float ismSynchronizationQual = 1.0;
146  if( hSynchronizationByLumi_->GetBinContent(0) > 0 ) {
147  float errors = hSynchronizationByLumi_->GetBinContent(i+1);
148  ismSynchronizationQual = 1.0 - errors/hSynchronizationByLumi_->GetBinContent(0);
149  synchronizationErrSum += errors;
150  }
151  float minVal= std::min(ismIntegrityQual,ismFrontendQual);
152  DQMVal[i] = std::min(minVal,ismSynchronizationQual);
153  }
154 
155  if( hIntegrityByLumi_->GetBinContent(0) > 0 ) integrityQual = 1.0 - integrityErrSum/hIntegrityByLumi_->GetBinContent(0)/18.;
156  if( hFrontendByLumi_->GetBinContent(0) > 0 ) frontendQual = 1.0 - frontendErrSum/hFrontendByLumi_->GetBinContent(0)/18.;
157  if( hSynchronizationByLumi_->GetBinContent(0) > 0 ) synchronizationQual = 1.0 - synchronizationErrSum/hSynchronizationByLumi_->GetBinContent(0)/36.;
158  float minVal = std::min(integrityQual,frontendQual);
159  float totDQMVal = std::min(minVal,synchronizationQual);
160 
161  me = dqmStore_->get( prefixME_ + "/EventInfo/reportSummary" );
162  if( me ) me->Fill(totDQMVal);
163 
164  for ( int i=0; i<18; i++) {
165  me = dqmStore_->get( prefixME_ + "/EventInfo/reportSummaryContents/EcalEndcap_" + Numbers::sEE(i+1) );
166  if( me ) me->Fill(DQMVal[i]);
167 
168  me = dqmStore_->get( prefixME_ + "/EventInfo/reportSummaryMap" );
169  if( me ) {
170  for(int t=1 ; t<=nTowerMax_ ; t++){
171  if(! map->dccTowerConstituents(DccId_[i], t).size() ) continue;
172  std::vector<EcalScDetId> scs = map->getEcalScDetId(DccId_[i], t, false);
173  for(unsigned u=0 ; u<scs.size() ; u++){
174  int jx = scs[u].ix() + (scs[u].zside()<0 ? 0 : 20);
175  int jy = scs[u].iy();
176  me->setBinContent(jx,jy, DQMVal[i]);
177  }
178  }
179  }
180  }
181 
182  }
183 
184  // now combine reduced DQM with DCS and DAQ
185  me = dqmStore_->get( prefixME_ + "/EventInfo/DAQSummaryMap" );
186  hDAQ_ = UtilsClient::getHisto<TH2F*>( me, cloneME_, hDAQ_ );
187 
188  me = dqmStore_->get( prefixME_ + "/EventInfo/DCSSummaryMap" );
189  hDCS_ = UtilsClient::getHisto<TH2F*>( me, cloneME_, hDCS_ );
190 
191  float sumCert = 0.;
192  float sumCertEE[18];
193  int nValidChannels = 0;
194  int nValidChannelsEE[18];
195 
197  for(int ix=1 ; ix<=meEEDataCertificationSummaryMap_->getNbinsX() ; ix++){
198  for(int iy=1 ; iy<=meEEDataCertificationSummaryMap_->getNbinsY() ; iy++){
200  }
201  }
202  }
203 
204  for (int i = 0; i < 18; i++) {
205  sumCertEE[i] = 0;
206  nValidChannelsEE[i] = 0;
207 
208  for(int t=1 ; t<=nTowerMax_ ; t++){
209 
210  std::vector<DetId> crystals = map->dccTowerConstituents(DccId_[i], t);
211  if(!crystals.size()) continue; // getEcalScDetId throws an exception when no crystal is found
212 
213  std::vector<EcalScDetId> scs = map->getEcalScDetId(DccId_[i], t, false);
214  for(unsigned u=0 ; u<scs.size() ; u++){
215 
216  int jx = scs[u].ix() + (scs[u].zside()<0 ? 0 : 20);
217  int jy = scs[u].iy();
218 
219  float xvalDQM = DQMVal[i];
220 
221  float xvalDAQ, xvalDCS;
222  xvalDAQ = xvalDCS = -1.;
223  float xcert = -1.;
224 
225  if ( hDAQ_ ) xvalDAQ = hDAQ_->GetBinContent( jx, jy );
226  if ( hDCS_ ) xvalDCS = hDCS_->GetBinContent( jx, jy );
227 
228  if ( xvalDQM == -1 || ( xvalDAQ == -1 && xvalDCS == -1 ) ) {
229  // problems: DQM empty or DAQ and DCS not available
230  xcert = 0.0;
231  } else {
232  // do not consider the white value of DAQ and DCS (problems with DB)
233  xcert = std::abs(xvalDQM) * std::abs(xvalDAQ) * std::abs(xvalDCS);
234  }
235 
237 
238  int ncrystals = 0;
239 
240  for(std::vector<DetId>::const_iterator it=crystals.begin() ; it!=crystals.end() ; ++it){
241  EEDetId id(*it);
242  if( id.zside() == scs[u].zside() && (id.ix()-1)/5+1 == scs[u].ix() && (id.iy()-1)/5+1 == scs[u].iy() ) ncrystals++;
243  }
244 
245  sumCertEE[i] += xcert * ncrystals;
246  nValidChannelsEE[i] += ncrystals;
247 
248  sumCert += xcert * ncrystals;
249  nValidChannels += ncrystals;
250 
251  }
252  }
253 
254  if( meEEDataCertification_[i] ) {
255  if( nValidChannelsEE[i]>0 ) meEEDataCertification_[i]->Fill( sumCertEE[i]/nValidChannelsEE[i] );
256  else meEEDataCertification_[i]->Fill( 0.0 );
257  }
258  }
259 
261  if( nValidChannels>0 ) meEEDataCertificationSummary_->Fill( sumCert/nValidChannels );
262  else meEEDataCertificationSummary_->Fill( 0.0 );
263  }
264 
265 }
static std::string sEE(const unsigned ism)
Definition: Numbers.cc:223
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * meEEDataCertification_[18]
int getNbinsY(void) const
get # of bins in Y-axis
void Fill(long long x)
MonitorElement * meEEDataCertificationSummaryMap_
tuple handle
Definition: patZpeak.py:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1623
std::vector< EcalScDetId > getEcalScDetId(int DCCid, int DCC_Channel, bool ignoreSingleCrystal=true) const
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
int getNbinsX(void) const
get # of bins in X-axis
MonitorElement * meEEDataCertificationSummary_
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.
void EEDataCertificationTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 273 of file EEDataCertificationTask.cc.

References funct::abs(), cloneME_, DccId_, EcalElectronicsMapping::dccTowerConstituents(), dqmStore_, MonitorElement::Fill(), edm::EventSetup::get(), DQMStore::get(), EcalElectronicsMapping::getEcalScDetId(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), patZpeak::handle, hDAQ_, hDCS_, hDQM_, i, python.multivaluedict::map(), meEEDataCertification_, meEEDataCertificationSummary_, meEEDataCertificationSummaryMap_, nTowerMax_, prefixME_, edm::ESHandle< class >::product(), reset(), MonitorElement::setBinContent(), and lumiQTWidget::t.

273  {
274 
275  this->reset();
276 
278  c.get< EcalMappingRcd >().get(handle);
279  const EcalElectronicsMapping *map = handle.product();
280  if( ! map ){
281  edm::LogWarning("EEDaqInfoTask") << "EcalElectronicsMapping not available";
282  return;
283  }
284 
285  MonitorElement* me;
286 
287  me = dqmStore_->get( prefixME_ + "/EventInfo/reportSummaryMap" );
288  hDQM_ = UtilsClient::getHisto<TH2F*>( me, cloneME_, hDQM_ );
289 
290  me = dqmStore_->get( prefixME_ + "/EventInfo/DAQSummaryMap" );
291  hDAQ_ = UtilsClient::getHisto<TH2F*>( me, cloneME_, hDAQ_ );
292 
293  me = dqmStore_->get( prefixME_ + "/EventInfo/DCSSummaryMap" );
294  hDCS_ = UtilsClient::getHisto<TH2F*>( me, cloneME_, hDCS_ );
295 
296  float sumCert = 0.;
297  float sumCertEE[18];
298  int nValidChannels = 0;
299  int nValidChannelsEE[18];
300 
302  for(int ix=1 ; ix<=meEEDataCertificationSummaryMap_->getNbinsX() ; ix++){
303  for(int iy=1 ; iy<=meEEDataCertificationSummaryMap_->getNbinsY() ; iy++){
305  }
306  }
307  }
308 
309  for (int i = 0; i < 18; i++) {
310  sumCertEE[i] = 0;
311  nValidChannelsEE[i] = 0;
312 
313  for(int t=1 ; t<=nTowerMax_ ; t++){
314 
315  std::vector<DetId> crystals = map->dccTowerConstituents(DccId_[i], t);
316  if(!crystals.size()) continue;
317 
318  std::vector<EcalScDetId> scs = map->getEcalScDetId(DccId_[i], t, false);
319  for(unsigned u=0 ; u<scs.size() ; u++){
320 
321  int jx = scs[u].ix() + (scs[u].zside()<0 ? 0 : 20);
322  int jy = scs[u].iy();
323 
324  float xvalDQM, xvalDAQ, xvalDCS;
325  xvalDQM = xvalDAQ = xvalDCS = -1.;
326  float xcert = -1.;
327 
328  if ( hDQM_ ) xvalDQM = hDQM_->GetBinContent( jx, jy );
329  if ( hDAQ_ ) xvalDAQ = hDAQ_->GetBinContent( jx, jy );
330  if ( hDCS_ ) xvalDCS = hDCS_->GetBinContent( jx, jy );
331 
332  if ( xvalDQM == -1 || ( xvalDAQ == -1 && xvalDCS == -1 ) ) {
333  // problems: DQM empty or DAQ and DCS not available
334  xcert = 0.0;
335  } else {
336  // do not consider the white value of DAQ and DCS (problems with DB)
337  xcert = std::abs(xvalDQM) * std::abs(xvalDAQ) * std::abs(xvalDCS);
338  }
339 
341 
342  int ncrystals = 0;
343 
344  for(std::vector<DetId>::const_iterator it=crystals.begin() ; it!=crystals.end() ; ++it){
345  EEDetId id(*it);
346  if( id.zside() == scs[u].zside() && (id.ix()-1)/5+1 == scs[u].ix() && (id.iy()-1)/5+1 == scs[u].iy() ) ncrystals++;
347  }
348 
349  sumCertEE[i] += xcert * ncrystals;
350  nValidChannelsEE[i] += ncrystals;
351 
352  sumCert += xcert * ncrystals;
353  nValidChannels += ncrystals;
354 
355  }
356  }
357 
358  if( meEEDataCertification_[i] ) {
359  if( nValidChannelsEE[i]>0 ) meEEDataCertification_[i]->Fill( sumCertEE[i]/nValidChannelsEE[i] );
360  else meEEDataCertification_[i]->Fill( 0.0 );
361  }
362  }
363 
365  if( nValidChannels>0 ) meEEDataCertificationSummary_->Fill( sumCert/nValidChannels );
366  else meEEDataCertificationSummary_->Fill( 0.0 );
367  }
368 
369 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * meEEDataCertification_[18]
int getNbinsY(void) const
get # of bins in Y-axis
void Fill(long long x)
MonitorElement * meEEDataCertificationSummaryMap_
tuple handle
Definition: patZpeak.py:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1623
std::vector< EcalScDetId > getEcalScDetId(int DCCid, int DCC_Channel, bool ignoreSingleCrystal=true) const
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
int getNbinsX(void) const
get # of bins in X-axis
MonitorElement * meEEDataCertificationSummary_
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.
void EEDataCertificationTask::reset ( void  )
protected

Reset.

Definition at line 371 of file EEDataCertificationTask.cc.

References i, meEEDataCertification_, meEEDataCertificationSummary_, meEEDataCertificationSummaryMap_, and MonitorElement::Reset().

Referenced by beginRun(), endLuminosityBlock(), and endRun().

371  {
372 
374 
375  for (int i = 0; i < 18; i++) {
377  }
378 
380 
382 
383 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * meEEDataCertification_[18]
MonitorElement * meEEDataCertificationSummaryMap_
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * meEEDataCertificationSummary_

Member Data Documentation

bool EEDataCertificationTask::cloneME_
private
const int EEDataCertificationTask::DccId_
staticprotected
Initial value:
= {1,2,3,4,5,6,7,8,9,
46,47,48,49,50,51,52,53,54}

Definition at line 56 of file EEDataCertificationTask.h.

Referenced by endLuminosityBlock(), and endRun().

DQMStore* EEDataCertificationTask::dqmStore_
private
bool EEDataCertificationTask::enableCleanup_
private

Definition at line 67 of file EEDataCertificationTask.h.

Referenced by EEDataCertificationTask(), and endJob().

TH2F* EEDataCertificationTask::hDAQ_
private
TH2F* EEDataCertificationTask::hDCS_
private

Definition at line 73 of file EEDataCertificationTask.h.

Referenced by cleanup(), endLuminosityBlock(), and endRun().

TH2F* EEDataCertificationTask::hDQM_
private

Definition at line 71 of file EEDataCertificationTask.h.

Referenced by cleanup(), EEDataCertificationTask(), and endRun().

TH1F* EEDataCertificationTask::hFrontendByLumi_
private

Definition at line 75 of file EEDataCertificationTask.h.

Referenced by cleanup(), EEDataCertificationTask(), and endLuminosityBlock().

TH1F* EEDataCertificationTask::hIntegrityByLumi_
private

Definition at line 74 of file EEDataCertificationTask.h.

Referenced by cleanup(), EEDataCertificationTask(), and endLuminosityBlock().

TH1F* EEDataCertificationTask::hSynchronizationByLumi_
private

Definition at line 76 of file EEDataCertificationTask.h.

Referenced by cleanup(), EEDataCertificationTask(), and endLuminosityBlock().

MonitorElement* EEDataCertificationTask::meEEDataCertification_[18]
private
MonitorElement* EEDataCertificationTask::meEEDataCertificationSummary_
private
MonitorElement* EEDataCertificationTask::meEEDataCertificationSummaryMap_
private
MonitorElement* EEDataCertificationTask::meEEReportSummary_
private

Definition at line 81 of file EEDataCertificationTask.h.

MonitorElement* EEDataCertificationTask::meEEReportSummaryContents_[36]
private

Definition at line 82 of file EEDataCertificationTask.h.

bool EEDataCertificationTask::mergeRuns_
private

Definition at line 69 of file EEDataCertificationTask.h.

Referenced by beginRun(), and EEDataCertificationTask().

const int EEDataCertificationTask::nTowerMax_ = 44
staticprotected

Definition at line 57 of file EEDataCertificationTask.h.

Referenced by endLuminosityBlock(), and endRun().

std::string EEDataCertificationTask::prefixME_
private