Skip to content

Commit

Permalink
some improvements in fillDescription methods and single electron sequ…
Browse files Browse the repository at this point in the history
…ence
  • Loading branch information
guitargeek committed Jul 17, 2019
1 parent b7f1f48 commit b08b4c6
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# island clustering for the endcaps
from RecoEcal.EgammaClusterProducers.islandClusteringSequence_cff import *
# sequence to make si-strip based electrons
from RecoEgamma.EgammaElectronProducers.electronSequence_cff import *
from RecoEgamma.EgammaElectronProducers.gsfElectronSequence_cff import *
from Calibration.EcalAlCaRecoProducers.alCaIsolatedElectrons_cfi import *
alcaElectronSequence = cms.Sequence(hybridClusteringSequence*islandClusteringSequence*electronSequence*alCaIsolatedElectrons)
alcaElectronSequence = cms.Sequence(hybridClusteringSequence*islandClusteringSequence*gsfElectronSequence*alCaIsolatedElectrons)

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from RecoEcal.EgammaClusterProducers.islandClusteringSequence_cff import *
from Geometry.CaloEventSetup.CaloGeometry_cfi import *
# sequence to make si-strip based electrons
from RecoEgamma.EgammaElectronProducers.electronSequence_cff import *
from Calibration.EcalAlCaRecoProducers.alCaIsolatedElectrons_cfi import *
electronFilter = cms.EDFilter("EtaPtMinGsfElectronFullCloneSelector",
filter = cms.bool(True),
Expand All @@ -20,10 +19,5 @@
ptMin = cms.double(5.0)
)

# sequence alcastreamElectron = {hybridClusteringSequence, islandClusteringSequence,electronSequence, alCaIsolatedElectrons}
# this is the full path if you start from uncalibrated RecHits
# path alcastreamElectron = {hybridClusteringSequence, islandClusteringSequence,electronSequence, alCaIsolatedElectrons}
# use this if siStripElectrons are already present
# path alcastreamElectron = {alCaIsolatedElectrons}
seqAlcastreamElectron = cms.Sequence(electronFilter*alCaIsolatedElectrons)

6 changes: 3 additions & 3 deletions RecoEgamma/Configuration/python/RecoEgamma_cff.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import FWCore.ParameterSet.Config as cms

from RecoEgamma.EgammaElectronProducers.electronSequence_cff import *
from RecoEgamma.EgammaElectronProducers.gsfElectronSequence_cff import *
from RecoEgamma.EgammaElectronProducers.uncleanedOnlyElectronSequence_cff import *
from RecoEgamma.EgammaPhotonProducers.photonSequence_cff import *
from RecoEgamma.EgammaPhotonProducers.conversionSequence_cff import *
Expand All @@ -27,7 +27,7 @@
_fastSim_egammaGlobalReco.replace(conversionTrackSequence,conversionTrackSequenceNoEcalSeeded)
fastSim.toReplaceWith(egammaGlobalReco, _fastSim_egammaGlobalReco)

egammareco = cms.Sequence(electronSequence*conversionSequence*photonSequence)
egammareco = cms.Sequence(gsfElectronSequence*conversionSequence*photonSequence)
egammaHighLevelRecoPrePF = cms.Sequence(gsfEcalDrivenElectronSequence*uncleanedOnlyElectronSequence*conversionSequence*photonSequence)
# not commisoned and not relevant in FastSim (?):
fastSim.toReplaceWith(egammareco, egammareco.copyAndExclude([conversionSequence]))
Expand All @@ -41,7 +41,7 @@

egammarecoFull = cms.Sequence(egammareco*interestingEgammaIsoDetIds*egmIsolationSequence*photonIDSequence*eIdSequence*hfEMClusteringSequence)
egammarecoWithID = cms.Sequence(egammareco*photonIDSequence*eIdSequence)
egammareco_woConvPhotons = cms.Sequence(electronSequence*photonSequence)
egammareco_woConvPhotons = cms.Sequence(gsfElectronSequence*photonSequence)
egammareco_withIsolation = cms.Sequence(egammareco*egammaIsolationSequence)
egammareco_withIsolation_woConvPhotons = cms.Sequence(egammareco_woConvPhotons*egammaIsolationSequence)
egammareco_withPhotonID = cms.Sequence(egammareco*photonIDSequence)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@

