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::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

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
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

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::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 28 of file SiStripBaselineValidator.h.

Constructor & Destructor Documentation

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
SiStripBaselineValidator::~SiStripBaselineValidator ( )
override

Definition at line 39 of file SiStripBaselineValidator.cc.

39 {}

Member Function Documentation

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

loop over modules

loop over strips

adc vs strip

strip loop ends

module loop

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

for all modules

Definition at line 54 of file SiStripBaselineValidator.cc.

References ecalMGPA::adc(), edm::DetSetVector< T >::begin(), DEFINE_FWK_MODULE, edm::DetSetVector< T >::end(), edm::Event::getByToken(), and digitizers_cfi::strip.

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();
70  h1ADC_vs_strip_->Fill(strip, 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 }
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > moduleRawDigiToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
void Fill(long long x)
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
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:32
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102
void SiStripBaselineValidator::bookHistograms ( DQMStore::IBooker ,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Setting the DQM top directories

Implements DQMEDAnalyzer.

Definition at line 41 of file SiStripBaselineValidator.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), and dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder().

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 }

Member Data Documentation

MonitorElement* SiStripBaselineValidator::h1ADC_vs_strip_
private

Definition at line 38 of file SiStripBaselineValidator.h.

MonitorElement* SiStripBaselineValidator::h1NumbadAPVsRes_
private

Definition at line 37 of file SiStripBaselineValidator.h.

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

Definition at line 41 of file SiStripBaselineValidator.h.

edm::InputTag SiStripBaselineValidator::srcProcessedRawDigi_
private

Definition at line 40 of file SiStripBaselineValidator.h.