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=default
 
- 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 24 of file SiStripBaselineValidator.h.

Constructor & Destructor Documentation

◆ SiStripBaselineValidator()

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

Definition at line 33 of file SiStripBaselineValidator.cc.

References edm::ParameterSet::getParameter().

33  {
34  srcProcessedRawDigi_ = conf.getParameter<edm::InputTag>("srcProcessedRawDigi");
36  consumes<edm::DetSetVector<SiStripDigi> >(conf.getParameter<edm::InputTag>("srcProcessedRawDigi"));
37 }
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > moduleRawDigiToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

◆ ~SiStripBaselineValidator()

SiStripBaselineValidator::~SiStripBaselineValidator ( )
overridedefault

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 52 of file SiStripBaselineValidator.cc.

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

52  {
54  e.getByToken(moduleRawDigiToken_, moduleRawDigi);
55  edm::DetSetVector<SiStripDigi>::const_iterator itRawDigis = moduleRawDigi->begin();
56 
57  int NumResAPVs = 0;
58  for (; itRawDigis != moduleRawDigi->end(); ++itRawDigis) {
59 
60  edm::DetSet<SiStripDigi>::const_iterator itRaw = itRawDigis->begin();
61  int strip = 0, totStripAPV = 0, apv = 0, prevapv = itRaw->strip() / 128;
62 
63  for (; itRaw != itRawDigis->end(); ++itRaw) {
64 
65  strip = itRaw->strip();
66  apv = strip / 128;
67  float adc = itRaw->adc();
69 
70  if (prevapv != apv) {
71  if (totStripAPV > 64) {
72  NumResAPVs++;
73  }
74  prevapv = apv;
75  totStripAPV = 0;
76  }
77  if (adc > 0)
78  ++totStripAPV;
79 
80  }
81  if (totStripAPV > 64) {
82  NumResAPVs++;
83  }
84 
85  }
86 
88 
89  h1NumbadAPVsRes_->Fill(NumResAPVs);
90 
91 }
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > moduleRawDigiToken_
void Fill(long long x)
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:325
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:314
collection_type::const_iterator const_iterator
Definition: DetSet.h:31
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ 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 39 of file SiStripBaselineValidator.cc.

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

41  {
43  ibooker.setCurrentFolder("SiStrip/BaselineValidator");
44 
45  h1NumbadAPVsRes_ = ibooker.book1D("ResAPVs", ";#ResAPVs", 100, 1.0, 10001);
46 
47  h1ADC_vs_strip_ = ibooker.book2D("ADCvsAPVs", ";ADCvsAPVs", 768, -0.5, 767.5, 1023, -0.5, 1022.5);
48 
49  return;
50 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
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:212
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

Member Data Documentation

◆ h1ADC_vs_strip_

MonitorElement* SiStripBaselineValidator::h1ADC_vs_strip_
private

Definition at line 34 of file SiStripBaselineValidator.h.

◆ h1NumbadAPVsRes_

MonitorElement* SiStripBaselineValidator::h1NumbadAPVsRes_
private

Definition at line 33 of file SiStripBaselineValidator.h.

◆ moduleRawDigiToken_

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

Definition at line 37 of file SiStripBaselineValidator.h.

◆ srcProcessedRawDigi_

edm::InputTag SiStripBaselineValidator::srcProcessedRawDigi_
private

Definition at line 36 of file SiStripBaselineValidator.h.