CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
DQMHcalPhiSymAlCaReco Class Reference

#include <DQMHcalPhiSymAlCaReco.h>

Inheritance diagram for DQMHcalPhiSymAlCaReco:
DQMEDAnalyzer edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 DQMHcalPhiSymAlCaReco (const edm::ParameterSet &)
 
 ~DQMHcalPhiSymAlCaReco () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void endRun (const edm::Run &r, const edm::EventSetup &c) override
 
- 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)
 

Private Attributes

int eventCounter_
 
std::string fileName_
 Output file name if required. More...
 
std::string folderName_
 DQM folder name. More...
 
edm::EDGetTokenT< HBHERecHitCollectionhbherecoMB
 object to monitor More...
 
edm::EDGetTokenT< HBHERecHitCollectionhbherecoNoise
 
MonitorElementhFEDsize
 
edm::EDGetTokenT< HFRecHitCollectionhfrecoMB
 
edm::EDGetTokenT< HFRecHitCollectionhfrecoNoise
 
MonitorElementhHcalIsZS
 
int hiDistr_r_nbin_
 
double hiDistr_x_max_
 
double hiDistr_x_min_
 
int hiDistr_x_nbin_
 
double hiDistr_y_max_
 
double hiDistr_y_min_
 
int hiDistr_y_nbin_
 
MonitorElementhiDistrHBHEsize1D_
 
MonitorElementhiDistrHFsize1D_
 
MonitorElementhiDistrMB2Min2D_
 
MonitorElementhiDistrMB2Pl2D_
 
MonitorElementhiDistrMBMin2D_
 
MonitorElementhiDistrMBPl2D_
 
MonitorElementhiDistrNoise2Min2D_
 
MonitorElementhiDistrNoise2Pl2D_
 
MonitorElementhiDistrNoiseMin2D_
 
MonitorElementhiDistrNoisePl2D_
 
MonitorElementhiDistrVarMBMin2D_
 
MonitorElementhiDistrVarMBPl2D_
 
MonitorElementhiDistrVarNoiseMin2D_
 
MonitorElementhiDistrVarNoisePl2D_
 
MonitorElementhL1Id
 
edm::InputTag horecoMB
 
edm::InputTag horecoNoise
 
double ihbhe_size_
 
double ihf_size_
 
unsigned int period_
 
edm::EDGetTokenT< FEDRawDataCollectionrawInLabel_
 
bool saveToFile_
 Write to file. More...
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 24 of file DQMHcalPhiSymAlCaReco.h.

Constructor & Destructor Documentation

DQMHcalPhiSymAlCaReco::DQMHcalPhiSymAlCaReco ( const edm::ParameterSet ps)

Definition at line 45 of file DQMHcalPhiSymAlCaReco.cc.

References fileName_, folderName_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hbherecoMB, hbherecoNoise, hfrecoMB, hfrecoNoise, hiDistr_r_nbin_, hiDistr_x_max_, hiDistr_x_min_, hiDistr_x_nbin_, hiDistr_y_max_, hiDistr_y_min_, hiDistr_y_nbin_, horecoMB, horecoNoise, ihbhe_size_, ihf_size_, period_, rawInLabel_, and saveToFile_.

