35 produces<std::vector<T>>();
46 desc.
add<
bool>(
"computeMiniIso",
false)->setComment(
"Recompute miniIsolation");
49 desc.
add<
bool>(
"recomputeMuonBasicSelectors",
false)->setComment(
"Recompute basic cut-based muon selector flags");
50 desc.
addOptional<std::vector<double>>(
"miniIsoParams")->setComment(
"Parameters used for miniIso (as in PATMuonProducer)");
51 descriptions.
add(
"muonsUpdated", desc);
53 desc.
addOptional<std::vector<double>>(
"miniIsoParamsB")->setComment(
"Parameters used for miniIso in the barrel (as in PATElectronProducer)");
54 desc.
addOptional<std::vector<double>>(
"miniIsoParamsE")->setComment(
"Parameters used for miniIso in the endcap (as in PATElectronProducer)");
55 descriptions.
add(
"electronsUpdated", desc);
97 if(miniIsoParams_[0].
size() != 9)
throw cms::Exception(
"ParameterError",
"miniIsoParamsB must have exactly 9 elements.\n");
98 if(miniIsoParams_[1].
size() != 9)
throw cms::Exception(
"ParameterError",
"miniIsoParamsE must have exactly 9 elements.\n");
127 std::unique_ptr<std::vector<T>>
out(
new std::vector<T>(*src));
131 for (
unsigned int i = 0,
n = src->size();
i <
n; ++
i) {
137 params[0], params[1], params[2],
138 params[3], params[4], params[5],
139 params[6], params[7], params[8]);
140 lep.setMiniPFIsolation(miniiso);
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double zError() const
error on z
pat::LeptonUpdater< pat::Electron > PATElectronUpdater
LeptonUpdater(const edm::ParameterSet &iConfig)
const Point & position() const
position
edm::EDGetTokenT< std::vector< T > > src_
pat::LeptonUpdater< pat::Muon > PATMuonUpdater
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void setDB(double dB, double edB, IPTYPE type)
Set impact parameter of a certain type and its uncertainty.
#define DEFINE_FWK_MODULE(type)
void setDB(double dB, double edB, IPTYPE type=PV2D)
bool recomputeMuonBasicSelectors_
void setSelectors(uint64_t selectors)
~LeptonUpdater() override
void setDZ(T &lep, const reco::Vertex &pv) const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void recomputeMuonBasicSelectors(T &, const reco::Vertex &, const bool) const
reco::Muon::Selector makeSelectorBitset(reco::Muon const &muon, reco::Vertex const *vertex=0, bool run2016_hip_mitigation=false)
edm::EDGetTokenT< pat::PackedCandidateCollection > pcToken_
T const * product() const
Analysis-level electron class.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const std::vector< double > & miniIsoParams(const T &lep) const
void readMiniIsoParams(const edm::ParameterSet &iConfig)
PFIsolation getMiniPFIsolation(const pat::PackedCandidateCollection *pfcands, const math::XYZTLorentzVector &p4, float mindr=0.05, float maxdr=0.2, float kt_scale=10.0, float ptthresh=0.5, float deadcone_ch=0.0001, float deadcone_pu=0.01, float deadcone_ph=0.01, float deadcone_nh=0.01, float dZ_cut=0.0)
reco::TrackRef muonBestTrack() const override
Track selected to be the best measurement of the muon parameters (including PFlow global information)...
void produce(edm::StreamID, edm::Event &, edm::EventSetup const &) const override
std::vector< double > miniIsoParams_[2]
reco::GsfTrackRef gsfTrack() const override
override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster ...
Analysis-level muon class.
edm::EDGetTokenT< std::vector< reco::Vertex > > vertices_