|
|
Go to the documentation of this file.
4 #ifndef PhysicsTools_PatAlgos_PATMuonProducer_h
5 #define PhysicsTools_PatAlgos_PATMuonProducer_h
74 return std::make_unique<PATMuonHeavyObjectCache>(iConfig);
87 typedef std::vector<edm::Handle<edm::Association<reco::GenParticleCollection>>>
GenAssociations;
102 template <
typename T>
104 const char* psetName,
122 bool primaryVertexIsValid,
124 bool beamspotIsValid);
128 const DetId& chamberId);
136 const std::vector<std::string>& collection_names);
183 std::vector<edm::EDGetTokenT<edm::Association<reco::GenParticleCollection>>>
genMatchTokens_;
258 template <
typename T>
260 const char* psetName,
265 if (iConfig.
exists(psetName)) {
268 if (depconf.
exists(
"tracker"))
270 if (depconf.
exists(
"ecal"))
272 if (depconf.
exists(
"hcal"))
274 if (depconf.
exists(
"pfAllParticles")) {
277 if (depconf.
exists(
"pfChargedHadrons")) {
281 if (depconf.
exists(
"pfChargedAll")) {
284 if (depconf.
exists(
"pfPUChargedHadrons")) {
288 if (depconf.
exists(
"pfNeutralHadrons")) {
292 if (depconf.
exists(
"pfPhotons")) {
295 if (depconf.
exists(
"user")) {
296 std::vector<edm::InputTag> userdeps = depconf.
getParameter<std::vector<edm::InputTag>>(
"user");
297 std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
299 for (; it != ed; ++it, ++
key) {
307 return consumes<edm::ValueMap<T>>(
label.second);
bool addInverseBeta_
add combined inverse beta measurement into the muon
void fillMuon(Muon &aMuon, const MuonBaseRef &muonRef, const reco::CandidateBaseRef &baseRef, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const IsolationValueMaps &isolationValues) const
common muon filling, for both the standard and PF2PAT case
double getRelMiniIsoPUCorrected(const pat::Muon &muon, double rho, const std::vector< double > &area)
std::unique_ptr< const pat::SoftMuonMvaEstimator > const & softMuonMvaEstimator() const
GreaterByPt< Muon > pTComparator_
bool embedTrack_
embed the track from inner tracker into the muon
Calculates a lepton's calorimetric isolation energy.
bool embedPfEcalEnergy_
add ecal PF energy
std::pair< pat::IsolationKeys, edm::InputTag > IsolationLabel
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
everything that needs to be done during the event loop
bool embedTunePBestTrack_
embed the track from best muon measurement (muon only)
bool embedPickyMuon_
embed track from picky muon fit into the muon
static std::unique_ptr< PATMuonHeavyObjectCache > initializeGlobalCache(const edm::ParameterSet &iConfig)
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
isolation value pair for temporary storage before being folded into the muon
static void globalEndJob(PATMuonHeavyObjectCache *)
edm::EDGetTokenT< std::vector< pat::TriggerObjectStandAlone > > triggerObjects_
std::vector< edm::Handle< edm::Association< reco::GenParticleCollection > > > GenAssociations
edm::EDGetTokenT< reco::JetCorrector > mvaL1L2L3ResCorrector_
Calculates a lepton's tracker isolation pt.
Analysis-level muon class.
bool embedDytMuon_
embed track from DYT muon fit into the muon
void fillHltTriggerInfo(pat::Muon &muon, edm::Handle< std::vector< pat::TriggerObjectStandAlone >> &triggerObjects, const edm::TriggerNames &names, const std::vector< std::string > &collection_names)
bool recomputeBasicSelectors_
std::vector< std::pair< pat::IsolationKeys, float > > IsolationValuePairs
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueTokens_
bool embedCombinedMuon_
embed track of the combined fit into the muon
bool isPhoton(long pdgid)
bool embedGenMatch_
embed the gen match information into the muon
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_neutral_hadrons_
primaryVertex
hltOfflineBeamSpot for HLTMON
IsolationLabels isolationValueLabels_
input source isolation value maps
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
pat::helper::EfficiencyLoader efficiencyLoader_
helper class to add efficiencies to the muon
bool useUserData_
add user data to the muon (this will be data members of th muon even w/o embedding)
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_charged_hadrons_
edm::RefToBase< reco::Muon > MuonBaseRef
typedefs for convenience
bool forceEmbedBestTrack_
force separate embed of the best track even if already embedded
const std::string names[nVars_]
bool addPuppiIsolation_
add puppi isolation
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
input tags for generator match information
bool isNeutralHadron(long pdgid)
std::unique_ptr< const pat::SoftMuonMvaEstimator > softMuonMvaEstimator_
bool embedHighLevelSelection_
embed high level selection variables
pat::helper::KinResolutionsLoader resolutionLoader_
helper class to add resolutions to the muon
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
IsolationLabels isoDepositLabels_
input source for isoDeposits
std::optional< GlobalPoint > getMuonDirection(const reco::MuonChamberMatch &chamberMatch, const edm::ESHandle< GlobalTrackingGeometry > &geometry, const DetId &chamberId)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
bool embedTcMETMuonCorrs_
embed muon MET correction info for tcMET into the muon
std::unique_ptr< const pat::MuonMvaEstimator > const & muonLowPtMvaEstimator() const
~PATMuonProducer() override
default destructur
bool isChargedHadron(long pdgid)
void readIsolationLabels(const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T >>> &tokens)
bool embedPFCandidate_
embed pfCandidates into the muon
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_photons_
bool computeMuonMVA_
standard muon selectors
edm::EDGetTokenT< reco::JetCorrector > mvaL1Corrector_
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > caloMETMuonCorrsToken_
source of caloMET muon corrections
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_charged_hadrons_
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
input source of the primary vertex
bool embedCaloMETMuonCorrs_
embed muon MET correction info for caloMET into the muon
bool embedTpfmsMuon_
embed track from tpfms muon fit into the muon
bool computePuppiCombinedIso_
edm::EDGetTokenT< edm::ValueMap< reco::MuonTimeExtra > > muonTimeExtraToken_
input tag for reading inverse beta
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_photons_
bool addEfficiencies_
add efficiencies to the muon (this will be data members of th muon even w/o embedding)
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
input source
edm::EDGetTokenT< reco::PFCandidateCollection > pfMuonToken_
input source pfCandidates that will be to be transformed into pat::Muons, when using PF2PAT
std::vector< pat::PackedCandidate > PackedCandidateCollection
bool addResolutions_
add resolutions to the muon (this will be data members of th muon even w/o embedding)
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > tcMETMuonCorrsToken_
source of tcMET muon corrections
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::BeamSpot > beamLineToken_
input source of the primary vertex/beamspot
std::vector< edm::Handle< edm::ValueMap< IsoDeposit > > > IsoDepositMaps
edm::EDGetTokenT< edm::ValueMap< reco::MuonSimInfo > > simInfo_
MC info.
void setMuonMiniIso(pat::Muon &aMuon, const pat::PackedCandidateCollection *pc)
IsolationKeys
Enum defining isolation keys.
std::unique_ptr< const pat::MuonMvaEstimator > muonMvaEstimator_
bool addTriggerMatching_
Trigger.
edm::EDGetTokenT< double > rho_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_neutral_hadrons_
bool addGenMatch_
add generator match information
edm::EDGetTokenT< reco::JetTagCollection > mvaBTagCollectionTag_
void fillL1TriggerInfo(pat::Muon &muon, edm::Handle< std::vector< pat::TriggerObjectStandAlone >> &triggerObjects, const edm::TriggerNames &names, const edm::ESHandle< GlobalTrackingGeometry > &geometry)
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
bool useParticleFlow_
switch to use particle flow (PF2PAT) or not
pat::PATUserDataHelper< pat::Muon > userDataHelper_
helper class to add userData to the muon
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
PATMuonHeavyObjectCache(const edm::ParameterSet &)
PATMuonProducer(const edm::ParameterSet &iConfig, PATMuonHeavyObjectCache const *)
default constructir
void embedHighLevel(pat::Muon &aMuon, reco::TrackRef track, reco::TransientTrack &tt, reco::Vertex &primaryVertex, bool primaryVertexIsValid, reco::BeamSpot &beamspot, bool beamspotIsValid)
bool embedBestTrack_
embed the track from best muon measurement (global pflow)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
description of config file parameters
std::unique_ptr< const pat::MuonMvaEstimator > const & muonMvaEstimator() const
std::vector< IsolationLabel > IsolationLabels
std::vector< double > miniIsoParams_
bool embedStandAloneMuon_
embed track from muon system into the muon
double puppiCombinedIsolation(const pat::Muon &muon, const pat::PackedCandidateCollection *pc)
std::vector< std::string > hltCollectionFilters_
std::vector< double > effectiveAreaVec_
double relMiniIsoPUCorrected(const pat::Muon &aMuon, double rho)
double relMiniIsoPUCorrected_
edm::EDGetTokenT< pat::PackedCandidateCollection > pcToken_
std::unique_ptr< const pat::MuonMvaEstimator > muonLowPtMvaEstimator_
pat::helper::MultiIsolator isolator_
helper class to add userdefined isolation values to the muon