45  :
47 {
48  //
49  // Input from configurator file
50  //
51  folderName_ = ps.getUntrackedParameter<string>("FolderName","ALCAStreamHcalPhiSym");
52 
53  hbherecoMB = consumes<HBHERecHitCollection>(ps.getParameter<edm::InputTag>("hbheInputMB"));
54  horecoMB = ps.getParameter<edm::InputTag>("hoInputMB");
55  hfrecoMB = consumes<HFRecHitCollection>(ps.getParameter<edm::InputTag>("hfInputMB"));
56 
57  hbherecoNoise = consumes<HBHERecHitCollection>(ps.getParameter<edm::InputTag>("hbheInputNoise"));
58  horecoNoise = ps.getParameter<edm::InputTag>("hoInputNoise");
59  hfrecoNoise = consumes<HFRecHitCollection>(ps.getParameter<edm::InputTag>("hfInputNoise"));
60 
61  rawInLabel_ = consumes<FEDRawDataCollection>(ps.getParameter<edm::InputTag>("rawInputLabel"));
62 
63  period_ = ps.getParameter<unsigned int>("period") ;
64 
65  saveToFile_ = ps.getUntrackedParameter<bool>("SaveToFile",false);
66  fileName_ = ps.getUntrackedParameter<string>("FileName","MonitorAlCaHcalPhiSym.root");
67 
68  // histogram parameters
69 
70  // Distribution of rechits in iPhi, iEta
71  hiDistr_y_nbin_ = ps.getUntrackedParameter<int>("hiDistr_y_nbin",72);
72  hiDistr_y_min_ = ps.getUntrackedParameter<double>("hiDistr_y_min",0.5);
73  hiDistr_y_max_ = ps.getUntrackedParameter<double>("hiDistr_y_max",72.5);
74  hiDistr_x_nbin_ = ps.getUntrackedParameter<int>("hiDistr_x_nbin",41);
75  hiDistr_x_min_ = ps.getUntrackedParameter<double>("hiDistr_x_min",0.5);
76  hiDistr_x_max_ = ps.getUntrackedParameter<double>("hiDistr_x_max",41.5);
77  // Check for NZS
78  hiDistr_r_nbin_ = ps.getUntrackedParameter<int>("hiDistr_r_nbin",100);
79  ihbhe_size_ = ps.getUntrackedParameter<double>("ihbhe_size_",5184.);
80  ihf_size_ = ps.getUntrackedParameter<double>("ihf_size_",1728.);
81 
82 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool saveToFile_
Write to file.
edm::EDGetTokenT< HBHERecHitCollection > hbherecoNoise
edm::EDGetTokenT< FEDRawDataCollection > rawInLabel_
edm::EDGetTokenT< HFRecHitCollection > hfrecoNoise
std::string folderName_
DQM folder name.
edm::EDGetTokenT< HFRecHitCollection > hfrecoMB
std::string fileName_
Output file name if required.
edm::EDGetTokenT< HBHERecHitCollection > hbherecoMB
object to monitor
DQMHcalPhiSymAlCaReco::~DQMHcalPhiSymAlCaReco ( )
override

Definition at line 84 of file DQMHcalPhiSymAlCaReco.cc.

85 {}

Member Function Documentation

void DQMHcalPhiSymAlCaReco::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotected

Definition at line 304 of file DQMHcalPhiSymAlCaReco.cc.

References edm::SortedCollection< T, SORT >::begin(), FEDRawData::data(), HcalDetId::depth(), edm::SortedCollection< T, SORT >::end(), eventCounter_, FEDRawDataCollection::FEDData(), MonitorElement::Fill(), edm::Event::getByToken(), HcalDCCHeader::getSpigotData(), HcalDCCHeader::getSpigotPresent(), hbherecoMB, hbherecoNoise, hFEDsize, hfrecoMB, hfrecoNoise, hHcalIsZS, hiDistrHBHEsize1D_, hiDistrHFsize1D_, hiDistrMB2Min2D_, hiDistrMB2Pl2D_, hiDistrMBMin2D_, hiDistrMBPl2D_, hiDistrNoise2Min2D_, hiDistrNoise2Pl2D_, hiDistrNoiseMin2D_, hiDistrNoisePl2D_, hL1Id, mps_fire::i, HcalDetId::ieta(), ihbhe_size_, ihf_size_, HcalDetId::iphi(), HcalHTRData::isUnsuppressed(), edm::HandleBase::isValid(), gen::k, LogDebug, FEDHeader::lvl1ID(), FEDNumbering::MAXHCALFEDID, FEDNumbering::MINHCALFEDID, period_, funct::pow(), edm::Handle< T >::product(), rawInLabel_, mathSSE::return(), FEDRawData::size(), edm::SortedCollection< T, SORT >::size(), and HcalDCCHeader::SPIGOT_COUNT.

305  {
306 
307 
308  eventCounter_++;
309 
311  iEvent.getByToken(rawInLabel_,rawIn);
312 
313  if(!rawIn.isValid()){
314  LogDebug("") << "HcalCalibAlgos: Error! can't get hbhe product!" << std::endl;
315  return ;
316  }
317 
318  //get HCAL FEDs:
319  std::vector<int> selFEDs;
321  {
322  selFEDs.push_back(i);
323  }
324 
325  // std::cout<<" Size of FED "<<selFEDs.size()<<std::endl;
326 
327  const FEDRawDataCollection *rdc=rawIn.product();
328 
329  bool hcalIsZS = false;
330  int lvl1ID = 0;
331  bool lvl1IDFound = false;
332  for (unsigned int k=0; k<selFEDs.size(); k++) {
333  const FEDRawData & fedData = rdc->FEDData(selFEDs[k]);
334  // std::cout<<fedData.size()*std::pow(1024.,-1)<<std::endl;
335  hFEDsize->Fill(fedData.size()*std::pow(1024.,-1),1);
336 
337  // get HCAL DCC Header for each FEDRawData
338  const HcalDCCHeader* dccHeader=(const HcalDCCHeader*)(fedData.data());
339  if (dccHeader) {
340  // walk through the HTR data...
341  HcalHTRData htr;
342 
343  int nspigot =0;
344  for (int spigot=0; spigot<HcalDCCHeader::SPIGOT_COUNT; spigot++) {
345  nspigot++;
346 
347  if (!dccHeader->getSpigotPresent(spigot)) continue;
348 
349  // Load the given decoder with the pointer and length from this spigot.
350  dccHeader->getSpigotData(spigot,htr, fedData.size());
351 
352  if(k != 20 && nspigot !=14 ) {
353  if ( !htr.isUnsuppressed() ) { hcalIsZS = true; }
354  }
355  }
356  }
357 
358  // try to get the lvl1ID from the HCAL fed
359  if (!lvl1IDFound && (fedData.size() > 0)) {
360  // get FED Header for FEDRawData
361  FEDHeader fedHeader(fedData.data());
362  lvl1ID = fedHeader.lvl1ID();
363  lvl1IDFound = true;
364  }
365  } // loop over HcalFEDs
366 
367  hHcalIsZS->Fill( hcalIsZS );
368  hL1Id->Fill( lvl1ID%period_ );
369 
371  iEvent.getByToken(hbherecoNoise, hbheNS);
372 
373  if(!hbheNS.isValid()){
374  LogDebug("") << "HcalCalibAlgos: Error! can't get hbhe product!" << std::endl;
375  return ;
376  }
377 
379  iEvent.getByToken(hbherecoMB, hbheMB);
380 
381  if(!hbheMB.isValid()){
382  LogDebug("") << "HcalCalibAlgos: Error! can't get hbhe product!" << std::endl;
383  return ;
384  }
385 
387  iEvent.getByToken(hfrecoNoise, hfNS);
388 
389  if(!hfNS.isValid()){
390  LogDebug("") << "HcalCalibAlgos: Error! can't get hbhe product!" << std::endl;
391  return ;
392  }
393 
395  iEvent.getByToken(hfrecoMB, hfMB);
396 
397  if(!hfMB.isValid()){
398  LogDebug("") << "HcalCalibAlgos: Error! can't get hbhe product!" << std::endl;
399  return ;
400  }
401 
402  const HBHERecHitCollection HithbheNS = *(hbheNS.product());
403 
404  hiDistrHBHEsize1D_->Fill(HithbheNS.size()/ihbhe_size_);
405 
406 
407  for(HBHERecHitCollection::const_iterator hbheItr=HithbheNS.begin(); hbheItr!=HithbheNS.end(); hbheItr++)
408  {
409  DetId id = (*hbheItr).detid();
410  HcalDetId hid=HcalDetId(id);
411 
412  if(hid.depth() == 1) {
413  if( hid.ieta() > 0 ) {
414  hiDistrNoisePl2D_->Fill(hid.ieta(),hid.iphi(),hbheItr->energy());
415  hiDistrNoise2Pl2D_->Fill(hid.ieta(),hid.iphi(),hbheItr->energy()*hbheItr->energy());
416  } else {
417  hiDistrNoiseMin2D_->Fill(fabs(hid.ieta()),hid.iphi(),hbheItr->energy());
418  hiDistrNoise2Min2D_->Fill(fabs(hid.ieta()),hid.iphi(),hbheItr->energy()*hbheItr->energy());
419  }
420  }
421  }
422 
423  const HBHERecHitCollection HithbheMB = *(hbheMB.product());
424 
425  for(HBHERecHitCollection::const_iterator hbheItr=HithbheMB.begin(); hbheItr!=HithbheMB.end(); hbheItr++)
426  {
427  DetId id = (*hbheItr).detid();
428  HcalDetId hid=HcalDetId(id);
429 
430  if(hid.depth() == 1) {
431  if( hid.ieta() > 0 ) {
432  hiDistrMBPl2D_->Fill(hid.ieta(),hid.iphi(),hbheItr->energy());
433  hiDistrMB2Pl2D_->Fill(hid.ieta(),hid.iphi(),hbheItr->energy()*hbheItr->energy());
434  } else {
435  hiDistrMBMin2D_->Fill(fabs(hid.ieta()),hid.iphi(),hbheItr->energy());
436  hiDistrMB2Min2D_->Fill(fabs(hid.ieta()),hid.iphi(),hbheItr->energy()*hbheItr->energy());
437  }
438  }
439 
440  }
441 
442  const HFRecHitCollection HithfNS = *(hfNS.product());
443 
444  hiDistrHFsize1D_->Fill(HithfNS.size()/ihf_size_);
445 
446  for(HFRecHitCollection::const_iterator hbheItr=HithfNS.begin(); hbheItr!=HithfNS.end(); hbheItr++)
447  {
448 
449  DetId id = (*hbheItr).detid();
450  HcalDetId hid=HcalDetId(id);
451 
452  if(hid.depth() == 1) {
453  if( hid.ieta() > 0 ) {
454  hiDistrNoisePl2D_->Fill(hid.ieta(),hid.iphi(),hbheItr->energy());
455  hiDistrNoise2Pl2D_->Fill(hid.ieta(),hid.iphi(),hbheItr->energy()*hbheItr->energy());
456  } else {
457  hiDistrNoiseMin2D_->Fill(fabs(hid.ieta()),hid.iphi(),hbheItr->energy());
458  hiDistrNoise2Min2D_->Fill(fabs(hid.ieta()),hid.iphi(),hbheItr->energy()*hbheItr->energy());
459  }
460  }
461 
462  }
463 
464  const HFRecHitCollection HithfMB = *(hfMB.product());
465 
466  for(HFRecHitCollection::const_iterator hbheItr=HithfMB.begin(); hbheItr!=HithfMB.end(); hbheItr++)
467  {
468  DetId id = (*hbheItr).detid();
469  HcalDetId hid=HcalDetId(id);
470 
471  if(hid.depth() == 1) {
472  if( hid.ieta() > 0 ) {
473  hiDistrMBPl2D_->Fill(hid.ieta(),hid.iphi(),hbheItr->energy());
474  hiDistrMB2Pl2D_->Fill(hid.ieta(),hid.iphi(),hbheItr->energy()*hbheItr->energy());
475  } else {
476  hiDistrMBMin2D_->Fill(fabs(hid.ieta()),hid.iphi(),hbheItr->energy());
477  hiDistrMB2Min2D_->Fill(fabs(hid.ieta()),hid.iphi(),hbheItr->energy()*hbheItr->energy());
478  }
479  }
480  }
481 
482 
483 } //analyze
#define LogDebug(id)
MonitorElement * hiDistrNoisePl2D_
edm::EDGetTokenT< HBHERecHitCollection > hbherecoNoise
std::vector< HBHERecHit >::const_iterator const_iterator
edm::EDGetTokenT< FEDRawDataCollection > rawInLabel_
int getSpigotData(int nspigot, HcalHTRData &decodeTool, int validSize) const
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
return((rh^lh)&mask)
void Fill(long long x)
bool isUnsuppressed() const
Is this event an unsuppresed event?
Definition: HcalHTRData.cc:354
MonitorElement * hiDistrMBPl2D_
MonitorElement * hiDistrHFsize1D_
int depth() const
get the tower depth
Definition: HcalDetId.h:162
edm::EDGetTokenT< HFRecHitCollection > hfrecoNoise
int iEvent
Definition: GenABIO.cc:230
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
bool getSpigotPresent(unsigned int nspigot) const
Read the "PRESENT" bit for this spigot.
MonitorElement * hiDistrMB2Pl2D_
bool isValid() const
Definition: HandleBase.h:74
MonitorElement * hiDistrNoise2Min2D_
int k[5][pyjets_maxn]
const_iterator end() const
int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
Definition: DetId.h:18
T const * product() const
Definition: Handle.h:81
MonitorElement * hiDistrMBMin2D_
edm::EDGetTokenT< HFRecHitCollection > hfrecoMB
static const int SPIGOT_COUNT
Definition: HcalDCCHeader.h:19
size_type size() const
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
MonitorElement * hiDistrNoise2Pl2D_
MonitorElement * hiDistrNoiseMin2D_
uint32_t lvl1ID() const
Level-1 event number generated by the TTC system.
Definition: FEDHeader.cc:22
edm::EDGetTokenT< HBHERecHitCollection > hbherecoMB
object to monitor
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
const_iterator begin() const
MonitorElement * hiDistrHBHEsize1D_
MonitorElement * hiDistrMB2Min2D_
void DQMHcalPhiSymAlCaReco::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  irun,
edm::EventSetup const &  isetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 88 of file DQMHcalPhiSymAlCaReco.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), eventCounter_, folderName_, hFEDsize, hHcalIsZS, hiDistr_r_nbin_, hiDistr_x_max_, hiDistr_x_min_, hiDistr_x_nbin_, hiDistr_y_max_, hiDistr_y_min_, hiDistr_y_nbin_, hiDistrHBHEsize1D_, hiDistrHFsize1D_, hiDistrMB2Min2D_, hiDistrMB2Pl2D_, hiDistrMBMin2D_, hiDistrMBPl2D_, hiDistrNoise2Min2D_, hiDistrNoise2Pl2D_, hiDistrNoiseMin2D_, hiDistrNoisePl2D_, hiDistrVarMBMin2D_, hiDistrVarMBPl2D_, hiDistrVarNoiseMin2D_, hiDistrVarNoisePl2D_, hL1Id, period_, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), TrackerOfflineValidation_Dqm_cff::xmax, and TrackerOfflineValidation_Dqm_cff::xmin.

