CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

MuonProducer Class Reference

#include <MuonProducer.h>

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

List of all members.

Public Types

typedef std::vector
< edm::InputTag
InputTags

Public Member Functions

 MuonProducer (const edm::ParameterSet &)
 Constructor.
virtual void produce (edm::Event &, const edm::EventSetup &)
 reconstruct muons
virtual ~MuonProducer ()
 Destructor.

Private Member Functions

template<typename TYPE >
void fillMuonMap (edm::Event &event, const edm::OrphanHandle< reco::MuonCollection > &muonHandle, const std::vector< TYPE > &muonExtra, const std::string &label)
std::string labelOrInstance (const edm::InputTag &) const
void setAlias (std::string alias)

Private Attributes

bool debug_
bool fastLabelling_
bool fillCosmicsIdMap_
bool fillDetectorBasedIsolation_
bool fillIsolation_
bool fillPFIsolation_
bool fillPFMomentum_
bool fillSelectors_
bool fillShoweringInfo_
bool fillTimingInfo_
std::string theAlias
edm::InputTag theCosmicCompMapName
edm::InputTag theEcalDepositName
edm::InputTag theHcalDepositName
edm::InputTag theHoDepositName
std::map< std::string,
edm::InputTag
theIsoPF03MapNames
std::map< std::string,
edm::InputTag
theIsoPF04MapNames
edm::InputTag theJetDepositName
edm::InputTag theMuonsCollectionLabel
std::string theMuToMuMapName
edm::InputTag thePFCandLabel
MuPFIsoHelperthePFIsoHelper
InputTags theSelectorMapNames
edm::InputTag theShowerMapName
edm::InputTag theTrackDepositName
bool writeIsoDeposits_

Detailed Description

See header file.

Date:
2011/11/22 18:01:13
Revision:
1.15
Author:
R. Bellan - UCSB <riccardo.bellan@cern.ch>

Producer meant for the Post PF reconstruction.

This class takes the muon collection produced before the PF is run (muons1Step) and the information calculated after that the entire event has been reconstructed. The collections produced here are meant to be used for the final analysis (or as PAT input). The previous muon collection is meant to be transient.

Date:
2011/11/22 18:01:13
Revision:
1.14
Author:
R. Bellan - UCSB <riccardo.bellan@cern.ch>

Definition at line 29 of file MuonProducer.h.


Member Typedef Documentation

typedef std::vector<edm::InputTag> MuonProducer::InputTags

Definition at line 42 of file MuonProducer.h.


Constructor & Destructor Documentation

MuonProducer::MuonProducer ( const edm::ParameterSet pSet)

Constructor.

Definition at line 49 of file MuonProducer.cc.

