CMS 3D CMS Logo

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

#include <SiStripBaselineValidator.h>

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

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 SiStripBaselineValidator (const edm::ParameterSet &)
 
 ~SiStripBaselineValidator () override
 
- 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
 

Private Attributes

MonitorElementh1ADC_vs_strip_
 
MonitorElementh1NumbadAPVsRes_
 
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > moduleRawDigiToken_
 
edm::InputTag srcProcessedRawDigi_
 

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 Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 28 of file SiStripBaselineValidator.h.

Constructor & Destructor Documentation

◆ SiStripBaselineValidator()

SiStripBaselineValidator::SiStripBaselineValidator ( const edm::ParameterSet conf)
explicit

Definition at line 33 of file SiStripBaselineValidator.cc.

33  {
34  srcProcessedRawDigi_ = conf.getParameter<edm::InputTag>("srcProcessedRawDigi");
36  consumes<edm::DetSetVector<SiStripDigi> >(conf.getParameter<edm::InputTag>("srcProcessedRawDigi"));
37 }

References edm::ParameterSet::getParameter().

◆ ~SiStripBaselineValidator()

SiStripBaselineValidator::~SiStripBaselineValidator ( )
override

Definition at line 39 of file SiStripBaselineValidator.cc.

39 {}

Member Function Documentation

◆ analyze()

void SiStripBaselineValidator::analyze ( const edm::Event e,
const edm::EventSetup es 
)
overridevirtual

loop over modules

loop over strips

adc vs strip

strip loop ends

module loop

std::cout<< " napvs : " << NumResAPVs << std::endl;

for all modules

Reimplemented from DQMEDAnalyzer.

Definition at line 54 of file SiStripBaselineValidator.cc.

54  {
56  e.getByToken(moduleRawDigiToken_, moduleRawDigi);
57  edm::DetSetVector<SiStripDigi>::const_iterator itRawDigis = moduleRawDigi->begin();
58 
59  int NumResAPVs = 0;
60  for (; itRawDigis != moduleRawDigi->end(); ++itRawDigis) {
61 
62  edm::DetSet<SiStripDigi>::const_iterator itRaw = itRawDigis->begin();
63  int strip = 0, totStripAPV = 0, apv = 0, prevapv = itRaw->strip() / 128;
64 
65  for (; itRaw != itRawDigis->end(); ++itRaw) {
66 
67  strip = itRaw->strip();
68  apv = strip / 128;
69  float adc = itRaw->adc();
71 
72  if (prevapv != apv) {
73  if (totStripAPV > 64) {
74  NumResAPVs++;
75  }
76  prevapv = apv;
77  totStripAPV = 0;
78  }
79  if (adc > 0)
80  ++totStripAPV;
81 
82  }
83  if (totStripAPV > 64) {
84  NumResAPVs++;
85  }
86 
87  }
88 
90 
91  h1NumbadAPVsRes_->Fill(NumResAPVs);
92 
93 }

References gpuClustering::adc, edm::DetSetVector< T >::begin(), MillePedeFileConverter_cfg::e, edm::DetSetVector< T >::end(), and digitizers_cfi::strip.

◆ bookHistograms()

void SiStripBaselineValidator::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
edm::EventSetup const &  es 
)
overridevirtual

Setting the DQM top directories

Implements DQMEDAnalyzer.

Definition at line 41 of file SiStripBaselineValidator.cc.

43  {
45  ibooker.setCurrentFolder("SiStrip/BaselineValidator");
46 
47  h1NumbadAPVsRes_ = ibooker.book1D("ResAPVs", ";#ResAPVs", 100, 1.0, 10001);
48 
49  h1ADC_vs_strip_ = ibooker.book2D("ADCvsAPVs", ";ADCvsAPVs", 768, -0.5, 767.5, 1023, -0.5, 1022.5);
50 
51  return;
52 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), and dqm::implementation::NavigatorBase::setCurrentFolder().

Member Data Documentation

◆ h1ADC_vs_strip_

MonitorElement* SiStripBaselineValidator::h1ADC_vs_strip_
private

Definition at line 38 of file SiStripBaselineValidator.h.

◆ h1NumbadAPVsRes_

MonitorElement* SiStripBaselineValidator::h1NumbadAPVsRes_
private

Definition at line 37 of file SiStripBaselineValidator.h.

◆ moduleRawDigiToken_

edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > SiStripBaselineValidator::moduleRawDigiToken_
private

Definition at line 41 of file SiStripBaselineValidator.h.

◆ srcProcessedRawDigi_

edm::InputTag SiStripBaselineValidator::srcProcessedRawDigi_
private

Definition at line 40 of file SiStripBaselineValidator.h.

edm::DetSetVector::end
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:325
gpuClustering::adc
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Definition: gpuClusterChargeCut.h:20
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
edm::DetSetVector::begin
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:314
edm::Handle
Definition: AssociativeIterator.h:50
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
SiStripBaselineValidator::h1NumbadAPVsRes_
MonitorElement * h1NumbadAPVsRes_
Definition: SiStripBaselineValidator.h:37
edm::DetSetVector::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102
SiStripBaselineValidator::h1ADC_vs_strip_
MonitorElement * h1ADC_vs_strip_
Definition: SiStripBaselineValidator.h:38
SiStripBaselineValidator::moduleRawDigiToken_
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > moduleRawDigiToken_
Definition: SiStripBaselineValidator.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
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SiStripBaselineValidator::srcProcessedRawDigi_
edm::InputTag srcProcessedRawDigi_
Definition: SiStripBaselineValidator.h:40
edm::InputTag
Definition: InputTag.h:15
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
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
edm::DetSet::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSet.h:31