51 muons_(iConfig.getParameter<
edm::InputTag>(
"muons")),
64 produces<std::vector<reco::Muon> >();
77 auto out = std::make_unique<std::vector<reco::Muon>>();
81 for (std::vector<reco::Muon>::const_iterator it = muons->begin(), ed = muons->end(); it != ed; ++it) {
90 }
else throw cms::Exception(
"Boh") <<
"Muon with track and no CaloCompatibility; pt = " << mu.
pt() <<
", eta = " << mu.
eta() <<
", type = " << mu.
type() <<
"\n";
96 for (std::vector<reco::CaloMuon>::const_iterator it = caloMuons->begin(), ed = caloMuons->end(); it != ed; ++it) {
100 double energy =
sqrt(track->p() * track->p() + 0.011163691);
114 for (
size_t i = 0;
i < tracks->size();
i++) {
119 for(std::vector<reco::Muon>::const_iterator
muon = muons->begin();
muon < muons->end();
muon++){
127 bool isCaloMuon =
false;
128 for(std::vector<reco::CaloMuon>::const_iterator
muon = caloMuons->begin();
muon < caloMuons->end();
muon++){
134 if(isCaloMuon)
continue;
137 double energy =
sqrt(track->p() * track->p() + 0.011163691);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
TrackRef track() const override
reference to a Track
bool isNonnull() const
Checks for non-null.
double eta() const final
momentum pseudorapidity
void setType(unsigned int type)
bool isMuon(const Candidate &part)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool isCaloCompatibilityValid() const
double pt() const final
transverse momentum
void setCalEnergy(const MuonEnergy &calEnergy)
set energy deposition information
StringCutObjectSelector< reco::CaloMuon, false > caloMuonsCut_
double minCaloCompatibility_
edm::EDGetTokenT< std::vector< reco::Track > > trackToken_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual void setInnerTrack(const TrackRef &t)
set reference to Track
#define DEFINE_FWK_MODULE(type)
StringCutObjectSelector< reco::TrackRef, false > tracksCut_
void setCaloCompatibility(float input)
edm::EDGetTokenT< std::vector< reco::Muon > > muonToken_
CaloMuonMerger(const edm::ParameterSet &iConfig)
~CaloMuonMerger() override
StringCutObjectSelector< reco::Muon, false > muonsCut_
edm::EDGetTokenT< std::vector< reco::CaloMuon > > caloMuonToken_
static const unsigned int CaloMuon
Merges reco::CaloMuons, reco::Muons and optionally reco::Tracks avoiding innerTrack duplications in a...
unsigned int type() const
float caloCompatibility() const
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override