19 : srcSelectedMuons_(cfg.getParameter<edm::InputTag>(
"selectedMuons")),
20 srcESrecHits_(cfg.getParameter<edm::InputTag>(
"esRecHits"))
28 produces<detIdToFloatMap>(
"energyDepositsMuPlus");
29 produces<detIdToFloatMap>(
"energyDepositsMuMinus");
39 std::auto_ptr<detIdToFloatMap> energyDepositsMuPlus(
new detIdToFloatMap());
40 std::auto_ptr<detIdToFloatMap> energyDepositsMuMinus(
new detIdToFloatMap());
49 evt.
put(energyDepositsMuPlus,
"energyDepositsMuPlus");
50 evt.
put(energyDepositsMuMinus,
"energyDepositsMuMinus");
57 for ( std::vector<const EcalRecHit*>::const_iterator rh = trackDetMatchInfo.
crossedEcalRecHits.begin();
59 energyDepositMap[(*rh)->detid().rawId()] += (*rh)->energy();
62 for ( std::vector<const HBHERecHit*>::const_iterator rh = trackDetMatchInfo.
crossedHcalRecHits.begin();
64 energyDepositMap[(*rh)->detid().rawId()] += (*rh)->energy();
67 for ( std::vector<const HORecHit*>::const_iterator rh = trackDetMatchInfo.
crossedHORecHits.begin();
69 energyDepositMap[(*rh)->detid().rawId()] += (*rh)->energy();
75 for ( std::vector<DetId>::const_iterator detId = trackDetMatchInfo.
crossedPreshowerIds.begin();
78 if ( rh != esRecHits->end() ) {
79 energyDepositMap[rh->detid().rawId()] += rh->energy();
std::vector< DetId > crossedPreshowerIds
T getParameter(std::string const &) const
reco::CandidateBaseRef getTheMuMinus(const std::vector< reco::CandidateBaseRef > &)
std::vector< const HBHERecHit * > crossedHcalRecHits
#define DEFINE_FWK_MODULE(type)
void useDefaultPropagator()
use the default propagator
std::vector< EcalRecHit >::const_iterator const_iterator
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
TrackDetMatchInfo getTrackDetMatchInfo(const edm::Event &, const edm::EventSetup &, TrackDetectorAssociator &, const TrackAssociatorParameters &, const reco::Candidate *)
std::vector< const EcalRecHit * > crossedEcalRecHits
hits in detector elements crossed by a track
MuonCaloCleanerAllCrossed(const edm::ParameterSet &)
edm::InputTag srcESrecHits_
void fillEnergyDepositMap(edm::Event &, const edm::EventSetup &, const reco::Candidate *, detIdToFloatMap &)
TrackAssociatorParameters trackAssociatorParameters_
std::map< uint32_t, float > detIdToFloatMap
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::InputTag srcSelectedMuons_
~MuonCaloCleanerAllCrossed()
TrackDetectorAssociator trackAssociator_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< const HORecHit * > crossedHORecHits
virtual void produce(edm::Event &, const edm::EventSetup &)
std::vector< reco::CandidateBaseRef > getSelMuons(const edm::Event &, const edm::InputTag &)
reco::CandidateBaseRef getTheMuPlus(const std::vector< reco::CandidateBaseRef > &)
bool isNonnull() const
Checks for non-null.