CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

MuPFIsoEmbedder Class Reference

#include <RecoMuon/MuPFIsoEmbedder/src/MuPFIsoEmbedder.cc>

Inheritance diagram for MuPFIsoEmbedder:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 MuPFIsoEmbedder (const edm::ParameterSet &)
 ~MuPFIsoEmbedder ()

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)

Private Member Functions

virtual void beginJob ()
virtual void beginLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &)
virtual void beginRun (edm::Run &, edm::EventSetup const &)
virtual void endJob ()
virtual void endLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &)
virtual void endRun (edm::Run &, edm::EventSetup const &)
virtual void produce (edm::Event &, const edm::EventSetup &)

Private Attributes

MuPFIsoHelperhelper_
edm::InputTag muons_

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 40 of file MuPFIsoEmbedder.cc.


Constructor & Destructor Documentation

MuPFIsoEmbedder::MuPFIsoEmbedder ( const edm::ParameterSet iConfig) [explicit]

Definition at line 69 of file MuPFIsoEmbedder.cc.

References edm::ParameterSet::getParameter(), helper_, and diffTwoXMLs::label.

                                                              :
  muons_(iConfig.getParameter<edm::InputTag>("src"))
{

  //decide what to read
    //Define a map between the isolation and the PSet for the PFHelper
    std::map<std::string,edm::ParameterSet> psetMap;

    //First declare what isolation you are going to read
    std::vector<std::string> isolationLabels;
    isolationLabels.push_back("pfIsolationR03");
    isolationLabels.push_back("pfIsoMeanDRProfileR03");
    isolationLabels.push_back("pfIsoSumDRProfileR03");
    isolationLabels.push_back("pfIsolationR04");
    isolationLabels.push_back("pfIsoMeanDRProfileR04");
    isolationLabels.push_back("pfIsoSumDRProfileR04");

    //Fill the label,pet map and initialize MuPFIsoHelper
    for( std::vector<std::string>::const_iterator label = isolationLabels.begin();label != isolationLabels.end();++label)
      psetMap[*label] =iConfig.getParameter<edm::ParameterSet >(*label); 

    helper_ = new MuPFIsoHelper(psetMap);

  produces<reco::MuonCollection>();
}
MuPFIsoEmbedder::~MuPFIsoEmbedder ( )

Definition at line 96 of file MuPFIsoEmbedder.cc.

{
 
   // do anything here that needs to be done at desctruction time
   // (e.g. close files, deallocate resources etc.)

}

Member Function Documentation

void MuPFIsoEmbedder::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 137 of file MuPFIsoEmbedder.cc.

{
}
void MuPFIsoEmbedder::beginLuminosityBlock ( edm::LuminosityBlock ,
edm::EventSetup const &   
) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 160 of file MuPFIsoEmbedder.cc.

{
}
void MuPFIsoEmbedder::beginRun ( edm::Run ,
edm::EventSetup const &   
) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 148 of file MuPFIsoEmbedder.cc.

{
}
void MuPFIsoEmbedder::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 143 of file MuPFIsoEmbedder.cc.

                        {
}
void MuPFIsoEmbedder::endLuminosityBlock ( edm::LuminosityBlock ,
edm::EventSetup const &   
) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 166 of file MuPFIsoEmbedder.cc.

{
}
void MuPFIsoEmbedder::endRun ( edm::Run ,
edm::EventSetup const &   
) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 154 of file MuPFIsoEmbedder.cc.

{
}
void MuPFIsoEmbedder::fillDescriptions ( edm::ConfigurationDescriptions descriptions) [static]

Reimplemented from edm::EDProducer.

Definition at line 172 of file MuPFIsoEmbedder.cc.

References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().

                                                                            {
  //The following says we do not know what parameters are allowed so do no validation
  // Please change this to state exactly what you do use, even if it is no parameters
  edm::ParameterSetDescription desc;
  desc.setUnknown();
  descriptions.addDefault(desc);
}
void MuPFIsoEmbedder::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDProducer.

Definition at line 111 of file MuPFIsoEmbedder.cc.

References MuPFIsoHelper::beginEvent(), MuPFIsoHelper::embedPFIsolation(), edm::Event::getByLabel(), helper_, i, metsig::muon, patZpeak::muons, muons_, dbtoconf::out, edm::Event::put(), and dt_dqm_sourceclient_common_cff::reco.

{
   using namespace edm;
   using namespace reco;


   helper_->beginEvent(iEvent);
  
   edm::Handle<reco::MuonCollection > muons;
   iEvent.getByLabel(muons_,muons);


   std::auto_ptr<MuonCollection> out(new MuonCollection);

   for(unsigned int i=0;i<muons->size();++i) {
     MuonRef muonRef(muons,i);
     Muon muon = muons->at(i);
     helper_->embedPFIsolation(muon,muonRef);
     out->push_back(muon);
   }

   iEvent.put(out);
}

Member Data Documentation

Definition at line 61 of file MuPFIsoEmbedder.cc.

Referenced by MuPFIsoEmbedder(), and produce().

Definition at line 59 of file MuPFIsoEmbedder.cc.

Referenced by produce().