test
CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
customiseForTripletsHLTPixelTracksByCellularAutomaton Namespace Reference

Functions

def customiseForTripletsHLTPixelTracksByCellularAutomaton
 
def producers_by_type
 

Function Documentation

def customiseForTripletsHLTPixelTracksByCellularAutomaton.customiseForTripletsHLTPixelTracksByCellularAutomaton (   process)

Definition at line 8 of file customiseForTripletsHLTPixelTracksByCellularAutomaton.py.

References producers_by_type().

8 
10  for module in producers_by_type(process, "PixelTrackProducer"):
11  if not hasattr(module, "OrderedHitsFactoryPSet"):
12  continue
13  pset = getattr(module, "OrderedHitsFactoryPSet")
14  if not hasattr(pset, "ComponentName"):
15  continue
16  if not (pset.ComponentName == "StandardHitTripletGenerator"):
17  continue
18  # Adjust seeding layers
19  seedingLayersName = module.OrderedHitsFactoryPSet.SeedingLayers.getModuleLabel()
20 
21  # Configure seed generator / pixel track producer
22  triplets = module.OrderedHitsFactoryPSet.clone()
23  from RecoPixelVertexing.PixelTriplets.CAHitTripletGenerator_cfi import CAHitTripletGenerator as _CAHitTripletGenerator
24 
25  module.OrderedHitsFactoryPSet = _CAHitTripletGenerator.clone(
26  ComponentName = cms.string("CAHitTripletGenerator"),
27  extraHitRPhitolerance = triplets.GeneratorPSet.extraHitRPhitolerance,
28  maxChi2 = cms.PSet(
29  pt1 = cms.double(0.9), pt2 = cms.double(2),
30  value1 = cms.double(20), value2 = cms.double(10),
31  enabled = cms.bool(True),
32  ),
33  useBendingCorrection = cms.bool(True),
34  SeedingLayers = cms.InputTag(seedingLayersName),
35  CAThetaCut = cms.double(0.0015),
36  CAPhiCut = cms.double(0.01),
37  CAHardPtCut = cms.double(0),
38  )
39 
40  if hasattr(triplets.GeneratorPSet, "SeedComparitorPSet"):
41  module.OrderedHitsFactoryPSet.SeedComparitorPSet = triplets.GeneratorPSet.SeedComparitorPSet
42  return process
def customiseForTripletsHLTPixelTracksByCellularAutomaton.producers_by_type (   process,
  types 
)

Definition at line 4 of file customiseForTripletsHLTPixelTracksByCellularAutomaton.py.

Referenced by customiseForTripletsHLTPixelTracksByCellularAutomaton().

4 
5 def producers_by_type(process, *types):
6  return (module for module in process._Process__producers.values() if module._TypedParameterizable__type in types)
7