24 virtual void endJob()
override ;
48 produces<std::vector<reco::Muon> >();
87 edm::LogError(
"") <<
">>> Muon collection does not exist !!!";
95 edm::LogError(
"") <<
">>> PFCandidate collection does not exist !!!";
106 unsigned int muonCollectionSize = muonCollection->size();
107 unsigned int pfCollectionSize = pfCollection->size();
108 for (
unsigned int i=0;
i<muonCollectionSize;
i++) {
112 bool muonFound =
false;
122 for (
unsigned int j=0;
j<pfCollectionSize;
j++) {
126 bool thisIsTheMuon =
false;
128 thisIsTheMuon =
true;
134 if (deltaR>0.5)
continue;
159 if (deltaR<0.3) iso03.
emEt += pf->
pt();
169 if (deltaR<0.3) iso03.
hadEt += pf->
pt();
181 newmuons->push_back(*newmu);
T getUntrackedParameter(std::string const &, T const &) const
bool isNonnull() const
Checks for non-null.
float sumPt
sum-pt of tracks
virtual float pt() const
transverse momentum
virtual TrackRef innerTrack() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
MuonWithPFIsoProducer(const edm::ParameterSet &)
virtual void beginJob() override
virtual Vector momentum() const
spatial momentum vector
float hadVetoEt
hcal sum-et in the veto region in r-phi
std::vector< Muon > MuonCollection
collection of Muon objects
reco::TrackRef trackRef() const
virtual void endJob() override
virtual void produce(edm::Event &, const edm::EventSetup &) override
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
int nTracks
number of tracks in the cone (excluding veto region)
double deltaR(double eta1, double eta2, double phi1, double phi2)
float emVetoEt
ecal sum-et in the veto region in r-phi
edm::EDGetTokenT< edm::View< reco::PFCandidate > > pfToken_
double neutralHadronIsoVeto_
void setIsolation(const MuonIsolation &isoR03, const MuonIsolation &isoR05)
virtual ParticleType particleId() const
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
Muon * clone() const
create a clone
float trackerVetoPt
(sum-)pt inside the veto region in r-phi