using namespace reco;

void GEDGsfElectronCoreProducer::fillDescriptions(edm::ConfigurationDescriptions &descriptions) {
edm::ParameterSetDescription desc;
GsfElectronCoreBaseProducer::fillDescription(desc);
desc.add<edm::InputTag>("GEDEMUnbiased", edm::InputTag("GEDPFCandidates"));

descriptions.add("produceEcalDrivenGsfElectronCores", desc);
void GEDGsfElectronCoreProducer::fillDescriptions( edm::ConfigurationDescriptions & descriptions )
{
edm::ParameterSetDescription desc ;
desc.add<edm::InputTag>("gsfPfRecTracks",edm::InputTag("pfTrackElec")) ;
desc.add<edm::InputTag>("gsfTracks",edm::InputTag("electronGsfTracks")) ;
desc.add<edm::InputTag>("ctfTracks",edm::InputTag("generalTracks")) ;
desc.add<bool>("useGsfPfRecTracks",true) ;
desc.add<edm::InputTag>("GEDEMUnbiased",edm::InputTag("particleFlowEGamma")) ;
descriptions.add("gedGsfElectronCores",desc) ;
}

GEDGsfElectronCoreProducer::GEDGsfElectronCoreProducer(const edm::ParameterSet &config)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void LowPtGSFToTrackLinker::fillDescriptions(edm::ConfigurationDescriptions& des
desc.add<edm::InputTag>("tracks", edm::InputTag("generalTracks"));
desc.add<edm::InputTag>("gsfPreID", edm::InputTag("lowPtGsfElectronSeeds"));
desc.add<edm::InputTag>("gsfTracks", edm::InputTag("lowPtGsfEleGsfTracks"));
descriptions.add("lowPtGsfToTrackLinksDefault", desc);
descriptions.add("lowPtGsfToTrackLinks", desc);
}

DEFINE_FWK_MODULE(LowPtGSFToTrackLinker);
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ void LowPtGsfElectronCoreProducer::produce(edm::Event& event, const edm::EventSe
//
void LowPtGsfElectronCoreProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
GsfElectronCoreBaseProducer::fillDescription(desc);
desc.add<edm::InputTag>("superClusters", edm::InputTag("lowPtGsfElectronSuperClusters"));
descriptions.add("defaultLowPtGsfElectronCores", desc);
desc.add<edm::InputTag>("gsfPfRecTracks",edm::InputTag("lowPtGsfElePfGsfTracks")) ;
desc.add<edm::InputTag>("gsfTracks",edm::InputTag("lowPtGsfEleGsfTracks")) ;
desc.add<edm::InputTag>("ctfTracks",edm::InputTag("generalTracks")) ;
desc.add<bool>("useGsfPfRecTracks",true) ;
desc.add<edm::InputTag>("superClusters",edm::InputTag("lowPtGsfElectronSuperClusters"));
descriptions.add("lowPtGsfElectronCores",desc);
}

//////////////////////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ void LowPtGsfElectronIDProducer::produce(edm::Event& event, const edm::EventSetu
//
void LowPtGsfElectronIDProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("electrons", edm::InputTag("lowPtGsfElectrons"));
desc.add<edm::InputTag>("rho", edm::InputTag("fixedGridRhoFastjetAllTmp"));
desc.add<std::vector<std::string> >("ModelNames", std::vector<std::string>());
desc.add<std::vector<std::string> >("ModelWeights", std::vector<std::string>());
desc.add<std::vector<double> >("ModelThresholds", std::vector<double>());
desc.add<bool>("PassThrough", false);
desc.add<double>("MinPtThreshold", 0.5);
desc.add<double>("MaxPtThreshold", 15.);
descriptions.add("defaultLowPtGsfElectronID", desc);
desc.add<edm::InputTag>("electrons",edm::InputTag("lowPtGsfElectrons"));
desc.add<edm::InputTag>("rho",edm::InputTag("fixedGridRhoFastjetAllTmp"));
desc.add< std::vector<std::string> >("ModelNames",{""});
desc.add< std::vector<std::string> >("ModelWeights",{"RecoEgamma/ElectronIdentification/data/LowPtElectrons/RunII_Autumn18_LowPtElectrons_mva_id.xml.gz"});
desc.add< std::vector<double> >("ModelThresholds",{-10.});
desc.add<bool>("PassThrough",false);
desc.add<double>("MinPtThreshold",0.5);
desc.add<double>("MaxPtThreshold",15.);
descriptions.add("lowPtGsfElectronID",desc);
}