88  {
89 
90  // create and cd into new folder
92 
93  eventCounter_ = 0;
94 
95  hFEDsize = ibooker.book1D("hFEDsize","HCAL FED size (kB)",200,-0.5,20.5);
96  hFEDsize->setAxisTitle("kB",1);
97 
98  hHcalIsZS = ibooker.book1D("hHcalIsZS", "Hcal Is ZS", 4, -1.5, 2.5);
99  hHcalIsZS->setBinLabel(2, "NZS");
100  hHcalIsZS->setBinLabel(3, "ZS");
101 
102  char hname[50];
103  sprintf(hname, "L1 Event Number %% %i", period_);
104  hL1Id = ibooker.book1D("hL1Id", hname,4200,-99.5,4099.5);
105  hL1Id->setAxisTitle(hname);
106 
107 
108  // book some histograms 1D
109  double xmin = 0.1;
110  double xmax = 1.1;
112  ibooker.book1D("DistrHBHEsize","Size of HBHE Collection",
114  xmin,
115  xmax
116  );
118  ibooker.book1D("DistrHFsize","Size of HF Collection",
120  xmin,
121  xmax
122  );
123 
124 
125  // First moment
126  hiDistrMBPl2D_ =
127  ibooker.book2D("MBdepthPl1", "iphi- +ieta signal distribution at depth1",
134  );
135 
136  hiDistrMBPl2D_->setAxisTitle("i#phi ", 2);
137  hiDistrMBPl2D_->setAxisTitle("i#eta ", 1);
138 
139 
141  ibooker.book2D("NoisedepthPl1", "iphi-ieta noise distribution at depth1",
142  hiDistr_x_nbin_+1,
143  hiDistr_x_min_-1.,
145  hiDistr_y_nbin_+1,
146  hiDistr_y_min_-1.,
148  );
149 
150  hiDistrNoisePl2D_->setAxisTitle("i#phi ", 2);
151  hiDistrNoisePl2D_->setAxisTitle("i#eta ", 1);
152 // Second moment
154  ibooker.book2D("MB2depthPl1", "iphi- +ieta signal distribution at depth1",
161  );
162 
163  hiDistrMB2Pl2D_->setAxisTitle("i#phi ", 2);
164  hiDistrMB2Pl2D_->setAxisTitle("i#eta ", 1);
165 
166 
168  ibooker.book2D("Noise2depthPl1", "iphi-ieta noise distribution at depth1",
175  );
176 
177  hiDistrNoise2Pl2D_->setAxisTitle("i#phi ", 2);
178  hiDistrNoise2Pl2D_->setAxisTitle("i#eta ", 1);
179 
180 // Variance
182  ibooker.book2D("VarMBdepthPl1", "iphi- +ieta signal distribution at depth1",
189  );
190 
191  hiDistrVarMBPl2D_->setAxisTitle("i#phi ", 2);
192  hiDistrVarMBPl2D_->setAxisTitle("i#eta ", 1);
193 
194 
196  ibooker.book2D("VarNoisedepthPl1", "iphi-ieta noise distribution at depth1",
203  );
204 
205  hiDistrVarNoisePl2D_->setAxisTitle("i#phi ", 2);
206  hiDistrVarNoisePl2D_->setAxisTitle("i#eta ", 1);
207 
208 //==================================================================================
209 // First moment
210  hiDistrMBMin2D_ =
211  ibooker.book2D("MBdepthMin1", "iphi- +ieta signal distribution at depth1",
218  );
219 
220  hiDistrMBMin2D_->setAxisTitle("i#phi ", 2);
221  hiDistrMBMin2D_->setAxisTitle("i#eta ", 1);
222 
223 
225  ibooker.book2D("NoisedepthMin1", "iphi-ieta noise distribution at depth1",
232  );
233 
234  hiDistrNoiseMin2D_->setAxisTitle("i#phi ", 2);
235  hiDistrNoiseMin2D_->setAxisTitle("i#eta ", 1);
236 // Second moment
238  ibooker.book2D("MB2depthMin1", "iphi- +ieta signal distribution at depth1",
245  );
246 
247  hiDistrMB2Min2D_->setAxisTitle("i#phi ", 2);
248  hiDistrMB2Min2D_->setAxisTitle("i#eta ", 1);
249 
250 
252  ibooker.book2D("Noise2depthMin1", "iphi-ieta noise distribution at depth1",
259  );
260 
261  hiDistrNoise2Min2D_->setAxisTitle("i#phi ", 2);
262  hiDistrNoise2Min2D_->setAxisTitle("i#eta ", 1);
263 
264 // Variance
266  ibooker.book2D("VarMBdepthMin1", "iphi- +ieta signal distribution at depth1",
273  );
274 
275  hiDistrVarMBMin2D_->setAxisTitle("i#phi ", 2);
276  hiDistrVarMBMin2D_->setAxisTitle("i#eta ", 1);
277 
278 
280  ibooker.book2D("VarNoisedepthMin1", "iphi-ieta noise distribution at depth1",
287  );
288 
289  hiDistrVarNoiseMin2D_->setAxisTitle("i#phi ", 2);
290  hiDistrVarNoiseMin2D_->setAxisTitle("i#eta ", 1);
291 
292 
293 }
MonitorElement * hiDistrNoisePl2D_
MonitorElement * hiDistrVarMBPl2D_
MonitorElement * hiDistrVarNoiseMin2D_
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * hiDistrMBPl2D_
MonitorElement * hiDistrHFsize1D_
MonitorElement * hiDistrVarMBMin2D_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
MonitorElement * hiDistrVarNoisePl2D_
std::string folderName_
DQM folder name.
MonitorElement * hiDistrMB2Pl2D_
MonitorElement * hiDistrNoise2Min2D_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
MonitorElement * hiDistrMBMin2D_
MonitorElement * hiDistrNoise2Pl2D_
MonitorElement * hiDistrNoiseMin2D_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * hiDistrHBHEsize1D_
MonitorElement * hiDistrMB2Min2D_
void DQMHcalPhiSymAlCaReco::endRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotected

