#include <DPGAnalysis/SiStripTools/src/MultiplicityCorrelator.cc>
Public Member Functions | |
MultiplicityCorrelator (const edm::ParameterSet &) | |
~MultiplicityCorrelator () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | beginRun (const edm::Run &, const edm::EventSetup &) |
virtual void | endJob () |
virtual void | endRun (const edm::Run &, const edm::EventSetup &) |
Private Attributes | |
std::vector < MultiplicityCorrelatorHistogramMaker * > | m_mchms |
std::vector< std::string > | m_xLabels |
std::vector< edm::InputTag > | m_xMultiplicityMaps |
std::vector< unsigned int > | m_xSelections |
std::vector< std::string > | m_yLabels |
std::vector< edm::InputTag > | m_yMultiplicityMaps |
std::vector< unsigned int > | m_ySelections |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 45 of file MultiplicityCorrelator.cc.
MultiplicityCorrelator::MultiplicityCorrelator | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 83 of file MultiplicityCorrelator.cc.
References edm::ParameterSet::getParameter(), m_mchms, m_xLabels, m_xMultiplicityMaps, m_xSelections, m_yLabels, m_yMultiplicityMaps, and m_ySelections.
: m_mchms(), m_xMultiplicityMaps(),m_yMultiplicityMaps(), m_xLabels(),m_yLabels(), m_xSelections(),m_ySelections() { //now do what ever initialization is needed std::vector<edm::ParameterSet> correlationConfigs = iConfig.getParameter<std::vector<edm::ParameterSet> >("correlationConfigurations"); for(std::vector<edm::ParameterSet>::const_iterator ps=correlationConfigs.begin();ps!=correlationConfigs.end();++ps) { m_xMultiplicityMaps.push_back(ps->getParameter<edm::InputTag>("xMultiplicityMap")); m_yMultiplicityMaps.push_back(ps->getParameter<edm::InputTag>("yMultiplicityMap")); m_xLabels.push_back(ps->getParameter<std::string>("xDetLabel")); m_yLabels.push_back(ps->getParameter<std::string>("yDetLabel")); m_xSelections.push_back(ps->getParameter<unsigned int>("xDetSelection")); m_ySelections.push_back(ps->getParameter<unsigned int>("yDetSelection")); m_mchms.push_back(new MultiplicityCorrelatorHistogramMaker(*ps)); } }
MultiplicityCorrelator::~MultiplicityCorrelator | ( | ) |
void MultiplicityCorrelator::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 125 of file MultiplicityCorrelator.cc.
References edm::Event::getByLabel(), i, m_mchms, m_xMultiplicityMaps, m_xSelections, m_yMultiplicityMaps, and m_ySelections.
{ using namespace edm; for(unsigned int i=0;i<m_mchms.size();++i) { Handle<std::map<unsigned int, int> > xMults; iEvent.getByLabel(m_xMultiplicityMaps[i],xMults); Handle<std::map<unsigned int, int> > yMults; iEvent.getByLabel(m_yMultiplicityMaps[i],yMults); // check if the selection exists std::map<unsigned int, int>::const_iterator xmult = xMults->find(m_xSelections[i]); std::map<unsigned int, int>::const_iterator ymult = yMults->find(m_ySelections[i]); if(xmult!=xMults->end() && ymult!=yMults->end()) { m_mchms[i]->fill(iEvent,xmult->second,ymult->second); } else { edm::LogWarning("DetSelectionNotFound") << " DetSelection " << m_xSelections[i] << " " << m_ySelections[i] << " not found"; } } }
void MultiplicityCorrelator::beginJob | ( | void | ) | [private, virtual] |
void MultiplicityCorrelator::beginRun | ( | const edm::Run & | iRun, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
void MultiplicityCorrelator::endJob | ( | void | ) | [private, virtual] |
void MultiplicityCorrelator::endRun | ( | const edm::Run & | iRun, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
std::vector<MultiplicityCorrelatorHistogramMaker*> MultiplicityCorrelator::m_mchms [private] |
Definition at line 60 of file MultiplicityCorrelator.cc.
Referenced by analyze(), beginRun(), MultiplicityCorrelator(), and ~MultiplicityCorrelator().
std::vector<std::string> MultiplicityCorrelator::m_xLabels [private] |
Definition at line 64 of file MultiplicityCorrelator.cc.
Referenced by MultiplicityCorrelator().
std::vector<edm::InputTag> MultiplicityCorrelator::m_xMultiplicityMaps [private] |
Definition at line 62 of file MultiplicityCorrelator.cc.
Referenced by analyze(), and MultiplicityCorrelator().
std::vector<unsigned int> MultiplicityCorrelator::m_xSelections [private] |
Definition at line 66 of file MultiplicityCorrelator.cc.
Referenced by analyze(), and MultiplicityCorrelator().
std::vector<std::string> MultiplicityCorrelator::m_yLabels [private] |
Definition at line 65 of file MultiplicityCorrelator.cc.
Referenced by MultiplicityCorrelator().
std::vector<edm::InputTag> MultiplicityCorrelator::m_yMultiplicityMaps [private] |
Definition at line 63 of file MultiplicityCorrelator.cc.
Referenced by analyze(), and MultiplicityCorrelator().
std::vector<unsigned int> MultiplicityCorrelator::m_ySelections [private] |
Definition at line 67 of file MultiplicityCorrelator.cc.
Referenced by analyze(), and MultiplicityCorrelator().