//////////////////////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ reco::PFClusterRef LowPtGsfElectronSCProducer::closestCluster(const reco::PFTraj
//
void LowPtGsfElectronSCProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("gsfPfRecTracks", edm::InputTag("lowPtGsfElePfGsfTracks"));
desc.add<edm::InputTag>("ecalClusters", edm::InputTag("particleFlowClusterECAL"));
desc.add<edm::InputTag>("hcalClusters", edm::InputTag("particleFlowClusterHCAL"));
desc.add<double>("MaxDeltaR2", 0.5);
descriptions.add("defaultLowPtGsfElectronSuperClusters", desc);
desc.add<edm::InputTag>("gsfPfRecTracks",edm::InputTag("lowPtGsfElePfGsfTracks"));
desc.add<edm::InputTag>("ecalClusters",edm::InputTag("particleFlowClusterECAL"));
desc.add<edm::InputTag>("hcalClusters",edm::InputTag("particleFlowClusterHCAL"));
desc.add<double>("MaxDeltaR2",0.5);
descriptions.add("lowPtGsfElectronSuperClusters",desc);
}

//////////////////////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ void LowPtGsfElectronSeedValueMapsProducer::produce(edm::Event& event, const edm
//
void LowPtGsfElectronSeedValueMapsProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("gsfTracks", edm::InputTag("lowPtGsfEleGsfTracks"));
desc.add<edm::InputTag>("preIdsValueMap", edm::InputTag("lowPtGsfElectronSeeds"));
desc.add<std::vector<std::string> >("ModelNames", std::vector<std::string>());
descriptions.add("defaultLowPtGsfElectronSeedValueMaps", desc);
desc.add<edm::InputTag>("gsfTracks",edm::InputTag("lowPtGsfEleGsfTracks"));
desc.add<edm::InputTag>("preIdsValueMap",edm::InputTag("lowPtGsfElectronSeeds"));
desc.add< std::vector<std::string> >("ModelNames",{"unbiased", "ptbiased"});
descriptions.add("lowPtGsfElectronSeedValueMaps",desc);
}

//////////////////////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# module to produce electron seeds
from RecoEgamma.EgammaElectronProducers.ecalDrivenElectronSeeds_cfi import *
from RecoEgamma.EgammaElectronProducers.electronSequence_cff import *
from RecoEgamma.EgammaElectronProducers.gsfElectronSequence_cff import *


ecalDrivenElectronSeeds.barrelSuperClusters = cms.InputTag('cosmicSuperClusters','CosmicBarrelSuperClusters')
Expand All @@ -24,4 +24,4 @@
gsfElectrons.barrelClusterShapes = cms.InputTag('cosmicSuperClusters','CosmicBarrelSuperClusters')
gsfElectrons.endcapClusterShapes = cms.InputTag('cosmicSuperClusters','CosmicEndcapSuperClusters')

cosmicElectronSequence = cms.Sequence(electronSequence)
cosmicElectronSequence = cms.Sequence(gsfElectronSequence)
21 changes: 0 additions & 21 deletions RecoEgamma/EgammaElectronProducers/python/electronSequence_cff.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
# Sequence to the GED electrons.
#==============================================================================