Definition at line 490 of file DQMHcalPhiSymAlCaReco.cc.

References eventCounter_, MonitorElement::getBinContent(), hiDistr_x_nbin_, hiDistr_y_nbin_, hiDistrMB2Min2D_, hiDistrMB2Pl2D_, hiDistrMBMin2D_, hiDistrMBPl2D_, hiDistrNoise2Min2D_, hiDistrNoise2Pl2D_, hiDistrNoiseMin2D_, hiDistrNoisePl2D_, hiDistrVarMBMin2D_, hiDistrVarMBPl2D_, hiDistrVarNoiseMin2D_, hiDistrVarNoisePl2D_, gen::k, and MonitorElement::setBinContent().

490  {
491 // Keep Variances
492  if(eventCounter_ > 0) {
493  for(int k=0; k<=hiDistr_x_nbin_;k++)
494  {
495  for(int j=0; j<=hiDistr_y_nbin_;j++)
496  {
497 // First moment
498  float cc1=hiDistrMBPl2D_->getBinContent(k,j);
499  cc1 = cc1 * 1./eventCounter_;
500  float cc2=hiDistrNoisePl2D_->getBinContent(k,j);
501  cc2 = cc2 * 1./eventCounter_;
502  float cc3=hiDistrMBMin2D_->getBinContent(k,j);
503  cc3 = cc3 * 1./eventCounter_;
504  float cc4=hiDistrNoiseMin2D_->getBinContent(k,j);
505  cc4 = cc4 * 1./eventCounter_;
506 // Second moment
507  float cc11=hiDistrMB2Pl2D_->getBinContent(k,j);
508  cc11 = cc11 * 1./eventCounter_;
509  hiDistrVarMBPl2D_->setBinContent(k,j,cc11-cc1*cc1);
510  float cc22=hiDistrNoise2Pl2D_->getBinContent(k,j);
511  cc22 = cc22 * 1./eventCounter_;
512  hiDistrVarNoisePl2D_->setBinContent(k,j,cc22-cc2*cc2);
513  float cc33=hiDistrMB2Min2D_->getBinContent(k,j);
514  cc33 = cc33 * 1./eventCounter_;
515  hiDistrVarMBMin2D_->setBinContent(k,j,cc33-cc3*cc3);
516  float cc44=hiDistrNoise2Min2D_->getBinContent(k,j);
517  cc44 = cc44 * 1./eventCounter_;
518  hiDistrVarNoiseMin2D_->setBinContent(k,j,cc44-cc4*cc4);
519  }
520  }
521  }
522 }
MonitorElement * hiDistrNoisePl2D_
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * hiDistrVarMBPl2D_
MonitorElement * hiDistrVarNoiseMin2D_
MonitorElement * hiDistrMBPl2D_
MonitorElement * hiDistrVarMBMin2D_
MonitorElement * hiDistrVarNoisePl2D_
MonitorElement * hiDistrMB2Pl2D_
MonitorElement * hiDistrNoise2Min2D_
int k[5][pyjets_maxn]
MonitorElement * hiDistrMBMin2D_
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * hiDistrNoise2Pl2D_
MonitorElement * hiDistrNoiseMin2D_
MonitorElement * hiDistrMB2Min2D_

