Difference: Hlt2SharedParticles (1 vs. 2)

Revision 22009-04-13 - VladimirVavaGligorov

Line: 1 to 1
 
META TOPICPARENT name="HltLine"

What is an Hlt2SharedParticle?

Changed:
<
<
Hlt2SharedParticles are intermediate states which should be made once for all Hlt2 lines. Examples would be a K* or φ which could be reused between several different lines. Because of this, Hlt2SharedParticles are not Hlt2Lines. They are made after the Hlt1 lines, and after the Hlt2 reconstruction, but before any Hlt2Lines are processed.
>
>
Hlt2SharedParticles are intermediate states which should be made once for all Hlt2 lines. Examples would be a K* or φ which could be reused between several different lines. Because of this, Hlt2SharedParticles are not Hlt2Lines. They are made "on-demand" when requested by an Hlt2Line, and if another line subsequently asks for the same Hlt2SharedParticle it is pointed to the same particles; hence all shared particles are made at most once per event. If no Hlt2Line requests a specific shared particle, it is never made.
 

Including Hlt2SharedParticles in a line

Changed:
<
<
See Hlt2Lines for a full example but, since an Hlt2SharedParticle is just a configurable, it is enough to do
>
>
See Hlt2Lines for a full example but, since an Hlt2SharedParticle is just a configurable, they are imported through
from Hlt2SharedParticles.MyParticle import MyParticle2MyFinalState
There are two further required steps: declaring the shared particle in the input location of an Hlt2Member or CombineParticles/FilterDesktop instance, and declaring it in the Hlt2Line itself. First of all, in order to be able to use the Hlt2SharedParticle in the Hlt2Line, it must be added to the algos list of that line, for example:
myLine = Hlt2Line( "myLineName",
                             prescale,
                             algos = [sharedParticle1,sharedParticle2,combineSharedParticles]
                         )
Finally, to actually use the shared particle:

  • To use in an Hlt2Member
    inputLocations = [MyParticle2MyFinalState]
  • To use in a CombineParticles/FilterDesktop instance
    inputLocations = [MyParticle2MyFinalState.outputSelection()]
 
Changed:
<
<

Example in Python

>
>

Example of creating an Hlt2SharedParticle

 
from Gaudi.Configuration import * 
from Hlt2SharedParticles.GoodParticles import GoodPions, GoodKaons

Revision 12009-04-13 - VladimirVavaGligorov

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="HltLine"

What is an Hlt2SharedParticle?

Hlt2SharedParticles are intermediate states which should be made once for all Hlt2 lines. Examples would be a K* or φ which could be reused between several different lines. Because of this, Hlt2SharedParticles are not Hlt2Lines. They are made after the Hlt1 lines, and after the Hlt2 reconstruction, but before any Hlt2Lines are processed.

Including Hlt2SharedParticles in a line

See Hlt2Lines for a full example but, since an Hlt2SharedParticle is just a configurable, it is enough to do

Example in Python

from Gaudi.Configuration import * 
from Hlt2SharedParticles.GoodParticles import GoodPions, GoodKaons
from Configurables import CombineParticles, GaudiSequencer, PhysDesktop
from HltConf.HltLine import bindMembers

__all__ = ( 'D02KPi')
##########################################################################################
# D0 -> K Pi
#
Hlt2SharedD02KPi = CombineParticles("Hlt2SharedD02KPi")
Hlt2SharedD02KPi.DecayDescriptor = "[D0 -> K- pi+]cc"
Hlt2SharedD02KPi.DaughtersCuts = { "K+" : "ALL",
                                  "pi+" : "ALL"}
Hlt2SharedD02KPi.CombinationCut = "(ADAMASS('D0')<50*MeV) & (APT>1*GeV)"
Hlt2SharedD02KPi.MotherCut = "(VFASPF(VCHI2/VDOF)<25)"
Hlt2SharedD02KPi.addTool(PhysDesktop)
Hlt2SharedD02KPi.PhysDesktop.InputLocations = [ "Hlt2GoodKaons", "Hlt2GoodPions" ]

D02KPi = bindMembers( None, [ GoodKaons, GoodPions, Hlt2SharedD02KPi ] )

Notes on the example

  • In the code above,
    __all__
    is where you declare all of the shared states in that particular MySharedParticle.py file. If you look at the actual $HLT2SHAREDPARTICLES/python/Hlt2SharedParticles/D0.py file you will see several other final states for the D0 to decay into being declared, but the list was shortened for this example. Separate the shared states with commas:
    __all__ = ('Decay1','Decay2',...)
  • Since Hlt2SharedParticles are not Hlt2Lines, do not declare any Hlt2Members/Hlt2Lines here. Just CombineParticles/FilterDesktop instances.
  • Finally use bindMembers to create a concrete instance of your shared particle for use in an Hlt2Line. Make sure you include everything it depends on; in this case, the D02KPi shared particle depends on the GoodPions and GoodKaons (also shared particles) so you must say
     D02KPi = bindMembers( None, [ GoodKaons, GoodPions, Hlt2SharedD02KPi ] ) 

-- VladimirVavaGligorov - 12 Apr 2009

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback