#include <DigiCollectionProfiler.h>
Public Member Functions | |
DigiCollectionProfiler () | |
DigiCollectionProfiler (const edm::ParameterSet &iConfig) | |
template<> | |
void | fill (edm::Handle< edm::DetSetVector< SiStripDigi > > digis, const std::vector< TH1F * > &hist, const std::vector< TProfile * > &hprof, const std::vector< TH2F * > &hist2d) const |
void | fill (edm::Handle< T > digis, const std::vector< TH1F * > &, const std::vector< TProfile * > &, const std::vector< TH2F * > &) const |
template<> | |
void | fill (edm::Handle< edmNew::DetSetVector< SiStripCluster > > digis, const std::vector< TH1F * > &hist, const std::vector< TProfile * > &hprof, const std::vector< TH2F * > &hist2d) const |
~DigiCollectionProfiler () | |
Private Attributes | |
bool | m_folded |
std::vector< DetIdSelector > | m_selections |
bool | m_want1dHisto |
bool | m_want2dHisto |
bool | m_wantProfile |
Definition at line 20 of file DigiCollectionProfiler.h.
DigiCollectionProfiler< T >::DigiCollectionProfiler | ( | ) |
Definition at line 41 of file DigiCollectionProfiler.h.
: m_folded(false), m_want1dHisto(false), m_wantProfile(false), m_want2dHisto(false), m_selections() { }
DigiCollectionProfiler< T >::DigiCollectionProfiler | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 45 of file DigiCollectionProfiler.h.
References edm::ParameterSet::getParameter(), DigiCollectionProfiler< T >::m_selections, and corrVsCorr::selection.
: m_folded(iConfig.getUntrackedParameter<bool>("foldedStrips",false)), m_want1dHisto(iConfig.getUntrackedParameter<bool>("want1dHisto",true)), m_wantProfile(iConfig.getUntrackedParameter<bool>("wantProfile",true)), m_want2dHisto(iConfig.getUntrackedParameter<bool>("want2dHisto",false)) { std::vector<edm::ParameterSet> selconfigs = iConfig.getParameter<std::vector<edm::ParameterSet> >("selections"); for(std::vector<edm::ParameterSet>::const_iterator selconfig=selconfigs.begin();selconfig!=selconfigs.end();++selconfig) { DetIdSelector selection(*selconfig); m_selections.push_back(selection); } }
DigiCollectionProfiler< T >::~DigiCollectionProfiler | ( | ) | [inline] |
Definition at line 25 of file DigiCollectionProfiler.h.
{};
void DigiCollectionProfiler< T >::fill | ( | edm::Handle< T > | digis, |
const std::vector< TH1F * > & | hist, | ||
const std::vector< TProfile * > & | hprof, | ||
const std::vector< TH2F * > & | hist2d | ||
) | const |
Definition at line 63 of file DigiCollectionProfiler.h.
{ }
DAClusterizerInZ_vect::track_t DAClusterizerInZ_vect::fill | ( | edm::Handle< edmNew::DetSetVector< SiStripCluster > > | digis, |
const std::vector< TH1F * > & | hist, | ||
const std::vector< TProfile * > & | hprof, | ||
const std::vector< TH2F * > & | hist2d | ||
) | const |
Definition at line 100 of file DigiCollectionProfiler.h.
References estimatePileup::hist, and mod().
{ for(edmNew::DetSetVector<SiStripCluster>::const_iterator mod = digis->begin();mod!=digis->end();mod++) { for(unsigned int isel=0;isel< m_selections.size(); ++isel) { if(m_selections[isel].isSelected(mod->detId())) { TH1F* tobefilled1d=0; TProfile* tobefilledprof=0; TH2F* tobefilled2d=0; if(m_want1dHisto) tobefilled1d = hist[isel]; if(m_wantProfile) tobefilledprof = hprof[isel]; if(m_want2dHisto) tobefilled2d = hist2d[isel]; for(edmNew::DetSet<SiStripCluster>::const_iterator clus=mod->begin();clus!=mod->end();clus++) { for(unsigned int digi=0; digi < clus->amplitudes().size() ; ++digi) { if(clus->amplitudes()[digi]>0) { unsigned int strip = clus->firstStrip()+digi; if(m_folded) strip = strip%256; if(tobefilled1d) tobefilled1d->Fill(strip); if(tobefilledprof) tobefilledprof->Fill(strip,clus->amplitudes()[digi]); if(tobefilled2d) tobefilled2d->Fill(strip,clus->amplitudes()[digi]); } } } } } } }
void DigiCollectionProfiler< edm::DetSetVector< SiStripDigi > >::fill | ( | edm::Handle< edm::DetSetVector< SiStripDigi > > | digis, |
const std::vector< TH1F * > & | hist, | ||
const std::vector< TProfile * > & | hprof, | ||
const std::vector< TH2F * > & | hist2d | ||
) | const |
Definition at line 69 of file DigiCollectionProfiler.h.
References estimatePileup::hist, and mod().
{ for(edm::DetSetVector<SiStripDigi>::const_iterator mod = digis->begin();mod!=digis->end();mod++) { for(unsigned int isel=0;isel< m_selections.size(); ++isel) { if(m_selections[isel].isSelected(mod->detId())) { TH1F* tobefilled1d=0; TProfile* tobefilledprof=0; TH2F* tobefilled2d=0; if(m_want1dHisto) tobefilled1d = hist[isel]; if(m_wantProfile) tobefilledprof = hprof[isel]; if(m_want2dHisto) tobefilled2d = hist2d[isel]; for(edm::DetSet<SiStripDigi>::const_iterator digi=mod->begin();digi!=mod->end();digi++) { if(digi->adc()>0) { unsigned int strip = digi->strip(); if(m_folded) strip = strip%256; if(tobefilled1d) tobefilled1d->Fill(strip); if(tobefilledprof) tobefilledprof->Fill(strip,digi->adc()); if(tobefilled2d) tobefilled2d->Fill(strip,digi->adc()); } } } } } }
bool DigiCollectionProfiler< T >::m_folded [private] |
Definition at line 31 of file DigiCollectionProfiler.h.
std::vector<DetIdSelector> DigiCollectionProfiler< T >::m_selections [private] |
Definition at line 36 of file DigiCollectionProfiler.h.
Referenced by DigiCollectionProfiler< T >::DigiCollectionProfiler().
bool DigiCollectionProfiler< T >::m_want1dHisto [private] |
Definition at line 32 of file DigiCollectionProfiler.h.
bool DigiCollectionProfiler< T >::m_want2dHisto [private] |
Definition at line 34 of file DigiCollectionProfiler.h.
bool DigiCollectionProfiler< T >::m_wantProfile [private] |
Definition at line 33 of file DigiCollectionProfiler.h.