Difference: LoKiHybridFilters (1 vs. 39)

Revision 392019-08-02 - NiklasStefanNolte

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
Line: 139 to 139
 is extracted using DVAlgorithm::lifetimeFitter("nick-name").

BPVVDCHI2: -separation from related PV

Changed:
<
<
Computes the -distance from the related PV.
>
>
Computes the -distance from the related PV: (Pos(bestPV) - Pos(EndVertex))^T ( cov_(bestPV) + cov(EndVertex) )^-1 (Pos(bestPV) - Pos(EndVertex))
 
<!-- SyntaxHighlightingPlugin -->
CombineParticles.MotherCut = "BPVVDCHI2()>100" 
<!-- end SyntaxHighlightingPlugin -->

Revision 382019-07-16 - HangyiWu

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
Line: 78 to 78
 

BPVDIRA: Direction angle

Computes the cosine of the angle between the momentum of the particle and the direction fo flight from the best PV to the decay vertex. %SYNTAX{ syntax="python" }%
Changed:
<
<
MotherCut = "BPVDIRA>0.9999"
>
>
MotherCut = "BPVDIRA()>0.9999"
 %ENDSYNTAX%

BPVIPCHI2(): IP on related PV

Line: 141 to 141
 

BPVVDCHI2: -separation from related PV

Computes the -distance from the related PV. %SYNTAX{ syntax="python" }%
Changed:
<
<
MotherCut = "BPVVDCHI2>100"
>
>
MotherCut = "BPVVDCHI2()>100"
 %ENDSYNTAX%

BPVVDZ: -distance from the end vertex of the particle and the related primary vertex.

Revision 372019-07-09 - MichaelWilkinson

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

Recommended LoKi::Hybrid Functors

Changed:
<
<
This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
>
>
This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
  This page refers to DaVinci v22r1.

Revision 362019-02-26 - MichaelWilkinson

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

Recommended LoKi::Hybrid Functors

Changed:
<
<
This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
>
>
This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
  This page refers to DaVinci v22r1.

Revision 352015-11-10 - VanyaBelyaev

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
Line: 56 to 56
 

ADMASS: The absolute mass difference to the reference value

Calculates the absolute difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument. %SYNTAX{ syntax="python" }%
Changed:
<
<
FilterDesktop.Filter.Code = "(ADMASS('KS0')<50*MeV)"
>
>
FilterDesktop.Filter.Code = "ADMASS('KS0')<50*MeV"
 %ENDSYNTAX%

The mass difference can also be used without the absolute value. See DMASS.

Line: 78 to 78
 

BPVDIRA: Direction angle

Computes the cosine of the angle between the momentum of the particle and the direction fo flight from the best PV to the decay vertex. %SYNTAX{ syntax="python" }%
Changed:
<
<
MotherCut = "(BPVDIRA>0.9999)"
>
>
MotherCut = "BPVDIRA>0.9999"
 %ENDSYNTAX%

BPVIPCHI2(): IP on related PV

Line: 230 to 230
 

INTREE: In tree

Requires there is a particle in the decay tree satisfying the requirements. %SYNTAX{ syntax="python" }%
Changed:
<
<
FilterDesktop.Filter.Code = "(INTREE( (ID=='J/psi(1S)') & (BPVVDCHI2>25) ) )"
>
>
FilterDesktop.Filter.Code = "INTREE( (ID=='J/psi(1S)') & (BPVVDCHI2>25) ) "
 %ENDSYNTAX% Requires there is a in the tree more than away from the best vertex.

MAXTREE: Maximum value in the decay tree

