56 : minPt_(iConfig.getParameter<double>(
"minPt")),
57 maxEta_(iConfig.getParameter<double>(
"maxEta")),
58 isAlsoTkMu_(iConfig.getParameter<
bool>(
"isAlsoTkMu")),
59 maxNormChi2_(iConfig.getParameter<double>(
"maxNormChi2")),
60 maxd0_(iConfig.getParameter<double>(
"maxd0")),
61 minnHits_(iConfig.getParameter<
int>(
"minnHits")),
62 minnValidStaHits_(iConfig.getParameter<
int>(
"minnValidStaHits")),
63 useTrackAssociatorPositions_(iConfig.getParameter<
bool>(
"useTrackAssociatorPositions")),
64 useHO_(iConfig.getParameter<
bool>(
"useHO")),
65 towerEtThreshold_(iConfig.getParameter<double>(
"towerEtThreshold")),
66 useRecHits_(iConfig.getParameter<
bool>(
"useRecHits")) {
69 magFieldToken_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
76 produces<edm::ValueMap<reco::MuonMETCorrectionData>>(
"muCorrData");
91 std::vector<reco::MuonMETCorrectionData> muCorrDataList;
101 muCorrDataList.push_back(muMETCorrData);
104 auto valueMapMuCorrData = std::make_unique<edm::ValueMap<reco::MuonMETCorrectionData>>();
108 dataFiller.insert(
muons, muCorrDataList.begin(), muCorrDataList.end());
123 if (
muon.isGlobalMuon())
124 mu_track =
muon.globalTrack();
125 else if (
muon.isTrackerMuon() ||
muon.isRPCMuon() ||
muon.isGEMMuon() ||
muon.isME0Muon())
126 mu_track =
muon.innerTrack();
128 mu_track =
muon.outerTrack();
142 return reco::MuonMETCorrectionData::Type::MuonCandidateValuesUsed;
144 return reco::MuonMETCorrectionData::Type::NotUsed;
150 if (!
muon.isGlobalMuon())
161 if (fabs(globTk->dxy(beamSpotPosition)) > fabs(
maxd0_))
163 if (siTk->numberOfValidHits() <
minnHits_)
void determine_deltax_deltay(double &deltax, double &deltay, const reco::Muon &muon, double bfield, const MagneticField &magneticField, edm::Event &iEvent, const edm::EventSetup &iSetup)
T getParameter(std::string const &) const
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
void useDefaultPropagator()
use the default propagator
Global3DPoint GlobalPoint
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
TrackDetectorAssociator trackAssociator_
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
reco::MuonMETCorrectionData::Type decide_correction_type(const reco::Muon &muon, const math::XYZPoint &beamSpotPosition)
bool useTrackAssociatorPositions_
TrackAssociatorParameters trackAssociatorParameters_
bool getData(T &iHolder) const
Namespace of DDCMS conversion namespace.
void produce(edm::Event &, const edm::EventSetup &) override
XYZPointD XYZPoint
point in space with cartesian internal representation
static FreeTrajectoryState getFreeTrajectoryState(const MagneticField *, const reco::Track &)
get FreeTrajectoryState from different track representations
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
MuonMETValueMapProducer(const edm::ParameterSet &)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
bool should_type_MuonCandidateValuesUsed(const reco::Muon &muon, const math::XYZPoint &beamSpotPosition)
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)