CMS 3D CMS Logo

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

#include <EcalPreshowerNoiseDistrib.h>

Inheritance diagram for EcalPreshowerNoiseDistrib:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
 EcalPreshowerNoiseDistrib (const edm::ParameterSet &ps)
 Constructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 Analyze. More...
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Types

typedef std::map< uint32_t, float, std::less< uint32_t > > MapType
 

Private Attributes

edm::EDGetTokenT< ESDigiCollectionESdigiCollectionToken_
 
MonitorElementmeESDigi3D_
 
MonitorElementmeESDigiADC_ [3]
 
MonitorElementmeESDigiCorr_ [3]
 
MonitorElementmeESDigiMultiplicity_
 
std::string outputFile_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 26 of file EcalPreshowerNoiseDistrib.h.

Member Typedef Documentation

◆ MapType

typedef std::map<uint32_t, float, std::less<uint32_t> > EcalPreshowerNoiseDistrib::MapType
private

Definition at line 27 of file EcalPreshowerNoiseDistrib.h.

Constructor & Destructor Documentation

◆ EcalPreshowerNoiseDistrib()

EcalPreshowerNoiseDistrib::EcalPreshowerNoiseDistrib ( const edm::ParameterSet ps)

Constructor.

Definition at line 8 of file EcalPreshowerNoiseDistrib.cc.

References edm::ParameterSet::getUntrackedParameter(), cuy::ii, meESDigiADC_, meESDigiMultiplicity_, and verbose_.