Member Data Documentation

int DQMHcalPhiSymAlCaReco::eventCounter_
private

Definition at line 45 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), bookHistograms(), and endRun().

std::string DQMHcalPhiSymAlCaReco::fileName_
private

Output file name if required.

Definition at line 106 of file DQMHcalPhiSymAlCaReco.h.

Referenced by DQMHcalPhiSymAlCaReco().

std::string DQMHcalPhiSymAlCaReco::folderName_
private

DQM folder name.

Definition at line 97 of file DQMHcalPhiSymAlCaReco.h.

Referenced by bookHistograms(), and DQMHcalPhiSymAlCaReco().

edm::EDGetTokenT<HBHERecHitCollection> DQMHcalPhiSymAlCaReco::hbherecoMB
private

object to monitor

Definition at line 86 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), and DQMHcalPhiSymAlCaReco().

edm::EDGetTokenT<HBHERecHitCollection> DQMHcalPhiSymAlCaReco::hbherecoNoise
private

Definition at line 90 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), and DQMHcalPhiSymAlCaReco().

MonitorElement* DQMHcalPhiSymAlCaReco::hFEDsize
private

Definition at line 68 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<HFRecHitCollection> DQMHcalPhiSymAlCaReco::hfrecoMB
private

Definition at line 88 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), and DQMHcalPhiSymAlCaReco().