References fastLabelling_, fillCosmicsIdMap_, fillDetectorBasedIsolation_, fillPFIsolation_, fillPFMomentum_, fillSelectors_, fillShoweringInfo_, fillTimingInfo_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), labelOrInstance(), Association::map, edm::ProductRegistryHelper::produces(), setAlias(), GlobalPosition_Frontier_DevDB_cff::tag, theAlias, theCosmicCompMapName, theEcalDepositName, theHcalDepositName, theHoDepositName, theIsoPF03MapNames, theIsoPF04MapNames, theJetDepositName, theMuonsCollectionLabel, theMuToMuMapName, thePFCandLabel, thePFIsoHelper, theSelectorMapNames, theShowerMapName, and theTrackDepositName.

                                                     :debug_(pSet.getUntrackedParameter<bool>("ActivateDebug",false)){
  
  setAlias(pSet.getParameter<std::string>("@module_label"));
  
  fastLabelling_ = pSet.getUntrackedParameter<bool>("FastLabelling",true);

  
  theMuonsCollectionLabel = pSet.getParameter<edm::InputTag>("InputMuons");
  thePFCandLabel = pSet.getParameter<edm::InputTag>("PFCandidates");
  
  
  // Variables to switch on-off the differnt parts
  fillSelectors_              = pSet.getParameter<bool>("FillSelectorMaps");
  fillCosmicsIdMap_           = pSet.getParameter<bool>("FillCosmicsIdMap");
  fillPFMomentum_             = pSet.getParameter<bool>("FillPFMomentumAndAssociation");
  fillPFIsolation_            = pSet.getParameter<bool>("FillPFIsolation");
  fillDetectorBasedIsolation_ = pSet.getParameter<bool>("FillDetectorBasedIsolation"); 
  fillShoweringInfo_          = pSet.getParameter<bool>("FillShoweringInfo");
  fillTimingInfo_             = pSet.getParameter<bool>("FillTimingInfo");

  produces<reco::MuonCollection>();

  if(fillTimingInfo_){
    produces<reco::MuonTimeExtraMap>("combined");
    produces<reco::MuonTimeExtraMap>("dt");
    produces<reco::MuonTimeExtraMap>("csc");
  }
  
  if (fillDetectorBasedIsolation_){
    theTrackDepositName = pSet.getParameter<edm::InputTag>("TrackIsoDeposits");
    produces<reco::IsoDepositMap>(labelOrInstance(theTrackDepositName));
    theJetDepositName = pSet.getParameter<edm::InputTag>("JetIsoDeposits");
    produces<reco::IsoDepositMap>(labelOrInstance(theJetDepositName));
    theEcalDepositName = pSet.getParameter<edm::InputTag>("EcalIsoDeposits");
    produces<reco::IsoDepositMap>(theEcalDepositName.instance());
    theHcalDepositName = pSet.getParameter<edm::InputTag>("HcalIsoDeposits");
    produces<reco::IsoDepositMap>(theHcalDepositName.instance());
    theHoDepositName = pSet.getParameter<edm::InputTag>("HoIsoDeposits");
    produces<reco::IsoDepositMap>(theHoDepositName.instance());
  }
  
  if(fillSelectors_){
    theSelectorMapNames = pSet.getParameter<InputTags>("SelectorMaps");
    
    for(InputTags::const_iterator tag = theSelectorMapNames.begin(); tag != theSelectorMapNames.end(); ++tag)
      produces<edm::ValueMap<bool> >(labelOrInstance(*tag));
  }
  
  if(fillShoweringInfo_){
    theShowerMapName = pSet.getParameter<edm::InputTag>("ShowerInfoMap");
    produces<edm::ValueMap<reco::MuonShower> >(labelOrInstance(theShowerMapName));
  }
  
  if(fillCosmicsIdMap_){
    theCosmicCompMapName = pSet.getParameter<edm::InputTag>("CosmicIdMap");
    produces<edm::ValueMap<reco::MuonCosmicCompatibility> >(labelOrInstance(theCosmicCompMapName));
    produces<edm::ValueMap<unsigned int> >(labelOrInstance(theCosmicCompMapName));
  }
  
  theMuToMuMapName = theMuonsCollectionLabel.label()+"2"+theAlias+"sMap";
  produces<edm::ValueMap<reco::MuonRef> >(theMuToMuMapName);
  
  if(fillPFIsolation_){
    edm::ParameterSet pfIsoPSet = pSet.getParameter<edm::ParameterSet>("PFIsolation");
    thePFIsoHelper = new MuPFIsoHelper(pfIsoPSet);
    edm::ParameterSet isoCfg03 = pfIsoPSet.getParameter<edm::ParameterSet>("isolationR03");
    edm::ParameterSet isoCfg04 = pfIsoPSet.getParameter<edm::ParameterSet>("isolationR04");

    theIsoPF03MapNames["chargedParticle"] = isoCfg03.getParameter<edm::InputTag>("chargedParticle");
    theIsoPF03MapNames["chargedHadron"]   = isoCfg03.getParameter<edm::InputTag>("chargedHadron");
    theIsoPF03MapNames["neutralHadron"]   = isoCfg03.getParameter<edm::InputTag>("neutralHadron");
    theIsoPF03MapNames["photon"]          = isoCfg03.getParameter<edm::InputTag>("photon");
    theIsoPF03MapNames["pu"]              = isoCfg03.getParameter<edm::InputTag>("pu");

    theIsoPF04MapNames["chargedParticle"] = isoCfg04.getParameter<edm::InputTag>("chargedParticle");
    theIsoPF04MapNames["chargedHadron"]   = isoCfg04.getParameter<edm::InputTag>("chargedHadron");
    theIsoPF04MapNames["neutralHadron"]   = isoCfg04.getParameter<edm::InputTag>("neutralHadron");
    theIsoPF04MapNames["photon"]          = isoCfg04.getParameter<edm::InputTag>("photon");
    theIsoPF04MapNames["pu"]              = isoCfg04.getParameter<edm::InputTag>("pu");
    
    for(std::map<std::string,edm::InputTag>::const_iterator map = theIsoPF03MapNames.begin(); map != theIsoPF03MapNames.end(); ++map)
      produces<edm::ValueMap<double> >(labelOrInstance(map->second));
    
    for(std::map<std::string,edm::InputTag>::const_iterator map = theIsoPF04MapNames.begin(); map != theIsoPF04MapNames.end(); ++map)
      produces<edm::ValueMap<double> >(labelOrInstance(map->second));
  }
}
MuonProducer::~MuonProducer ( ) [virtual]