9  : ESdigiCollectionToken_(consumes<ESDigiCollection>(ps.getParameter<edm::InputTag>("ESdigiCollection"))) {
10  // verbosity switch
11  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
12 
13  // histos
14  meESDigiMultiplicity_ = nullptr;
15  for (int ii = 0; ii < 3; ii++) {
16  meESDigiADC_[ii] = nullptr;
17  }
18 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
T getUntrackedParameter(std::string const &, T const &) const
ii
Definition: cuy.py:589
edm::EDGetTokenT< ESDigiCollection > ESdigiCollectionToken_

Member Function Documentation

◆ analyze()

void EcalPreshowerNoiseDistrib::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotectedvirtual

Analyze.

Reimplemented from DQMEDAnalyzer.

Definition at line 39 of file EcalPreshowerNoiseDistrib.cc.

References gpuClustering::adc, MillePedeFileConverter_cfg::e, ESdigiCollectionToken_, dqm::impl::MonitorElement::Fill(), edm::HandleBase::isValid(), ESDataFrame::MAXSAMPLES, meESDigi3D_, meESDigiADC_, meESDigiCorr_, meESDigiMultiplicity_, ecalTB2006H4_GenSimDigiReco_cfg::mySample, edm::Handle< T >::product(), edm::DataFrameContainer::reserve(), ecalGpuTask_cfi::sample, ESDataFrame::size(), and edm::DataFrameContainer::size().

39  {
41 
42  e.getByToken(ESdigiCollectionToken_, EcalDigiES);
43 
44  // retrun if no data
45  if (!EcalDigiES.isValid())
46  return;
47 
48  // loop over Digis
49  const ESDigiCollection* preshowerDigi = EcalDigiES.product();
50 
51  std::vector<double> esADCCounts;
52  esADCCounts.reserve(ESDataFrame::MAXSAMPLES);
53 
54  int nDigis = 0;
55 
56  for (unsigned int digis = 0; digis < EcalDigiES->size(); ++digis) {
57  nDigis++;
58  ESDataFrame esdf = (*preshowerDigi)[digis];
59  int nrSamples = esdf.size();
60  for (int sample = 0; sample < nrSamples; ++sample) {
61  ESSample mySample = esdf[sample];
62  if (meESDigiADC_[sample]) {
64  }
65  }
66 
67  // to study correlations
68  if (meESDigiCorr_[0]) {
69  meESDigiCorr_[0]->Fill(esdf[0].adc(), esdf[1].adc());
70  }
71  if (meESDigiCorr_[1]) {
72  meESDigiCorr_[1]->Fill(esdf[0].adc(), esdf[2].adc());
73  }
74  if (meESDigiCorr_[2]) {
75  meESDigiCorr_[2]->Fill(esdf[1].adc(), esdf[2].adc());
76  }
77 
78  // reference histo: sample0, sample1, sample2
79  if (meESDigi3D_)
80  meESDigi3D_->Fill(esdf[0].adc(), esdf[1].adc(), esdf[2].adc());
81  }
82 
84  meESDigiMultiplicity_->Fill(nDigis);
85 }
int size() const
Definition: ESDataFrame.h:21
T const * product() const
Definition: Handle.h:70
void Fill(long long x)
static const int MAXSAMPLES
Definition: ESDataFrame.h:30
void reserve(size_t isize)
edm::EDGetTokenT< ESDigiCollection > ESdigiCollectionToken_
bool isValid() const
Definition: HandleBase.h:70
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ bookHistograms()

void EcalPreshowerNoiseDistrib::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 20 of file EcalPreshowerNoiseDistrib.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::book3D(), timingPdfMaker::histo, cuy::ii, meESDigi3D_, meESDigiADC_, meESDigiCorr_, and meESDigiMultiplicity_.

20  {
21  Char_t histo[200];
22 
23  sprintf(histo, "multiplicity");
24  meESDigiMultiplicity_ = ibooker.book1D(histo, histo, 1000, 0., 137728);
25 
26  for (int ii = 0; ii < 3; ii++) {
27  sprintf(histo, "esRefHistos%02d", ii);
28  meESDigiADC_[ii] = ibooker.book1D(histo, histo, 35, 983.5, 1018.5);
29  }
30 
31  for (int ii = 0; ii < 3; ii++) {
32  sprintf(histo, "esRefHistosCorr%02d", ii);
33  meESDigiCorr_[ii] = ibooker.book2D(histo, histo, 35, 983.5, 1018.5, 35, 983.5, 1018.5);
34  }
35 
36  meESDigi3D_ = ibooker.book3D("meESDigi3D_", "meESDigi3D_", 35, 983.5, 1018.5, 35, 983.5, 1018.5, 35, 983.5, 1018.5);
37 }
ii
Definition: cuy.py:589

Member Data Documentation

◆ ESdigiCollectionToken_

edm::EDGetTokenT<ESDigiCollection> EcalPreshowerNoiseDistrib::ESdigiCollectionToken_
private

Definition at line 44 of file EcalPreshowerNoiseDistrib.h.

Referenced by analyze().

◆ meESDigi3D_

MonitorElement* EcalPreshowerNoiseDistrib::meESDigi3D_
private

Definition at line 48 of file EcalPreshowerNoiseDistrib.h.

Referenced by analyze(), and bookHistograms().

◆ meESDigiADC_

MonitorElement* EcalPreshowerNoiseDistrib::meESDigiADC_[3]
private

Definition at line 46 of file EcalPreshowerNoiseDistrib.h.

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

◆ meESDigiCorr_

MonitorElement* EcalPreshowerNoiseDistrib::meESDigiCorr_[3]
private

Definition at line 47 of file EcalPreshowerNoiseDistrib.h.

Referenced by analyze(), and bookHistograms().

◆ meESDigiMultiplicity_

MonitorElement* EcalPreshowerNoiseDistrib::meESDigiMultiplicity_
private

Definition at line 49 of file EcalPreshowerNoiseDistrib.h.

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

◆ outputFile_

std::string EcalPreshowerNoiseDistrib::outputFile_
private

Definition at line 42 of file EcalPreshowerNoiseDistrib.h.

◆ verbose_

bool EcalPreshowerNoiseDistrib::verbose_
private

Definition at line 40 of file EcalPreshowerNoiseDistrib.h.

Referenced by EcalPreshowerNoiseDistrib().