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

New seeding framework #16635

Merged
merged 69 commits into from
Nov 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
e13def5
Add TrackingRegionEDProducerT, and instantiate it with GlobalTracking…
makortel Apr 26, 2016
af0a674
Remove Event from TrackingRegion::hits() parameters
makortel Apr 28, 2016
c4bda7a
Add HitPairEDProducer and IntermediateHitDoublets
makortel Apr 28, 2016
e60ae23
LayerHitMapCache::SimpleCache::add() takes non-const pointer
makortel Apr 29, 2016
fd3301f
Use mayown_ptr in LayerHitMapCache and provide extend()
makortel Apr 29, 2016
c8392fa
Improve interface of PixelTripletHLTGenerator
makortel Apr 29, 2016
fb8a094
Add HitTripletEDProducerT and IntermediateHitTriplets
makortel Apr 29, 2016
7b07dda
Fix LayerTriplets for quadruplet layer sets
makortel Apr 30, 2016
556c763
Produce pairs only for the necessary layers
makortel May 2, 2016
12f0e75
Switch IntermediateHitTriplets data layout to pair+3rd layers
makortel May 17, 2016
bb0aa19
Finalize IntermediateHitTriplets
makortel Aug 2, 2016
8e4d2bc
Add PixelQuadrupletEDProducer
makortel Jul 19, 2016
41a159b
Add RegionsSeedingHitSets and migrate {HitPair,HitTriplet,PixelQuadru…
makortel Jul 29, 2016
e0d5382
Add SeedGeneratorFromSeedingHitsEDProducerT, and instantiate it with …
makortel Jul 29, 2016
747d022
#ifndef CINT etc. no longer needed
makortel Jul 30, 2016
95619d6
Add support for ClusterCheck with ClusterCheckerEDProducer
makortel Jul 30, 2016
8f1c063
Use InitialStepPreSplitting as a testbed
makortel Apr 26, 2016
6357ff0
Update seeding layer deduction in TrackValidation_cff
makortel Aug 4, 2016
49db1be
Add PixelQuadrupletMergerEDProducer
makortel Aug 9, 2016
d8ed2e3
Add HIMuonTrackingRegionEDProducer
makortel Aug 10, 2016
f76a8d2
Migrate InitialStep to the new seeding modules
makortel Aug 10, 2016
c8ccfb5
"Fix" PixelQuadrupletMergerEDProducer to preserve old behaviour
makortel Aug 11, 2016
87fe045
Migrate HighPtTripletStep and LowPtQuadStep
makortel Aug 12, 2016
21bfb4d
Migrate LowPtTripletStep
makortel Aug 15, 2016
c7fbdd7
Add PixelTripletLargeTipEDProducer and SeedCreatorFromRegionConsecuti…
makortel Aug 15, 2016
4e181c3
Migrate DetachedQuadStep
makortel Aug 15, 2016
71dbc41
Migrate DetachedTripletStep
makortel Aug 16, 2016
a08e44b
Add GlobalTrackingRegionWithVerticesEDProducer
makortel Aug 16, 2016
860d628
Migrate PixelPairStep
makortel Aug 16, 2016
ec52d99
Migrate MixedTripletStep
makortel Aug 17, 2016
02ef592
Add MultiHitFromChi2EDProducer
makortel Aug 17, 2016
16a8111
Migrate PixelLessStep
makortel Aug 18, 2016
241846a
Migrate TobTecStep
makortel Aug 18, 2016
88c34bb
Add TauRegionalPixelSeedTrackingRegionEDProducer
makortel Aug 23, 2016
db4ede9
Migrate JetCoreRegionalStep
makortel Aug 23, 2016
bd3ca8d
Migrate ElectronSeeds
makortel Aug 24, 2016
6ff51c0
Do cluster check only once
makortel Aug 25, 2016
c116a3f
Improve the maxElements defaults
makortel Aug 25, 2016
36b8273
Use filler pattern also for IntermediateHitDoublets and IntermediateH…
makortel Aug 26, 2016
15caa08
Fix (optimize) the use of LayerHitMapCache
makortel Sep 1, 2016
cd22efa
Simplify IntermediateHitTriplets
makortel Sep 15, 2016
1ad84a8
Improve documentation and interfaces (for self-documentation)
makortel Sep 16, 2016
0a76318
Migrate CAHitQuadrupletGenerator
makortel Sep 26, 2016
d3e4cd4
Migrate CAHiTripletGenerator and generalize
makortel Sep 29, 2016
560791d
TauRegionalPixelSeedGenerator accepts measurementTrackerName as eithe…
makortel Sep 30, 2016
d2e35ac
Add support for new modules to tracking validation timing plots
makortel Oct 6, 2016
53df150
Fix era customizations in PixelLessStep
makortel Oct 14, 2016
1335830
Put temporary TrajectorySeedCollection to event in PixelQuadrupletMer…
makortel Nov 7, 2016
6d9695d
Add explicit UseVertex=True
makortel Nov 9, 2016
886beb8
Rename MuonTrackingRegionBuilder::fillDescriptions2() to fillDescript…
makortel Nov 9, 2016
99e7a4c
Change exception categories to LogicError
makortel Nov 9, 2016
87f8a59
Add line breaks
makortel Nov 9, 2016
9b594c8
Move era customizations to _cfi's
makortel Nov 9, 2016
871c3e5
Migrate FastSim to read TrackingRegions from Event
makortel Nov 11, 2016
216de84
Migrate customiseClusterCheckForHighPileup.py
makortel Nov 15, 2016
bb4f845
Migrate peripheralPbPb era customizations
makortel Nov 15, 2016
57fd324
Remove commented unnecessary config
makortel Nov 15, 2016
7cf68d1
Remove newline
makortel Nov 15, 2016
a55b93a
Remove HiRegitMuonLowPtTripletStep_cff, HiRegitMuonTobTecStep_cff and…
makortel Nov 15, 2016
5548d68
Remove HiTrackingRegionFactoryFromSTAMuonsBlock as obsolete
makortel Nov 15, 2016
1714b15
Add customize function to early-delete new temporary data products
makortel Nov 16, 2016
3e0925e
Fix one forgotten cff->cfi import
makortel Nov 17, 2016
dae1408
Add back missing MuonTrackingRegionCommon
makortel Nov 18, 2016
fc8e50e
Add calls to shrink_to_fit()
makortel Nov 18, 2016
607ad0d
Replace repeated if's with template-based abstractions
makortel Nov 19, 2016
356f681
Fix HitTripletEDProducerT for empty input
makortel Nov 20, 2016
4a87e64
Fix reconstruction_fromRECO
makortel Nov 23, 2016
0fd1027
Add early deletion customise after everything else
makortel Nov 23, 2016
71a871a
Abstract early deletion settings to a separate file
makortel Nov 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Configuration/Applications/python/ConfigBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2217,6 +2217,16 @@ def prepare(self, doChecking = False):

self.pythonCfgCode += self.addCustomiseCmdLine()

# Temporary hack to put the early delete customization after
# everything else
#
# FIXME: remove when no longer needed
if "RECO" in self.stepMap or "RAW2RECO" in self.stepMap:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @makortel a comment and question here

  1. the same changes need to be applied to self.process

  2. can't we just remove the if statement to future proof this?

self.pythonCfgCode += "\n# Add early deletion of temporary data products to reduce peak memory need\n"
self.pythonCfgCode += "from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDeleteForRECO\n"
self.pythonCfgCode += "process = customiseEarlyDeleteForRECO(process)\n"
self.pythonCfgCode += "# End adding early deletion\n"


# make the .io file

Expand Down
4 changes: 4 additions & 0 deletions Configuration/StandardSequences/python/Reconstruction_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@
noTrackingAndDependent.append(siStripZeroSuppression)
noTrackingAndDependent.append(siStripClusters)
noTrackingAndDependent.append(initialStepSeedLayersPreSplitting)
noTrackingAndDependent.append(trackerClusterCheckPreSplitting)
noTrackingAndDependent.append(initialStepTrackingRegionsPreSplitting)
noTrackingAndDependent.append(initialStepHitDoubletsPreSplitting)
noTrackingAndDependent.append(initialStepHitTripletsPreSplitting)
noTrackingAndDependent.append(initialStepSeedsPreSplitting)
noTrackingAndDependent.append(initialStepTrackCandidatesPreSplitting)
noTrackingAndDependent.append(initialStepTracksPreSplitting)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Abstract all early deletion settings here

from RecoTracker.Configuration.customiseEarlyDeleteForSeeding import customiseEarlyDeleteForSeeding

def customiseEarlyDeleteForRECO(process):
process = customiseEarlyDeleteForSeeding(process)
return process
6 changes: 5 additions & 1 deletion DataFormats/TrackerRecHit2D/src/classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "DataFormats/TrackerRecHit2D/interface/FastProjectedTrackerRecHit.h"
#include "DataFormats/TrackerRecHit2D/interface/FastTrackerRecHitCollection.h"
#include "DataFormats/TrackerRecHit2D/interface/Phase2TrackerRecHit1D.h"
#include "DataFormats/TrackerRecHit2D/interface/BaseTrackerRecHit.h"
#include <vector>

namespace DataFormats_TrackerRecHit2D {
Expand Down Expand Up @@ -62,7 +63,10 @@ namespace DataFormats_TrackerRecHit2D {
edm::ClonePolicy<SiTrackerMultiRecHit> > e3;
edm::OwnVector<SiTrackerMultiRecHit,
edm::ClonePolicy<SiTrackerMultiRecHit> >::const_iterator it10;


edm::OwnVector<BaseTrackerRecHit> ovbtrh;
edm::Wrapper<edm::OwnVector<BaseTrackerRecHit>> wovbtrh;

edm::Wrapper< edm::RangeMap<DetId,
edm::OwnVector<SiStripRecHit2D,
edm::ClonePolicy<SiStripRecHit2D> >,
Expand Down
4 changes: 4 additions & 0 deletions DataFormats/TrackerRecHit2D/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
<class name="edm::OwnVector<SiStripRecHit1D,edm::ClonePolicy<SiStripRecHit1D> >::const_iterator"/>

<class name="edm::OwnVector<SiTrackerMultiRecHit,edm::ClonePolicy<SiTrackerMultiRecHit> >::const_iterator"/>

<class name="edm::OwnVector<BaseTrackerRecHit>" persistent="false"/>
<class name="edm::Wrapper<edm::OwnVector<BaseTrackerRecHit> >" persistent="false"/>

<class name="edm::RangeMap<DetId, edm::OwnVector<SiStripRecHit2D, edm::ClonePolicy<SiStripRecHit2D> >, edm::ClonePolicy<SiStripRecHit2D> >"/>
<class name="edm::RangeMap<DetId, edm::OwnVector<SiStripRecHit1D, edm::ClonePolicy<SiStripRecHit1D> >, edm::ClonePolicy<SiStripRecHit1D> >"/>

Expand Down
24 changes: 11 additions & 13 deletions FastSimulation/Tracking/plugins/TrajectorySeedProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@
#include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"

// reco track classes
#include "RecoTracker/TkTrackingRegions/interface/GlobalTrackingRegion.h"
#include "RecoTracker/TkTrackingRegions/interface/TrackingRegionProducer.h"
#include "RecoTracker/TkTrackingRegions/interface/TrackingRegionProducerFactory.h"
#include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h"
#include "RecoTracker/TkSeedingLayers/interface/SeedingHitSet.h"
#include "RecoTracker/TkSeedGenerator/interface/SeedCreator.h"
#include "RecoTracker/TkSeedGenerator/interface/SeedCreatorFactory.h"
Expand All @@ -67,6 +65,7 @@ class TrajectorySeedProducer:

edm::EDGetTokenT<FastTrackerRecHitCombinationCollection> recHitCombinationsToken;
edm::EDGetTokenT<std::vector<bool> > hitMasksToken;
edm::EDGetTokenT<edm::OwnVector<TrackingRegion> > trackingRegionToken;

// other data members
unsigned int nHitsPerSeed_;
Expand All @@ -75,7 +74,6 @@ class TrajectorySeedProducer:
SeedingTree<TrackingLayer> _seedingTree;

std::unique_ptr<SeedCreator> seedCreator;
std::unique_ptr<TrackingRegionProducer> theRegionProducer;
std::string measurementTrackerLabel;

std::unique_ptr<SeedFinderSelector> seedFinderSelector;
Expand Down Expand Up @@ -139,10 +137,8 @@ TrajectorySeedProducer::TrajectorySeedProducer(const edm::ParameterSet& conf)
seedFinderSelector.reset(new SeedFinderSelector(conf.getParameter<edm::ParameterSet>("seedFinderSelector"),consumesCollector()));
}

/// region producer
edm::ParameterSet regfactoryPSet = conf.getParameter<edm::ParameterSet>("RegionFactoryPSet");
std::string regfactoryName = regfactoryPSet.getParameter<std::string>("ComponentName");
theRegionProducer.reset(TrackingRegionProducerFactory::get()->create(regfactoryName,regfactoryPSet,consumesCollector()));
/// regions
trackingRegionToken = consumes<edm::OwnVector<TrackingRegion> >(conf.getParameter<edm::InputTag>("trackingRegions"));

// seed creator
const edm::ParameterSet & seedCreatorPSet = conf.getParameter<edm::ParameterSet>("SeedCreatorPSet");
Expand Down Expand Up @@ -174,8 +170,10 @@ void TrajectorySeedProducer::produce(edm::Event& e, const edm::EventSetup& es)
// output data
std::unique_ptr<TrajectorySeedCollection> output(new TrajectorySeedCollection());

// produce the regions;
const auto regions = theRegionProducer->regions(e,es);
// read the regions;
edm::Handle<edm::OwnVector<TrackingRegion> > hregions;
e.getByToken(trackingRegionToken, hregions);
const auto& regions = *hregions;
// and make sure there is at least one region
if(regions.size() == 0)
{
Expand Down Expand Up @@ -208,12 +206,12 @@ void TrajectorySeedProducer::produce(edm::Event& e, const edm::EventSetup& es)
}

// loop over the regions
for(auto region = regions.begin();region != regions.end(); ++region)
for(const auto& region: regions)
{
// set the region used in the selector
if(seedFinderSelector)
{
seedFinderSelector->setTrackingRegion(region->get());
seedFinderSelector->setTrackingRegion(&region);
}

// find hits compatible with the seed requirements
Expand All @@ -233,7 +231,7 @@ void TrajectorySeedProducer::produce(edm::Event& e, const edm::EventSetup& es)
fastTrackingUtilities::setRecHitCombinationIndex(seedHits,icomb);

// create the seed
seedCreator->init(**region,es,0);
seedCreator->init(region,es,0);
seedCreator->makeSeed(
*output,
SeedingHitSet(
Expand Down
9 changes: 7 additions & 2 deletions FastSimulation/Tracking/python/DetachedTripletStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@

# import the full tracking equivalent of this file
import RecoTracker.IterativeTracking.DetachedTripletStep_cff as _standard
from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet

# fast tracking mask producer
import FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
detachedTripletStepMasks = FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi.maskProducerFromClusterRemover(_standard.detachedTripletStepClusters)

# tracking regions
detachedTripletStepTrackingRegions = _standard.detachedTripletStepTrackingRegions.clone()

# trajectory seeds
import FastSimulation.Tracking.TrajectorySeedProducer_cfi
detachedTripletStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
layerList = _standard.detachedTripletStepSeedLayers.layerList.value(),
RegionFactoryPSet = _standard.detachedTripletStepSeeds.RegionFactoryPSet,
trackingRegions = "detachedTripletStepTrackingRegions",
hitMasks = cms.InputTag("detachedTripletStepMasks")
)
detachedTripletStepSeeds.seedFinderSelector.pixelTripletGeneratorFactory = _standard.detachedTripletStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet
detachedTripletStepSeeds.seedFinderSelector.pixelTripletGeneratorFactory = _hitSetProducerToFactoryPSet(_standard.detachedTripletStepHitTriplets)

# track candidates
import FastSimulation.Tracking.TrackCandidateProducer_cfi
Expand All @@ -36,6 +40,7 @@

# Final sequence
DetachedTripletStep = cms.Sequence(detachedTripletStepMasks
+detachedTripletStepTrackingRegions
+detachedTripletStepSeeds
+detachedTripletStepTrackCandidates
+detachedTripletStepTracks
Expand Down
11 changes: 8 additions & 3 deletions FastSimulation/Tracking/python/InitialStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@

# import the full tracking equivalent of this file
import RecoTracker.IterativeTracking.InitialStep_cff as _standard
from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet

# tracking regions
initialStepTrackingRegions = _standard.initialStepTrackingRegions.clone()

# trajectory seeds
import FastSimulation.Tracking.TrajectorySeedProducer_cfi
initialStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
layerList = _standard.initialStepSeedLayers.layerList.value(),
RegionFactoryPSet = _standard.initialStepSeeds.RegionFactoryPSet
trackingRegions = "initialStepTrackingRegions"
)
initialStepSeeds.seedFinderSelector.pixelTripletGeneratorFactory = _standard.initialStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet
initialStepSeeds.seedFinderSelector.pixelTripletGeneratorFactory = _hitSetProducerToFactoryPSet(_standard.initialStepHitTriplets)
initialStepSeeds.seedFinderSelector.pixelTripletGeneratorFactory.SeedComparitorPSet.ComponentName = "none"

# track candidates
Expand All @@ -36,7 +40,8 @@
initialStep = _standard.initialStep.clone()

# Final sequence
InitialStep = cms.Sequence(initialStepSeeds
InitialStep = cms.Sequence(initialStepTrackingRegions
+initialStepSeeds
+initialStepTrackCandidates
+initialStepTracks
+firstStepPrimaryVerticesBeforeMixing
Expand Down
9 changes: 7 additions & 2 deletions FastSimulation/Tracking/python/LowPtTripletStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@

# import the full tracking equivalent of this file
import RecoTracker.IterativeTracking.LowPtTripletStep_cff as _standard
from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet

# fast tracking mask producer
import FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
lowPtTripletStepMasks = FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi.maskProducerFromClusterRemover(_standard.lowPtTripletStepClusters)

# tracking regions
lowPtTripletStepTrackingRegions = _standard.lowPtTripletStepTrackingRegions.clone()

# trajectory seeds
import FastSimulation.Tracking.TrajectorySeedProducer_cfi
lowPtTripletStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
layerList = _standard.lowPtTripletStepSeedLayers.layerList.value(),
RegionFactoryPSet = _standard.lowPtTripletStepSeeds.RegionFactoryPSet,
trackingRegions = "lowPtTripletStepTrackingRegions",
hitMasks = cms.InputTag("lowPtTripletStepMasks"),
)
lowPtTripletStepSeeds.seedFinderSelector.pixelTripletGeneratorFactory = _standard.lowPtTripletStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet
lowPtTripletStepSeeds.seedFinderSelector.pixelTripletGeneratorFactory = _hitSetProducerToFactoryPSet(_standard.lowPtTripletStepHitTriplets)
#lowPtTripletStepSeeds.pixelTripletGeneratorFactory.SeedComparitorPSet=cms.PSet( ComponentName = cms.string( "none" ) )

# track candidates
Expand All @@ -34,6 +38,7 @@

# Final swquence
LowPtTripletStep = cms.Sequence(lowPtTripletStepMasks
+lowPtTripletStepTrackingRegions
+lowPtTripletStepSeeds
+lowPtTripletStepTrackCandidates
+lowPtTripletStepTracks
Expand Down
16 changes: 12 additions & 4 deletions FastSimulation/Tracking/python/MixedTripletStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,36 @@

# import the full tracking equivalent of this file
import RecoTracker.IterativeTracking.MixedTripletStep_cff as _standard
from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet

# fast tracking mask producer
import FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
mixedTripletStepMasks = FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi.maskProducerFromClusterRemover(_standard.mixedTripletStepClusters)
mixedTripletStepMasks.oldHitRemovalInfo = cms.InputTag("pixelPairStepMasks")

# tracking regions
mixedTripletStepTrackingRegionsA = _standard.mixedTripletStepTrackingRegionsA.clone()

# trajectory seeds
import FastSimulation.Tracking.TrajectorySeedProducer_cfi
mixedTripletStepSeedsA = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
layerList = _standard.mixedTripletStepSeedLayersA.layerList.value(),
RegionFactoryPSet = _standard.mixedTripletStepSeedsA.RegionFactoryPSet,
trackingRegions = "mixedTripletStepTrackingRegionsA",
hitMasks = cms.InputTag("mixedTripletStepMasks")
)
mixedTripletStepSeedsA.seedFinderSelector.pixelTripletGeneratorFactory = _standard.mixedTripletStepSeedsA.OrderedHitsFactoryPSet.GeneratorPSet
mixedTripletStepSeedsA.seedFinderSelector.pixelTripletGeneratorFactory = _hitSetProducerToFactoryPSet(_standard.mixedTripletStepHitTripletsA)


###
mixedTripletStepTrackingRegionsB = _standard.mixedTripletStepTrackingRegionsB.clone()

import FastSimulation.Tracking.TrajectorySeedProducer_cfi
mixedTripletStepSeedsB = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
layerList = _standard.mixedTripletStepSeedLayersB.layerList.value(),
RegionFactoryPSet = _standard.mixedTripletStepSeedsB.RegionFactoryPSet,
trackingRegions = "mixedTripletStepTrackingRegionsB",
hitMasks = cms.InputTag("mixedTripletStepMasks")
)
mixedTripletStepSeedsB.seedFinderSelector.pixelTripletGeneratorFactory = _standard.mixedTripletStepSeedsB.OrderedHitsFactoryPSet.GeneratorPSet
mixedTripletStepSeedsB.seedFinderSelector.pixelTripletGeneratorFactory = _hitSetProducerToFactoryPSet(_standard.mixedTripletStepHitTripletsB)

mixedTripletStepSeeds = _standard.mixedTripletStepSeeds.clone()

Expand All @@ -50,7 +56,9 @@

# Final sequence
MixedTripletStep = cms.Sequence(mixedTripletStepMasks
+mixedTripletStepTrackingRegionsA
+mixedTripletStepSeedsA
+mixedTripletStepTrackingRegionsB
+mixedTripletStepSeedsB
+mixedTripletStepSeeds
+mixedTripletStepTrackCandidates
Expand Down
9 changes: 7 additions & 2 deletions FastSimulation/Tracking/python/PixelLessStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@

# import the full tracking equivalent of this file
import RecoTracker.IterativeTracking.PixelLessStep_cff as _standard
from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet

# fast tracking mask producer
import FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
pixelLessStepMasks = FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi.maskProducerFromClusterRemover(_standard.pixelLessStepClusters)

# tracking regions
pixelLessStepTrackingRegions = _standard.pixelLessStepTrackingRegions.clone()

# trajectory seeds
import FastSimulation.Tracking.TrajectorySeedProducer_cfi
pixelLessStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
layerList = _standard.pixelLessStepSeedLayers.layerList.value(),
RegionFactoryPSet = _standard.pixelLessStepSeeds.RegionFactoryPSet,
trackingRegions = "pixelLessStepTrackingRegions",
hitMasks = cms.InputTag("pixelLessStepMasks"),
)
pixelLessStepSeeds.seedFinderSelector.MultiHitGeneratorFactory = _standard.pixelLessStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet
pixelLessStepSeeds.seedFinderSelector.MultiHitGeneratorFactory = _hitSetProducerToFactoryPSet(_standard.pixelLessStepHitTriplets)
pixelLessStepSeeds.seedFinderSelector.MultiHitGeneratorFactory.refitHits = False

# track candidates
Expand All @@ -37,6 +41,7 @@

# Final sequence
PixelLessStep = cms.Sequence(pixelLessStepMasks
+pixelLessStepTrackingRegions
+pixelLessStepSeeds
+pixelLessStepTrackCandidates
+pixelLessStepTracks
Expand Down
9 changes: 7 additions & 2 deletions FastSimulation/Tracking/python/PixelPairStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@
import FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
pixelPairStepMasks = FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi.maskProducerFromClusterRemover(_standard.pixelPairStepClusters)

# tracking regions
pixelPairStepTrackingRegions = _standard.pixelPairStepTrackingRegions.clone(
RegionPSet=dict(VertexCollection = "firstStepPrimaryVerticesBeforeMixing")
)

# trajectory seeds
import FastSimulation.Tracking.TrajectorySeedProducer_cfi
pixelPairStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
layerList = _standard.pixelPairStepSeedLayers.layerList.value(),
RegionFactoryPSet = _standard.pixelPairStepSeeds.RegionFactoryPSet,
trackingRegions = "pixelPairStepTrackingRegions",
hitMasks = cms.InputTag("pixelPairStepMasks"),
)
pixelPairStepSeeds.RegionFactoryPSet.RegionPSet.VertexCollection = cms.InputTag("firstStepPrimaryVerticesBeforeMixing")

# track candidate
import FastSimulation.Tracking.TrackCandidateProducer_cfi
Expand All @@ -33,6 +37,7 @@

# Final sequence
PixelPairStep = cms.Sequence(pixelPairStepMasks
+pixelPairStepTrackingRegions
+pixelPairStepSeeds
+pixelPairStepTrackCandidates
+pixelPairStepTracks
Expand Down
18 changes: 18 additions & 0 deletions FastSimulation/Tracking/python/SeedingMigration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import FWCore.ParameterSet.Config as cms

def _copy(old, new, skip=[]):
skipSet = set(skip)
for key in old.parameterNames_():
if key not in skipSet:
setattr(new, key, getattr(old, key))

def _hitSetProducerToFactoryPSet(producer):
_map = {
"PixelTripletHLTEDProducer": "PixelTripletHLTGenerator",
"PixelTripletLargeTipEDProducer": "PixelTripletLargeTipGenerator",
"MultiHitFromChi2EDProducer": "MultiHitGeneratorFromChi2",
}
ret = cms.PSet()
_copy(producer, ret)
ret.ComponentName = cms.string(_map[producer._TypedParameterizable__type]);
return ret
Loading