edm::EDGetTokenT<HFRecHitCollection> DQMHcalPhiSymAlCaReco::hfrecoNoise
private

Definition at line 92 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), and DQMHcalPhiSymAlCaReco().

MonitorElement* DQMHcalPhiSymAlCaReco::hHcalIsZS
private

Definition at line 69 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), and bookHistograms().

int DQMHcalPhiSymAlCaReco::hiDistr_r_nbin_
private

Definition at line 79 of file DQMHcalPhiSymAlCaReco.h.

Referenced by bookHistograms(), and DQMHcalPhiSymAlCaReco().

double DQMHcalPhiSymAlCaReco::hiDistr_x_max_
private

Definition at line 77 of file DQMHcalPhiSymAlCaReco.h.

Referenced by bookHistograms(), and DQMHcalPhiSymAlCaReco().

double DQMHcalPhiSymAlCaReco::hiDistr_x_min_
private

Definition at line 76 of file DQMHcalPhiSymAlCaReco.h.

Referenced by bookHistograms(), and DQMHcalPhiSymAlCaReco().

int DQMHcalPhiSymAlCaReco::hiDistr_x_nbin_
private

Definition at line 73 of file DQMHcalPhiSymAlCaReco.h.

Referenced by bookHistograms(), DQMHcalPhiSymAlCaReco(), and endRun().

