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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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 >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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 27 of file EcalPreshowerNoiseDistrib.h.

Member Typedef Documentation

◆ MapType

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

Definition at line 28 of file EcalPreshowerNoiseDistrib.h.

Constructor & Destructor Documentation

◆ EcalPreshowerNoiseDistrib()

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

Constructor.

Definition at line 8 of file EcalPreshowerNoiseDistrib.cc.

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 }

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

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.

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 }

References ecalLiteDTU::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(), simplePhotonAnalyzer_cfi::sample, ESDataFrame::size(), and edm::DataFrameContainer::size().

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 20 of file EcalPreshowerNoiseDistrib.cc.

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 }

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

Member Data Documentation

◆ ESdigiCollectionToken_

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

Definition at line 45 of file EcalPreshowerNoiseDistrib.h.

Referenced by analyze().

◆ meESDigi3D_

MonitorElement* EcalPreshowerNoiseDistrib::meESDigi3D_
private

Definition at line 49 of file EcalPreshowerNoiseDistrib.h.

Referenced by analyze(), and bookHistograms().

◆ meESDigiADC_

MonitorElement* EcalPreshowerNoiseDistrib::meESDigiADC_[3]
private

Definition at line 47 of file EcalPreshowerNoiseDistrib.h.

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

◆ meESDigiCorr_

MonitorElement* EcalPreshowerNoiseDistrib::meESDigiCorr_[3]
private

Definition at line 48 of file EcalPreshowerNoiseDistrib.h.

Referenced by analyze(), and bookHistograms().

◆ meESDigiMultiplicity_

MonitorElement* EcalPreshowerNoiseDistrib::meESDigiMultiplicity_
private

Definition at line 50 of file EcalPreshowerNoiseDistrib.h.

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

◆ outputFile_

std::string EcalPreshowerNoiseDistrib::outputFile_
private

Definition at line 43 of file EcalPreshowerNoiseDistrib.h.

◆ verbose_

bool EcalPreshowerNoiseDistrib::verbose_
private

Definition at line 41 of file EcalPreshowerNoiseDistrib.h.

Referenced by EcalPreshowerNoiseDistrib().

edm::Handle::product
T const * product() const
Definition: Handle.h:70
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
ESDataFrame::size
int size() const
Definition: ESDataFrame.h:21
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
EcalPreshowerNoiseDistrib::ESdigiCollectionToken_
edm::EDGetTokenT< ESDigiCollection > ESdigiCollectionToken_
Definition: EcalPreshowerNoiseDistrib.h:45
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
EcalPreshowerNoiseDistrib::meESDigi3D_
MonitorElement * meESDigi3D_
Definition: EcalPreshowerNoiseDistrib.h:49
edm::Handle
Definition: AssociativeIterator.h:50
ESDataFrame
Definition: ESDataFrame.h:10
ecalLiteDTU::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalLiteDTUSample.h:12
EcalPreshowerNoiseDistrib::meESDigiADC_
MonitorElement * meESDigiADC_[3]
Definition: EcalPreshowerNoiseDistrib.h:47
EcalPreshowerNoiseDistrib::meESDigiCorr_
MonitorElement * meESDigiCorr_[3]
Definition: EcalPreshowerNoiseDistrib.h:48
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
ESDataFrame::MAXSAMPLES
static const int MAXSAMPLES
Definition: ESDataFrame.h:30
edm::DataFrameContainer::reserve
void reserve(size_t isize)
Definition: DataFrameContainer.h:86
ESDigiCollection
Definition: EcalDigiCollections.h:82
ESSample
Definition: ESSample.h:7
ecalTB2006H4_GenSimDigiReco_cfg.mySample
mySample
Definition: ecalTB2006H4_GenSimDigiReco_cfg.py:5
EcalPreshowerNoiseDistrib::meESDigiMultiplicity_
MonitorElement * meESDigiMultiplicity_
Definition: EcalPreshowerNoiseDistrib.h:50
EcalPreshowerNoiseDistrib::verbose_
bool verbose_
Definition: EcalPreshowerNoiseDistrib.h:41
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
cuy.ii
ii
Definition: cuy.py:590
edm::InputTag
Definition: InputTag.h:15
edm::DataFrameContainer::size
size_type size() const
Definition: DataFrameContainer.h:162
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37