Returns the maximum value of some functor in the decay tree. Useful to apply cuts on all particles, or to extract some value from the tree. %SYNTAX{ syntax="python" }%
Changed:
<
<
MotherCut = "(M-MAXTREE('D0'==ABSID,M)<165.5)"
>
>
MotherCut = "M-MAXTREE('D0'==ABSID,M)<165.5"
 %ENDSYNTAX% This example looks for all in the decay, returns the largest mass (which is the mass of the as there's only one) and computes the mass difference with the mother.

MINTREE: Minimal value in the decay tree

Takes a functor as agrument and returns its minimal value searching through the decay tree. %SYNTAX{ syntax="python" }%
Changed:
<
<
FilterDesktop.Filter.Code = "(MINTREE(ABSID=='K+',PT)>1400*MeV)"
>
>
FilterDesktop.Filter.Code = "MINTREE(ABSID=='K+',PT)>1400*MeV"
 %ENDSYNTAX% This would look for all particles kaons in the decay tree and find their and return the minimum. The cut then requires that all kaon descendents have a .
Line: 283 to 283
 

MIPCHI2DV: Minimum IP-

Returns the minimum distance of a particles's trajectory to any set of vertices. Most useful in conjunction with the PRIMARY argument that looks at PVs. %SYNTAX{ syntax="python" }%
Changed:
<
<
FilterDesktop.Filter.Code = "(MIPCHI2DV(PRIMARY)>9)"
>
>
FilterDesktop.Filter.Code = "MIPCHI2DV(PRIMARY)>9" FilterDesktop.Filter.Code = "MIPCHI2DV()>9" ## ditto
 %ENDSYNTAX% This requires that the particle is away from any PV.

MIPDV: Minimum IP

Returns the minimum distance of a particles's trajectory to any set of vertices. Most useful in conjunction with the PRIMARY argument that looks at PVs.%SYNTAX{ syntax="python" }%
Changed:
<
<
FilterDesktop.Filter.Code = "(MIPDV(PRIMARY)>0.15)"
>
>
FilterDesktop.Filter.Code = "MIPDV(PRIMARY)>0.15"
 %ENDSYNTAX% This requires that the particle is 0.15 mm away from any PV.
Line: 299 to 300
 

MM: Measured Mass

Returns the measured mass of the particle. The function LHCb::Particle::measuredMass() is used for evaluation. %SYNTAX{ syntax="python" }%
Changed:
<
<
CombinationCuts = "(AM<11*GeV)"
>
>
CombinationCuts = "AM<11*GeV"
 %ENDSYNTAX% This selects dimuons up to a mass of 11 GeV.
Line: 322 to 323
 

NINTREE: Number of particles in tree

Returns the number of particles in a tree satisfying some selection criteria. %SYNTAX{ syntax="python" }%
Changed:
<
<
FilterDesktop.Filter.Code = "( 2 == NINTREE( (ABSID=='e-') & (PT>1*GeV)))"
>
>
FilterDesktop.Filter.Code = "2 == NINTREE( (ABSID=='e-') & (PT>1*GeV))"
 %ENDSYNTAX% Requires that there are two electrons in the tree with .
Line: 656 to 657
 CombinationCut, the effective mother particle is created through teh vertex fit procedure, and MotherCut is applied for this effective mother particle.
Deleted:
<
<

Use of FilterDesktop.

FilterDesktop is a DVAlgorithm that applies a cut and clones the selected particles. It has one filter (Filter) but the default is not the LoKi::Hybrid::FilterCriterion which needs to be set by hand using the FilterCriterion property.

<!-- SyntaxHighlightingPlugin -->
HltExclusive.Members += { "FilterDesktop/HltSelSingleMuon" } 

HltSelSingleMuon.PhysDesktop.InputLocations  = {"Phys/HltMuons"} 

HltSelSingleMuon.FilterCriterion = "LoKi::Hybrid::FilterCriterion" 
/**
 * Pt > 3 GeV & IP/err > 5 & IP > 0.15 mm 
 */
HltSelSingleMuon.Filter.Code = "(PT>3*GeV) & (MIPCHI2DV(PRIMARY)>25) & (MIPDV(PRIMARY)>0.15)"  
<!-- end SyntaxHighlightingPlugin -->
 

Help

Please do not send mails directly to the authors, but send the questions and requests through the following mailing lists:

Revision 342012-05-08 - VanyaBelyaev

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
Line: 95 to 95
 originates from the given primary vertex. It is also probably the best "pointing" variable. %SYNTAX{ syntax="python" }%
Changed:
<
<
MotherCut = "BPVLTFITCHI2('PropertimeFitter/properTime:PUBLIC')<16"
>
>
MotherCut = "BPVLTFITCHI2()<16"
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself
Line: 109 to 109
 ns instead of the natural units: . %SYNTAX{ syntax="python" }%
Changed:
<
<
MotherCut = "BPVLTIME('PropertimeFitter/properTime:PUBLIC')>1.5"
>
>
MotherCut = "BPVLTIME()>1.5"
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself
Line: 120 to 120
 ILifetimeFitter tool. %SYNTAX{ syntax="python" }%
Changed:
<
<
MotherCut = "BPVLTCHI2('PropertimeFitter/properTime:PUBLIC')>9"
>
>
MotherCut = "BPVLTCHI2()>9"
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself
Line: 132 to 132
 ILifetimeFitter tool. %SYNTAX{ syntax="python" }%
Changed:
<
<
MotherCut = "BPVLTSIGNCHI2('PropertimeFitter/properTime:PUBLIC')>-4"
>
>
MotherCut = "BPVLTSIGNCHI2()>-4"
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself

Revision 332012-04-30 - PaulaCollins

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
Line: 779 to 779
 The tool is a specialization of general "tuple tools", the concept developed by Jeremie Borel. The usage is failrly trivial:
Deleted:
<
<
The tool is a specialization of general "tuple tools", the concept developed by Jeremie Borel. The usage is failrly trivial:
 %SYNTAX{ syntax="cpp" }%

TopAlg += { "DecayTreeTuple/MyDecayTreeTuple" } ;

Line: 788 to 786
 // specify location of input data in TES InputLocations = {"Phys/HltSelBd2MuMuKstar"} ;
Changed:
<
<
// use varios tools, developed by Jeremie
>
>
// use various tools, developed by Jeremie
 ToolList = { "TupleToolTrigger" , "TupleToolMCTruth"
Line: 803 to 801
 };

// configure LoKi tuple tool:

Changed:
<
<
LoKiTool.Variables = {
>
>
LoKiTool.Variables = {
  "mass" : "M/GeV" , "p" : "P/GeV" , "pt" : "PT/GeV"

Revision 322011-10-03 - MarcoCattaneo

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

Recommended LoKi::Hybrid Functors

Changed:
<
<
This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
>
>
This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
  This page refers to DaVinci v22r1.
Line: 702 to 702
 

LoKi::Hybrid::PrintTool

The most primitive tool, it implements the abstract interface

Changed:
<
<
IPrintDecay,
>
>
IPrintDecay,
 and it allows to print some information about the decay tree. It is convinient to use the high-level algorithm PrintDecayTree to drive the tool:
Line: 759 to 759
  ---------------------------------------
Changed:
<
<
For more detailes see the Doxygen documentation here.
>
>
For more details see the Doxygen documentation here.
 

LoKi::Hybrid::PlotTool

Changed:
<
<
The simple tool, which implements the abstract interface IPlotTool
>
>
The simple tool, which implements the abstract interface IPlotTool
 and allows to fill some histograms for the selected particles.
Changed:
<
<
For more detailes see the Doxygen documentation here.
>
>
For more details see the Doxygen documentation here.
 

LoKi::Hybrid::TupleTool

The simple tool, which implements the abstract interface
Changed:
<
<
here
>
>
here
 and allows to fill N-tuple with useful information for the selected particles.
Line: 819 to 819
 M/GeV, P/GeV and PT/GeV.
Changed:
<
<
For more detailes see the Doxygen documentation here.
>
>
For more details see the Doxygen documentation here.
 

Direct manipulatuon with factories

Revision 312011-01-19 - unknown

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
Line: 194 to 194
  TODO : Is there a way of applying a cut to the daughters only, without navigating the whole tree? From next version NINGENERATION and INGENERATION will do this.
Added:
>
>

DECTREE: Check if a particle satisfies a certain decay descriptor

<!-- SyntaxHighlightingPlugin -->
FilterDesktop.Filter.Code = "DECTREE ('B0 -> (D- -> K+ pi- pi-) pi+')" 
<!-- end SyntaxHighlightingPlugin -->
The example selects the decay of B0 to D- pi+ followed by D- to K+ pi- pi-. This can be useful for example to select one or more decay channels from a stripping line that contains many decay channels
 

DMASS: The mass difference to the reference value

Calculates the difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument. In most reasonable cases one will use the absolute mass difference (see ADMASS) or the mass itself (see MM).

Revision 302010-09-23 - unknown

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
Line: 460 to 460
 

Vertex functors

Vertex functors are accessed using VFASPF.
Added:
>
>

VX, VY, VZ: Vertex x, y or z-position

<!-- SyntaxHighlightingPlugin -->
CombineParticles.MotherCut = "VFASPF(VZ)>-100 & VFASPF(VZ)>100" 
<!-- end SyntaxHighlightingPlugin -->
 

VCHI2 : Vertex

%SYNTAX{ syntax="python" }%

Revision 292010-09-08 - unknown

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
Line: 411 to 411
 

AMAXDOCA, AMINDOCA: Distance of closest approach cut

%SYNTAX{ syntax="python" }%
Deleted:
<
<
 CombinationCut = "(AMAXDOCA('') < 0.08*mm)"
Added:
>
>
%ENDSYNTAX% Checks that the maximum distance of closest approach between all possible pairs of particles is less than 80mum. Equal results can be otained with less CPU time using
<!-- SyntaxHighlightingPlugin -->
CombineParticles.CombinationCut = "ACUTDOCA(0.08*mm,'')"
<!-- end SyntaxHighlightingPlugin -->
 
Added:
>
>

AMAXDOCACHI2, AMINDOCACHI2: Distance of closest approach significance cut

<!-- SyntaxHighlightingPlugin -->
CombineParticles.CombinationCut = "(AMAXDOCACHI2('') < 10)"
<!-- end SyntaxHighlightingPlugin -->
Checks that the maximum distance of closest approach - chi2 between all possible pairs of particles is less than 10. Equal results can be otained with less CPU time using %SYNTAX{ syntax="python" }% CombinationCut = "ACUTDOCACHI2(10,'')"
 %ENDSYNTAX%
Added:
>
>
This cut is particularly useful to gain speed on vertex fits. As a rule of thumb, any vertex chi2 cut can be preceded by a DOCACHI2 cut at the same (total, not reduced!) chi2.
 

ANUM: Number of particles in the array meeting a requirement

%SYNTAX{ syntax="python" }%
Line: 458 to 473
 MotherCut = "VFASPF(VCHI2/VDOF)<10"

%ENDSYNTAX%

Added:
>
>
A two-track vertex has one degree of freedom. A three-track vertex has three degrees of freedom.
 

VMINVDDV: minimum distance between the vertex and any other vertex

The functor evaluates the minimal 3D-distance between the vertex and the vertices from "list".

Revision 282009-12-02 - RobLambert

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

Recommended LoKi::Hybrid Functors

Changed:
<
<
This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
>
>
This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code. As neither are guaranteed to be a complete list, you can always see the DOxygen for the LoKi::Cuts namespace here.
  This page refers to DaVinci v22r1.

Revision 272009-04-30 - VanyaBelyaev

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 188 to 188
 

CHILDCUT: Applies a cut to a given child

%SYNTAX{ syntax="python" }%
Changed:
<
<
FilterDesktop.Filter.Code = "CHILDCUT ( MIPCHI2DV ( PRIMARY ) > 1 , 2 )"
>
>
FilterDesktop.Filter.Code = "CHILDCUT ( MIPCHI2DV ( PRIMARY ) > 1 , 1 )"
 %ENDSYNTAX% In this example one applies an IP cut on the first daughter of the input particle. This requires to know which is the first, second, etc daughter. Can be useful when (N)INTREE won't work. Like here for the slow pion in a where searching for a pion in the tree would also return the daughters of the . Use the safer INTREE and NINTREE instead.

Revision 262009-04-15 - RobLambert

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 565 to 565
 Once a combination has been made according to the decay descriptor but before the vertex fit. This cut is applied to the set of daughters. Therefore only Particle array functors can be used. They all start with an A.

MotherCut

Changed:
<
<
Applied the vertex fit on the mother. All the cuts that require the position of the vertex must be applied in MotherCut, while the others can be applied earlier (saving CPU). Note that for long lived particles like Ks it pays off to apply a loose mass cut in CombinationCut and a harder in MotherCut=. The reason is that the vertex fit does a propagation of the momenta through the detector. You thus get the momentum at the Ks vertex, while in CombinationCut it's just the sum of the momenta of the daughters at their first measurement.
>
>
Applied the vertex fit on the mother. All the cuts that require the position of the vertex must be applied in MotherCut, while the others can be applied earlier (saving CPU). Note that for long lived particles like Ks it pays off to apply a loose mass cut in CombinationCut and a harder in MotherCut. The reason is that the vertex fit does a propagation of the momenta through the detector. You thus get the momentum at the Ks vertex, while in CombinationCut it's just the sum of the momenta of the daughters at their first measurement.
  A simple example: %SYNTAX{ syntax="python" }%

Revision 252009-04-07 - MatthewCharles

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 351 to 351
 

TRCHI2: the track fit

Gets the of the track fit. %SYNTAX{ syntax="python" }%
Changed:
<
<
FilterDesktop.Filter.Code = "TRCHI2<1*GeV"
>
>
FilterDesktop.Filter.Code = "TRCHI2<1000"
 %ENDSYNTAX%

Revision 242009-03-19 - unknown

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Changed:
<
<
This page refers to DaVinci v20r4.
>
>
This page refers to DaVinci v22r1.
 
Line: 863 to 863
 -- PatrickKoppenburg - 18 Aug 2008

META FILEATTACHMENT attachment="TestFunctor.cpp" attr="h" comment="" date="1213266131" name="TestFunctor.cpp" path="TestFunctor.cpp" size="6746" stream="TestFunctor.cpp" user="Main.VanyaBelyaev" version="1"
Added:
>
>
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 232009-03-19 - unknown

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 409 to 409
 In this example one checks that the minimal PT of pions in the decay tree of the particles is in excess of 1 GeV.
Added:
>
>

AMAXDOCA, AMINDOCA: Distance of closest approach cut

<!-- SyntaxHighlightingPlugin -->
CombineParticles.CombinationCut = "(AMAXDOCA('') < 0.08*mm)"
<!-- end SyntaxHighlightingPlugin -->
 

ANUM: Number of particles in the array meeting a requirement

%SYNTAX{ syntax="python" }%

Revision 222008-11-20 - SeanBrisbane

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 195 to 195
 TODO : Is there a way of applying a cut to the daughters only, without navigating the whole tree? From next version NINGENERATION and INGENERATION will do this.

DMASS: The mass difference to the reference value

Changed:
<
<
Calculates the difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument. In most reasonable cases one will use the absolute mass difference (see DMASS) or the mass itself (see MM).
>
>
Calculates the difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument. In most reasonable cases one will use the absolute mass difference (see ADMASS) or the mass itself (see MM).
 

DPDGM and DPDGMASS: The mass difference to the nominal mass

Returns the difference with the PDG value of a particle mass. Useful to compute the difference with the measured mass. This calls the ParticlePropertySvc at very call and is therefore slow. Use DMASS('B0') rather than DPDGM if you know the PID.

Revision 212008-09-23 - unknown

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Changed:
<
<
This page refers to DaVinci v20r0.
>
>
This page refers to DaVinci v20r4.
 
Line: 61 to 61
  The mass difference can also be used without the absolute value. See DMASS.
Changed:
<
<
TODO : A version without argument will be provided where the ID of the particle is used to get the reference mass.
>
>

ADPDGM and ADPDGMASS: The absolute mass difference to the nominal mass

Returns the difference with the PDG value of a particle mass. Useful to compute the difference with the measured mass. This calls the ParticlePropertySvc at very call and is therefore slow. Use ADMASS('B0') rather than ADPDGM if you know the PID.
 

AMAXCHILD or AMINCHILD: cut an array and return the max/min value of a functor.

Similar to MINTREE and MAXTREE, however can be performed on a particle array.
Line: 173 to 174
 The concept and the name come from Sean Brisbane. The functor is available starting from Phys/LoKiPhys version >= v7r2.
Added:
>
>

CHI2PDGM and CHI2PDGMASS: The mass difference to the nominal mass in units of chi2

Returns the difference with the PDG value of a particle mass. This calls the ParticlePropertySvc at very call and is therefore slow. Use CHI2M('B0') rather than CHI2PDGM if you know the PID.

CHI2M and CHI2MASS: The mass difference to some reference mass in units of chi2

Returns the difference with the PDG value of a particle mass. It takes an argument like ADMASS

<!-- SyntaxHighlightingPlugin -->
CombineParticles.MotherCut = "CHI2M('B0')<5" 
<!-- end SyntaxHighlightingPlugin -->
 

CHILDCUT: Applies a cut to a given child

%SYNTAX{ syntax="python" }%
Line: 185 to 197
 

DMASS: The mass difference to the reference value

Calculates the difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument. In most reasonable cases one will use the absolute mass difference (see DMASS) or the mass itself (see MM).
Added:
>
>

DPDGM and DPDGMASS: The mass difference to the nominal mass

Returns the difference with the PDG value of a particle mass. Useful to compute the difference with the measured mass. This calls the ParticlePropertySvc at very call and is therefore slow. Use DMASS('B0') rather than DPDGM if you know the PID.
 

ID: Particle ID

Like ABSID but without the absolute value.
Line: 193 to 209
 The predicate which checks the existence of the particle satisfying the requirements in the decay tree at the given depth %SYNTAX{ syntax="python" }%
Changed:
<
<
FilterDesktop.Filter.Code = "INGENERATION ( ( 'mu+'==ABSID) & ( PT > 2 * GeV ) , 2 ) "
>
>
FilterDesktop.Code = "INGENERATION ( ( 'mu+'==ABSID) & ( PT > 2 * GeV ) , 2 ) "
  %ENDSYNTAX% Requires the presence of at least one granddaughter , which the transverse momentum
Line: 303 to 319
 %ENDSYNTAX% Requires that there are two electrons in the tree with .
Added:
>
>

NMASS: The nominal mass of a particle

Returns the PDG value of a particle mass. Useful to compute the difference with the measured mass. This calls the ParticlePropertySvc at very call and is therefore slow. Use ADMASS('B0') rather than abs(MM-NMASS) if you know the PID.
 

P: Momentum

Gets the momentum of the particle. %SYNTAX{ syntax="python" }%

Revision 202008-08-18 - unknown

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Changed:
<
<
This page refers to DaVinci v19r12.
>
>
This page refers to DaVinci v20r0.
 

Particle Functors

Some mnemonic rules:

Changed:
<
<
  • The functors with the prefix BPV deal with "the best primary vertex". The best primary vertex is extracted from the desktop-tool using the method IPhysDesktop::relatedVertex;
>
>
  • The functors with the prefix BPV deal with "the best primary vertex". The best primary vertex is extracted from the desktop-tool using the method IPhysDesktop::relatedVertex
 
  • The functors with the suffix DV get some even-data (e.g. the list of all vertices) through desktop tool
  • The functors with the suffix TES get the event data from the Transient Event Store
  • The VD as a part of the functor name means that the functor deals with "vertex distance"
Line: 23 to 23
 

ALL: All

Takes all particles. This is required if one wants to apply no cut.
Changed:
<
<
%SYNTAX{ syntax="cpp" }% FilterDesktop.Filter.Code = "ALL" ;
>
>
%SYNTAX{ syntax="python" }% FilterDesktop.Filter.Code = "ALL"
 %ENDSYNTAX%

ABSID: Absolute value of PID.

Returns the absolute value of the PID. The following lines are equivalent:
Changed:
<
<
%SYNTAX{ syntax="cpp" }% FilterDesktop.Filter.Code = "ABSID==211" ; FilterDesktop.Filter.Code = "ABSID=='pi+' " ; FilterDesktop.Filter.Code = "ABSID=='pi-' " ;
>
>
%SYNTAX{ syntax="python" }% FilterDesktop.Filter.Code = "ABSID==211" FilterDesktop.Filter.Code = "ABSID=='pi+' " FilterDesktop.Filter.Code = "ABSID=='pi-' "
 %ENDSYNTAX% Note the last line! The comparison (ABSID=='pi-') takes the absolute value on both sides. This avoid having to remember that the has a positive pid (211) while the has a negative pid (-13).
Line: 47 to 47
 ACHILD(PT,2) return the transverse momentum of the second particle in the combination.

For example:

Changed:
<
<
%SYNTAX{ syntax="cpp" }% CombinationCut = "ACHILD(PT,1)*ACHILD(PT,2)>1500000" ;
>
>
%SYNTAX{ syntax="python" }% CombinationCut = "ACHILD(PT,1)*ACHILD(PT,2)>1500000"
 %ENDSYNTAX%

See the function AMAXCHILD or AMINCHILD, to get the daughter particle by name.

ADMASS: The absolute mass difference to the reference value

Calculates the absolute difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument.
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 FilterDesktop.Filter.Code = "(ADMASS('KS0')<50*MeV)" %ENDSYNTAX%
Line: 68 to 68
  e.g. the minimal PT for all negative kaons: AMINCHILD(PT,"K-"==ID)
Changed:
<
<
%SYNTAX{ syntax="cpp" }% CombinationCut = "AMINCHILD(PT,"K-"==ID)*ACHILD(PT,"K+"==ID)>1500000" ;
>
>
%SYNTAX{ syntax="python" }% CombinationCut = "AMINCHILD(PT,"K-"==ID)*ACHILD(PT,"K+"==ID)>1500000"
 %ENDSYNTAX%

This is computationally expensive, using ACHILD is much quicker if possible.

BPVDIRA: Direction angle

Computes the cosine of the angle between the momentum of the particle and the direction fo flight from the best PV to the decay vertex.
Changed:
<
<
%SYNTAX{ syntax="cpp" }% MotherCut = "(BPVDIRA>0.9999)" ;
>
>
%SYNTAX{ syntax="python" }% MotherCut = "(BPVDIRA>0.9999)"
 %ENDSYNTAX%

BPVIPCHI2(): IP on related PV

Computes the -IP on the related PV.
Changed:
<
<
%SYNTAX{ syntax="cpp" }% MotherCut = "BPVIPCHI2()<25" ;
>
>
%SYNTAX{ syntax="python" }% MotherCut = "BPVIPCHI2()<25"
 %ENDSYNTAX% TODO : So far it needs the ().
Line: 92 to 92
 of the particle using ILifetimeFitter tool. This is probably the best measure of the consistency of the hypothesis that the particle originates from the given primary vertex. It is also probably the best "pointing" variable.
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "BPVLTFITCHI2('PropertimeFitter/properTime:PUBLIC')<16" ;
>
>
MotherCut = "BPVLTFITCHI2('PropertimeFitter/properTime:PUBLIC')<16"
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself
Line: 106 to 106
 The functor evaluates the proper lifetime of the particle using ILifetimeFitter tool. Unfortunately due to very sad conventions adopted for LHCb, the proper time is measured in ns instead of the natural units: .
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "BPVLTIME('PropertimeFitter/properTime:PUBLIC')>1.5" ;
>
>
MotherCut = "BPVLTIME('PropertimeFitter/properTime:PUBLIC')>1.5"
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself
Line: 117 to 117
 

BPVLTCHI2: the -significance of the proper lifetime of the particle

The functor evaluates the -significance of the proper lifetime of the particle using ILifetimeFitter tool.
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "BPVLTCHI2('PropertimeFitter/properTime:PUBLIC')>9" ;
>
>
MotherCut = "BPVLTCHI2('PropertimeFitter/properTime:PUBLIC')>9"
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself
Line: 129 to 129
 

BPVLTSIGNCHI2: the signed -significance of the proper lifetime of the particle

The functor evaluates the signed -significance of the proper lifetime of the particle using ILifetimeFitter tool.
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "BPVLTSIGNCHI2('PropertimeFitter/properTime:PUBLIC')>-4" ;
>
>
MotherCut = "BPVLTSIGNCHI2('PropertimeFitter/properTime:PUBLIC')>-4"
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself
Line: 139 to 139
 

BPVVDCHI2: -separation from related PV

Computes the -distance from the related PV.
Changed:
<
<
%SYNTAX{ syntax="cpp" }% MotherCut = "BPVVDCHI2>100" ;
>
>
%SYNTAX{ syntax="python" }% MotherCut = "BPVVDCHI2>100"
 %ENDSYNTAX%

BPVVDZ: -distance from the end vertex of the particle and the related primary vertex.

The functor computes the -distance from the end vertex of the particle and the related primary vertex.
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "0<BPVVDZ" ;
>
>
MotherCut = "0<BPVVDZ"
  %ENDSYNTAX% The concept and the name come from Sean Brisbane.
Line: 155 to 155
 

BPVVDR: -distance from the end vertex of the particle and the related primary vertex.

The functor computes the -distance(cylindrical) from the end vertex of the particle and the related primary vertex.
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "0.1<BPVVDR" ;
>
>
MotherCut = "0.1<BPVVDR"
  %ENDSYNTAX% The concept and the name come from Sean Brisbane.
Line: 165 to 165
 

BPVVDRHO: -distance from the end vertex of the particle and the related primary vertex.

The functor computes the -distance(cylindrical) from the end vertex of the particle and the related primary vertex.
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "0.1<BPVVDRHO" ;
>
>
MotherCut = "0.1<BPVVDRHO"
  %ENDSYNTAX% The concept and the name come from Sean Brisbane.
Line: 175 to 175
 

CHILDCUT: Applies a cut to a given child

Changed:
<
<
%SYNTAX{ syntax="cpp" }% FilterDesktop.Filter.Code = "CHILDCUT ( MIPCHI2DV ( PRIMARY ) > 1 , 2 )" ;
>
>
%SYNTAX{ syntax="python" }% FilterDesktop.Filter.Code = "CHILDCUT ( MIPCHI2DV ( PRIMARY ) > 1 , 2 )"
 %ENDSYNTAX% In this example one applies an IP cut on the first daughter of the input particle. This requires to know which is the first, second, etc daughter. Can be useful when (N)INTREE won't work. Like here for the slow pion in a where searching for a pion in the tree would also return the daughters of the . Use the safer INTREE and NINTREE instead.
Line: 191 to 191
 

INGENERATION: "in generation"

The predicate which checks the existence of the particle satisfying the requirements in the decay tree at the given depth
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
FilterDesktop.Filter.Code = "INGENERATION ( ( 'mu+'==ABSID) & ( PT > 2 * GeV ) , 2 ) " ;
>
>
FilterDesktop.Filter.Code = "INGENERATION ( ( 'mu+'==ABSID) & ( PT > 2 * GeV ) , 2 ) "
  %ENDSYNTAX% Requires the presence of at least one granddaughter , which the transverse momentum
Line: 206 to 206
 

INTREE: In tree

Requires there is a particle in the decay tree satisfying the requirements.
Changed:
<
<
%SYNTAX{ syntax="cpp" }% FilterDesktop.Filter.Code = "(INTREE( (ID=='J/psi(1S)') & (BPVVDCHI2>25) ) )" ;
>
>
%SYNTAX{ syntax="python" }% FilterDesktop.Filter.Code = "(INTREE( (ID=='J/psi(1S)') & (BPVVDCHI2>25) ) )"
 %ENDSYNTAX% Requires there is a in the tree more than away from the best vertex.

MAXTREE: Maximum value in the decay tree

Returns the maximum value of some functor in the decay tree. Useful to apply cuts on all particles, or to extract some value from the tree.
Changed:
<
<
%SYNTAX{ syntax="cpp" }% MotherCut = "(M-MAXTREE('D0'==ABSID,M)<165.5)" ;
>
>
%SYNTAX{ syntax="python" }% MotherCut = "(M-MAXTREE('D0'==ABSID,M)<165.5)"
 %ENDSYNTAX% This example looks for all in the decay, returns the largest mass (which is the mass of the as there's only one) and computes the mass difference with the mother.

MINTREE: Minimal value in the decay tree

Takes a functor as agrument and returns its minimal value searching through the decay tree.
Changed:
<
<
%SYNTAX{ syntax="cpp" }% FilterDesktop.Filter.Code = "(MINTREE(ABSID=='K+',PT)>1400*MeV)" ;
>
>
%SYNTAX{ syntax="python" }% FilterDesktop.Filter.Code = "(MINTREE(ABSID=='K+',PT)>1400*MeV)"
 %ENDSYNTAX% This would look for all particles kaons in the decay tree and find their and return the minimum. The cut then requires that all kaon descendents have a .
Line: 229 to 229
 

MINVDDV: minimum distance between the particle's end-vertex and any other vertex

The functor evaluates the minimal 3D-distance between the particle's end-vertex and the vertices form "list". The list of vertices is extracted from the desktop:
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "MINVDDV(PRIMARY)>1" ;
>
>
MotherCut = "MINVDDV(PRIMARY)>1"
  %ENDSYNTAX% Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.
Line: 240 to 240
 

MINVDSOURCE: minimum distance between the particle's end-vertex and any other vertex

The functor evaluates the minimal 3D-distance between the particle's end-vertex and the vertices form "list". The list of vertices is extracted from the "source":
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "MINVDSOURCE( VSOURCEDV ( PRIMARY ) )>1" ;
>
>
MotherCut = "MINVDSOURCE( VSOURCEDV ( PRIMARY ) )>1"
  %ENDSYNTAX% Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.
Line: 250 to 250
 

MINVDTES: minimum distance between the particle's end-vertex and any other vertex

The functor evaluates the minimal 3D-distance between the particle's end-vertex and the vertices form "list". The list of vertices is extracted from the TES:
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "MINVDTES('SomeLocationInTES',PRIMARY)>1" ;
>
>
MotherCut = "MINVDTES('SomeLocationInTES',PRIMARY)>1"
  %ENDSYNTAX% Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.

MIPCHI2DV: Minimum IP-

Returns the minimum distance of a particles's trajectory to any set of vertices. Most useful in conjunction with the PRIMARY argument that looks at PVs.
Changed:
<
<
%SYNTAX{ syntax="cpp" }% FilterDesktop.Filter.Code = "(MIPCHI2DV(PRIMARY)>9)" ;
>
>
%SYNTAX{ syntax="python" }% FilterDesktop.Filter.Code = "(MIPCHI2DV(PRIMARY)>9)"
 %ENDSYNTAX% This requires that the particle is away from any PV.

MIPDV: Minimum IP

Changed:
<
<
Returns the minimum distance of a particles's trajectory to any set of vertices. Most useful in conjunction with the PRIMARY argument that looks at PVs.%SYNTAX{ syntax="cpp" }% FilterDesktop.Filter.Code = "(MIPDV(PRIMARY)>0.15)" ;
>
>
Returns the minimum distance of a particles's trajectory to any set of vertices. Most useful in conjunction with the PRIMARY argument that looks at PVs.%SYNTAX{ syntax="python" }% FilterDesktop.Filter.Code = "(MIPDV(PRIMARY)>0.15)"
 %ENDSYNTAX% This requires that the particle is 0.15 mm away from any PV.
Line: 275 to 275
 

MM: Measured Mass

Returns the measured mass of the particle. The function LHCb::Particle::measuredMass() is used for evaluation.
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 CombinationCuts = "(AM<11*GeV)" %ENDSYNTAX% This selects dimuons up to a mass of 11 GeV.
Line: 283 to 283
 

NINGENERATION: "Number of particles in generation"

The function which counts the particles satisfying the requirements in the decay tree at the given depth:
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
FilterDesktop.Filter.Code = " 2 == NINGENERATION ( ( 'mu+'==ABSID) & ( PT > 2 * GeV ) , 2 ) " ;
>
>
FilterDesktop.Filter.Code = " 2 == NINGENERATION ( ( 'mu+'==ABSID) & ( PT > 2 * GeV ) , 2 ) "
  %ENDSYNTAX% Requires the presence of exactly two granddaughter with the transverse momentum
Line: 298 to 298
 

NINTREE: Number of particles in tree

Returns the number of particles in a tree satisfying some selection criteria.
Changed:
<
<
%SYNTAX{ syntax="cpp" }% FilterDesktop.Filter.Code = "( 2 == NINTREE( (ABSID=='e-') & (PT>1*GeV)))" ;
>
>
%SYNTAX{ syntax="python" }% FilterDesktop.Filter.Code = "( 2 == NINTREE( (ABSID=='e-') & (PT>1*GeV)))"
 %ENDSYNTAX% Requires that there are two electrons in the tree with .

P: Momentum

Gets the momentum of the particle.
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
FilterDesktop.Filter.Code = "P>2*GeV";
>
>
FilterDesktop.Filter.Code = "P>2*GeV"
  %ENDSYNTAX% Gets particles with .

PIDe, PIDmu, PIDK, PIDp, PIDpi : PID

Gets the combined delta-log-likelihood for the given hypothesis (wrt the pion), :
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
FilterDesktop.Filter.Code = "PIDe-PIDpi>6" ;
>
>
FilterDesktop.Filter.Code = "PIDe-PIDpi>6"
  %ENDSYNTAX%

PT: Transverse momentum

Gets the transverse momentum of the particle. Note that this is evaluated at the first measurement of the particle, which might not be where you want it for pions in decays.
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
FilterDesktop.Filter.Code = "PT>1*GeV";
>
>
FilterDesktop.Filter.Code = "PT>1*GeV"
  %ENDSYNTAX% Gets particles with .

TRCHI2: the track fit

Gets the of the track fit.
Changed:
<
<
%SYNTAX{ syntax="cpp" }% FilterDesktop.Filter.Code = "TRCHI2<1*GeV" ;
>
>
%SYNTAX{ syntax="python" }% FilterDesktop.Filter.Code = "TRCHI2<1*GeV"
 %ENDSYNTAX%

TRCHI2DOF: per degree of freedom of the track fit

Gets the per degree of freedom of the track fit.
Changed:
<
<
%SYNTAX{ syntax="cpp" }% FilterDesktop.Filter.Code = "TRCHI2DOF<20" ;
>
>
%SYNTAX{ syntax="python" }% FilterDesktop.Filter.Code = "TRCHI2DOF<20"
 %ENDSYNTAX%

TRPCHI2: -probability the track fit

Gets the -probability of the track fit.
Changed:
<
<
%SYNTAX{ syntax="cpp" }% FilterDesktop.Filter.Code = "TRPCHI2>0.01" ;
>
>
%SYNTAX{ syntax="python" }% FilterDesktop.Filter.Code = "TRPCHI2>0.01"
 %ENDSYNTAX%
Line: 354 to 354
 

VFASPF: Vertex Function as Particle Function.

Allows to apply vertex functors to the particle's endVertex().
Changed:
<
<
%SYNTAX{ syntax="cpp" }% MotherCut = "VFASPF(VCHI2/VDOF)<10" ;
>
>
%SYNTAX{ syntax="python" }% MotherCut = "VFASPF(VCHI2/VDOF)<10"
 %ENDSYNTAX% Applies a cut to the vertex of the particle.

Particle Array Functors

Applied to a set of particles, typically the daughters
Added:
>
>

AHASCHILD: Checks if there is a particle in the array that matches the requirements

<!-- SyntaxHighlightingPlugin -->
CombineParticles.CombinationCut = "AHASCHILD((ABSID=='pi+') & (PT>1*GeV))"
<!-- end SyntaxHighlightingPlugin -->
Requires there's at least one pion with a Pt larger than 1 GeV in the combination. This is useful when one requires at least one particle in the decay to meet a requirement.
 

ADAMASS: The absolute mass difference to the PDG reference value

Calculates the absolute difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument.
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
  CombinationCut = "ADAMASS('KS0')<50*MeV"
Line: 373 to 381
 

AM: Mass of the combination

Returns .
Changed:
<
<

APT: Sum transverse momentum of the array

Gets the transverse momentum of the array (that's the of the sum 4-vector, not the sum of the ). Note that this is evaluated at the first measurement of the particles, which might not be where you want it for pions in decays. %SYNTAX{ syntax="cpp" }%
>
>

AMAXCHILD, AMINCHILD: Maximal, minimal value in array.

%SYNTAX{ syntax="python" }%
 
Changed:
<
<
CombinationCut = "APT>1*GeV";
>
>
CombinationCut = "1*GeV<AMINCHILD(MINTREE('pi-'==ABSID,PT)"

%ENDSYNTAX% In this example one checks that the minimal PT of pions in the decay tree of the particles is in excess of 1 GeV.

ANUM: Number of particles in the array meeting a requirement

%SYNTAX{ syntax="python" }%

CombinationCut = "1<ANUM( ('pi+'==ABSID) & (MIPCHI2DV(PRIMARY)>25))"

  %ENDSYNTAX%
Deleted:
<
<
Gets particles with .
 

AP: Sum momentum of the array

Gets the momentum of the array.
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
CombinationCut = "AP>1*GeV";
>
>
CombinationCut = "AP>1*GeV"
  %ENDSYNTAX% Gets particles with .
Added:
>
>

APT: Sum transverse momentum of the array

Gets the transverse momentum of the array (that's the of the sum 4-vector, not the sum of the ). Note that this is evaluated at the first measurement of the particles, which might not be where you want it for pions in decays.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.CombinationCut = "APT>1*GeV"
<!-- end SyntaxHighlightingPlugin -->
Gets particles with .
 

Vertex functors

Vertex functors are accessed using VFASPF.

VCHI2 : Vertex

Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "VFASPF(VCHI2/VDOF)<10" ;
>
>
MotherCut = "VFASPF(VCHI2/VDOF)<10"
  %ENDSYNTAX%

VDOF : Vertex fit number of degrees of freedom

Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "VFASPF(VCHI2/VDOF)<10" ;
>
>
MotherCut = "VFASPF(VCHI2/VDOF)<10"
  %ENDSYNTAX%

VMINVDDV: minimum distance between the vertex and any other vertex

The functor evaluates the minimal 3D-distance between the vertex and the vertices from "list". The list of vertices is extracted from the desktop:
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "VFASFP(VMINVDDV(PRIMARY))>1" ;
>
>
MotherCut = "VFASFP(VMINVDDV(PRIMARY))>1"
  %ENDSYNTAX% Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.
Line: 423 to 447
 

VMINVDSOURCE: minimum distance between the vertex and any other vertex

The functor evaluates the minimal 3D-distance between the vertex and the vertices form "list". The list of vertices is extracted from the "source":
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "VFASPF( VMINVDSOURCE( VSOURCEDV ( PRIMARY ) ) ) >1" ;
>
>
MotherCut = "VFASPF( VMINVDSOURCE( VSOURCEDV ( PRIMARY ) ) ) >1"
  %ENDSYNTAX% Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.
Line: 433 to 457
 

VMINVDTES: minimum distance between the vertex and any other vertex

The functor evaluates the minimal 3D-distance between the vertex and the vertices form "list". The list of vertices is extracted from the TES:
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "VFASPF( VMINVDTES ( 'SomeLocationInTES' , PRIMARY ) ) >1" ;
>
>
MotherCut = "VFASPF( VMINVDTES ( 'SomeLocationInTES' , PRIMARY ) ) >1"
  %ENDSYNTAX% Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.
Line: 444 to 468
 

VPCHI2: -probability

The functor evaluates the -probability of the vertex, taking into account the number of degrees of freedom. The GSL routine gsl_cdf_chisq_Q functon is used for evaluation.
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
MotherCut = "VFASPF(VPCHI2)>1*perCent" ;
>
>
MotherCut = "VFASPF(VPCHI2)>1*perCent"
  %ENDSYNTAX% The functor is available starting from Phys/LoKiPhys version >= v7r2
Line: 463 to 487
 

Syntax

Cut are combined using the bit-wide & and | operators, not boolean operators. This also requires that cuts are well protected using parentheses. Example:
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
  FilterDesktop.Filter.Code = "( ((ABSID=='pi+') & (PT>400*MeV)) | ((ABSID=='KS0') & (PT>1*GeV)))"
Line: 480 to 504
 the simplest way to check if the symbol is a type or instance is through inspection using the interactive python:
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 [lxplus097] ~/cmtuser/DaVinci_v19r12/Phys/DaVinci/v19r12/cmt % python Python 2.5 (r25:51908, Oct 18 2007, 16:04:48) [GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2
Line: 500 to 524
 

DaughtersCuts :

On the incoming daughter particles. It is a map of "particle" : "cuts"
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
  DaughtersCuts = { // PT cut for muons "mu-" : "PT>400*MeV", // IP_chi2 cut for D0 in D*+ "D*(2010)+'" : "MAXTREE('D0'==ABSID,BPVVDCHI2) >6.25 "
Changed:
<
<
} ;
>
>
}
  %ENDSYNTAX%
Line: 518 to 542
 Applied the vertex fit on the mother. All the cuts that require the position of the vertex must be applied in MotherCut, while the others can be applied earlier (saving CPU). Note that for long lived particles like Ks it pays off to apply a loose mass cut in CombinationCut and a harder in MotherCut=. The reason is that the vertex fit does a propagation of the momenta through the detector. You thus get the momentum at the Ks vertex, while in CombinationCut it's just the sum of the momenta of the daughters at their first measurement.

A simple example:

Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
HltShared.Members += { "CombineParticles/HltSharedPhi2KK" } ;
>
>
HltShared.Members += { "CombineParticles/HltSharedPhi2KK" }
 
Changed:
<
<
InputLocations = { "Phys/HltNoPIDsKaons" };
>
>
InputLocations = { "Phys/HltNoPIDsKaons" }
 
Changed:
<
<
DecayDescriptor = "phi(1020) -> K+ K-";
>
>
DecayDescriptor = "phi(1020) -> K+ K-"
  // (IP > 2 sigma^2)
Changed:
<
<
DaughtersCuts = { "K+" : "MIPCHI2DV(PRIMARY)>4" } ;
>
>
DaughtersCuts = { "K+" : "MIPCHI2DV(PRIMARY)>4" }
  // mass window +/- 300 MeV
Changed:
<
<
CombinationCut = "ADAMASS('phi(1020)')<50";
>
>
CombinationCut = "ADAMASS('phi(1020)')<50"
  // chi2/ degrees of freedom < 25
Changed:
<
<
MotherCut = "VFASPF(VCHI2/VDOF)<25" ;
>
>
MotherCut = "VFASPF(VCHI2/VDOF)<25"
  %ENDSYNTAX%

The decay descriptor can be overwritten by DecayDescriptors which allows to reconstruct several decays in one go.

Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
HltShared.Members += { "CombineParticles/HltSharedDstarWithD02KPi" } ; InputLocations = { "Phys/HltSharedD02KPi", "Phys/HltSharedSlowPions" };
>
>
HltShared.Members += { "CombineParticles/HltSharedDstarWithD02KPi" } InputLocations = { "Phys/HltSharedD02KPi", "Phys/HltSharedSlowPions" }
  // also wrong-sign ones
Changed:
<
<
DecayDescriptors = {"[D*(2010)+ -> pi+ D0]cc", "[D*(2010)+ -> pi+ D~0]cc" };
>
>
DecayDescriptors = {"[D*(2010)+ -> pi+ D0]cc", "[D*(2010)+ -> pi+ D~0]cc" }
  // mass window +/- 50 MeV, PT> 1.25 GeV
Changed:
<
<
CombinationCut = "(ADAMASS('D*(2010)+')<50) & (APT>1250)";
>
>
CombinationCut = "(ADAMASS('D*(2010)+')<50) & (APT>1250)"
  // Chi2/nDoF < 25 . m(D*-D0) = 145.5 MeV, +2
Changed:
<
<
MotherCut = "(VFASPF(VCHI2/VDOF)<25) & (M-MAXTREE('D0'==ABSID,M)<165.5)" ;
>
>
MotherCut = "(VFASPF(VCHI2/VDOF)<25) & (M-MAXTREE('D0'==ABSID,M)<165.5)"
  %ENDSYNTAX%
Line: 577 to 601
 

Use of FilterDesktop.

FilterDesktop is a DVAlgorithm that applies a cut and clones the selected particles. It has one filter (Filter) but the default is not the LoKi::Hybrid::FilterCriterion which needs to be set by hand using the FilterCriterion property.

Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
 
Changed:
<
<
HltExclusive.Members += { "FilterDesktop/HltSelSingleMuon" } ;
>
>
HltExclusive.Members += { "FilterDesktop/HltSelSingleMuon" }
 
Changed:
<
<
InputLocations = {"Phys/HltMuons"} ;
>
>
InputLocations = {"Phys/HltMuons"}
 
Changed:
<
<
FilterCriterion = "LoKi::Hybrid::FilterCriterion" ;
>
>
FilterCriterion = "LoKi::Hybrid::FilterCriterion"
 /** * Pt > 3 GeV & IP/err > 5 & IP > 0.15 mm */
Changed:
<
<
HltSelSingleMuon.Filter.Code = "(PT>3*GeV) & (MIPCHI2DV(PRIMARY)>25) & (MIPDV(PRIMARY)>0.15)" ;
>
>
HltSelSingleMuon.Filter.Code = "(PT>3*GeV) & (MIPCHI2DV(PRIMARY)>25) & (MIPDV(PRIMARY)>0.15)"
  %ENDSYNTAX%
Line: 654 to 678
 For the default configuration, all columns are printed using 14.5g "scientific" format and the column title is constructed from the functor itself. However both the format and the table header could be modified, e.g. if one adds into the previous configuration the explicit specification of Format and Header:
Changed:
<
<
%SYNTAX{ syntax="cpp" }%
>
>
%SYNTAX{ syntax="python" }%
  // Format: print only 5th (KEY) and 1st (ID) variable from the list of "Variables":
Changed:
<
<
Printer.PRINT.Format = "| %5% %|6t|| %1% %|14t||";
>
>
Printer.PRINT.Format = "| %5% %|6t|| %1% %|14t||"
  // specify explicitly the table header: column names
Changed:
<
<
Printer.PRINT.Header = "| Key | PdgID |";
>
>
Printer.PRINT.Header = "| Key | PdgID |"
  %ENDSYNTAX% In this case the output table looks like:
Line: 739 to 763
  For more detailes see the Doxygen documentation here.
Changed:
<
<

The direct manipulatuon with factories

>
>

Direct manipulatuon with factories

  Sometime for debugging purposes the direct manipulation with factories could be useful. Also it could have some sense for validation of functors and comparison with some other calculations.
Line: 806 to 830
 The complete example is available here.
Changed:
<
<

More documentation

For more information please refer to


PatrickKoppenburg - 28 Mar 2008
PatrickKoppenburg - 25 Apr 2008
Karol Hennessy - 15 May 2008
Vanya Belyaev - 12 Jun 2008

>
>
-- PatrickKoppenburg - 28 Mar 2008 -- PatrickKoppenburg - 25 Apr 2008 -- Karol Hennessy - 15 May 2008 -- Vanya Belyaev - 12 Jun 2008 -- PatrickKoppenburg - 18 Aug 2008
 
META FILEATTACHMENT attachment="TestFunctor.cpp" attr="h" comment="" date="1213266131" name="TestFunctor.cpp" path="TestFunctor.cpp" size="6746" stream="TestFunctor.cpp" user="Main.VanyaBelyaev" version="1"

Revision 192008-08-13 - unknown

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 38 to 38
  The pid can also be used without the absolute value. See ID.
Added:
>
>

ACHILD: Compute a function on a particle in an array

The functor ACHILD acts as "meta-functor", it gets the daughter particle number "N" (the second parameter of constructor), apply the functor (the first parameter of contructor) and return the result.

e.g. ACHILD(PT,1) return the transverse momentum of the first particle in the combination, ACHILD(PT,2) return the transverse momentum of the second particle in the combination.

For example:

<!-- SyntaxHighlightingPlugin -->
XXX.CombinationCut = "ACHILD(PT,1)*ACHILD(PT,2)>1500000" ;
<!-- end SyntaxHighlightingPlugin -->

See the function AMAXCHILD or AMINCHILD, to get the daughter particle by name.

 

ADMASS: The absolute mass difference to the reference value

Calculates the absolute difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument. %SYNTAX{ syntax="cpp" }%
Line: 48 to 63
  TODO : A version without argument will be provided where the ID of the particle is used to get the reference mass.
Added:
>
>

AMAXCHILD or AMINCHILD: cut an array and return the max/min value of a functor.

Similar to MINTREE and MAXTREE, however can be performed on a particle array.

e.g. the minimal PT for all negative kaons: AMINCHILD(PT,"K-"==ID)

<!-- SyntaxHighlightingPlugin -->
XXX.CombinationCut = "AMINCHILD(PT,"K-"==ID)*ACHILD(PT,"K+"==ID)>1500000" ;
<!-- end SyntaxHighlightingPlugin -->

This is computationally expensive, using ACHILD is much quicker if possible.

 

BPVDIRA: Direction angle

Computes the cosine of the angle between the momentum of the particle and the direction fo flight from the best PV to the decay vertex. %SYNTAX{ syntax="cpp" }%

Revision 182008-08-11 - GreigCowan

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 68 to 68
 originates from the given primary vertex. It is also probably the best "pointing" variable. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
MotherCut = "BPVLTFITCHI2('ProperTimeFitter/properTime:PUBLIC')<16" ;
>
>
MotherCut = "BPVLTFITCHI2('PropertimeFitter/properTime:PUBLIC')<16" ;
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself
Line: 82 to 82
 ns instead of the natural units: . %SYNTAX{ syntax="cpp" }%
Changed:
<
<
MotherCut = "BPVLTIME('ProperTimeFitter/properTime:PUBLIC')>1.5" ;
>
>
MotherCut = "BPVLTIME('PropertimeFitter/properTime:PUBLIC')>1.5" ;
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself
Line: 93 to 93
 ILifetimeFitter tool. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
MotherCut = "BPVLTCHI2('ProperTimeFitter/properTime:PUBLIC')>9" ;
>
>
MotherCut = "BPVLTCHI2('PropertimeFitter/properTime:PUBLIC')>9" ;
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself
Line: 105 to 105
 ILifetimeFitter tool. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
MotherCut = "BPVLTSIGNCHI2('ProperTimeFitter/properTime:PUBLIC')>-4" ;
>
>
MotherCut = "BPVLTSIGNCHI2('PropertimeFitter/properTime:PUBLIC')>-4" ;
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself

Revision 172008-06-12 - VanyaBelyaev

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 666 to 666
 here and allows to fill N-tuple with useful information for the selected particles.
Added:
>
>

The tool is a specialization of general "tuple tools", the concept developed by Jeremie Borel. The usage is failrly trivial:

 The tool is a specialization of general "tuple tools", the concept developed by Jeremie Borel. The usage is failrly trivial: %SYNTAX{ syntax="cpp" }%
Line: 706 to 713
  For more detailes see the Doxygen documentation here.
Added:
>
>

The direct manipulatuon with factories

Sometime for debugging purposes the direct manipulation with factories could be useful. Also it could have some sense for validation of functors and comparison with some other calculations.

Since the factory is AlgTool in Gaudi sense, first one needs to acquire the factory

<!-- SyntaxHighlightingPlugin -->
#include "LoKi/IHybridFactory.h"

...
const std::string factoryName = "LoKi::Hybrid::Tool/HybridFactory:PUBLIC" ;

LoKi::IHybridFactory* factory = tool<LoKi::IHybridFactory> ( factoryName ) ;
<!-- end SyntaxHighlightingPlugin -->

And now one can use the factory for creation of of functors (functions and predicates) :

<!-- SyntaxHighlightingPlugin -->
using namespace LoKi::Types ;
using namespace LoKi::Cuts   ;

// initialize the function with *some* values 

Fun fun = -1.E+10 * ONE ;

// get the code 
const std::string& code = .... ; 

// instantiate the functor:
StatusCode sc = factory->get ( code , fun ) ;

if ( sc.isFailure() ) { .... } // handle the error 

<!-- end SyntaxHighlightingPlugin -->
In a similar way one can create predicate (the functor with returns bool):

<!-- SyntaxHighlightingPlugin -->
using namespace LoKi::Types ;
using namespace LoKi::Cuts   ;

// initialize the predicate with *some* values 

Cut cut = NONE ;

// get the code 
const std::string& code = .... ; 

// instantiate the functor:
StatusCode sc = factory->get ( code , cut ) ;

if ( sc.isFailure() ) { .... } // handle the error 

<!-- end SyntaxHighlightingPlugin -->

Finally one can operate with fun and cut objects as with regular LoKi functors.

The complete example is available here.

 

More documentation

Line: 721 to 795
 
PatrickKoppenburg - 28 Mar 2008
PatrickKoppenburg - 25 Apr 2008
Karol Hennessy - 15 May 2008
Changed:
<
<

Vanya Belyaev - 17 May 2008
Vanya Belyaev - 25 May 2008
>
>

Vanya Belyaev - 12 Jun 2008

META FILEATTACHMENT attachment="TestFunctor.cpp" attr="h" comment="" date="1213266131" name="TestFunctor.cpp" path="TestFunctor.cpp" size="6746" stream="TestFunctor.cpp" user="Main.VanyaBelyaev" version="1"

Revision 162008-05-25 - VanyaBelyaev

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 666 to 666
 here and allows to fill N-tuple with useful information for the selected particles.
Added:
>
>
The tool is a specialization of general "tuple tools", the concept developed by Jeremie Borel. The usage is failrly trivial:
<!-- SyntaxHighlightingPlugin -->
ApplicationMgr.TopAlg += { "DecayTreeTuple/MyDecayTreeTuple" };

// specify location of input data in TES 
MyDecayTreeTuple.PhysDesktop.InputLocations = {"Phys/HltSelBd2MuMuKstar"}; 

// use varios tools, developed by Jeremie
MyDecayTreeTuple.ToolList = {  
      "TupleToolTrigger"
      , "TupleToolMCTruth"
      , "TupleToolMCBackgroundInfo"
      , "TupleToolGeometry"
      , "TupleToolKinematic"
      , "TupleToolPropertime"
      , "TupleToolPrimaries"
     , "TupleToolEventInfo"
     // use also LoKi-based Tuple Tool!!
     , "LoKi::Hybrid::TupleTool/LoKiTool" /// < THIS LINE 
};

// configure LoKi tuple tool:
HltDecayTreeTuple.LoKiTool.Variables = 
{ 
  "mass" : "M/GeV" ,
  "p"       : "P/GeV" ,
  "pt"      : "PT/GeV" 
};
<!-- end SyntaxHighlightingPlugin -->
For this example, the tool adds three columns into N-Tuple, defines the names of the column to be "head"+"mass", "head"+"p" and "head"+"pt". The content of the colums will be filled with tresult of evaluation of the following LoKi functors: M/GeV, P/GeV and PT/GeV.
 For more detailes see the Doxygen documentation here.
Line: 684 to 722
 
PatrickKoppenburg - 25 Apr 2008
Karol Hennessy - 15 May 2008
Vanya Belyaev - 17 May 2008
Added:
>
>

Vanya Belyaev - 25 May 2008

Revision 152008-05-18 - VanyaBelyaev

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 571 to 571
 lhcb-davinci@cern.ch, lhcb-loki@cern.ch, lhcb-bender@cern.ch

In this case more colleagues can profit from solutions to the problems and it will allow a bit more wide distribution of useful information, tricks, recipes, experience and the solutions. Also it will simplify the monitoring of the progress with the implementation of the missing functionality.

Added:
>
>
As alternative to the mailing lists the following actions are also accepted:
  1. One can submit the question to LoKi FAQ.
  2. One can submit new task or request new feature through Savannah LoKi portal
  3. One can submit new task or request new feature through Savannah Bender portal
 

Examples

Many working examples can be found in the Hlt/HltSelections package from version v6r0 released with DaVinci v19r11.

Feature requests

Changed:
<
<
Feature requests should be sent to the same mailing lists as above. For every new feature a suggested name should be provided. This drastically simplifies the life of developers and results in a much higher priority.
>
>
Feature requests should be sent to the same mailing lists as above. For every new feature a suggested name should be provided. This drastically simplifies the life of developers and results in a MUCH HIGHER PRIORITY for the implementation.
 

Change of names

Although it is very simple to define aliases for these functors (and many of them are actually available) their use is not encouraged. This is because we would like to define a minimum vocabulary everyone would have to be able to understand. Since this is rather new, suggestions for changes of names are accepted but should be agreed by the community. Please send requests to the mailing lists above. It is suggested to freeze this in the next version.
Line: 589 to 593
 

LoKi::Hybrid::PrintTool

Changed:
<
<
The most primitive tool, it implements the abstract interface IPrintDecay, and it allows to print soem information about the decay tree.
>
>
The most primitive tool, it implements the abstract interface IPrintDecay, and it allows to print some information about the decay tree.
 It is convinient to use the high-level algorithm PrintDecayTree to drive the tool:

%SYNTAX{ syntax="cpp" }%

Line: 645 to 651
  ---------------------------------------
Changed:
<
<
>
>
For more detailes see the Doxygen documentation here.
 

LoKi::Hybrid::PlotTool

Added:
>
>

The simple tool, which implements the abstract interface IPlotTool and allows to fill some histograms for the selected particles.

For more detailes see the Doxygen documentation here.

 

LoKi::Hybrid::TupleTool

Added:
>
>
The simple tool, which implements the abstract interface here and allows to fill N-tuple with useful information for the selected particles.

For more detailes see the Doxygen documentation here.

 

More documentation

Revision 142008-05-17 - VanyaBelyaev

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 280 to 280
 

P: Momentum

Gets the momentum of the particle. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
FilterDesktop.Filter.Code = "(P>2*GeV)";
>
>
FilterDesktop.Filter.Code = "P>2*GeV";
 %ENDSYNTAX% Gets particles with .
Line: 288 to 290
 Gets the combined delta-log-likelihood for the given hypothesis (wrt the pion), : %SYNTAX{ syntax="cpp" }%
Changed:
<
<
FilterDesktop.Filter.Code = "(PIDe-PIDpi>6)" ;
>
>
FilterDesktop.Filter.Code = "PIDe-PIDpi>6" ;
  %ENDSYNTAX%

PT: Transverse momentum

Gets the transverse momentum of the particle. Note that this is evaluated at the first measurement of the particle, which might not be where you want it for pions in decays. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
FilterDesktop.Filter.Code = "(PT>1*GeV)";
>
>
FilterDesktop.Filter.Code = "PT>1*GeV";
 %ENDSYNTAX% Gets particles with .
Line: 325 to 329
 

VFASPF: Vertex Function as Particle Function.

Allows to apply vertex functors to the particle's endVertex(). %SYNTAX{ syntax="cpp" }%
Changed:
<
<
MotherCut = "(VFASPF(VCHI2/VDOF)<10)" ;
>
>
MotherCut = "VFASPF(VCHI2/VDOF)<10" ;
 %ENDSYNTAX% Applies a cut to the vertex of the particle.

Particle Array Functors

Applied to a set of particles, typically the daughters
Changed:
<
<

ADMASS: The absolute mass difference to the PDG reference value

>
>

ADAMASS: The absolute mass difference to the PDG reference value

 Calculates the absolute difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombinationCut = "(ADAMASS('KS0')<50*MeV)"
>
>
CombinationCut = "ADAMASS('KS0')<50*MeV"
 %ENDSYNTAX%

AM: Mass of the combination

Line: 344 to 350
 

APT: Sum transverse momentum of the array

Gets the transverse momentum of the array (that's the of the sum 4-vector, not the sum of the ). Note that this is evaluated at the first measurement of the particles, which might not be where you want it for pions in decays. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombinationCut = "(APT>1*GeV)";
>
>
CombinationCut = "APT>1*GeV";
 %ENDSYNTAX% Gets particles with .

AP: Sum momentum of the array

Gets the momentum of the array. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombinationCut = "(AP>1*GeV)";
>
>
CombinationCut = "AP>1*GeV";
 %ENDSYNTAX% Gets particles with .
Line: 361 to 371
 

VCHI2 : Vertex

%SYNTAX{ syntax="cpp" }%
Changed:
<
<
MotherCut = "(VFASPF(VCHI2/VDOF)<10)" ;
>
>
MotherCut = "VFASPF(VCHI2/VDOF)<10" ;
 %ENDSYNTAX%

VDOF : Vertex fit number of degrees of freedom

%SYNTAX{ syntax="cpp" }%
Changed:
<
<
MotherCut = "(VFASPF(VCHI2/VDOF)<10)" ;
>
>
MotherCut = "VFASPF(VCHI2/VDOF)<10" ;
 %ENDSYNTAX%

VMINVDDV: minimum distance between the vertex and any other vertex

Line: 432 to 448
 

Types

Some allowed symbols are instances, therefore they do not require any parentheses, e.g. P, PT etc...

Changed:
<
<
Some symbols are types, e.g. MIPDV, and they require to be instantiated.
>
>
Some symbols are types, e.g. MIPDV, and they require to be instantiated.
 The parentheses means invocation of constructor.
Changed:
<
<
E.g. 'MIPDV(PRIMARY)' is just invocation of the constructor of type MIPDV with parameter 'PRIMARY' (the predicate to select the vertices).
>
>
E.g. MIPDV(PRIMARY) is just invocation of the constructor of type MIPDV with parameter PRIMARY (the predicate to select the vertices).
 the simplest way to check if the symbol is a type or instance is through inspection using the interactive python:
Line: 454 to 470
 

Use of CombineParticles.

CombineParticles is a LoKI::Algo, and a DVAlgorithm that combines the input particles according to the decay descriptor. There are three cuts applied :
Changed:
<
<
  1. DaughtersCuts : On the incoming daughter particles. It is a set of pairs "particle" : "cuts"
>
>

DaughtersCuts :

On the incoming daughter particles. It is a map of "particle" : "cuts"
 %SYNTAX{ syntax="cpp" }%
Changed:
<
<
DaughtersCuts = { "mu-" : "(PT>400*MeV)", // PT of muon "D*(2010)+'" : "(MAXTREE('D0'==ABSID,BPVVDCHI2) >6.25 )"} ; // IP of D0 in D*
>
>
DaughtersCuts = { // PT cut for muons "mu-" : "PT>400*MeV", // IP_chi2 cut for D0 in D*+ "D*(2010)+'" : "MAXTREE('D0'==ABSID,BPVVDCHI2) >6.25 " } ;
 %ENDSYNTAX%
Changed:
<
<
  1. CombinationCut : Once a combination has been made according to the decay descriptor but before the vertex fit. This cut is applied to the set of daughters. Therefore only Particle array functors can be used. They all start with an A=.
  2. MotherCut : Applied the vertex fit on the mother.
All the cuts that require the position of the vertex must be applied in MotherCut=, while the others can be applied earlier (saving CPU). Note that for long lived particles like Ks it pays off to apply a loose mass cut in CombinationCut and a harder in MotherCut=. The reason is that the vertex fit does a propagation of the momenta through the detector. You thus get the momentum at the Ks vertex, while in CombinationCut it's just the sum of the momenta of the daughters at their first measurement.
>
>

CombinationCut

Once a combination has been made according to the decay descriptor but before the vertex fit. This cut is applied to the set of daughters. Therefore only Particle array functors can be used. They all start with an A.

MotherCut

Applied the vertex fit on the mother. All the cuts that require the position of the vertex must be applied in MotherCut, while the others can be applied earlier (saving CPU). Note that for long lived particles like Ks it pays off to apply a loose mass cut in CombinationCut and a harder in MotherCut=. The reason is that the vertex fit does a propagation of the momenta through the detector. You thus get the momentum at the Ks vertex, while in CombinationCut it's just the sum of the momenta of the daughters at their first measurement.
  A simple example: %SYNTAX{ syntax="cpp" }%
Line: 465 to 493
  A simple example: %SYNTAX{ syntax="cpp" }%
Added:
>
>
 HltShared.Members += { "CombineParticles/HltSharedPhi2KK" } ;
Added:
>
>
 InputLocations = { "Phys/HltNoPIDsKaons" };
Added:
>
>
 DecayDescriptor = "phi(1020) -> K+ K-";
Changed:
<
<
DaughtersCuts = { "K+" : "(MIPCHI2DV(PRIMARY)>4)" } ; // (IP > 2 sigma)^2 CombinationCut = "(ADAMASS('phi(1020)')<50)"; // mass window +/- 300 MeV MotherCut = "(VFASPF(VCHI2/VDOF)<25)" ; // chi2/ degrees of freedom < 25
>
>
// (IP > 2 sigma^2) DaughtersCuts = { "K+" : "MIPCHI2DV(PRIMARY)>4" } ;

// mass window +/- 300 MeV CombinationCut = "ADAMASS('phi(1020)')<50";

// chi2/ degrees of freedom < 25 MotherCut = "VFASPF(VCHI2/VDOF)<25" ;

 %ENDSYNTAX%

The decay descriptor can be overwritten by DecayDescriptors which allows to reconstruct several decays in one go.

Line: 475 to 513
  The decay descriptor can be overwritten by DecayDescriptors which allows to reconstruct several decays in one go. %SYNTAX{ syntax="cpp" }%
Added:
>
>
 HltShared.Members += { "CombineParticles/HltSharedDstarWithD02KPi" } ; InputLocations = { "Phys/HltSharedD02KPi", "Phys/HltSharedSlowPions" };
Changed:
<
<
DecayDescriptors = {"[D*(2010)+ -> pi+ D0]cc", "[D*(2010)+ -> pi+ D~0]cc" }; // also wrong-sign ones CombinationCut = "(ADAMASS('D*(2010)+')<50) & (APT>1250)"; // mass window +/- 50 MeV, PT> 1.25 GeV MotherCut = "(VFASPF(VCHI2/VDOF)<25) & (M-MAXTREE('D0'==ABSID,M)<165.5)" ; // Chi2 < 25 . D*-D0 = 145.5 MeV, +2
>
>
// also wrong-sign ones DecayDescriptors = {"[D*(2010)+ -> pi+ D0]cc", "[D*(2010)+ -> pi+ D~0]cc" };

// mass window +/- 50 MeV, PT> 1.25 GeV CombinationCut = "(ADAMASS('D*(2010)+')<50) & (APT>1250)";

// Chi2/nDoF < 25 . m(D*-D0) = 145.5 MeV, +2 MotherCut = "(VFASPF(VCHI2/VDOF)<25) & (M-MAXTREE('D0'==ABSID,M)<165.5)" ;

 %ENDSYNTAX%

Mother Cut, Daughter Cut, Combination Cut

Line: 486 to 533
 Each cut, which is applicable to mother is also applicable to daughter (and vice versa). Moreover the cut, used for daughter particle, being equipped with the
Changed:
<
<
proper CHILD,CHILDFUN,CHILDCUT,MINTREE,MAXTREE,INTREE,NINTREE meta-
>
>
proper CHILD,CHILDFUN,CHILDCUT,MINTREE,MAXTREE,INTREE,NINTREE meta-
 function, gives IDENTICAL result being applied for the mother particle.
Changed:
<
<
From pure C++ point of view, both "DaughterCuts" and "MotherCuts" are objects which get as argument "const LHCb::Particle*". But "CombinationCut" accepts as an argument "LoKi::Range_<LHCb::Particle::ConstVector>".
>
>
From pure C++ point of view, both DaughterCuts and MotherCuts are objects which get as argument const LHCb::Particle*. But CombinationCut accepts as an argument LoKi::Range_<LHCb::Particle::ConstVector>".
  Therefore is requires the DIFFERENT objects.
Changed:
<
<
"CombinationCut" is applied for the combination of "good" daughter
>
>
CombinationCut is applied for the combination of "good" daughter
 particles, and only for the combinations, which satisfy
Changed:
<
<
"CombinationCut", the effective mother particle is created through teh vertex fit procedure, and

"MotherCut" is applied for this effective mother particle.

>
>
CombinationCut, the effective mother particle is created through teh vertex fit procedure, and MotherCut is applied for this effective mother particle.
 

Use of FilterDesktop.

Added:
>
>
 FilterDesktop is a DVAlgorithm that applies a cut and clones the selected particles. It has one filter (Filter) but the default is not the LoKi::Hybrid::FilterCriterion which needs to be set by hand using the FilterCriterion property. %SYNTAX{ syntax="cpp" }%
Added:
>
>
 HltExclusive.Members += { "FilterDesktop/HltSelSingleMuon" } ;
Added:
>
>
 InputLocations = {"Phys/HltMuons"} ;
Added:
>
>
 FilterCriterion = "LoKi::Hybrid::FilterCriterion" ; /** * Pt > 3 GeV & IP/err > 5 & IP > 0.15 mm
Line: 512 to 561
 /** * Pt > 3 GeV & IP/err > 5 & IP > 0.15 mm */
Changed:
<
<
HltSelSingleMuon.Filter.Code = "((PT>3*GeV) & (MIPCHI2DV(PRIMARY)>25) & (MIPDV(PRIMARY)>0.15))" ;
>
>
HltSelSingleMuon.Filter.Code = "(PT>3*GeV) & (MIPCHI2DV(PRIMARY)>25) & (MIPDV(PRIMARY)>0.15)" ;
 %ENDSYNTAX%

Help

Line: 613 to 661
 
Deleted:
<
<
-- PatrickKoppenburg - 28 Mar 2008 -- PatrickKoppenburg - 25 Apr 2008
 \ No newline at end of file
Added:
>
>

PatrickKoppenburg - 28 Mar 2008
PatrickKoppenburg - 25 Apr 2008
Karol Hennessy - 15 May 2008
Vanya Belyaev - 17 May 2008

Revision 132008-05-15 - unknown

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 429 to 429
 %ENDSYNTAX% Cuts can be split over several lines.
Changed:
<
<
Types
>
>

Types

  Some allowed symbols are instances, therefore they do not require any parentheses, e.g. P, PT etc... Some symbols are types, e.g. MIPDV, and they require to be instantiated.
Line: 482 to 482
 MotherCut = "(VFASPF(VCHI2/VDOF)<25) & (M-MAXTREE('D0'==ABSID,M)<165.5)" ; // Chi2 < 25 . D*-D0 = 145.5 MeV, +2 %ENDSYNTAX%
Changed:
<
<
Mother Cut, Daughter Cut, Combination Cut
>
>

Mother Cut, Daughter Cut, Combination Cut

 Each cut, which is applicable to mother is also applicable to daughter (and vice versa). Moreover the cut, used for daughter particle, being equipped with the

Revision 122008-05-15 - unknown

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 429 to 429
 %ENDSYNTAX% Cuts can be split over several lines.
Added:
>
>
Types

Some allowed symbols are instances, therefore they do not require any parentheses, e.g. P, PT etc... Some symbols are types, e.g. MIPDV, and they require to be instantiated. The parentheses means invocation of constructor. E.g. 'MIPDV(PRIMARY)' is just invocation of the constructor of type MIPDV with parameter 'PRIMARY' (the predicate to select the vertices). the simplest way to check if the symbol is a type or instance is through inspection using the interactive python:

<!-- SyntaxHighlightingPlugin -->
[lxplus097] ~/cmtuser/DaVinci_v19r12/Phys/DaVinci/v19r12/cmt % python
Python 2.5 (r25:51908, Oct 18 2007, 16:04:48)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>from LoKiPhys.decorators import *
>>>from LoKiArrayFunctors.decorators import *
>>>P
P
>>>MIPDV
<class 'LoKiPhys.functions.LoKi::Particles::MinImpParDV'>
<!-- end SyntaxHighlightingPlugin -->
 

Use of CombineParticles.

CombineParticles is a LoKI::Algo, and a DVAlgorithm that combines the input particles according to the decay descriptor. There are three cuts applied :
  1. DaughtersCuts : On the incoming daughter particles. It is a set of pairs "particle" : "cuts"
Line: 459 to 482
 MotherCut = "(VFASPF(VCHI2/VDOF)<25) & (M-MAXTREE('D0'==ABSID,M)<165.5)" ; // Chi2 < 25 . D*-D0 = 145.5 MeV, +2 %ENDSYNTAX%
Added:
>
>
Mother Cut, Daughter Cut, Combination Cut
Each cut, which is applicable to mother is also applicable to daughter (and vice versa). Moreover the cut, used for daughter particle, being equipped with the proper CHILD,CHILDFUN,CHILDCUT,MINTREE,MAXTREE,INTREE,NINTREE meta- function, gives IDENTICAL result being applied for the mother particle.

From pure C++ point of view, both "DaughterCuts" and "MotherCuts" are objects which get as argument "const LHCb::Particle*". But "CombinationCut" accepts as an argument "LoKi::Range_<LHCb::Particle::ConstVector>".

Therefore is requires the DIFFERENT objects. "CombinationCut" is applied for the combination of "good" daughter particles, and only for the combinations, which satisfy "CombinationCut", the effective mother particle is created through teh vertex fit procedure, and

"MotherCut" is applied for this effective mother particle.

 

Use of FilterDesktop.

FilterDesktop is a DVAlgorithm that applies a cut and clones the selected particles. It has one filter (Filter) but the default is not the LoKi::Hybrid::FilterCriterion which needs to be set by hand using the FilterCriterion property. %SYNTAX{ syntax="cpp" }%

Revision 112008-04-25 - unknown

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Changed:
<
<
This page refers to DaVinci v19r11.
>
>
This page refers to DaVinci v19r12.
 
Line: 19 to 19
 
  • The IP stands for "impact parameter" and MIP means "the minimal (with reswpect to some set of vertices) value of impact parameter"
  • Practically all "vertex functors" ( the functors which accept const LHCb::VertexBase* as arguments) have their names starting from V, the most evident exception if the functor PRIMARY
  • All indices, e.g. for CHILDCUT or CHILDFUN functors, starts from 1. 0 always means the particle itself.
Changed:
<
<
>
>
  • For many Particle functors there is an equivalent Particle array functor starting with an A. A notable exception is ADAMASS for ADMASS.
 

ALL: All

Takes all particles. This is required if one wants to apply no cut. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER0.Code = "ALL" ;
>
>
FilterDesktop.Filter.Code = "ALL" ;
 %ENDSYNTAX%

ABSID: Absolute value of PID.

Returns the absolute value of the PID. The following lines are equivalent: %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER0.Code = "ABSID==211" ; CombineParticles.FILTER0.Code = "ABSID=='pi+' " ; CombineParticles.FILTER0.Code = "ABSID=='pi-' " ;
>
>
FilterDesktop.Filter.Code = "ABSID==211" ; FilterDesktop.Filter.Code = "ABSID=='pi+' " ; FilterDesktop.Filter.Code = "ABSID=='pi-' " ;
 %ENDSYNTAX% Note the last line! The comparison (ABSID=='pi-') takes the absolute value on both sides. This avoid having to remember that the has a positive pid (211) while the has a negative pid (-13).
Line: 41 to 41
 

ADMASS: The absolute mass difference to the reference value

Calculates the absolute difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
HltSharedKsLL.FILTER1.Code = "ADMASS('KS0')<50"
>
>
FilterDesktop.Filter.Code = "(ADMASS('KS0')<50*MeV)"
 %ENDSYNTAX%

The mass difference can also be used without the absolute value. See DMASS.

Line: 51 to 51
 

BPVDIRA: Direction angle

Computes the cosine of the angle between the momentum of the particle and the direction fo flight from the best PV to the decay vertex. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "(BPVDIRA>0.9999)" ;
>
>
MotherCut = "(BPVDIRA>0.9999)" ;
 %ENDSYNTAX%

BPVIPCHI2(): IP on related PV

Computes the -IP on the related PV. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "BPVIPCHI2()<25" ;
>
>
MotherCut = "BPVIPCHI2()<25" ;
 %ENDSYNTAX% TODO : So far it needs the ().
Line: 68 to 68
 originates from the given primary vertex. It is also probably the best "pointing" variable. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "BPVLTFITCHI2('ProperTimeFitter/properTime:PUBLIC')<16" ;
>
>
MotherCut = "BPVLTFITCHI2('ProperTimeFitter/properTime:PUBLIC')<16" ;
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself
Line: 82 to 82
 ns instead of the natural units: . %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "BPVLTIME('ProperTimeFitter/properTime:PUBLIC')>1.5" ;
>
>
MotherCut = "BPVLTIME('ProperTimeFitter/properTime:PUBLIC')>1.5" ;
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself
Line: 93 to 93
 ILifetimeFitter tool. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "BPVLTCHI2('ProperTimeFitter/properTime:PUBLIC')>9" ;
>
>
MotherCut = "BPVLTCHI2('ProperTimeFitter/properTime:PUBLIC')>9" ;
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself
Line: 105 to 105
 ILifetimeFitter tool. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "BPVLTSIGNCHI2('ProperTimeFitter/properTime:PUBLIC')>-4" ;
>
>
MotherCut = "BPVLTSIGNCHI2('ProperTimeFitter/properTime:PUBLIC')>-4" ;
  %ENDSYNTAX% The related primary vertex is extracted from the desktop, the fitter itself
Line: 117 to 114
 

BPVVDCHI2: -separation from related PV

Computes the -distance from the related PV. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "BPVVDCHI2>100" ;
>
>
MotherCut = "BPVVDCHI2>100" ;
 %ENDSYNTAX%

BPVVDZ: -distance from the end vertex of the particle and the related primary vertex.

The functor computes the -distance from the end vertex of the particle and the related primary vertex. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "0<BPVVDZ" ;
>
>
MotherCut = "0<BPVVDZ" ;
  %ENDSYNTAX% The concept and the name come from Sean Brisbane.
Line: 134 to 131
 The functor computes the -distance(cylindrical) from the end vertex of the particle and the related primary vertex. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "0.1<BPVVDR" ;
>
>
MotherCut = "0.1<BPVVDR" ;
  %ENDSYNTAX% The concept and the name come from Sean Brisbane.
Line: 144 to 141
 The functor computes the -distance(cylindrical) from the end vertex of the particle and the related primary vertex. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "0.1<BPVVDRHO" ;
>
>
MotherCut = "0.1<BPVVDRHO" ;
  %ENDSYNTAX% The concept and the name come from Sean Brisbane.
Line: 191 to 188
 

MAXTREE: Maximum value in the decay tree

Returns the maximum value of some functor in the decay tree. Useful to apply cuts on all particles, or to extract some value from the tree. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "(M-MAXTREE('D0'==ABSID,M)<165.5)" ;
>
>
MotherCut = "(M-MAXTREE('D0'==ABSID,M)<165.5)" ;
 %ENDSYNTAX% This example looks for all in the decay, returns the largest mass (which is the mass of the as there's only one) and computes the mass difference with the mother.

MINTREE: Minimal value in the decay tree

Takes a functor as agrument and returns its minimal value searching through the decay tree. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER0.Code = "(MINTREE(ABSID=='K+',PT)>1400)" ;
>
>
FilterDesktop.Filter.Code = "(MINTREE(ABSID=='K+',PT)>1400*MeV)" ;
 %ENDSYNTAX% This would look for all particles kaons in the decay tree and find their and return the minimum. The cut then requires that all kaon descendents have a .
Line: 208 to 205
 The list of vertices is extracted from the desktop: %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "MINVDDV(PRIMARY)>1" ;
>
>
MotherCut = "MINVDDV(PRIMARY)>1" ;
  %ENDSYNTAX% Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.
Line: 219 to 216
 The list of vertices is extracted from the "source": %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "MINVDSOURCE( VSOURCEDV ( PRIMARY ) )>1" ;
>
>
MotherCut = "MINVDSOURCE( VSOURCEDV ( PRIMARY ) )>1" ;
  %ENDSYNTAX% Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.
Line: 229 to 226
 The list of vertices is extracted from the TES: %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "MINVDTES('SomeLocationInTES',PRIMARY)>1" ;
>
>
MotherCut = "MINVDTES('SomeLocationInTES',PRIMARY)>1" ;
  %ENDSYNTAX% Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.
Line: 237 to 234
 

MIPCHI2DV: Minimum IP-

Returns the minimum distance of a particles's trajectory to any set of vertices. Most useful in conjunction with the PRIMARY argument that looks at PVs. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER0.Code = "(MIPCHI2DV(PRIMARY)>9)" ;
>
>
FilterDesktop.Filter.Code = "(MIPCHI2DV(PRIMARY)>9)" ;
 %ENDSYNTAX% This requires that the particle is away from any PV.

MIPDV: Minimum IP

Returns the minimum distance of a particles's trajectory to any set of vertices. Most useful in conjunction with the PRIMARY argument that looks at PVs.%SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER0.Code = "(MIPDV(PRIMARY)>0.15)" ;
>
>
FilterDesktop.Filter.Code = "(MIPDV(PRIMARY)>0.15)" ;
 %ENDSYNTAX% This requires that the particle is 0.15 mm away from any PV.
Line: 253 to 250
 

MM: Measured Mass

Returns the measured mass of the particle. The function LHCb::Particle::measuredMass() is used for evaluation. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
HltSharedDiMuon.FILTER1.Code = "(MM<11000)"
>
>
CombinationCuts = "(AM<11*GeV)"
 %ENDSYNTAX% This selects dimuons up to a mass of 11 GeV.
Line: 276 to 273
 

NINTREE: Number of particles in tree

Returns the number of particles in a tree satisfying some selection criteria. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER0.Code = "( 2 == NINTREE( (ABSID=='e-') & (PT>1000)))" ;
>
>
FilterDesktop.Filter.Code = "( 2 == NINTREE( (ABSID=='e-') & (PT>1*GeV)))" ;
 %ENDSYNTAX% Requires that there are two electrons in the tree with .

P: Momentum

Gets the momentum of the particle. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
HltSharedKsLL.FILTER0.Code = "(P>2000)";
>
>
FilterDesktop.Filter.Code = "(P>2*GeV)";
 %ENDSYNTAX% Gets particles with .
Line: 291 to 288
 Gets the combined delta-log-likelihood for the given hypothesis (wrt the pion), : %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER0.Code = "(PIDe-PIDpi>6)" ;
>
>
FilterDesktop.Filter.Code = "(PIDe-PIDpi>6)" ;
  %ENDSYNTAX%

PT: Transverse momentum

Gets the transverse momentum of the particle. Note that this is evaluated at the first measurement of the particle, which might not be where you want it for pions in decays. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
HltSharedKsLL.FILTER0.Code = "(PT>1000)";
>
>
FilterDesktop.Filter.Code = "(PT>1*GeV)";
 %ENDSYNTAX% Gets particles with .

TRCHI2: the track fit

Gets the of the track fit. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER0.Code = "TRCHI2<1000" ;
>
>
FilterDesktop.Filter.Code = "TRCHI2<1*GeV" ;
 %ENDSYNTAX%

TRCHI2DOF: per degree of freedom of the track fit

Gets the per degree of freedom of the track fit. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER0.Code = "TRCHI2DOF<20" ;
>
>
FilterDesktop.Filter.Code = "TRCHI2DOF<20" ;
 %ENDSYNTAX%

TRPCHI2: -probability the track fit

Gets the -probability of the track fit. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER0.Code = "TRPCHI2>0.01" ;
>
>
FilterDesktop.Filter.Code = "TRPCHI2>0.01" ;
 %ENDSYNTAX%
Line: 328 to 325
 

VFASPF: Vertex Function as Particle Function.

Allows to apply vertex functors to the particle's endVertex(). %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "(VFASPF(VCHI2/VDOF)<10)" ;
>
>
MotherCut = "(VFASPF(VCHI2/VDOF)<10)" ;
 %ENDSYNTAX% Applies a cut to the vertex of the particle.
Added:
>
>

Particle Array Functors

Applied to a set of particles, typically the daughters

ADMASS: The absolute mass difference to the PDG reference value

Calculates the absolute difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.CombinationCut = "(ADAMASS('KS0')<50*MeV)"
<!-- end SyntaxHighlightingPlugin -->

AM: Mass of the combination

Returns .

APT: Sum transverse momentum of the array

Gets the transverse momentum of the array (that's the of the sum 4-vector, not the sum of the ). Note that this is evaluated at the first measurement of the particles, which might not be where you want it for pions in decays.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.CombinationCut = "(APT>1*GeV)";
<!-- end SyntaxHighlightingPlugin -->
Gets particles with .

AP: Sum momentum of the array

Gets the momentum of the array.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.CombinationCut = "(AP>1*GeV)";
<!-- end SyntaxHighlightingPlugin -->
Gets particles with .
 

Vertex functors

Vertex functors are accessed using VFASPF.

VCHI2 : Vertex

%SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "(VFASPF(VCHI2/VDOF)<10)" ;
>
>
MotherCut = "(VFASPF(VCHI2/VDOF)<10)" ;
 %ENDSYNTAX%

VDOF : Vertex fit number of degrees of freedom

%SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "(VFASPF(VCHI2/VDOF)<10)" ;
>
>
MotherCut = "(VFASPF(VCHI2/VDOF)<10)" ;
 %ENDSYNTAX%

VMINVDDV: minimum distance between the vertex and any other vertex

Line: 351 to 374
 The list of vertices is extracted from the desktop: %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "VFASFP(VMINVDDV(PRIMARY))>1" ;
>
>
MotherCut = "VFASFP(VMINVDDV(PRIMARY))>1" ;
  %ENDSYNTAX% Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.
Line: 362 to 385
 The list of vertices is extracted from the "source": %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "VFASPF( VMINVDSOURCE( VSOURCEDV ( PRIMARY ) ) ) >1" ;
>
>
MotherCut = "VFASPF( VMINVDSOURCE( VSOURCEDV ( PRIMARY ) ) ) >1" ;
  %ENDSYNTAX% Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.
Line: 372 to 395
 The list of vertices is extracted from the TES: %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "VFASPF( VMINVDTES ( 'SomeLocationInTES' , PRIMARY ) ) >1" ;
>
>
MotherCut = "VFASPF( VMINVDTES ( 'SomeLocationInTES' , PRIMARY ) ) >1" ;
  %ENDSYNTAX% Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.
Line: 383 to 406
 The GSL routine gsl_cdf_chisq_Q functon is used for evaluation. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "VFASPF(VPCHI2)>1*perCent" ;
>
>
MotherCut = "VFASPF(VPCHI2)>1*perCent" ;
  %ENDSYNTAX% The functor is available starting from Phys/LoKiPhys version >= v7r2
Line: 401 to 424
 

Syntax

Cut are combined using the bit-wide & and | operators, not boolean operators. This also requires that cuts are well protected using parentheses. Example: %SYNTAX{ syntax="cpp" }%
Changed:
<
<
HltSharedD02KsPiPi.FILTER0.Code = "( ((ABSID=='pi+') & (PT>400)) | ((ABSID=='KS0') & (PT>1000)))"
>
>
FilterDesktop.Filter.Code = "( ((ABSID=='pi+') & (PT>400*MeV)) | ((ABSID=='KS0') & (PT>1*GeV)))"
 %ENDSYNTAX% Cuts can be split over several lines.

Use of CombineParticles.

Changed:
<
<
CombineParticles is a DVAlgorithm that combines the input particles according to the decay descriptor. There are three cuts applied :
  1. FILTER0 : On the incoming daughter particles.
  2. FILTER1 : Once a combination has been made according to the decay descriptor but before the vertex fit.
  3. FILTER2 : After the vertex fit.
All the cuts that require the position of the vertex must be applied in FILTER2, while the others can be applied earlier (saving CPU). Note that for long lived particles like Ks it pays off to apply a loose mass cut in FILTER1 and a harder in FILTER2. The reason is that the vertex fit does a propagation of the momenta through the detector. You thus get the momentum at the Ks vertex, while in FILTER1 it's just the sum of the momenta of the daughters at their first measurement.
>
>
CombineParticles is a LoKI::Algo, and a DVAlgorithm that combines the input particles according to the decay descriptor. There are three cuts applied :
  1. DaughtersCuts : On the incoming daughter particles. It is a set of pairs "particle" : "cuts"
<!-- SyntaxHighlightingPlugin -->
HltSelB2DstarMu.DaughtersCuts = { "mu-" :  "(PT>400*MeV)", // PT of muon
                                  "D*(2010)+'" : "(MAXTREE('D0'==ABSID,BPVVDCHI2) >6.25 )"} ; // IP of D0 in D*
<!-- end SyntaxHighlightingPlugin -->
  1. CombinationCut : Once a combination has been made according to the decay descriptor but before the vertex fit. This cut is applied to the set of daughters. Therefore only Particle array functors can be used. They all start with an A=.
  2. MotherCut : Applied the vertex fit on the mother.
All the cuts that require the position of the vertex must be applied in MotherCut=, while the others can be applied earlier (saving CPU). Note that for long lived particles like Ks it pays off to apply a loose mass cut in CombinationCut and a harder in MotherCut=. The reason is that the vertex fit does a propagation of the momenta through the detector. You thus get the momentum at the Ks vertex, while in CombinationCut it's just the sum of the momenta of the daughters at their first measurement.
  A simple example: %SYNTAX{ syntax="cpp" }% HltShared.Members += { "CombineParticles/HltSharedPhi2KK" } ; InputLocations = { "Phys/HltNoPIDsKaons" }; DecayDescriptor = "phi(1020) -> K+ K-";
Changed:
<
<
HltSharedPhi2KK.FILTER0.Code = "(MIPCHI2DV(PRIMARY)>4)"; // (IP > 2 sigma)^2 HltSharedPhi2KK.FILTER1.Code = "(ADMASS('phi(1020)')<50)"; // mass window +/- 300 MeV HltSharedPhi2KK.FILTER2.Code = "(VFASPF(VCHI2/VDOF)<25)" ;
>
>
DaughtersCuts = { "K+" : "(MIPCHI2DV(PRIMARY)>4)" } ; // (IP > 2 sigma)^2 CombinationCut = "(ADAMASS('phi(1020)')<50)"; // mass window +/- 300 MeV MotherCut = "(VFASPF(VCHI2/VDOF)<25)" ; // chi2/ degrees of freedom < 25
 %ENDSYNTAX%

The decay descriptor can be overwritten by DecayDescriptors which allows to reconstruct several decays in one go.

Line: 428 to 455
 HltShared.Members += { "CombineParticles/HltSharedDstarWithD02KPi" } ; InputLocations = { "Phys/HltSharedD02KPi", "Phys/HltSharedSlowPions" }; DecayDescriptors = {"[D*(2010)+ -> pi+ D0]cc", "[D*(2010)+ -> pi+ D~0]cc" }; // also wrong-sign ones
Changed:
<
<
HltSharedDstarWithD02KPi.FILTER0.Code = "(ALL)"; // IP already applied in shared slow pion HltSharedDstarWithD02KPi.FILTER1.Code = "(ADMASS('D*(2010)+')<50) & (PT>1250)"; // mass window +/- 50 MeV, PT> 1.25 GeV HltSharedDstarWithD02KPi.FILTER2.Code = "(VFASPF(VCHI2/VDOF)<25) & (M-MAXTREE('D0'==ABSID,M)<165.5)" ; // Chi2 < 25 . D*-D0 = 145.5 MeV, +2
>
>
CombinationCut = "(ADAMASS('D*(2010)+')<50) & (APT>1250)"; // mass window +/- 50 MeV, PT> 1.25 GeV MotherCut = "(VFASPF(VCHI2/VDOF)<25) & (M-MAXTREE('D0'==ABSID,M)<165.5)" ; // Chi2 < 25 . D*-D0 = 145.5 MeV, +2
 %ENDSYNTAX%

Use of FilterDesktop.

Line: 442 to 468
 /** * Pt > 3 GeV & IP/err > 5 & IP > 0.15 mm */
Changed:
<
<
HltSelSingleMuon.Filter.Code = "((PT>3000) & (MIPCHI2DV(PRIMARY)>25) & (MIPDV(PRIMARY)>0.15))" ;
>
>
HltSelSingleMuon.Filter.Code = "((PT>3*GeV) & (MIPCHI2DV(PRIMARY)>25) & (MIPDV(PRIMARY)>0.15))" ;
 %ENDSYNTAX%
Changed:
<
<

Help

>
>

Help

 Please do not send mails directly to the authors, but send the questions and requests through the following mailing lists:

lhcb-davinci@cern.ch, lhcb-loki@cern.ch, lhcb-bender@cern.ch

In this case more colleagues can profit from solutions to the problems and it will allow a bit more wide distribution of useful information, tricks, recipes, experience and the solutions. Also it will simplify the monitoring of the progress with the implementation of the missing functionality.

Changed:
<
<

Examples

>
>

Examples

 Many working examples can be found in the Hlt/HltSelections package from version v6r0 released with DaVinci v19r11.
Changed:
<
<

Feature requests

>
>

Feature requests

 Feature requests should be sent to the same mailing lists as above. For every new feature a suggested name should be provided. This drastically simplifies the life of developers and results in a much higher priority.
Changed:
<
<

Change of names

>
>

Change of names

 Although it is very simple to define aliases for these functors (and many of them are actually available) their use is not encouraged. This is because we would like to define a minimum vocabulary everyone would have to be able to understand. Since this is rather new, suggestions for changes of names are accepted but should be agreed by the community. Please send requests to the mailing lists above. It is suggested to freeze this in the next version.

Suggestions for the names of the filters in CombineParticles are also welcome.

Line: 544 to 570
 

-- PatrickKoppenburg - 28 Mar 2008

Added:
>
>
-- PatrickKoppenburg - 25 Apr 2008

Revision 102008-04-10 - VanyaBelyaev

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 470 to 470
 

LoKi::Hybrid::PrintTool

The most primitive tool, it implements the abstract interface IPrintDecay, and it allows to print soem information about the decay tree.

Changed:
<
<
It is convinient to use the high-level algorithm XXX by [[Patrick Koppenburg][PatrickKoppenburg][ to drive this tool:
>
>
It is convinient to use the high-level algorithm PrintDecayTree to drive the tool:
  %SYNTAX{ syntax="cpp" }%

// append the algorithm to the list of top level algorithms:

Changed:
<
<
TopAlg += { "PrintDecay/Printer"} ;
>
>
TopAlg += { "PrintDecayTree/Printer"} ;
  // declare the actual type/name of the IPrintDecay tool:
Changed:
<
<
PrintDecayTreeTool = "LoKi::Hybrid::PrintTool/PRINT" ;
>
>
PrintDecayTool = "LoKi::Hybrid::PrintTool/PRINT" ;
 
Changed:
<
<
// declare the variables to be printed by the tool: Printer.PRINT.Variables = { "ID" , "P/GeV" , // each "variable" is a LoKi functor "PT/GeV" , "M/GeV" , "KEY" } ;
>
>
// declare the variables to be printed by the tool, each "variable" is just LoKi-functor: Printer.PRINT.Variables = { "ID" , "P/GeV" , "PT/GeV" , "M/GeV" , "KEY" } ;
  %ENDSYNTAX%
Changed:
<
<
With this configurarion one gets following printout:
>
>
With this configuration one obtains the following printout:

 
Printer.PRINT             INFO Print the decay tree:  ( B0 ->  mu+  mu-  K+  K-  )
 ---------------------------------------------------------------------------------------------------------
Line: 503 to 499
 
 
 
1 --> K- -321 20.261 0.63129 493.68 5
---------------------------------------------------------------------------------------------------------
Added:
>
>
For the default configuration, all columns are printed using 14.5g "scientific" format and the column title is constructed from the functor itself. However both the format and the table header could be modified, e.g. if one adds into the previous configuration the explicit specification of Format and Header: %SYNTAX{ syntax="cpp" }%
 
Added:
>
>
// Format: print only 5th (KEY) and 1st (ID) variable from the list of "Variables": Printer.PRINT.Format = "| %5% %|6t|| %1% %|14t||";
 
Changed:
<
<

LoKi::Hybrid::PrintTool

>
>
// specify explicitly the table header: column names Printer.PRINT.Header = "| Key | PdgID |";

%ENDSYNTAX% In this case the output table looks like:

Printer.PRINT                         INFO Print the decay tree:  ( B0 ->  mu+  mu-  K+  K-  )
 ---------------------------------------
 |#         Decay        | Key | PdgID |
 ---------------------------------------
 |0 |--> B0              | 5   | 511   |
 |1    |--> mu+          | 0   | -13   |
 |1    |--> mu-          | 1   | 13    |
 |1    |--> K+           | 2   | 321   |
 |1    |--> K-           | 5   | -321  |
 ---------------------------------------

LoKi::Hybrid::PlotTool

 

LoKi::Hybrid::TupleTool

Revision 92008-04-10 - VanyaBelyaev

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 302 to 302
 %ENDSYNTAX% Gets particles with .
Added:
>
>

TRCHI2: the track fit

Gets the of the track fit.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER0.Code = "TRCHI2<1000" ;
<!-- end SyntaxHighlightingPlugin -->
 

TRCHI2DOF: per degree of freedom of the track fit

Gets the per degree of freedom of the track fit. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER0.Code = "(TRCHI2DOF<20)" ;
>
>
CombineParticles.FILTER0.Code = "TRCHI2DOF<20" ;
 %ENDSYNTAX%
Added:
>
>

TRPCHI2: -probability the track fit

Gets the -probability of the track fit.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER0.Code = "TRPCHI2>0.01" ;
<!-- end SyntaxHighlightingPlugin -->
 

VDMIN: Distance of two vertices

TODO : Not yet supported.
Line: 449 to 463
  Suggestions for the names of the filters in CombineParticles are also welcome.
Added:
>
>

Few related tools/algorithms.

A few simple tools can be used for debugging and/or validation/testing the various LoKi::Hybrid construction.

LoKi::Hybrid::PrintTool

The most primitive tool, it implements the abstract interface IPrintDecay, and it allows to print soem information about the decay tree. It is convinient to use the high-level algorithm XXX by [[Patrick Koppenburg][PatrickKoppenburg][ to drive this tool:

<!-- SyntaxHighlightingPlugin -->
// append the algorithm to the list of top level algorithms:
ApplicationMgr.TopAlg += { "PrintDecay/Printer"} ;

// declare the actual type/name of the IPrintDecay tool:
Printer.PrintDecayTreeTool = "LoKi::Hybrid::PrintTool/PRINT" ;

// declare the variables to be printed by the tool:
Printer.PRINT.Variables = { 
  "ID"         ,
  "P/GeV"    ,  // each "variable" is a LoKi functor
  "PT/GeV"  ,
  "M/GeV"   , 
  "KEY"      
} ;
<!-- end SyntaxHighlightingPlugin -->
With this configurarion one gets following printout:
Printer.PRINT             INFO Print the decay tree:  ( B0 ->  mu+  mu-  K+  K-  )
 ---------------------------------------------------------------------------------------------------------
 |#         Decay        |       ID      |    (P/1000)   |   (PT/1000)   |       M       |      KEY      |
 ---------------------------------------------------------------------------------------------------------
 |0 |--> B0              |      511      |     262.81    |     6.1192    |     5099.1    |       5       |
 |1    |--> mu+          |      -13      |     56.877    |     1.6668    |     105.66    |       0       |
 |1    |--> mu-          |       13      |     128.8     |     3.7141    |     105.66    |       1       |
 |1    |--> K+           |      321      |     56.877    |     1.6668    |     493.68    |       2       |
 |1    |--> K-           |      -321     |     20.261    |    0.63129    |     493.68    |       5       |
 ---------------------------------------------------------------------------------------------------------

LoKi::Hybrid::PrintTool

LoKi::Hybrid::TupleTool

 

More documentation

For more information please refer to

Revision 82008-03-29 - VanyaBelyaev

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 8 to 8
 

Particle Functors

Added:
>
>
Some mnemonic rules:
  • The functors with the prefix BPV deal with "the best primary vertex". The best primary vertex is extracted from the desktop-tool using the method IPhysDesktop::relatedVertex;
  • The functors with the suffix DV get some even-data (e.g. the list of all vertices) through desktop tool
  • The functors with the suffix TES get the event data from the Transient Event Store
  • The VD as a part of the functor name means that the functor deals with "vertex distance"
  • The VDCHI2 as a part of the functor name means that the functor deals with "vertex -distance"
  • The SIGN as a part of the functor name means that functor return the value of or distance artificially signed according to some criteria.
  • The IP stands for "impact parameter" and MIP means "the minimal (with reswpect to some set of vertices) value of impact parameter"
  • Practically all "vertex functors" ( the functors which accept const LHCb::VertexBase* as arguments) have their names starting from V, the most evident exception if the functor PRIMARY
  • All indices, e.g. for CHILDCUT or CHILDFUN functors, starts from 1. 0 always means the particle itself.

 

ALL: All

Takes all particles. This is required if one wants to apply no cut. %SYNTAX{ syntax="cpp" }%
Line: 48 to 61
 %ENDSYNTAX% TODO : So far it needs the ().
Added:
>
>

BPVLTFITCHI2: the of the proper lifetime fit.

The functor evaluates the of the proper lifetime fit of the particle using ILifetimeFitter tool. This is probably the best measure of the consistency of the hypothesis that the particle originates from the given primary vertex. It is also probably the best "pointing" variable.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "BPVLTFITCHI2('ProperTimeFitter/properTime:PUBLIC')<16" ;
<!-- end SyntaxHighlightingPlugin -->
The related primary vertex is extracted from the desktop, the fitter itself is extracted using DVAlgorithm::lifetimeFitter("nick-name"). Please note that it is completely different functor from BPVLTCHI2!

BPVLTIME: the proper lifetime of the particle

The functor evaluates the proper lifetime of the particle using ILifetimeFitter tool. Unfortunately due to very sad conventions adopted for LHCb, the proper time is measured in ns instead of the natural units: .
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "BPVLTIME('ProperTimeFitter/properTime:PUBLIC')>1.5" ;
<!-- end SyntaxHighlightingPlugin -->
The related primary vertex is extracted from the desktop, the fitter itself is extracted using DVAlgorithm::lifetimeFitter("nick-name").

BPVLTCHI2: the -significance of the proper lifetime of the particle

The functor evaluates the -significance of the proper lifetime of the particle using ILifetimeFitter tool.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "BPVLTCHI2('ProperTimeFitter/properTime:PUBLIC')>9" ;
<!-- end SyntaxHighlightingPlugin -->
The related primary vertex is extracted from the desktop, the fitter itself is extracted using DVAlgorithm::lifetimeFitter("nick-name"). Please note that it is completely different functor from BPVLTFITCHI2!

BPVLTSIGNCHI2: the signed -significance of the proper lifetime of the particle

The functor evaluates the signed -significance of the proper lifetime of the particle using ILifetimeFitter tool.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "BPVLTSIGNCHI2('ProperTimeFitter/properTime:PUBLIC')>-4" ;
<!-- end SyntaxHighlightingPlugin -->
The related primary vertex is extracted from the desktop, the fitter itself is extracted using DVAlgorithm::lifetimeFitter("nick-name").

 

BPVVDCHI2: -separation from related PV

Computes the -distance from the related PV. %SYNTAX{ syntax="cpp" }%
Line: 221 to 287
 %ENDSYNTAX% Gets particles with .
Changed:
<
<

PIDe, PIDmu, PIDK, PIDp, PIDpi : PID DLL

Gets the combined delta-log-likelihood for the given hypothesis (wrt the pion)
>
>

PIDe, PIDmu, PIDK, PIDp, PIDpi : PID

Gets the combined delta-log-likelihood for the given hypothesis (wrt the pion), :
 %SYNTAX{ syntax="cpp" }%
Added:
>
>
 CombineParticles.FILTER0.Code = "(PIDe-PIDpi>6)" ;
Added:
>
>
 %ENDSYNTAX%

PT: Transverse momentum

Revision 72008-03-29 - VanyaBelyaev

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

Recommended LoKi::Hybrid Functors

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 11 to 11
 

ALL: All

Takes all particles. This is required if one wants to apply no cut. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER0.Code = "(ALL)" ;
>
>
CombineParticles.FILTER0.Code = "ALL" ;
 %ENDSYNTAX%

ABSID: Absolute value of PID.

Returns the absolute value of the PID. The following lines are equivalent: %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER0.Code = "(ABSID==211) " ; CombineParticles.FILTER0.Code = "(ABSID=='pi+') " ; CombineParticles.FILTER0.Code = "(ABSID=='pi-') " ;
>
>
CombineParticles.FILTER0.Code = "ABSID==211" ; CombineParticles.FILTER0.Code = "ABSID=='pi+' " ; CombineParticles.FILTER0.Code = "ABSID=='pi-' " ;
 %ENDSYNTAX% Note the last line! The comparison (ABSID=='pi-') takes the absolute value on both sides. This avoid having to remember that the has a positive pid (211) while the has a negative pid (-13).
Line: 28 to 28
 

ADMASS: The absolute mass difference to the reference value

Calculates the absolute difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
HltSharedKsLL.FILTER1.Code = "(ADMASS('KS0')<50)"
>
>
HltSharedKsLL.FILTER1.Code = "ADMASS('KS0')<50"
 %ENDSYNTAX%

The mass difference can also be used without the absolute value. See DMASS.

Line: 51 to 51
 

BPVVDCHI2: -separation from related PV

Computes the -distance from the related PV. %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "(BPVVDCHI2>100)" ;
>
>
CombineParticles.FILTER2.Code = "BPVVDCHI2>100" ;
 %ENDSYNTAX%
Added:
>
>

BPVVDZ: -distance from the end vertex of the particle and the related primary vertex.

The functor computes the -distance from the end vertex of the particle and the related primary vertex.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "0<BPVVDZ" ;
<!-- end SyntaxHighlightingPlugin -->
The concept and the name come from Sean Brisbane. The functor is available starting from Phys/LoKiPhys version >= v7r2.

BPVVDR: -distance from the end vertex of the particle and the related primary vertex.

The functor computes the -distance(cylindrical) from the end vertex of the particle and the related primary vertex.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "0.1<BPVVDR" ;
<!-- end SyntaxHighlightingPlugin -->
The concept and the name come from Sean Brisbane. The functor is available starting from Phys/LoKiPhys version >= v7r2.

BPVVDRHO: -distance from the end vertex of the particle and the related primary vertex.

The functor computes the -distance(cylindrical) from the end vertex of the particle and the related primary vertex.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "0.1<BPVVDRHO" ;
<!-- end SyntaxHighlightingPlugin -->
The concept and the name come from Sean Brisbane. The functor is available starting from Phys/LoKiPhys version >= v7r2.
 

CHILDCUT: Applies a cut to a given child

%SYNTAX{ syntax="cpp" }%
Changed:
<
<
FilterDesktop.Filter.Code = "(CHILDCUT ( MIPCHI2DV(PRIMARY)>1 , 2 ))" ;
>
>
FilterDesktop.Filter.Code = "CHILDCUT ( MIPCHI2DV ( PRIMARY ) > 1 , 2 )" ;
 %ENDSYNTAX% In this example one applies an IP cut on the first daughter of the input particle. This requires to know which is the first, second, etc daughter. Can be useful when (N)INTREE won't work. Like here for the slow pion in a where searching for a pion in the tree would also return the daughters of the . Use the safer INTREE and NINTREE instead.
Line: 68 to 99
 

ID: Particle ID

Like ABSID but without the absolute value.
Added:
>
>

INGENERATION: "in generation"

The predicate which checks the existence of the particle satisfying the requirements in the decay tree at the given depth
<!-- SyntaxHighlightingPlugin -->
FilterDesktop.Filter.Code = "INGENERATION ( ( 'mu+'==ABSID)  & ( PT > 2 * GeV ) , 2 ) " ;
<!-- end SyntaxHighlightingPlugin -->
Requires the presence of at least one granddaughter , which the transverse momentum . The generations are defined as: 0 - the particle itself, 1 - the direct children, 2 - grandchildren , etc. The concept and the name come from Patrick Koppenburg. The functor is available starting from Phys/LoKiPhys version >= v7r2.

 

INTREE: In tree

Requires there is a particle in the decay tree satisfying the requirements. %SYNTAX{ syntax="cpp" }%
Line: 89 to 136
 %ENDSYNTAX% This would look for all particles kaons in the decay tree and find their and return the minimum. The cut then requires that all kaon descendents have a .
Added:
>
>

MINVDDV: minimum distance between the particle's end-vertex and any other vertex

The functor evaluates the minimal 3D-distance between the particle's end-vertex and the vertices form "list". The list of vertices is extracted from the desktop:
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "MINVDDV(PRIMARY)>1" ;
<!-- end SyntaxHighlightingPlugin -->
Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.

MINVDSOURCE: minimum distance between the particle's end-vertex and any other vertex

The functor evaluates the minimal 3D-distance between the particle's end-vertex and the vertices form "list". The list of vertices is extracted from the "source":
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "MINVDSOURCE( VSOURCEDV ( PRIMARY ) )>1" ;
<!-- end SyntaxHighlightingPlugin -->
Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.

MINVDTES: minimum distance between the particle's end-vertex and any other vertex

The functor evaluates the minimal 3D-distance between the particle's end-vertex and the vertices form "list". The list of vertices is extracted from the TES:
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "MINVDTES('SomeLocationInTES',PRIMARY)>1" ;
<!-- end SyntaxHighlightingPlugin -->
Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.
 

MIPCHI2DV: Minimum IP-

Returns the minimum distance of a particles's trajectory to any set of vertices. Most useful in conjunction with the PRIMARY argument that looks at PVs. %SYNTAX{ syntax="cpp" }%
Line: 112 to 191
 %ENDSYNTAX% This selects dimuons up to a mass of 11 GeV.
Added:
>
>

NINGENERATION: "Number of particles in generation"

The function which counts the particles satisfying the requirements in the decay tree at the given depth:
<!-- SyntaxHighlightingPlugin -->
FilterDesktop.Filter.Code = " 2 == NINGENERATION ( ( 'mu+'==ABSID)  & ( PT > 2 * GeV ) , 2 ) " ;
<!-- end SyntaxHighlightingPlugin -->
Requires the presence of exactly two granddaughter with the transverse momentum . The generations are defined as: 0 - the particle itself, 1 - the direct children, 2 - grandchildren , etc. The concept and the name come from Patrick Koppenburg. The functor is available starting from Phys/LoKiPhys version >= v7r2.
 

NINTREE: Number of particles in tree

Returns the number of particles in a tree satisfying some selection criteria. %SYNTAX{ syntax="cpp" }%
Line: 139 to 234
 %ENDSYNTAX% Gets particles with .
Changed:
<
<

TRCHI2DOF: per DoF of the track fit

>
>

TRCHI2DOF: per degree of freedom of the track fit

 Gets the per degree of freedom of the track fit. %SYNTAX{ syntax="cpp" }% CombineParticles.FILTER0.Code = "(TRCHI2DOF<20)" ;
Line: 169 to 264
 CombineParticles.FILTER2.Code = "(VFASPF(VCHI2/VDOF)<10)" ; %ENDSYNTAX%
Added:
>
>

VMINVDDV: minimum distance between the vertex and any other vertex

The functor evaluates the minimal 3D-distance between the vertex and the vertices from "list". The list of vertices is extracted from the desktop:
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "VFASFP(VMINVDDV(PRIMARY))>1" ;
<!-- end SyntaxHighlightingPlugin -->
Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.

VMINVDSOURCE: minimum distance between the vertex and any other vertex

The functor evaluates the minimal 3D-distance between the vertex and the vertices form "list". The list of vertices is extracted from the "source":
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "VFASPF( VMINVDSOURCE( VSOURCEDV ( PRIMARY ) ) ) >1" ;
<!-- end SyntaxHighlightingPlugin -->
Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.

VMINVDTES: minimum distance between the vertex and any other vertex

The functor evaluates the minimal 3D-distance between the vertex and the vertices form "list". The list of vertices is extracted from the TES:
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "VFASPF( VMINVDTES ( 'SomeLocationInTES' , PRIMARY ) ) >1" ;
<!-- end SyntaxHighlightingPlugin -->
Requires that the particle's end-vertex has at least one millimeter separation with respect to any primary vertex.

VPCHI2: -probability

The functor evaluates the -probability of the vertex, taking into account the number of degrees of freedom. The GSL routine gsl_cdf_chisq_Q functon is used for evaluation.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "VFASPF(VPCHI2)>1*perCent" ;
<!-- end SyntaxHighlightingPlugin -->
The functor is available starting from Phys/LoKiPhys version >= v7r2
 

Units

Presently units are not supported easily. This will change in the next release. To avoid confusion between M (mass) and m (meter) for instance a limited set will be defined. Vanya suggests:
Line: 176 to 314
 
  • mm, millimeter, cm , centimeter, meter
  • perCent
  • ns, fs, nanosecond, femtosecond, ps, picoseconds
Added:
>
>
These units are available starting from Phys/LoKiPhys version >= v7r2
 

Syntax

Cut are combined using the bit-wide & and | operators, not boolean operators. This also requires that cuts are well protected using parentheses. Example:

Revision 62008-03-28 - unknown

Line: 1 to 1
 
META TOPICPARENT name="DaVinci"
Changed:
<
<

Recommended LoKi::Hybrid Filters

>
>

Recommended LoKi::Hybrid Functors

 This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.

This page refers to DaVinci v19r11.

Revision 52008-03-28 - unknown

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

Recommended LoKi::Hybrid Filters

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 60 to 60
 %ENDSYNTAX% In this example one applies an IP cut on the first daughter of the input particle. This requires to know which is the first, second, etc daughter. Can be useful when (N)INTREE won't work. Like here for the slow pion in a where searching for a pion in the tree would also return the daughters of the . Use the safer INTREE and NINTREE instead.
Changed:
<
<
TODO : Is there a way of applying a cut to the daughters only, without navigating the whole tree?
>
>
TODO : Is there a way of applying a cut to the daughters only, without navigating the whole tree? From next version NINGENERATION and INGENERATION will do this.
 

DMASS: The mass difference to the reference value

Calculates the difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument. In most reasonable cases one will use the absolute mass difference (see DMASS) or the mass itself (see MM).
Line: 169 to 169
 CombineParticles.FILTER2.Code = "(VFASPF(VCHI2/VDOF)<10)" ; %ENDSYNTAX%
Added:
>
>

Units

Presently units are not supported easily. This will change in the next release. To avoid confusion between M (mass) and m (meter) for instance a limited set will be defined. Vanya suggests:

  • MeV, GeV
  • mm, millimeter, cm , centimeter, meter
  • perCent
  • ns, fs, nanosecond, femtosecond, ps, picoseconds
 

Syntax

Cut are combined using the bit-wide & and | operators, not boolean operators. This also requires that cuts are well protected using parentheses. Example: %SYNTAX{ syntax="cpp" }%
Line: 226 to 234
 

Examples

Many working examples can be found in the Hlt/HltSelections package from version v6r0 released with DaVinci v19r11.
Added:
>
>

Feature requests

Feature requests should be sent to the same mailing lists as above. For every new feature a suggested name should be provided. This drastically simplifies the life of developers and results in a much higher priority.

Change of names

Although it is very simple to define aliases for these functors (and many of them are actually available) their use is not encouraged. This is because we would like to define a minimum vocabulary everyone would have to be able to understand. Since this is rather new, suggestions for changes of names are accepted but should be agreed by the community. Please send requests to the mailing lists above. It is suggested to freeze this in the next version.

Suggestions for the names of the filters in CombineParticles are also welcome.

More documentation

For more information please refer to

  -- PatrickKoppenburg - 28 Mar 2008 \ No newline at end of file

Revision 42008-03-28 - VanyaBelyaev

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

Recommended LoKi::Hybrid Filters

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
Line: 87 to 87
 
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER0.Code = "(MINTREE(ABSID=='K+',PT)>1400)" ;
<!-- end SyntaxHighlightingPlugin -->
Changed:
<
<
This would look for all particles kaons in the decay tree and find their and return the minimum. The cut then requires that all kaon descendents ahve a .
>
>
This would look for all particles kaons in the decay tree and find their and return the minimum. The cut then requires that all kaon descendents have a .
 

MIPCHI2DV: Minimum IP-

Changed:
<
<
Returns the minimum distance of a particles's trajectory to any set of vertices. Most useful in conjunction with the PRIMARY argument that looks at PVs.
>
>
Returns the minimum distance of a particles's trajectory to any set of vertices. Most useful in conjunction with the PRIMARY argument that looks at PVs.
 
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER0.Code = "(MIPCHI2DV(PRIMARY)>9)" ;
<!-- end SyntaxHighlightingPlugin -->
Line: 103 to 103
 This requires that the particle is 0.15 mm away from any PV.

M: Mass

Changed:
<
<
Returns . Should be the same as MM.
>
>
Returns . Uses the function LHCb::Particle::momentum().M(). For many cases it should be practically the same as MM.
 

MM: Measured Mass

Changed:
<
<
Returns the measured mass of the particle.
>
>
Returns the measured mass of the particle. The function LHCb::Particle::measuredMass() is used for evaluation.
 
<!-- SyntaxHighlightingPlugin -->
HltSharedDiMuon.FILTER1.Code = "(MM<11000)"
<!-- end SyntaxHighlightingPlugin -->

Revision 32008-03-28 - unknown

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

Recommended LoKi::Hybrid Filters

Added:
>
>
This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
 
Changed:
<
<
>
>
This page refers to DaVinci v19r11.
 
Changed:
<
<

Introduction

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
>
>
 

Particle Functors

ALL: All

Line: 46 to 46
 
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "BPVIPCHI2()<25" ;
<!-- end SyntaxHighlightingPlugin -->
Changed:
<
<
So far it needs the ().
>
>
TODO : So far it needs the ().
 

BPVVDCHI2: -separation from related PV

Computes the -distance from the related PV.
Line: 54 to 54
 CombineParticles.FILTER2.Code = "(BPVVDCHI2>100)" ; %ENDSYNTAX%
Added:
>
>

CHILDCUT: Applies a cut to a given child

<!-- SyntaxHighlightingPlugin -->
FilterDesktop.Filter.Code = "(CHILDCUT ( MIPCHI2DV(PRIMARY)>1 , 2 ))" ;
<!-- end SyntaxHighlightingPlugin -->
In this example one applies an IP cut on the first daughter of the input particle. This requires to know which is the first, second, etc daughter. Can be useful when (N)INTREE won't work. Like here for the slow pion in a where searching for a pion in the tree would also return the daughters of the . Use the safer INTREE and NINTREE instead.

TODO : Is there a way of applying a cut to the daughters only, without navigating the whole tree?

 

DMASS: The mass difference to the reference value

Calculates the difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument. In most reasonable cases one will use the absolute mass difference (see DMASS) or the mass itself (see MM).
Changed:
<
<

ID:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->
>
>

ID: Particle ID

Like ABSID but without the absolute value.
 

INTREE: In tree

Requires there is a particle in the decay tree satisfying the requirements.
<!-- SyntaxHighlightingPlugin -->
FilterDesktop.Filter.Code = "(INTREE( (ID=='J/psi(1S)') & (BPVVDCHI2>25) ) )" ;
<!-- end SyntaxHighlightingPlugin -->
Changed:
<
<
Requires there is a in the tree more than 5\sigma away from the best vertex.
>
>
Requires there is a in the tree more than away from the best vertex.
 
Changed:
<
<

MAXTREE:

>
>

MAXTREE: Maximum value in the decay tree

Returns the maximum value of some functor in the decay tree. Useful to apply cuts on all particles, or to extract some value from the tree.
 %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "" ;
>
>
CombineParticles.FILTER2.Code = "(M-MAXTREE('D0'==ABSID,M)<165.5)" ;
 %ENDSYNTAX%
Added:
>
>
This example looks for all in the decay, returns the largest mass (which is the mass of the as there's only one) and computes the mass difference with the mother.
 

MINTREE: Minimal value in the decay tree

Takes a functor as agrument and returns its minimal value searching through the decay tree.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER0.Code = "(MINTREE(ABSID=='K+',PT)>1400)" ;
<!-- end SyntaxHighlightingPlugin -->
Changed:
<
<
This would look for all particles kaons in the decay tree and find their and return the minimum. The cut then requires that all kaon descendents ahve a .
>
>
This would look for all particles kaons in the decay tree and find their and return the minimum. The cut then requires that all kaon descendents ahve a .
 
Changed:
<
<

MIPCHI2DV:

>
>

MIPCHI2DV: Minimum IP-

Returns the minimum distance of a particles's trajectory to any set of vertices. Most useful in conjunction with the PRIMARY argument that looks at PVs.
 %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "" ;
>
>
CombineParticles.FILTER0.Code = "(MIPCHI2DV(PRIMARY)>9)" ;
 %ENDSYNTAX%
Added:
>
>
This requires that the particle is away from any PV.
 
Changed:
<
<

MIPDV:

%SYNTAX{ syntax="cpp" }% CombineParticles.FILTER2.Code = "" ;
>
>

MIPDV: Minimum IP

Returns the minimum distance of a particles's trajectory to any set of vertices. Most useful in conjunction with the PRIMARY argument that looks at PVs.%SYNTAX{ syntax="cpp" }% CombineParticles.FILTER0.Code = "(MIPDV(PRIMARY)>0.15)" ;
 %ENDSYNTAX%
Added:
>
>
This requires that the particle is 0.15 mm away from any PV.
 
Changed:
<
<

M:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->
>
>

M: Mass

Returns . Should be the same as MM.
 
Changed:
<
<

MM:

>
>

MM: Measured Mass

Returns the measured mass of the particle.
 %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "" ;
>
>
HltSharedDiMuon.FILTER1.Code = "(MM<11000)"
 %ENDSYNTAX%
Added:
>
>
This selects dimuons up to a mass of 11 GeV.
 

NINTREE: Number of particles in tree

Returns the number of particles in a tree satisfying some selection criteria.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER0.Code = "( 2 == NINTREE( (ABSID=='e-') & (PT>1000)))" ;
<!-- end SyntaxHighlightingPlugin -->
Changed:
<
<
Requires that there are two electrons in the tree with .
>
>
Requires that there are two electrons in the tree with .
 
Changed:
<
<

P:

>
>

P: Momentum

Gets the momentum of the particle.
 %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "" ;
>
>
HltSharedKsLL.FILTER0.Code = "(P>2000)";
 %ENDSYNTAX%
Added:
>
>
Gets particles with .
 
Changed:
<
<

PIDe, ==, :

>
>

PIDe, PIDmu, PIDK, PIDp, PIDpi : PID DLL

Gets the combined delta-log-likelihood for the given hypothesis (wrt the pion)
 %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "" ;
>
>
CombineParticles.FILTER0.Code = "(PIDe-PIDpi>6)" ;
 %ENDSYNTAX%
Changed:
<
<

PT:

>
>

PT: Transverse momentum

Gets the transverse momentum of the particle. Note that this is evaluated at the first measurement of the particle, which might not be where you want it for pions in decays.
 %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "" ;
>
>
HltSharedKsLL.FILTER0.Code = "(PT>1000)";
 %ENDSYNTAX%
Added:
>
>
Gets particles with .
 
Changed:
<
<

TRCHI2DOF:

>
>

TRCHI2DOF: per DoF of the track fit

Gets the per degree of freedom of the track fit.
 %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "" ;
>
>
CombineParticles.FILTER0.Code = "(TRCHI2DOF<20)" ;
 %ENDSYNTAX%
Changed:
<
<

VDMIN:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->
>
>

VDMIN: Distance of two vertices

TODO : Not yet supported.
 

VFASPF: Vertex Function as Particle Function.

Allows to apply vertex functors to the particle's endVertex().
Line: 143 to 159
 

Vertex functors

Vertex functors are accessed using VFASPF.
Changed:
<
<

VCHI2

>
>

VCHI2 : Vertex

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "(VFASPF(VCHI2/VDOF)<10)" ;
<!-- end SyntaxHighlightingPlugin -->

VDOF : Vertex fit number of degrees of freedom

 %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "" ;
>
>
CombineParticles.FILTER2.Code = "(VFASPF(VCHI2/VDOF)<10)" ;
 %ENDSYNTAX%
Changed:
<
<

VDOF

>
>

Syntax

Cut are combined using the bit-wide & and | operators, not boolean operators. This also requires that cuts are well protected using parentheses. Example:
 %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "" ;
>
>
HltSharedD02KsPiPi.FILTER0.Code = "( ((ABSID=='pi+') & (PT>400)) | ((ABSID=='KS0') & (PT>1000)))"
 %ENDSYNTAX%
Added:
>
>
Cuts can be split over several lines.

Use of CombineParticles.

CombineParticles is a DVAlgorithm that combines the input particles according to the decay descriptor. There are three cuts applied :
  1. FILTER0 : On the incoming daughter particles.
  2. FILTER1 : Once a combination has been made according to the decay descriptor but before the vertex fit.
  3. FILTER2 : After the vertex fit.
All the cuts that require the position of the vertex must be applied in FILTER2, while the others can be applied earlier (saving CPU). Note that for long lived particles like Ks it pays off to apply a loose mass cut in FILTER1 and a harder in FILTER2. The reason is that the vertex fit does a propagation of the momenta through the detector. You thus get the momentum at the Ks vertex, while in FILTER1 it's just the sum of the momenta of the daughters at their first measurement.

A simple example:

<!-- SyntaxHighlightingPlugin -->
HltShared.Members += { "CombineParticles/HltSharedPhi2KK" } ;
HltSharedPhi2KK.PhysDesktop.InputLocations = { "Phys/HltNoPIDsKaons" };
HltSharedPhi2KK.DecayDescriptor = "phi(1020) -> K+ K-";
HltSharedPhi2KK.FILTER0.Code = "(MIPCHI2DV(PRIMARY)>4)";    // (IP > 2 sigma)^2
HltSharedPhi2KK.FILTER1.Code = "(ADMASS('phi(1020)')<50)";  // mass window +/- 300 MeV
HltSharedPhi2KK.FILTER2.Code = "(VFASPF(VCHI2/VDOF)<25)" ;       
<!-- end SyntaxHighlightingPlugin -->

The decay descriptor can be overwritten by DecayDescriptors which allows to reconstruct several decays in one go.

<!-- SyntaxHighlightingPlugin -->
HltShared.Members += { "CombineParticles/HltSharedDstarWithD02KPi" } ;
HltSharedDstarWithD02KPi.PhysDesktop.InputLocations = { "Phys/HltSharedD02KPi", "Phys/HltSharedSlowPions" };
HltSharedDstarWithD02KPi.DecayDescriptors = {"[D*(2010)+ -> pi+ D0]cc", "[D*(2010)+ -> pi+ D~0]cc" }; // also wrong-sign ones
HltSharedDstarWithD02KPi.FILTER0.Code = "(ALL)";    // IP already applied in shared slow pion
HltSharedDstarWithD02KPi.FILTER1.Code = "(ADMASS('D*(2010)+')<50) & (PT>1250)";  // mass window +/- 50 MeV, PT> 1.25 GeV
HltSharedDstarWithD02KPi.FILTER2.Code = "(VFASPF(VCHI2/VDOF)<25) & (M-MAXTREE('D0'==ABSID,M)<165.5)" ;       // Chi2 < 25 . D*-D0 = 145.5 MeV, +2
<!-- end SyntaxHighlightingPlugin -->

Use of FilterDesktop.

FilterDesktop is a DVAlgorithm that applies a cut and clones the selected particles. It has one filter (Filter) but the default is not the LoKi::Hybrid::FilterCriterion which needs to be set by hand using the FilterCriterion property.
<!-- SyntaxHighlightingPlugin -->
HltExclusive.Members += { "FilterDesktop/HltSelSingleMuon" } ;
HltSelSingleMuon.PhysDesktop.InputLocations  = {"Phys/HltMuons"} ;
HltSelSingleMuon.FilterCriterion = "LoKi::Hybrid::FilterCriterion" ;
/**
 * Pt > 3 GeV & IP/err > 5 & IP > 0.15 mm 
 */
HltSelSingleMuon.Filter.Code = "((PT>3000) & (MIPCHI2DV(PRIMARY)>25) & (MIPDV(PRIMARY)>0.15))" ; 
<!-- end SyntaxHighlightingPlugin -->

Help

Please do not send mails directly to the authors, but send the questions and requests through the following mailing lists:

lhcb-davinci@cern.ch, lhcb-loki@cern.ch, lhcb-bender@cern.ch

In this case more colleagues can profit from solutions to the problems and it will allow a bit more wide distribution of useful information, tricks, recipes, experience and the solutions. Also it will simplify the monitoring of the progress with the implementation of the missing functionality.

 
Changed:
<
<
--+ Syntax
>
>

Examples

Many working examples can be found in the Hlt/HltSelections package from version v6r0 released with DaVinci v19r11.
 
Changed:
<
<
-- PatrickKoppenburg - 27 Mar 2008
>
>
-- PatrickKoppenburg - 28 Mar 2008

Revision 22008-03-28 - unknown

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

Recommended LoKi::Hybrid Filters

Introduction

Changed:
<
<
This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hnads-on tutorial. A longer, but not necessaraly up-to-date list can be found at LoKiParticleFunctions.
>
>
This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hands-on tutorial. A longer, but not necessarily up-to-date, list can be found at LoKiParticleFunctions. It also contains examples on how to use these functors in C++ code.
 

Particle Functors

ALL: All

Line: 13 to 13
 
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER0.Code = "(ALL)" ;
<!-- end SyntaxHighlightingPlugin -->
Changed:
<
<

ABSID:

>
>

ABSID: Absolute value of PID.

Returns the absolute value of the PID. The following lines are equivalent:
 %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "" ;
>
>
CombineParticles.FILTER0.Code = "(ABSID==211) " ; CombineParticles.FILTER0.Code = "(ABSID=='pi+') " ; CombineParticles.FILTER0.Code = "(ABSID=='pi-') " ;
 %ENDSYNTAX%
Changed:
<
<

ADMASS:

>
>
Note the last line! The comparison (ABSID=='pi-') takes the absolute value on both sides. This avoid having to remember that the has a positive pid (211) while the has a negative pid (-13).

The pid can also be used without the absolute value. See ID.

ADMASS: The absolute mass difference to the reference value

Calculates the absolute difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument.
 %SYNTAX{ syntax="cpp" }%
Changed:
<
<
CombineParticles.FILTER2.Code = "" ;
>
>
HltSharedKsLL.FILTER1.Code = "(ADMASS('KS0')<50)"
 %ENDSYNTAX%
Added:
>
>
The mass difference can also be used without the absolute value. See DMASS.

TODO : A version without argument will be provided where the ID of the particle is used to get the reference mass.

 

BPVDIRA: Direction angle

Computes the cosine of the angle between the momentum of the particle and the direction fo flight from the best PV to the decay vertex. %SYNTAX{ syntax="cpp" }%
Line: 37 to 53
 
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "(BPVVDCHI2>100)" ;
<!-- end SyntaxHighlightingPlugin -->
Changed:
<
<

CHILDCUT:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->
>
>

DMASS: The mass difference to the reference value

Calculates the difference between the measured mass and the PDG reference value. It takes the pid of the reference particle as argument. In most reasonable cases one will use the absolute mass difference (see DMASS) or the mass itself (see MM).
 

ID:

%SYNTAX{ syntax="cpp" }% CombineParticles.FILTER2.Code = "" ;
Line: 82 to 106
 
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER0.Code = "( 2 == NINTREE( (ABSID=='e-') & (PT>1000)))" ;
<!-- end SyntaxHighlightingPlugin -->
Changed:
<
<
Reuqires that there are two electrons in the tree with .
>
>
Requires that there are two electrons in the tree with .
 

P:

%SYNTAX{ syntax="cpp" }% CombineParticles.FILTER2.Code = "" ;
Line: 121 to 153
 CombineParticles.FILTER2.Code = "" ; %ENDSYNTAX%
Added:
>
>
--+ Syntax
 -- PatrickKoppenburg - 27 Mar 2008

Revision 12008-03-27 - unknown

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

Recommended LoKi::Hybrid Filters

Introduction

This lists the filters recommended for use in the HLT and the selections. See DaVinciTutorial4 for a hnads-on tutorial. A longer, but not necessaraly up-to-date list can be found at LoKiParticleFunctions.

Particle Functors

ALL: All

Takes all particles. This is required if one wants to apply no cut.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER0.Code = "(ALL)" ;
<!-- end SyntaxHighlightingPlugin -->

ABSID:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

ADMASS:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

BPVDIRA: Direction angle

Computes the cosine of the angle between the momentum of the particle and the direction fo flight from the best PV to the decay vertex.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "(BPVDIRA>0.9999)" ;
<!-- end SyntaxHighlightingPlugin -->

BPVIPCHI2(): IP on related PV

Computes the -IP on the related PV.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "BPVIPCHI2()<25" ;
<!-- end SyntaxHighlightingPlugin -->
So far it needs the ().

BPVVDCHI2: -separation from related PV

Computes the -distance from the related PV.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "(BPVVDCHI2>100)" ;
<!-- end SyntaxHighlightingPlugin -->

CHILDCUT:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

ID:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

INTREE: In tree

Requires there is a particle in the decay tree satisfying the requirements.
<!-- SyntaxHighlightingPlugin -->
FilterDesktop.Filter.Code = "(INTREE( (ID=='J/psi(1S)') & (BPVVDCHI2>25) ) )" ;
<!-- end SyntaxHighlightingPlugin -->
Requires there is a in the tree more than 5\sigma away from the best vertex.

MAXTREE:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

MINTREE: Minimal value in the decay tree

Takes a functor as agrument and returns its minimal value searching through the decay tree.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER0.Code = "(MINTREE(ABSID=='K+',PT)>1400)" ;
<!-- end SyntaxHighlightingPlugin -->
This would look for all particles kaons in the decay tree and find their and return the minimum. The cut then requires that all kaon descendents ahve a .

MIPCHI2DV:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

MIPDV:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

M:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

MM:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

NINTREE: Number of particles in tree

Returns the number of particles in a tree satisfying some selection criteria.
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER0.Code = "( 2 == NINTREE( (ABSID=='e-') & (PT>1000)))" ;
<!-- end SyntaxHighlightingPlugin -->
Reuqires that there are two electrons in the tree with .

P:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

PIDe, ==, :

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

PT:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

TRCHI2DOF:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

VDMIN:

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

VFASPF: Vertex Function as Particle Function.

Allows to apply vertex functors to the particle's endVertex().
<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "(VFASPF(VCHI2/VDOF)<10)" ;
<!-- end SyntaxHighlightingPlugin -->
Applies a cut to the vertex of the particle.

Vertex functors

Vertex functors are accessed using VFASPF.

VCHI2

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

VDOF

<!-- SyntaxHighlightingPlugin -->
CombineParticles.FILTER2.Code = "" ;
<!-- end SyntaxHighlightingPlugin -->

-- PatrickKoppenburg - 27 Mar 2008

 
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