gedGsfElectronCores = cms.EDProducer("GEDGsfElectronCoreProducer",
GEDEMUnbiased = cms.InputTag("particleFlowEGamma"),
gsfTracks = cms.InputTag("electronGsfTracks"),
ctfTracks = cms.InputTag("generalTracks"),
)

from RecoEgamma.EgammaElectronProducers.gedGsfElectronCores_cfi import *
from RecoEgamma.EgammaElectronProducers.gedGsfElectrons_cfi import *

gedGsfElectronSequenceTmp = cms.Sequence(gedGsfElectronCores*gedGsfElectronsTmp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@
fastSim.toModify(lowPtGsfEleGsfTracks,src = cms.InputTag("fastLowPtGsfTkfTrackCandidates"))

# GSFTrack to track association
from RecoEgamma.EgammaElectronProducers.lowPtGsfToTrackLinksDefault_cfi import *

lowPtGsfToTrackLinks = lowPtGsfToTrackLinksDefault.clone()
from RecoEgamma.EgammaElectronProducers.lowPtGsfToTrackLinks_cfi import lowPtGsfToTrackLinks

# GsfPFRecTracks
from RecoParticleFlow.PFTracking.pfTrackElec_cfi import *
Expand All @@ -59,18 +57,10 @@
# RecoParticleFlow/PFClusterProducer/python/particleFlowClusterECALUncorrected_cfi.py
# RecoParticleFlow/PFClusterProducer/python/particleFlowClusterECAL_cff.py
# (particleFlowClusterECAL_cfi is generated automatically)
from RecoEgamma.EgammaElectronProducers.defaultLowPtGsfElectronSuperClusters_cfi import defaultLowPtGsfElectronSuperClusters

lowPtGsfElectronSuperClusters = defaultLowPtGsfElectronSuperClusters.clone()
from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronSuperClusters_cfi import lowPtGsfElectronSuperClusters

# Low pT electron cores
from RecoEgamma.EgammaElectronProducers.defaultLowPtGsfElectronCores_cfi import defaultLowPtGsfElectronCores

lowPtGsfElectronCores = defaultLowPtGsfElectronCores.clone(
gsfPfRecTracks = cms.InputTag("lowPtGsfElePfGsfTracks"),
gsfTracks = cms.InputTag("lowPtGsfEleGsfTracks"),
ctfTracks = cms.InputTag("generalTracks"),
)
from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronCores_cfi import lowPtGsfElectronCores

from Configuration.Eras.Modifier_fastSim_cff import fastSim
fastSim.toModify(lowPtGsfElectronCores,ctfTracks = cms.InputTag("generalTracksBeforeMixing"))
Expand All @@ -79,22 +69,11 @@
from RecoEgamma.EgammaElectronProducers.lowPtGsfElectrons_cfi import *

# Low pT Electron value maps
from RecoEgamma.EgammaElectronProducers.defaultLowPtGsfElectronSeedValueMaps_cfi import defaultLowPtGsfElectronSeedValueMaps

lowPtGsfElectronSeedValueMaps = defaultLowPtGsfElectronSeedValueMaps.clone(
ModelNames = cms.vstring(['unbiased','ptbiased'])
)
from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronSeedValueMaps_cfi import lowPtGsfElectronSeedValueMaps

# Low pT Electron ID
from RecoEgamma.EgammaElectronProducers.defaultLowPtGsfElectronID_cfi import defaultLowPtGsfElectronID

lowPtGsfElectronID = defaultLowPtGsfElectronID.clone(
ModelNames = cms.vstring(['']),
ModelWeights = cms.vstring([
'RecoEgamma/ElectronIdentification/data/LowPtElectrons/RunII_Autumn18_LowPtElectrons_mva_id.xml.gz',
]),
ModelThresholds = cms.vdouble([-10.])
)
from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronID_cfi import lowPtGsfElectronID


# Full sequence
lowPtGsfElectronTask = cms.Task(lowPtGsfElePfTracks,
Expand Down

0 comments on commit b08b4c6

Please sign in to comment.