24 : srcSelectedMuons_(cfg.getParameter<edm::InputTag>(
"selectedMuons")),
25 srcPFCandidates_(cfg.getParameter<edm::InputTag>(
"pfCandidates")),
26 dRmatch_(cfg.getParameter<double>(
"dRmatch"))
29 produces<detIdToFloatMap>(
"energyDepositsMuPlus");
30 produces<detIdToFloatMap>(
"energyDepositsMuMinus");
38 std::auto_ptr<detIdToFloatMap> energyDepositMuPlus(
new detIdToFloatMap());
39 std::auto_ptr<detIdToFloatMap> energyDepositMuMinus(
new detIdToFloatMap());
52 evt.
put(energyDepositMuPlus,
"energyDepositsMuPlus");
53 evt.
put(energyDepositMuMinus,
"energyDepositsMuMinus");
80 pfCandidate != pfCandidates.
end(); ++pfCandidate ) {
82 double dR =
deltaR(pfCandidate->p4(), muon->
p4());
88 for ( reco::PFCandidate::ElementsInBlocks::const_iterator pfBlock = pfBlocks.begin();
89 pfBlock != pfBlocks.end(); ++pfBlock ) {
92 pfBlockElement != pfBlockElements.
end(); ++pfBlockElement ) {
93 if ( pfBlockElement->clusterRef().isNonnull() ) {
95 const std::vector<reco::PFRecHitFraction>& pfRecHitFractions = pfCluster->recHitFractions();
96 for ( std::vector<reco::PFRecHitFraction>::const_iterator pfRecHitFraction = pfRecHitFractions.begin();
97 pfRecHitFraction != pfRecHitFractions.end(); ++pfRecHitFraction ) {
99 energyDepositMap[pfRecHit->detId()] += pfRecHitFraction->fraction();
110 <<
"Failed to match Muon to PFCandidate: Pt = " << muon->
pt() <<
", eta = " << muon->
eta() <<
", phi = " << muon->
phi() <<
" !!" << std::endl;
114 pfCandidate != pfCandidates.
end(); ++pfCandidate ) {
115 std::cout <<
"PFCandidate #" << idx <<
" (" << getPFCandidateType(pfCandidate->particleId()) <<
"):"
116 <<
" Pt = " << pfCandidate->pt() <<
", eta = " << pfCandidate->eta() <<
", phi = " << pfCandidate->phi() << std::endl;
T getParameter(std::string const &) const
reco::CandidateBaseRef getTheMuMinus(const std::vector< reco::CandidateBaseRef > &)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
ParticleType
particle types
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
#define DEFINE_FWK_MODULE(type)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
void fillEnergyDepositMap(const reco::Muon *, const edm::View< reco::PFCandidate > &, detIdToFloatMap &)
edm::InputTag srcPFCandidates_
std::vector< ElementInBlock > ElementsInBlocks
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
virtual void produce(edm::Event &, const edm::EventSetup &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool isMatched(TrackingRecHit const &hit)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
double deltaR(double eta1, double eta2, double phi1, double phi2)
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
PFMuonCaloCleaner(const edm::ParameterSet &)
std::map< uint32_t, float > detIdToFloatMap
const_iterator begin() const
const_iterator end() const
std::vector< reco::CandidateBaseRef > getSelMuons(const edm::Event &, const edm::InputTag &)
reco::CandidateBaseRef getTheMuPlus(const std::vector< reco::CandidateBaseRef > &)
virtual float pt() const GCC11_FINAL
transverse momentum
bool isNonnull() const
Checks for non-null.
edm::InputTag srcSelectedMuons_