double DQMHcalPhiSymAlCaReco::hiDistr_y_max_
private

Definition at line 75 of file DQMHcalPhiSymAlCaReco.h.

Referenced by bookHistograms(), and DQMHcalPhiSymAlCaReco().

double DQMHcalPhiSymAlCaReco::hiDistr_y_min_
private

Definition at line 74 of file DQMHcalPhiSymAlCaReco.h.

Referenced by bookHistograms(), and DQMHcalPhiSymAlCaReco().

int DQMHcalPhiSymAlCaReco::hiDistr_y_nbin_
private

Definition at line 72 of file DQMHcalPhiSymAlCaReco.h.

Referenced by bookHistograms(), DQMHcalPhiSymAlCaReco(), and endRun().

MonitorElement* DQMHcalPhiSymAlCaReco::hiDistrHBHEsize1D_
private

Definition at line 65 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* DQMHcalPhiSymAlCaReco::hiDistrHFsize1D_
private

Definition at line 66 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* DQMHcalPhiSymAlCaReco::hiDistrMB2Min2D_
private

Definition at line 57 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), bookHistograms(), and endRun().

MonitorElement* DQMHcalPhiSymAlCaReco::hiDistrMB2Pl2D_
private

Definition at line 55 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), bookHistograms(), and endRun().

