CMS 3D CMS Logo

Functions | Variables
customiseForTripletsByCellularAutomaton Namespace Reference

Functions

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

Variables

 _CAParameters
 
 CAHardPtCut
 
 CAPhiCut
 
 CAThetaCut
 
 enabled
 
 maxChi2
 
 pt1
 
 pt2
 
 useBendingCorrection
 
 value1
 
 value2
 

Function Documentation

def customiseForTripletsByCellularAutomaton.customiseForTripletsByCellularAutomaton (   process)

Definition at line 72 of file customiseForTripletsByCellularAutomaton.py.

References customiseLegacySeeding(), and customiseNewSeeding().

73  for module in process._Process__producers.values():
74  if hasattr(module, "OrderedHitsFactoryPSet"):
76  elif module._TypedParameterizable__type in ["PixelTripletHLTEDProducer", "PixelTripletLargeTipEDProducer"]:
77  customiseNewSeeding(process, module)
78  return process
def customiseForTripletsByCellularAutomaton.customiseLegacySeeding (   module)

Definition at line 15 of file customiseForTripletsByCellularAutomaton.py.

Referenced by customiseForTripletsByCellularAutomaton().

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

Definition at line 39 of file customiseForTripletsByCellularAutomaton.py.

Referenced by customiseForTripletsByCellularAutomaton().

39 def customiseNewSeeding(process, module):
40  doubletModuleName = module.doublets.getModuleLabel()
41  doubletModule = getattr(process, doubletModuleName)
42 
43  # Generate doublets for all adjacent layer pairs
44  doubletModule.layerPairs = [
45  0, # layer pair (0,1)
46  1, # layer pair (1,2)
47  ]
48 
49  # Bit of a hack to replace a module with another, but works
50  #
51  # In principle setattr(process) could work too, but it expands the
52  # sequences and I don't want that
53  modifier = cms.Modifier()
54  modifier._setChosen()
55 
56  comparitor = None
57  if hasattr(module, "SeedComparitorPSet"):
58  comparitor = module.SeedComparitorPSet.clone()
59 
60  # Replace triplet generator with the CA version
61  from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer
62  modifier.toReplaceWith(module, _caHitTripletEDProducer.clone(
63  doublets = doubletModuleName,
64  extraHitRPhitolerance = module.extraHitRPhitolerance,
65  **_CAParameters
66  ))
67 
68  if comparitor:
69  module.SeedComparitorPSet = comparitor
70 
71 

Variable Documentation

customiseForTripletsByCellularAutomaton._CAParameters
private

Definition at line 3 of file customiseForTripletsByCellularAutomaton.py.

customiseForTripletsByCellularAutomaton.CAHardPtCut

Definition at line 12 of file customiseForTripletsByCellularAutomaton.py.

customiseForTripletsByCellularAutomaton.CAPhiCut

Definition at line 11 of file customiseForTripletsByCellularAutomaton.py.

customiseForTripletsByCellularAutomaton.CAThetaCut

Definition at line 10 of file customiseForTripletsByCellularAutomaton.py.

customiseForTripletsByCellularAutomaton.enabled

Definition at line 7 of file customiseForTripletsByCellularAutomaton.py.

customiseForTripletsByCellularAutomaton.maxChi2

Definition at line 4 of file customiseForTripletsByCellularAutomaton.py.

customiseForTripletsByCellularAutomaton.pt1

Definition at line 5 of file customiseForTripletsByCellularAutomaton.py.

customiseForTripletsByCellularAutomaton.pt2

Definition at line 5 of file customiseForTripletsByCellularAutomaton.py.

customiseForTripletsByCellularAutomaton.useBendingCorrection

Definition at line 9 of file customiseForTripletsByCellularAutomaton.py.

customiseForTripletsByCellularAutomaton.value1

Definition at line 6 of file customiseForTripletsByCellularAutomaton.py.

customiseForTripletsByCellularAutomaton.value2

Definition at line 6 of file customiseForTripletsByCellularAutomaton.py.