Destructor.

Definition at line 138 of file MuonProducer.cc.

References fillPFIsolation_, and thePFIsoHelper.


Member Function Documentation

template<typename TYPE >
void MuonProducer::fillMuonMap ( edm::Event event,
const edm::OrphanHandle< reco::MuonCollection > &  muonHandle,
const std::vector< TYPE > &  muonExtra,
const std::string &  label 
) [private]

Definition at line 427 of file MuonProducer.cc.

                                                      {
 
  typedef typename edm::ValueMap<TYPE>::Filler FILLER; 

  std::auto_ptr<edm::ValueMap<TYPE> > muonMap(new edm::ValueMap<TYPE>());
  if(!muonExtra.empty()){
    FILLER filler(*muonMap);
    filler.insert(muonHandle, muonExtra.begin(), muonExtra.end());
    filler.fill();
  }
  event.put(muonMap,label);
}
std::string MuonProducer::labelOrInstance ( const edm::InputTag input) const [private]

Definition at line 444 of file MuonProducer.cc.

References fastLabelling_, edm::InputTag::instance(), edm::InputTag::label(), and theMuonsCollectionLabel.

Referenced by MuonProducer(), and produce().

                                                                     {
  if(fastLabelling_) return input.label();

  return input.label() != theMuonsCollectionLabel.label() ? input.label() : input.instance();
}
void MuonProducer::produce ( edm::Event event,
const edm::EventSetup eventSetup 
) [virtual]

reconstruct muons

Implements edm::EDProducer.

Definition at line 144 of file MuonProducer.cc.

