CMS 3D CMS Logo

Functions | Variables
customiseForQuadrupletsByCellularAutomaton Namespace Reference

Functions

def customiseForQuadrupletsByCellularAutomaton (process)
 
def customiseLegacySeeding (module)
 
def customiseNewSeeding (process, module)
 

Variables

 _CAParameters
 
 CAHardPtCut
 
 CAPhiCut
 
 CAThetaCut
 
 enabled
 
 fitFastCircle
 
 fitFastCircleChi2Cut
 
 maxChi2
 
 pt1
 
 pt2
 
 useBendingCorrection
 
 value1
 
 value2
 

Function Documentation

def customiseForQuadrupletsByCellularAutomaton.customiseForQuadrupletsByCellularAutomaton (   process)

Definition at line 83 of file customiseForQuadrupletsByCellularAutomaton.py.

References customiseLegacySeeding(), and customiseNewSeeding().

84  for module in process._Process__producers.values():
85  if hasattr(module, "OrderedHitsFactoryPSet"):
87  elif module._TypedParameterizable__type == "PixelQuadrupletEDProducer":
88  customiseNewSeeding(process, module)
89 
90  return process
def customiseForQuadrupletsByCellularAutomaton.customiseLegacySeeding (   module)

Definition at line 17 of file customiseForQuadrupletsByCellularAutomaton.py.

Referenced by customiseForQuadrupletsByCellularAutomaton().

18  pset = getattr(module, "OrderedHitsFactoryPSet")
19  if not hasattr(pset, "ComponentName"):
20  return
21  if pset.ComponentName != "CombinedHitQuadrupletGenerator":
22  return
23  # Adjust seeding layers
24  seedingLayersName = module.OrderedHitsFactoryPSet.SeedingLayers.getModuleLabel()
25 
26  # Configure seed generator / pixel track producer
27  quadruplets = module.OrderedHitsFactoryPSet.clone()
28  from RecoPixelVertexing.PixelTriplets.CAHitQuadrupletGenerator_cfi import CAHitQuadrupletGenerator as _CAHitQuadrupletGenerator
29 
30  module.OrderedHitsFactoryPSet = _CAHitQuadrupletGenerator.clone(
31  ComponentName = "CAHitQuadrupletGenerator",
32  extraHitRPhitolerance = quadruplets.GeneratorPSet.extraHitRPhitolerance,
33  SeedingLayers = seedingLayersName,
34  **_CAParameters
35  )
36 
37  if hasattr(quadruplets.GeneratorPSet, "SeedComparitorPSet"):
38  module.OrderedHitsFactoryPSet.SeedComparitorPSet = quadruplets.GeneratorPSet.SeedComparitorPSet
39 
def customiseForQuadrupletsByCellularAutomaton.customiseNewSeeding (   process,
  module 
)

Definition at line 40 of file customiseForQuadrupletsByCellularAutomaton.py.

Referenced by customiseForQuadrupletsByCellularAutomaton(), customiseForQuadrupletsHLTPixelTracksByCellularAutomaton.customiseForQuadrupletsHLTPixelTracksByCellularAutomaton(), and customiseForTripletsHLTPixelTracksByCellularAutomaton.customiseForTripletsHLTPixelTracksByCellularAutomaton().

40 def customiseNewSeeding(process, module):
41  tripletModuleName = module.triplets.getModuleLabel()
42  tripletModule = getattr(process, tripletModuleName)
43  doubletModuleName = tripletModule.doublets.getModuleLabel()
44  doubletModule = getattr(process, doubletModuleName)
45 
46  # Generate doublets for all adjacent layer pairs
47  doubletModule.layerPairs = [
48  0, # layer pair (0,1)
49  1, # layer pair (1,2)
50  2 # layer pair (2,3)
51  ]
52 
53  # Bit of a hack to replace a module with another, but works
54  #
55  # In principle setattr(process) could work too, but it expands the
56  # sequences and I don't want that
57  modifier = cms.Modifier()
58  modifier._setChosen()
59 
60  # Replace quadruplet generator with the CA version
61  from RecoPixelVertexing.PixelTriplets.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer
62  modifier.toReplaceWith(module, _caHitQuadrupletEDProducer.clone(
63  doublets = doubletModuleName,
64  SeedComparitorPSet = module.SeedComparitorPSet.clone(),
65  extraHitRPhitolerance = module.extraHitRPhitolerance,
66  **_CAParameters
67  ))
68 
69  # Remove triplet generator from all sequence and paths
70  for seqs in [process.sequences_(), process.paths_()]:
71  for seqName, seq in seqs.iteritems():
72  # cms.Sequence.remove() would look simpler, but it expands
73  # the contained sequences if a replacement occurs there.
74  try:
75  index = seq.index(tripletModule)
76  except:
77  continue
78 
79  seq.remove(tripletModule)
80 
81  delattr(process, tripletModuleName)
82 

Variable Documentation

customiseForQuadrupletsByCellularAutomaton._CAParameters
private

Definition at line 3 of file customiseForQuadrupletsByCellularAutomaton.py.

customiseForQuadrupletsByCellularAutomaton.CAHardPtCut
customiseForQuadrupletsByCellularAutomaton.CAPhiCut
customiseForQuadrupletsByCellularAutomaton.CAThetaCut
customiseForQuadrupletsByCellularAutomaton.enabled

Definition at line 7 of file customiseForQuadrupletsByCellularAutomaton.py.

customiseForQuadrupletsByCellularAutomaton.fitFastCircle
customiseForQuadrupletsByCellularAutomaton.fitFastCircleChi2Cut
customiseForQuadrupletsByCellularAutomaton.maxChi2

Definition at line 4 of file customiseForQuadrupletsByCellularAutomaton.py.

customiseForQuadrupletsByCellularAutomaton.pt1

Definition at line 5 of file customiseForQuadrupletsByCellularAutomaton.py.

customiseForQuadrupletsByCellularAutomaton.pt2

Definition at line 5 of file customiseForQuadrupletsByCellularAutomaton.py.

customiseForQuadrupletsByCellularAutomaton.useBendingCorrection

Definition at line 9 of file customiseForQuadrupletsByCellularAutomaton.py.

customiseForQuadrupletsByCellularAutomaton.value1

Definition at line 6 of file customiseForQuadrupletsByCellularAutomaton.py.

customiseForQuadrupletsByCellularAutomaton.value2

Definition at line 6 of file customiseForQuadrupletsByCellularAutomaton.py.