Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconfigure particle flow config files #28110

Merged
merged 40 commits into from
Nov 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
3712eb3
Clean up the particleFlow config file and make associated changes
hatakeyamak Aug 14, 2019
6e482a4
code-check
hatakeyamak Aug 15, 2019
ccd41d9
code-format
hatakeyamak Aug 15, 2019
cdc2c1a
Clean up the particleFlow config file and make associated changes
hatakeyamak Aug 14, 2019
01af87e
code-check
hatakeyamak Aug 15, 2019
b33229f
code-format
hatakeyamak Aug 15, 2019
f3c8a52
introduce fillDescriptions
hatakeyamak Oct 3, 2019
2e5bb5f
solve conflicts
hatakeyamak Oct 3, 2019
1526106
solve conflicts
hatakeyamak Oct 3, 2019
5ea0bf6
cleanup. reduce parametersets usage somewhat.
hatakeyamak Oct 3, 2019
b4494a3
kill unused or moved parameters via HLTrigger/Configuration/python/cu…
hatakeyamak Oct 9, 2019
a7aa75c
reorganize config files for PFProducer/particleFlow
hatakeyamak Oct 9, 2019
a57622a
reorganize config files for PFProducer/particleFlow
hatakeyamak Oct 9, 2019
1ec0634
clean up for deletion
hatakeyamak Oct 28, 2019
b81c8aa
remove unnecessary existsAs
hatakeyamak Oct 28, 2019
9f5313e
cleanup commented-out lines
hatakeyamak Oct 28, 2019
b3fd33a
introduce fillPSetDescription for helper classes
hatakeyamak Oct 28, 2019
32e3c5b
Merge branch 'master' into Reconfigure_particleFlow_cfi
hatakeyamak Oct 30, 2019
0c9593c
Clean up the particleFlow config file and make associated changes
hatakeyamak Aug 14, 2019
84f295c
code-check
hatakeyamak Aug 15, 2019
64c36ef
code-format
hatakeyamak Aug 15, 2019
1d333e0
Clean up the particleFlow config file and make associated changes
hatakeyamak Aug 14, 2019
a0b4ccc
code-check
hatakeyamak Aug 15, 2019
5c7caea
code-format
hatakeyamak Aug 15, 2019
b91f240
introduce fillDescriptions
hatakeyamak Oct 3, 2019
2023b71
solve conflicts
hatakeyamak Oct 3, 2019
73cfd61
cleanup. reduce parametersets usage somewhat.
hatakeyamak Oct 3, 2019
a7f5ed5
kill unused or moved parameters via HLTrigger/Configuration/python/cu…
hatakeyamak Oct 9, 2019
4ab7777
reorganize config files for PFProducer/particleFlow
hatakeyamak Oct 9, 2019
0a894e3
reorganize config files for PFProducer/particleFlow
hatakeyamak Oct 9, 2019
dc0f690
Use corrected PF cluster correction tags for 2018 design scenario
christopheralanwest Oct 24, 2019
133d6fd
Remove ParameterSet::Bool as unused
makortel Oct 24, 2019
08c44fc
clean up for deletion
hatakeyamak Oct 28, 2019
3fc0dea
remove unnecessary existsAs
hatakeyamak Oct 28, 2019
3b5a6de
cleanup commented-out lines
hatakeyamak Oct 28, 2019
ce8fcee
introduce fillPSetDescription for helper classes
hatakeyamak Oct 28, 2019
2dd4166
call close with the option to shutdown workers
Oct 29, 2019
da63413
formatting
Oct 29, 2019
8b79388
code-format
hatakeyamak Oct 30, 2019
6756673
solve conflict
hatakeyamak Oct 30, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
75 changes: 75 additions & 0 deletions HLTrigger/Configuration/python/customizeHLTforCMSSW.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,79 @@
# pset.minGoodStripCharge = cms.PSet(refToPSet_ = cms.string('HLTSiStripClusterChargeCutNone'))
# return process

#
# PF config cleanup
def customiseFor28110(process):

for producer in producers_by_type(process, "PFProducer"):
#
# kill cleaned-up parameters
if hasattr(producer, "iCfgCandConnector"):
pset = getattr(producer, "iCfgCandConnector")
delattr(pset,'bCalibSecondary')
toDelete=['algoType',
'isolatedElectronID_mvaWeightFile',
'pf_electronID_mvaWeightFile',
'pf_electron_output_col',
'minTrackerHits',
'minPixelHits',
'dzPV']
#
# kill parameters that are moved to sub-psets
# PFEGammaFiltersParameters
toDelete.extend(['electron_iso_pt',
'electron_iso_mva_barrel',
'electron_iso_mva_endcap',
'electron_iso_combIso_barrel',
'electron_iso_combIso_endcap',
'electron_noniso_mvaCut',
'electron_missinghits',
'electron_ecalDrivenHademPreselCut',
'electron_maxElePtForOnlyMVAPresel',
'electron_protectionsForJetMET',
'electron_protectionsForBadHcal',
'photon_MinEt',
'photon_combIso',
'photon_HoE',
'photon_SigmaiEtaiEta_barrel',
'photon_SigmaiEtaiEta_endcap',
'photon_protectionsForJetMET',
'photon_protectionsForBadHcal'
])
# PFMuonAlgoParameters
toDelete.extend(['maxDPtOPt',
'trackQuality',
'ptErrorScale',
'eventFractionForCleaning',
'minPtForPostCleaning',
'eventFactorForCosmics',
'metSignificanceForCleaning',
'metSignificanceForRejection',
'metFactorForCleaning',
'eventFractionForRejection',
'metFactorForRejection',
'metFactorForHighEta',
'ptFactorForHighEta',
'metFactorForFakes',
'minMomentumForPunchThrough',
'minEnergyForPunchThrough',
'punchThroughFactor',
'punchThroughMETFactor',
'cosmicRejectionDistance'])
# Post HF cleaning
toDelete.extend(['minHFCleaningPt',
'maxSignificance',
'minSignificance',
'minSignificanceReduction',
'maxDeltaPhiPt',
'minDeltaMet'])
#
# Actually kill them
for att in toDelete:
if (hasattr(producer, att)): delattr(producer, att)
#
return process