References abs, MuPFIsoHelper::beginEvent(), dout, MuPFIsoHelper::embedPFIsolation(), event(), fillCosmicsIdMap_, fillDetectorBasedIsolation_, fillPFIsolation_, fillPFMomentum_, fillSelectors_, fillShoweringInfo_, fillTimingInfo_, i, edm::Ref< C, T, F >::id(), edm::InputTag::instance(), reco::Muon::isGlobalMuon(), reco::Muon::isPFMuon(), reco::Muon::isStandAloneMuon(), reco::Muon::isTrackerMuon(), edm::Ref< C, T, F >::key(), edm::InputTag::label(), labelOrInstance(), Association::map, metname, reco::PFCandidate::muonRef(), reco::LeafCandidate::p4(), reco::LeafCandidate::pdgId(), reco::tau::pfCandidates(), reco::Muon::pfP4(), alignCSCRings::s, reco::Muon::setPFP4(), GlobalPosition_Frontier_DevDB_cff::tag, theCosmicCompMapName, theEcalDepositName, theHcalDepositName, theHoDepositName, theIsoPF03MapNames, theIsoPF04MapNames, theJetDepositName, theMuonsCollectionLabel, theMuToMuMapName, thePFCandLabel, thePFIsoHelper, theSelectorMapNames, theShowerMapName, and theTrackDepositName.

                                                                          {

   const std::string metname = "Muon|RecoMuon|MuonIdentification|MuonProducer";

   // the muon collection, it will be loaded in the event
   std::auto_ptr<reco::MuonCollection> outputMuons(new reco::MuonCollection());
   reco::MuonRefProd outputMuonsRefProd = event.getRefBeforePut<reco::MuonCollection>();

   edm::Handle<reco::MuonCollection> inputMuons; 
   event.getByLabel(theMuonsCollectionLabel, inputMuons);
   edm::OrphanHandle<reco::MuonCollection> inputMuonsOH(inputMuons.product(), inputMuons.id());
   
   edm::Handle<reco::PFCandidateCollection> pfCandidates; 
   event.getByLabel(thePFCandLabel, pfCandidates);


   // fetch collections for PFIso
   if(fillPFIsolation_) thePFIsoHelper->beginEvent(event);

   
   // Fill timing information
   edm::Handle<reco::MuonTimeExtraMap> timeMapCmb;
   edm::Handle<reco::MuonTimeExtraMap> timeMapDT;
   edm::Handle<reco::MuonTimeExtraMap> timeMapCSC;
   
   int nMuons=inputMuons->size();

   std::vector<reco::MuonTimeExtra> dtTimeColl(nMuons);
   std::vector<reco::MuonTimeExtra> cscTimeColl(nMuons);
   std::vector<reco::MuonTimeExtra> combinedTimeColl(nMuons);

   if(fillTimingInfo_){
     event.getByLabel(theMuonsCollectionLabel.label(),"combined",timeMapCmb);
     event.getByLabel(theMuonsCollectionLabel.label(),"dt",timeMapDT);
     event.getByLabel(theMuonsCollectionLabel.label(),"csc",timeMapCSC);
   }

   std::vector<reco::IsoDeposit> trackDepColl(nMuons);
   std::vector<reco::IsoDeposit> ecalDepColl(nMuons);
   std::vector<reco::IsoDeposit> hcalDepColl(nMuons);
   std::vector<reco::IsoDeposit> hoDepColl(nMuons);
   std::vector<reco::IsoDeposit> jetDepColl(nMuons);


   edm::Handle<reco::IsoDepositMap> trackIsoDepMap;
   edm::Handle<reco::IsoDepositMap> ecalIsoDepMap;
   edm::Handle<reco::IsoDepositMap> hcalIsoDepMap;
   edm::Handle<reco::IsoDepositMap> hoIsoDepMap;
   edm::Handle<reco::IsoDepositMap> jetIsoDepMap;


   if(fillDetectorBasedIsolation_){
     event.getByLabel(theTrackDepositName,trackIsoDepMap);
     event.getByLabel(theEcalDepositName,ecalIsoDepMap);
     event.getByLabel(theHcalDepositName,hcalIsoDepMap);
     event.getByLabel(theHoDepositName,hoIsoDepMap);
     event.getByLabel(theJetDepositName,jetIsoDepMap);
   }

   std::map<std::string,edm::Handle<edm::ValueMap<double> > >  pfIso03Maps; 
   std::map<std::string,std::vector<double> > pfIso03MapVals;
   std::map<std::string,edm::Handle<edm::ValueMap<double> > >  pfIso04Maps; 
   std::map<std::string,std::vector<double> > pfIso04MapVals;

   if(fillPFIsolation_){
     for(std::map<std::string,edm::InputTag>::const_iterator map = theIsoPF03MapNames.begin(); map != theIsoPF03MapNames.end(); ++map){
       event.getByLabel(map->second,pfIso03Maps[map->first]);
       pfIso03MapVals[map->first].resize(nMuons);
     }
     for(std::map<std::string,edm::InputTag>::const_iterator map = theIsoPF04MapNames.begin(); map != theIsoPF04MapNames.end(); ++map){
       event.getByLabel(map->second,pfIso04Maps[map->first]);
       pfIso04MapVals[map->first].resize(nMuons);
     }
   }
   
   std::vector<edm::Handle<edm::ValueMap<bool> > >  selectorMaps(fillSelectors_ ? theSelectorMapNames.size() : 0); 
   std::vector<std::vector<bool> > selectorMapResults(fillSelectors_ ? theSelectorMapNames.size() : 0);
   if(fillSelectors_){
     unsigned int s=0;
     for(InputTags::const_iterator tag = theSelectorMapNames.begin(); tag != theSelectorMapNames.end(); ++tag, ++s){
       event.getByLabel(*tag,selectorMaps[s]);
       selectorMapResults[s].resize(nMuons);
     }
   }

   edm::Handle<reco::MuonShowerMap> showerInfoMap;
   if(fillShoweringInfo_) event.getByLabel(theShowerMapName,showerInfoMap);

   std::vector<reco::MuonShower> showerInfoColl(nMuons);

   edm::Handle<edm::ValueMap<unsigned int> > cosmicIdMap;
   if(fillCosmicsIdMap_) event.getByLabel(theCosmicCompMapName,cosmicIdMap);
   std::vector<unsigned int> cosmicIdColl(fillCosmicsIdMap_ ? nMuons : 0);
   
   edm::Handle<edm::ValueMap<reco::MuonCosmicCompatibility> > cosmicCompMap;
   if(fillCosmicsIdMap_) event.getByLabel(theCosmicCompMapName,cosmicCompMap);
   std::vector<reco::MuonCosmicCompatibility> cosmicCompColl(fillCosmicsIdMap_ ? nMuons : 0);


   std::vector<reco::MuonRef> muonRefColl(nMuons);



   if(inputMuons->empty()) {
     edm::OrphanHandle<reco::MuonCollection> muonHandle = event.put(outputMuons);
     
     if(fillTimingInfo_){
       fillMuonMap<reco::MuonTimeExtra>(event, muonHandle, combinedTimeColl,"combined");
       fillMuonMap<reco::MuonTimeExtra>(event, muonHandle, dtTimeColl,"dt");
       fillMuonMap<reco::MuonTimeExtra>(event, muonHandle, cscTimeColl,"csc");
     }
     
     if(fillDetectorBasedIsolation_){
       fillMuonMap<reco::IsoDeposit>(event, muonHandle, trackDepColl, labelOrInstance(theTrackDepositName));
       fillMuonMap<reco::IsoDeposit>(event, muonHandle, jetDepColl,   labelOrInstance(theJetDepositName));
       fillMuonMap<reco::IsoDeposit>(event, muonHandle, ecalDepColl,  theEcalDepositName.instance());
       fillMuonMap<reco::IsoDeposit>(event, muonHandle, hcalDepColl,  theHcalDepositName.instance());
       fillMuonMap<reco::IsoDeposit>(event, muonHandle, hoDepColl,    theHoDepositName.instance());
     }

     if(fillSelectors_){
       unsigned int s = 0;
       for(InputTags::const_iterator tag = theSelectorMapNames.begin(); 
           tag != theSelectorMapNames.end(); ++tag, ++s){
         fillMuonMap<bool>(event, muonHandle, selectorMapResults[s], labelOrInstance(*tag));
       }
     }

     if(fillShoweringInfo_) fillMuonMap<reco::MuonShower>(event, muonHandle, showerInfoColl, labelOrInstance(theShowerMapName));

     if(fillCosmicsIdMap_){
       fillMuonMap<unsigned int>(event, muonHandle, cosmicIdColl, labelOrInstance(theCosmicCompMapName));
       fillMuonMap<reco::MuonCosmicCompatibility>(event, muonHandle, cosmicCompColl, labelOrInstance(theCosmicCompMapName));
     }

     fillMuonMap<reco::MuonRef>(event,inputMuonsOH, muonRefColl, theMuToMuMapName);

     if(fillPFIsolation_){
       for(std::map<std::string,edm::InputTag>::const_iterator map = theIsoPF03MapNames.begin(); map != theIsoPF03MapNames.end(); ++map)
         fillMuonMap<double>(event, muonHandle, pfIso03MapVals[map->first], labelOrInstance(map->second));
       for(std::map<std::string,edm::InputTag>::const_iterator map = theIsoPF04MapNames.begin(); map != theIsoPF04MapNames.end(); ++map)
         fillMuonMap<double>(event, muonHandle, pfIso04MapVals[map->first], labelOrInstance(map->second));
     }

     return;
   }
   
   // FIXME: add the option to swith off the Muon-PF "info association".
   

   MuToPFMap muToPFMap;

   if(fillPFMomentum_){
     dout << "Number of PFCandidates: " << pfCandidates->size() << endl;
     foreach(const reco::PFCandidate &pfCand, *pfCandidates)
       if(abs(pfCand.pdgId()) == 13){
         muToPFMap[pfCand.muonRef()] = pfCand.p4();     
         dout << "MuonRef: " << pfCand.muonRef().id() << " " << pfCand.muonRef().key() << " PF p4: " << pfCand.p4() << endl;
       }
     dout << "Number of PFMuons: " << muToPFMap.size() << endl;
     dout << "Number of Muons in the original collection: " << inputMuons->size() << endl;
   }

   reco::MuonRef::key_type muIndex = 0;
   unsigned int i = 0;
   foreach(const reco::Muon &inMuon, *inputMuons){
     
     reco::MuonRef muRef(inputMuons, muIndex);
     muonRefColl[i] = reco::MuonRef(outputMuonsRefProd, muIndex++);

     // Copy the muon 
     reco::Muon outMuon = inMuon;
    
     if(fillPFMomentum_){ 
     // search for the corresponding pf candidate
       MuToPFMap::iterator iter =  muToPFMap.find(muRef);
       if(iter != muToPFMap.end()){
         outMuon.setPFP4(iter->second);
         muToPFMap.erase(iter);
         dout << "MuonRef: " << muRef.id() << " " << muRef.key() 
              << " Is it PF? " << outMuon.isPFMuon() 
              << " PF p4: " << outMuon.pfP4() << endl;
       }
       
       
       dout << "MuonRef: " << muRef.id() << " " << muRef.key() 
            << " Is it PF? " << outMuon.isPFMuon() << endl;
       
       dout << "GLB "  << outMuon.isGlobalMuon()
            << " TM "  << outMuon.isTrackerMuon()
            << " STA " << outMuon.isStandAloneMuon() 
            << " p4 "  << outMuon.p4() << endl;
     }

     // Add PF isolation info
     if(fillPFIsolation_){
       thePFIsoHelper->embedPFIsolation(outMuon,muRef);
       for(std::map<std::string,edm::InputTag>::const_iterator map = theIsoPF03MapNames.begin(); map != theIsoPF03MapNames.end(); ++map)
         pfIso03MapVals[map->first][i] = (*pfIso03Maps[map->first])[muRef];
       for(std::map<std::string,edm::InputTag>::const_iterator map = theIsoPF04MapNames.begin(); map != theIsoPF04MapNames.end(); ++map)
         pfIso04MapVals[map->first][i] = (*pfIso04Maps[map->first])[muRef];
     }

     
     // Fill timing information   
     if(fillTimingInfo_){
       combinedTimeColl[i] = (*timeMapCmb)[muRef];
       dtTimeColl[i] = (*timeMapDT)[muRef];
       cscTimeColl[i] = (*timeMapCSC)[muRef];
     }
     
     if(fillDetectorBasedIsolation_){
       trackDepColl[i] = (*trackIsoDepMap)[muRef];
       ecalDepColl[i]  = (*ecalIsoDepMap)[muRef];
       hcalDepColl[i]  = (*hcalIsoDepMap)[muRef];
       hoDepColl[i]    = (*hoIsoDepMap)[muRef];
       jetDepColl[i]   = (*jetIsoDepMap)[muRef];;
     }
     
     if(fillSelectors_){
       unsigned int s = 0;
       for(InputTags::const_iterator tag = theSelectorMapNames.begin(); 
           tag != theSelectorMapNames.end(); ++tag, ++s)
         selectorMapResults[s][i] = (*selectorMaps[s])[muRef];
     }

     // Fill the Showering Info
     if(fillShoweringInfo_) showerInfoColl[i] = (*showerInfoMap)[muRef];

     if(fillCosmicsIdMap_){
       cosmicIdColl[i] = (*cosmicIdMap)[muRef];
       cosmicCompColl[i] = (*cosmicCompMap)[muRef];
     }

     outputMuons->push_back(outMuon); 
     ++i;
   }

   dout << "Number of Muons in the new muon collection: " << outputMuons->size() << endl;
   edm::OrphanHandle<reco::MuonCollection> muonHandle = event.put(outputMuons);

   if(fillTimingInfo_){
     fillMuonMap<reco::MuonTimeExtra>(event, muonHandle, combinedTimeColl,"combined");
     fillMuonMap<reco::MuonTimeExtra>(event, muonHandle, dtTimeColl,"dt");
     fillMuonMap<reco::MuonTimeExtra>(event, muonHandle, cscTimeColl,"csc");
   }

   if(fillDetectorBasedIsolation_){
     fillMuonMap<reco::IsoDeposit>(event, muonHandle, trackDepColl, labelOrInstance(theTrackDepositName));
     fillMuonMap<reco::IsoDeposit>(event, muonHandle, jetDepColl,   labelOrInstance(theJetDepositName));
     fillMuonMap<reco::IsoDeposit>(event, muonHandle, ecalDepColl,  theEcalDepositName.instance());
     fillMuonMap<reco::IsoDeposit>(event, muonHandle, hcalDepColl,  theHcalDepositName.instance());
     fillMuonMap<reco::IsoDeposit>(event, muonHandle, hoDepColl,    theHoDepositName.instance());
   }
   
   if(fillPFIsolation_){
     for(std::map<std::string,edm::InputTag>::const_iterator map = theIsoPF03MapNames.begin(); map != theIsoPF03MapNames.end(); ++map)
       fillMuonMap<double>(event, muonHandle, pfIso03MapVals[map->first], labelOrInstance(map->second));
     for(std::map<std::string,edm::InputTag>::const_iterator map = theIsoPF04MapNames.begin(); map != theIsoPF04MapNames.end(); ++map)
       fillMuonMap<double>(event, muonHandle, pfIso04MapVals[map->first], labelOrInstance(map->second));
   }   

   if(fillSelectors_){
     unsigned int s = 0;
     for(InputTags::const_iterator tag = theSelectorMapNames.begin(); 
         tag != theSelectorMapNames.end(); ++tag, ++s)
       fillMuonMap<bool>(event, muonHandle, selectorMapResults[s], labelOrInstance(*tag));
   }

   if(fillShoweringInfo_) fillMuonMap<reco::MuonShower>(event, muonHandle, showerInfoColl, labelOrInstance(theShowerMapName));

   if(fillCosmicsIdMap_){
     fillMuonMap<unsigned int>(event, muonHandle, cosmicIdColl, labelOrInstance(theCosmicCompMapName));
     fillMuonMap<reco::MuonCosmicCompatibility>(event, muonHandle, cosmicCompColl, labelOrInstance(theCosmicCompMapName));
   }

   fillMuonMap<reco::MuonRef>(event,inputMuonsOH, muonRefColl, theMuToMuMapName);
   


}
void MuonProducer::setAlias ( std::string  alias) [inline, private]

