Create the compound particles in Bender

Prequisites

  • One needs to understand the way how Bender accesses the data

Learning objectives

  • Understand how Bender algorithm combines the particles and creates the compound particles

Make-B

The next example illustrates how one combines the particles and create the compound particles inside the Bender algorithm. Let's consider a simple case of creation of B+ -> J/psi(1S) K+ decays.

The first step is rather obvious: before getting the combinations, we need to get the individual components. Here select function does the job:

## get J/psi mesons from the input
psis  = self.select ( 'psi' , 'J/psi(1S) -> mu+ mu-' )
## get energetic kaons from the input:
kaons = self.select ( 'k'  , ( 'K+' == ID ) & ( PT > 1 * GeV ) &  ( PROBNNk > 0.2 ) )

The loop over psi k combinations is ratehr trivial:

## make a loop over J/psi K combinations :
for b in self.loop( 'psi k' , 'B+' ) :
    ## fast evaluation of mass (no fit here!) 
    m12 = b.mass ( 1 , 2 ) / GeV
    print 'J/psiK mass is %s[GeV]'  % m12  
    p1  = b.momentum ( 1 ) / GeV 
    p2  = b.momentum ( 2 ) / GeV 
    p12 = b.momentum ( 1 , 2 ) / GeV 
    print 'J/psiK  momentum is is %s[GeV]'  % p12

Looping object (b here), as the name, suggests, make a loop over all psi k combinations. The loop is done in CPU efficient way,
and no expensive vertex fitting is performed. One can estimate various raw (no fit) kinematical quantities using functions momentum, mass , etc... (Note that indices starts from 1. For all LoKi-based functions the index 0 is reserved for self-reference, the mother particle itself). These raw quantities can be used for quick reject of bad combinations before making CPU-expensive vertex fit.
If/when combination satisfies certain criteria, the vertex
fit and creatino of the compound particle is triggered automatically if any of particle/vertex information is retrieved (either directy via particle/vertex method, or indirectly, e.g. via call to any particle/vertex LoKi-functor. The good created mother particles can be saved for subsequent steps under some unique tag:

for b in self.loop( 'psi k' , 'B+' ) :
    ## fast evaluation of mass (no fit here!) 
    m12 = b.mass ( 1 , 2 ) / GeV
    if not 5 < m12 <   6    : continue  
    chi2vx = VCHI2 ( b )   ## indirect call for vertex fitr and creation of B+ meson
    if not 0<= chi2v <  20  : continue 
    m = M ( p ) / GeV 
    if not 5 <  m < 5.6     :  continue 
    m.save('MyB')

Obviously the looping can be combnied with filling of historgams and n-tuples.

How to deal with charge conjugation?Click to expand

The saved particles can be extracted back using the method selected:

myB = self.selected('MyB')
for b in myB : 
   print M(b)/GeV

Configuration

It is clear that to build B+ -> J/psi(1S) K+ decays, one needs to
feed the algorithm with J/psi(1S)-mesond and kaons. Using Selectionmachinery is the most efficient ansd transaprent way to do it.

from PhysConf.Selections import AutomaticData
jpsi = AutomaticData( '/Event/Dimuon/Phys/FullDSTDiMuonJpsi2MuMuDetachedLine/Particles' )

from StandardParticles   import StdLooseKaons as kaons     
bsel = BenderSelection ( 'MakeB' , [ jpsi , kaons ] )

The complete example of creation of B+ -> J/psi(1S) K+ decays starting from DIMUON.DST is accessible from here

Keypoints

Wth these example, you should be able to do

  • code Bender algorithm that perofem loopint, combianig anc creation of compound particles

results matching ""

    No results matching ""