def customiseFor2017DtUnpacking(process):
"""Adapt the HLT to run the legacy DT unpacking
for pre2018 data/MC workflows as the default"""
Expand Down Expand Up @@ -52,4 +125,6 @@ def customizeHLTforCMSSW(process, menuType="GRun"):
# add call to action function in proper order: newest last!
# process = customiseFor12718(process)

process = customiseFor28110(process)

return process
2 changes: 1 addition & 1 deletion RecoJets/JetProducers/python/hltParticleFlowForJets_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
)


from RecoParticleFlow.PFProducer.particleFlow_cfi import particleFlowTmp
from RecoParticleFlow.PFProducer.particleFlow_cff import particleFlowTmp

hltParticleFlow = particleFlowTmp.clone(
GedPhotonValueMap = cms.InputTag(""),
Expand Down
8 changes: 1 addition & 7 deletions RecoParticleFlow/PFProducer/interface/PFAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,7 @@ class PFAlgo {
const edm::ValueMap<reco::GsfElectronRef>& valueMapGedElectrons,
const edm::ValueMap<reco::PhotonRef>& valueMapGedPhotons);

void setPostHFCleaningParameters(bool postHFCleaning,
double minHFCleaningPt,
double minSignificance,
double maxSignificance,
double minSignificanceReduction,
double maxDeltaPhiPt,
double minDeltaMet);
void setPostHFCleaningParameters(bool postHFCleaning, const edm::ParameterSet& pfHFCleaningParams);

void setDisplacedVerticesParameters(bool rejectTracks_Bad,
bool rejectTracks_Step45,
Expand Down
7 changes: 4 additions & 3 deletions RecoParticleFlow/PFProducer/interface/PFCandConnector.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
#define PFProducer_PFCandConnector_H_

#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"

#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"

#include "FWCore/MessageLogger/interface/MessageLogger.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"

// \author : M. Gouzevitch
// \date : May 2010

Expand Down Expand Up @@ -79,6 +78,8 @@ class PFCandConnector {
double ptErrorSecondary,
const std::vector<double>& nuclCalibFactors);

static void fillPSetDescription(edm::ParameterSetDescription& iDesc);

reco::PFCandidateCollection connect(reco::PFCandidateCollection& pfCand) const;

private:
Expand Down
3 changes: 3 additions & 0 deletions RecoParticleFlow/PFProducer/interface/PFEGammaFilters.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateEGammaExtra.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"

#include <iostream>

Expand All @@ -28,6 +29,8 @@ class PFEGammaFilters {

bool isPhotonSafeForJetMET(const reco::Photon &, const reco::PFCandidate &) const;

static void fillPSetDescription(edm::ParameterSetDescription &iDesc);

private:
bool passGsfElePreSelWithOnlyConeHadem(const reco::GsfElectron &) const;

Expand Down
13 changes: 8 additions & 5 deletions RecoParticleFlow/PFProducer/interface/PFMuonAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/VertexReco/interface/VertexFwd.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "DataFormats/Common/interface/Handle.h"
#include "DataFormats/MuonReco/interface/Muon.h"
#include "DataFormats/MuonReco/interface/MuonFwd.h"
Expand All @@ -15,7 +16,9 @@ class PFMuonAlgo {

public:
/// constructor
PFMuonAlgo(edm::ParameterSet const&);
PFMuonAlgo(edm::ParameterSet const&, bool postMuonCleaning);

static void fillPSetDescription(edm::ParameterSetDescription& iDesc);

////STATIC MUON ID METHODS
static bool isMuon(const reco::PFBlockElement& elt);
Expand Down Expand Up @@ -118,14 +121,14 @@ class PFMuonAlgo {
const reco::VertexCollection* vertices_;

//Configurables
// for PFMuonAlgo::goodMuonTracks/muonTracks
const double maxDPtOPt_;
const int minTrackerHits_;
const int minPixelHits_;
// for PFMuonAlgo::reconstructMuon
const reco::TrackBase::TrackQuality trackQuality_;
const double errorCompScale_;
const double eventFractionCleaning_;
const double dzPV_;
// for postCleaning (postClean/addMissingMuons)
const bool postCleaning_;
const double eventFractionCleaning_;
const double minPostCleaningPt_;
const double eventFactorCosmics_;
const double metSigForCleaning_;
Expand Down
2 changes: 0 additions & 2 deletions RecoParticleFlow/PFProducer/plugins/PFEGammaProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ void PFEGammaProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup
std::list<reco::PFBlockRef> otherBlockRefs;

for (unsigned i = 0; i < blocks->size(); ++i) {
// reco::PFBlockRef blockref( blockh,i );
//reco::PFBlockRef blockref = createBlockRef( *blocks, i);
reco::PFBlockRef blockref(blocks, i);

const edm::OwnVector<reco::PFBlockElement>& elements = blockref->elements();
Expand Down