Definition at line 55 of file MuonProducer.h.

References theAlias.

Referenced by MuonProducer().

                                  {
    alias.erase( alias.size() - 1, alias.size() );
    theAlias=alias;
  }

Member Data Documentation

bool MuonProducer::debug_ [private]

Definition at line 63 of file MuonProducer.h.

Definition at line 64 of file MuonProducer.h.

Referenced by labelOrInstance(), and MuonProducer().

Definition at line 72 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 75 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 69 of file MuonProducer.h.

Definition at line 74 of file MuonProducer.h.

Referenced by MuonProducer(), produce(), and ~MuonProducer().

Definition at line 73 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 71 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 76 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 77 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

std::string MuonProducer::theAlias [private]

Definition at line 53 of file MuonProducer.h.

Referenced by MuonProducer(), and setAlias().

Definition at line 88 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 80 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 81 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 82 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

std::map<std::string,edm::InputTag> MuonProducer::theIsoPF03MapNames [private]

Definition at line 94 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

std::map<std::string,edm::InputTag> MuonProducer::theIsoPF04MapNames [private]

Definition at line 95 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 83 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 66 of file MuonProducer.h.

Referenced by labelOrInstance(), MuonProducer(), and produce().

std::string MuonProducer::theMuToMuMapName [private]

Definition at line 90 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 67 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 92 of file MuonProducer.h.

Referenced by MuonProducer(), produce(), and ~MuonProducer().

Definition at line 85 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 87 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 79 of file MuonProducer.h.

Referenced by MuonProducer(), and produce().

Definition at line 70 of file MuonProducer.h.