33def configEventDensityTool( name, jetOrConstitdef, radius=0.4, **options ):
34 """Returns an EventDensityTool configured with input and output names build according to the given jet (or jet constituent) definition.
35
36 jetOrConstitdef can be a JetDefinition, JetInputConstit. The input PseudoJetContainer name and output EventShape name are build
37 using helper functions shared in other parts of the config (jet, trigger, egamma,...)
38
39 It is still possible to override any properties of the tool in the optionnal additionnal arguments.
40 """
41 from JetRecConfig.JetRecConfig import getPJContName
42
43
44 toolProperties = dict(
45 JetAlgorithm = "Kt",
46 JetRadius = radius,
47 InputContainer = getPJContName( jetOrConstitdef),
48 AbsRapidityMin = 0.0,
49 AbsRapidityMax = 2.0,
50 AreaDefinition = "Voronoi",
51 VoronoiRfact = 0.9,
52 OutputContainer = getEventShapeName( jetOrConstitdef) ,
53 UseFourMomArea = True,
54 )
55
56 toolProperties.update( options)
57
58 return CompFactory.EventDensityTool(name, **toolProperties)
59
60