Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15862 from felicepantaleo/CATriplets_LayerCacheFix
Phase1 Pixel Triplets Seeding by CA - LayerCache cleared after use
- Loading branch information
Showing
4 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
RecoTracker/Configuration/python/customiseForTripletsByCellularAutomaton.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
def customiseForTripletsByCellularAutomaton(process): | ||
for module in process._Process__producers.values(): | ||
if not hasattr(module, "OrderedHitsFactoryPSet"): | ||
continue | ||
pset = getattr(module, "OrderedHitsFactoryPSet") | ||
if not hasattr(pset, "ComponentName"): | ||
continue | ||
if not (pset.ComponentName == "StandardHitTripletGenerator"): | ||
continue | ||
# Adjust seeding layers | ||
seedingLayersName = module.OrderedHitsFactoryPSet.SeedingLayers.getModuleLabel() | ||
|
||
|
||
|
||
# Configure seed generator / pixel track producer | ||
Triplets = module.OrderedHitsFactoryPSet.clone() | ||
from RecoPixelVertexing.PixelTriplets.CAHitTripletGenerator_cfi import CAHitTripletGenerator as _CAHitTripletGenerator | ||
|
||
module.OrderedHitsFactoryPSet = _CAHitTripletGenerator.clone( | ||
ComponentName = cms.string("CAHitTripletGenerator"), | ||
extraHitRPhitolerance = Triplets.GeneratorPSet.extraHitRPhitolerance, | ||
maxChi2 = dict( | ||
pt1 = 0.8, pt2 = 2, | ||
value1 = 20, value2 = 10, | ||
enabled = True, | ||
), | ||
useBendingCorrection = True, | ||
SeedingLayers = cms.InputTag(seedingLayersName), | ||
CAThetaCut = cms.double(0.0015), | ||
CAPhiCut = cms.double(0.01), | ||
CAHardPtCut = cms.double(0), | ||
) | ||
|
||
if hasattr(Triplets.GeneratorPSet, "SeedComparitorPSet"): | ||
pset.SeedComparitorPSet = Triplets.GeneratorPSet.SeedComparitorPSet | ||
return process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters