#include <SiStripBaselineValidator.h>
Public Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | endJob () |
analyzer loop | |
SiStripBaselineValidator (const edm::ParameterSet &) | |
virtual | ~SiStripBaselineValidator () |
Private Attributes | |
bool | createOutputFile_ |
DQMStore * | dbe |
MonitorElement * | h1ADC_vs_strip_ |
MonitorElement * | h1NumbadAPVsRes_ |
std::string | outputFile_ |
edm::InputTag | srcProcessedRawDigi_ |
Definition at line 36 of file SiStripBaselineValidator.h.
SiStripBaselineValidator::SiStripBaselineValidator | ( | const edm::ParameterSet & | conf | ) | [explicit] |
Definition at line 49 of file SiStripBaselineValidator.cc.
References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.
{ srcProcessedRawDigi_ = conf.getParameter<edm::InputTag>( "srcProcessedRawDigi" ); // hiSelectedTracks = conf.getParameter<edm::InputTag>( "hiSelectedTracks" ); createOutputFile_ = conf.getUntrackedParameter<bool>("saveFile",false); outputFile_ = conf.getParameter<std::string>("outputFile"); dbe = &*edm::Service<DQMStore>(); }
SiStripBaselineValidator::~SiStripBaselineValidator | ( | ) | [virtual] |
Definition at line 62 of file SiStripBaselineValidator.cc.
{ }
void SiStripBaselineValidator::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | es | ||
) | [virtual] |
loop over modules
loop over strips
adc vs strip
strip loop ends
module loop
std::cout<< " napvs : " << NumResAPVs << std::endl;
for all modules
Implements edm::EDAnalyzer.
Definition at line 88 of file SiStripBaselineValidator.cc.
References ecalMGPA::adc(), edm::DetSetVector< T >::begin(), edm::DetSetVector< T >::end(), and edm::Event::getByLabel().
{ /* edm::Handle<reco::TrackCollection> tracks; e.getByLabel("hiSelectedTracks", tracks); int ntracks =0; for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); track++) { ntracks++; } */ edm::Handle< edm::DetSetVector<SiStripRawDigi> > moduleRawDigi; e.getByLabel(srcProcessedRawDigi_,moduleRawDigi); edm::DetSetVector<SiStripRawDigi>::const_iterator itRawDigis = moduleRawDigi->begin(); // uint32_t Nmodule = moduleRawDigi->size(); int NumResAPVs=0; for (; itRawDigis != moduleRawDigi->end(); ++itRawDigis) { edm::DetSet<SiStripRawDigi>::const_iterator itRaw = itRawDigis->begin(); int strip =0, totADC=0; for(;itRaw != itRawDigis->end(); ++itRaw, ++strip){ float adc = itRaw->adc(); h1ADC_vs_strip_->Fill(strip,adc); totADC+= adc; if(strip%127 ==0){ if(totADC!= 0){ totADC =0; NumResAPVs++; } } } } h1NumbadAPVsRes_->Fill(NumResAPVs); }
void SiStripBaselineValidator::beginJob | ( | void | ) | [virtual] |
Setting the DQM top directories
Reimplemented from edm::EDAnalyzer.
Definition at line 67 of file SiStripBaselineValidator.cc.
{ if(dbe){ dbe->setCurrentFolder("SiStrip/BaselineValidator"); h1NumbadAPVsRes_ = dbe->book1D("ResAPVs",";#ResAPVs", 100, 1.0, 10001); dbe->tag(h1NumbadAPVsRes_->getFullname(),1); h1ADC_vs_strip_ = dbe->book2D("ADCvsAPVs",";ADCvsAPVs", 768,-0.5,767.5, 1023, -0.5, 1022.5); dbe->tag(h1ADC_vs_strip_->getFullname(),2); } return; }
void SiStripBaselineValidator::endJob | ( | void | ) | [virtual] |
analyzer loop
Reimplemented from edm::EDAnalyzer.
Definition at line 149 of file SiStripBaselineValidator.cc.
{ if (!outputFile_.empty() && createOutputFile_) { dbe->save(outputFile_); } }
bool SiStripBaselineValidator::createOutputFile_ [private] |
Definition at line 56 of file SiStripBaselineValidator.h.
DQMStore* SiStripBaselineValidator::dbe [private] |
Definition at line 48 of file SiStripBaselineValidator.h.
Definition at line 51 of file SiStripBaselineValidator.h.
Definition at line 50 of file SiStripBaselineValidator.h.
std::string SiStripBaselineValidator::outputFile_ [private] |
Definition at line 55 of file SiStripBaselineValidator.h.
Definition at line 53 of file SiStripBaselineValidator.h.