MonitorElement* DQMHcalPhiSymAlCaReco::hiDistrMBMin2D_
private

Definition at line 52 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), bookHistograms(), and endRun().

MonitorElement* DQMHcalPhiSymAlCaReco::hiDistrMBPl2D_
private

Definition at line 50 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), bookHistograms(), and endRun().

MonitorElement* DQMHcalPhiSymAlCaReco::hiDistrNoise2Min2D_
private

Definition at line 58 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), bookHistograms(), and endRun().

MonitorElement* DQMHcalPhiSymAlCaReco::hiDistrNoise2Pl2D_
private

Definition at line 56 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), bookHistograms(), and endRun().

MonitorElement* DQMHcalPhiSymAlCaReco::hiDistrNoiseMin2D_
private

Definition at line 53 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), bookHistograms(), and endRun().

MonitorElement* DQMHcalPhiSymAlCaReco::hiDistrNoisePl2D_
private

Definition at line 51 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), bookHistograms(), and endRun().

MonitorElement* DQMHcalPhiSymAlCaReco::hiDistrVarMBMin2D_
private

Definition at line 62 of file DQMHcalPhiSymAlCaReco.h.

Referenced by bookHistograms(), and endRun().

MonitorElement* DQMHcalPhiSymAlCaReco::hiDistrVarMBPl2D_
private

Definition at line 60 of file DQMHcalPhiSymAlCaReco.h.

Referenced by bookHistograms(), and endRun().

MonitorElement* DQMHcalPhiSymAlCaReco::hiDistrVarNoiseMin2D_
private

Definition at line 63 of file DQMHcalPhiSymAlCaReco.h.

Referenced by bookHistograms(), and endRun().

MonitorElement* DQMHcalPhiSymAlCaReco::hiDistrVarNoisePl2D_
private

Definition at line 61 of file DQMHcalPhiSymAlCaReco.h.

Referenced by bookHistograms(), and endRun().

MonitorElement* DQMHcalPhiSymAlCaReco::hL1Id
private

Definition at line 70 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), and bookHistograms().

edm::InputTag DQMHcalPhiSymAlCaReco::horecoMB
private

Definition at line 87 of file DQMHcalPhiSymAlCaReco.h.

Referenced by DQMHcalPhiSymAlCaReco().

edm::InputTag DQMHcalPhiSymAlCaReco::horecoNoise
private

Definition at line 91 of file DQMHcalPhiSymAlCaReco.h.

Referenced by DQMHcalPhiSymAlCaReco().

double DQMHcalPhiSymAlCaReco::ihbhe_size_
private

Definition at line 80 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), and DQMHcalPhiSymAlCaReco().

double DQMHcalPhiSymAlCaReco::ihf_size_
private

Definition at line 81 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), and DQMHcalPhiSymAlCaReco().

unsigned int DQMHcalPhiSymAlCaReco::period_
private

Definition at line 103 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), bookHistograms(), and DQMHcalPhiSymAlCaReco().

edm::EDGetTokenT<FEDRawDataCollection> DQMHcalPhiSymAlCaReco::rawInLabel_
private

Definition at line 94 of file DQMHcalPhiSymAlCaReco.h.

Referenced by analyze(), and DQMHcalPhiSymAlCaReco().

bool DQMHcalPhiSymAlCaReco::saveToFile_
private

Write to file.

Definition at line 100 of file DQMHcalPhiSymAlCaReco.h.

Referenced by DQMHcalPhiSymAlCaReco().