CMS 3D CMS Logo

EcalPreshowerNoiseDistrib.cc
Go to the documentation of this file.
1 /*
2  * \file EcalPreshowerNoiseDistrib.cc
3  *
4 */
5 
7 
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 }
19 
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 }
38 
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 }
ecalMGPA::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalMGPASample.h:11
edm::Handle::product
T const * product() const
Definition: Handle.h:70
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
edm::Run
Definition: Run.h:45
edm
HLT enums.
Definition: AlignableModifier.h:19
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
EcalPreshowerNoiseDistrib.h
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
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:58
EcalPreshowerNoiseDistrib::EcalPreshowerNoiseDistrib
EcalPreshowerNoiseDistrib(const edm::ParameterSet &ps)
Constructor.
Definition: EcalPreshowerNoiseDistrib.cc:8
ESSample
Definition: ESSample.h:7
EcalPreshowerNoiseDistrib::bookHistograms
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
Definition: EcalPreshowerNoiseDistrib.cc:20
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
ecalTB2006H4_GenSimDigiReco_cfg.mySample
mySample
Definition: ecalTB2006H4_GenSimDigiReco_cfg.py:5
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
EcalPreshowerNoiseDistrib::meESDigiMultiplicity_
MonitorElement * meESDigiMultiplicity_
Definition: EcalPreshowerNoiseDistrib.h:50
EcalPreshowerNoiseDistrib::verbose_
bool verbose_
Definition: EcalPreshowerNoiseDistrib.h:41
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
dqm::implementation::IBooker::book3D
MonitorElement * book3D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, FUNC onbooking=NOOP())
Definition: DQMStore.h:290
dqm::implementation::IBooker
Definition: DQMStore.h:43
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
EcalPreshowerNoiseDistrib::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
Definition: EcalPreshowerNoiseDistrib.cc:39
cuy.ii
ii
Definition: cuy.py:590
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
edm::DataFrameContainer::size
size_type size() const
Definition: DataFrameContainer.h:162
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37