Difference: TMKTutorial (1 vs. 13)

Revision 132013-09-24 - KonstantinSchubert

Line: 1 to 1
 
META TOPICPARENT name="TillMoritzKarbach"
<!--
These settings should configure the SYNTAXHIGHLIGHTINGPLUGIN, but they don't. Maybe I'm not allowed to override them.
Line: 29 to 29
 

Branches

Changed:
<
<
  • Note: This was tested in DaVinci v33r5.
>
>
  • Note: This was tested in DaVinci v33r5. PROBABLY OUTDATED in newer versions.
 

DecayTreeTuple writes out an ntuple (TTree) that contains one entry per candidate. Its variables are grouped in 'Branches': the mother particle's variables, the first daughter particle's variables, and so on. Each particle is therefore a Branch. This Branch structure just configures what variables will be in the ntuple, not to be confused with TBranch.

Revision 122013-09-20 - TillMoritzKarbach

Line: 1 to 1
 
META TOPICPARENT name="TillMoritzKarbach"
<!--
These settings should configure the SYNTAXHIGHLIGHTINGPLUGIN, but they don't. Maybe I'm not allowed to override them.
Line: 25 to 25
 The background categories, that are computed by the truth matching on MC and classify the candidates into signal and various backgrounds, are documented here: background category
  • If all candidates are in BKGCAT 60 (ghosts), you maybe forgot to include DaVinci().Simulation = True.
Added:
>
>
  • BKGCAT.pdf: A flowchart for the background categories (by Vava)
 

Branches

Line: 159 to 160
  [[B0]cc -> (^D- => {^K- ^K+ ^pi-, ^K- ^pi+ ^pi-,^pi+ ^pi- ^pi-}) ^K+]cc
Deleted:
<
<

Truth matching

  • See also: Background Categories (BKGCAT)
  • See also: DaVinci tutorials 6, 7

To add truth matching variables to your DecayTreeTuple, add the following tools:

<!-- SyntaxHighlightingPlugin -->
from Configurables import DecayTreeTuple
dataTuple = DecayTreeTuple("dataTuple")
dataTuple.ToolList = [ # pay attention to '=' vs. '+='
  "TupleToolMCTruth" ,
  "TupleToolMCBackgroundInfo"
]
<!-- end SyntaxHighlightingPlugin -->
Also make sure you tell DaVinci that you run over MC - otherwise all tracks will be categorized as ghosts!
<!-- SyntaxHighlightingPlugin -->
DaVinci().Simulation = True
<!-- end SyntaxHighlightingPlugin -->

 

Particle names and numbers

The particle names to be used in the DecayDescriptor are found in a big text file, which you can create follows. This will create the ParticleTable.txt file in the subdirectory param of the current directory, which lists all particles and their properties.

Line: 232 to 213
 TES["Rec/Header"] # print CONDDB and DDDB tags %ENDSYNTAX%
Added:
>
>

Truth matching

  • See also: Background Categories (BKGCAT)
  • See also: DaVinci tutorials 6, 7

To add truth matching variables to your DecayTreeTuple, add the following tools:

<!-- SyntaxHighlightingPlugin -->
from Configurables import DecayTreeTuple
dataTuple = DecayTreeTuple("dataTuple")
dataTuple.ToolList = [ # pay attention to '=' vs. '+='
  "TupleToolMCTruth" ,
  "TupleToolMCBackgroundInfo"
]
<!-- end SyntaxHighlightingPlugin -->
Also make sure you tell DaVinci that you run over MC - otherwise all tracks will be categorized as ghosts!
<!-- SyntaxHighlightingPlugin -->
DaVinci().Simulation = True
<!-- end SyntaxHighlightingPlugin -->

 

TupleToolDecayTreeFitter

  • See also: DecayTreeTuple, Branches
Line: 240 to 241
 dataTuple.lab0.ProtonHypothesisDsConst.daughtersToConstrain = [ "D_s-" ] # ^^ gets both charges, you can also write "D_s+" (but not "D_s" or "[D_s-]cc") %ENDSYNTAX% \ No newline at end of file
Added:
>
>

Screen sessions to allow Ganga to run over the weekend

The usual linux 'screen' command doesn't work out of the box because the AFS token will expire and the jobs won't have access to AFS anymore. To prevent his, add this alias to your .bashrc:

alias krb5screen="pagsh.krb -c 'kinit && screen'"

Then start screen as

krb5screen

Later you can reattach later using

screen -raAd

META FILEATTACHMENT attachment="BKGCAT.pdf" attr="" comment="" date="1379678746" name="BKGCAT.pdf" path="BKGCAT.pdf" size="491577" user="mkarbach" version="1"

Revision 112013-09-17 - TillMoritzKarbach

Line: 1 to 1
 
META TOPICPARENT name="TillMoritzKarbach"
<!--
These settings should configure the SYNTAXHIGHLIGHTINGPLUGIN, but they don't. Maybe I'm not allowed to override them.
Line: 104 to 104
 mySharedConf(tuple.KMinus) %ENDSYNTAX%
Added:
>
>

Common Particles (StdLoosePions etc)

The selection cuts that were applied to the common particles are defined here:

<!-- SyntaxHighlightingPlugin -->
SetupProject DaVinci
cd $COMMONPARTICLESROOT/python/CommonParticles/
vi StdLoosePions.py
<!-- end SyntaxHighlightingPlugin -->
 

Database tags

The Detector Description Database and the Conditions Database contain information about the actual configuration the data was recorded with. These contain both geometrical and environmental information. The tags always need to be set.

Revision 102013-08-20 - TillMoritzKarbach

Line: 1 to 1
 
META TOPICPARENT name="TillMoritzKarbach"
<!--
These settings should configure the SYNTAXHIGHLIGHTINGPLUGIN, but they don't. Maybe I'm not allowed to override them.
Line: 23 to 23
 

Background Categories (BKGCAT)

The background categories, that are computed by the truth matching on MC and classify the candidates into signal and various backgrounds, are documented here:
Changed:
<
<
http://lhcb-release-area.web.cern.ch/LHCb-release-area/DOC/davinci/releases/latest/doxygen/df/d88/class_i_background_category.html
>
>
background category
 
  • If all candidates are in BKGCAT 60 (ghosts), you maybe forgot to include DaVinci().Simulation = True.

Branches

Line: 168 to 168
 DaVinci().Simulation = True %ENDSYNTAX%
Changed:
<
<
describe how to use LoKi tools to truthmatch a decay chain that is different from the main decay descriptor.
>
>
 

Particle names and numbers

Revision 92013-08-19 - TillMoritzKarbach

Line: 1 to 1
 
META TOPICPARENT name="TillMoritzKarbach"
<!--
These settings should configure the SYNTAXHIGHLIGHTINGPLUGIN, but they don't. Maybe I'm not allowed to override them.
Line: 210 to 210
  Save it as example.py, then call it with python interactively:
Changed:
<
<
SetupProject DaVinci python -i example.py
>
>
<!-- SyntaxHighlightingPlugin -->
SetupProject DaVinci
python -i example.py
<!-- end SyntaxHighlightingPlugin -->
  Now, on the python prompt, you can do the following:

Revision 82013-08-07 - TillMoritzKarbach

Line: 1 to 1
 
META TOPICPARENT name="TillMoritzKarbach"
<!--
These settings should configure the SYNTAXHIGHLIGHTINGPLUGIN, but they don't. Maybe I'm not allowed to override them.
Line: 15 to 15
  Other sources of help:
Added:
>
>
 

Revision 72013-08-03 - TillMoritzKarbach

Line: 1 to 1
 
META TOPICPARENT name="TillMoritzKarbach"
<!--
These settings should configure the SYNTAXHIGHLIGHTINGPLUGIN, but they don't. Maybe I'm not allowed to override them.
Line: 167 to 167
 DaVinci().Simulation = True %ENDSYNTAX%
Added:
>
>
describe how to use LoKi tools to truthmatch a decay chain that is different from the main decay descriptor.
 

Particle names and numbers

The particle names to be used in the DecayDescriptor are found in a big text file, which you can create follows. This will create the ParticleTable.txt file in the subdirectory param of the current directory, which lists all particles and their properties.

Revision 62013-07-31 - TillMoritzKarbach

Line: 1 to 1
 
META TOPICPARENT name="TillMoritzKarbach"
<!--
These settings should configure the SYNTAXHIGHLIGHTINGPLUGIN, but they don't. Maybe I'm not allowed to override them.
Line: 105 to 105
 

Database tags

Deleted:
<
<
Is it important on MC, whether the CONDDB tag contains 'mu' or 'md' (magnet-up/magnet-dn)?
 The Detector Description Database and the Conditions Database contain information about the actual configuration the data was recorded with. These contain both geometrical and environmental information. The tags always need to be set.

Running on data:

Line: 125 to 123
 CondDBtag="sim-20111111-vc-md100" # update to what you need! %ENDSYNTAX%
Added:
>
>
  • Note: Is it important on MC, that each magnet-up and magnet-down samples get their 'mu' or 'md' versions of the CONDDB tag.
 You can get the correct tags
  • from the bookkeeping: SetupProject DaVinci, lhcb_bkk. Then find your MC files, e.g. sort by Event Type, and click all the way down to the last directory above ALLSTREAMS.DST. Then rightclick for 'more information'. The resulting window hopefully doesn't contain too many tabs, and lists consistent CONDDB and DDDB tags.
  • extract the info from the DST file. For this, see "Print the TES" on this page.

Revision 52013-07-30 - TillMoritzKarbach

Line: 1 to 1
 
META TOPICPARENT name="TillMoritzKarbach"
<!--
These settings should configure the SYNTAXHIGHLIGHTINGPLUGIN, but they don't. Maybe I'm not allowed to override them.
Line: 105 to 105
 

Database tags

Changed:
<
<
Describe when they need to be set, and how to obtain the correct settings.
>
>
Is it important on MC, whether the CONDDB tag contains 'mu' or 'md' (magnet-up/magnet-dn)?
 
Changed:
<
<
The Detector Description Database and the Conditions Database contain information about the actual configuration the data was recorded with. These contain both geometrical and environmental information.
>
>
The Detector Description Database and the Conditions Database contain information about the actual configuration the data was recorded with. These contain both geometrical and environmental information. The tags always need to be set.
  Running on data:
Line: 121 to 121
 Also the MC needs proper database tags that correspond to what the MC was simulated with. They can be obtained from the bookkeeping (SetupProject DaVinci; lhcb_bkk). Also, when running on MC, you need DaVinci().Simulation = True.

%SYNTAX{ syntax="python"}%

Changed:
<
<
DaVinci.DDDBtag="sim-20120831" # update to what you need! CondDBtag="sim-20120831" # update to what you need!
>
>
DaVinci.DDDBtag="MC11-20111102" # update to what you need! CondDBtag="sim-20111111-vc-md100" # update to what you need!
 %ENDSYNTAX%
Added:
>
>
You can get the correct tags
  • from the bookkeeping: SetupProject DaVinci, lhcb_bkk. Then find your MC files, e.g. sort by Event Type, and click all the way down to the last directory above ALLSTREAMS.DST. Then rightclick for 'more information'. The resulting window hopefully doesn't contain too many tabs, and lists consistent CONDDB and DDDB tags.
  • extract the info from the DST file. For this, see "Print the TES" on this page.
 

DataType

Describe when this needs to be set, and how to obtain the correct settings.

Line: 163 to 167
 DaVinci().Simulation = True %ENDSYNTAX%
Added:
>
>

Particle names and numbers

The particle names to be used in the DecayDescriptor are found in a big text file, which you can create follows. This will create the ParticleTable.txt file in the subdirectory param of the current directory, which lists all particles and their properties.

<!-- SyntaxHighlightingPlugin -->
SetupProject LHCb
dump_db_to_files.py  -c sqlite_file:$SQLITEDBPATH/DDDB.db/DDDB  -s /param/ParticleTable.txt -d ./ -v
<!-- end SyntaxHighlightingPlugin -->

The particle numbers, that are used in the lab0_ID fields, follow the official PDG numbering scheme. From PDGlive you can find it as "Reviews, Tables, Plots" -> "Mathematical Tools" -> "Monte Carlo Particle Numbering Scheme", or here directly: http://pdg.lbl.gov/2011/reviews/rpp2011-rev-monte-carlo-numbering.pdf

Print the TES

To print the TES, one can use the following simple script:

<!-- SyntaxHighlightingPlugin -->
#! /usr/bin/env python
from Configurables import DaVinci
import GaudiPython

## We configure the job
DaVinci().EvtMax = 0
DaVinci().DataType = "2011"
DaVinci().Simulation = True

## For instance, the dst contains the MC in which we have all the relevant information
DaVinci().Input = ['PFN:root://eoslhcb.cern.ch//eos/lhcb/MC/MC11a/ALLSTREAMS.DST/00017167/0000/00017167_00000050_1.allstreams.dst']

DaVinci().DDDBtag = "MC11-20111102"
DaVinci().CondDBtag = "sim-20111111-vc-md100"

gaudi = GaudiPython.AppMgr()
gaudi.initialize()

## The TES will give us access to all the event information
TES = gaudi.evtsvc()
<!-- end SyntaxHighlightingPlugin -->

Save it as example.py, then call it with python interactively:

SetupProject DaVinci python -i example.py

Now, on the python prompt, you can do the following:

<!-- SyntaxHighlightingPlugin -->
gaudi.run(1) # process 1st event
TES.dump() # print some TES locations
TES["Rec/Header"] # print CONDDB and DDDB tags
<!-- end SyntaxHighlightingPlugin -->
 

TupleToolDecayTreeFitter

  • See also: DecayTreeTuple, Branches

Revision 42013-07-30 - TillMoritzKarbach

Line: 1 to 1
 
META TOPICPARENT name="TillMoritzKarbach"
<!--
These settings should configure the SYNTAXHIGHLIGHTINGPLUGIN, but they don't. Maybe I'm not allowed to override them.
Line: 107 to 107
  Describe when they need to be set, and how to obtain the correct settings.
Added:
>
>
The Detector Description Database and the Conditions Database contain information about the actual configuration the data was recorded with. These contain both geometrical and environmental information.

Running on data:

<!-- SyntaxHighlightingPlugin -->
DaVinci.DDDBtag="dddb-20120831" # update to what you need!
DaVinci.CondDBtag="cond-20120831" # update to what you need!
<!-- end SyntaxHighlightingPlugin -->

Running on MC:

Also the MC needs proper database tags that correspond to what the MC was simulated with. They can be obtained from the bookkeeping (SetupProject DaVinci; lhcb_bkk). Also, when running on MC, you need DaVinci().Simulation = True.

 %SYNTAX{ syntax="python"}%
Changed:
<
<
DaVinci.DDDBtag="dddb-20120831" CondDBtag="cond-20120831"
>
>
DaVinci.DDDBtag="sim-20120831" # update to what you need! CondDBtag="sim-20120831" # update to what you need!
 %ENDSYNTAX%

DataType

Line: 122 to 135
 

DecayDescriptor

Changed:
<
<
Add a link to where the syntax is explained.
>
>
  Add a comment about cc's and double counting. When does the mother particle need a cc?

Revision 32013-07-29 - TillMoritzKarbach

Line: 1 to 1
 
META TOPICPARENT name="TillMoritzKarbach"
<!--
These settings should configure the SYNTAXHIGHLIGHTINGPLUGIN, but they don't. Maybe I'm not allowed to override them.
Line: 13 to 13
  Notes on DaVinci option files, in alphabetic order.
Changed:
<
<
>
>
Other sources of help:
 
Added:
>
>
 

Background Categories (BKGCAT)

Added:
>
>
The background categories, that are computed by the truth matching on MC and classify the candidates into signal and various backgrounds, are documented here:
  http://lhcb-release-area.web.cern.ch/LHCb-release-area/DOC/davinci/releases/latest/doxygen/df/d88/class_i_background_category.html
Added:
>
>
  • If all candidates are in BKGCAT 60 (ghosts), you maybe forgot to include DaVinci().Simulation = True.
 

Branches

Line: 126 to 132
  [[B0]cc -> (^D- => {^K- ^K+ ^pi-, ^K- ^pi+ ^pi-,^pi+ ^pi- ^pi-}) ^K+]cc
Added:
>
>

Truth matching

  • See also: Background Categories (BKGCAT)
  • See also: DaVinci tutorials 6, 7

To add truth matching variables to your DecayTreeTuple, add the following tools:

<!-- SyntaxHighlightingPlugin -->
from Configurables import DecayTreeTuple
dataTuple = DecayTreeTuple("dataTuple")
dataTuple.ToolList = [ # pay attention to '=' vs. '+='
  "TupleToolMCTruth" ,
  "TupleToolMCBackgroundInfo"
]
<!-- end SyntaxHighlightingPlugin -->
Also make sure you tell DaVinci that you run over MC - otherwise all tracks will be categorized as ghosts!
<!-- SyntaxHighlightingPlugin -->
DaVinci().Simulation = True
<!-- end SyntaxHighlightingPlugin -->
 

TupleToolDecayTreeFitter

  • See also: DecayTreeTuple, Branches

Revision 22013-07-29 - KonstantinSchubert

Line: 1 to 1
 
META TOPICPARENT name="TillMoritzKarbach"
<!--
These settings should configure the SYNTAXHIGHLIGHTINGPLUGIN, but they don't. Maybe I'm not allowed to override them.
Line: 15 to 15
 
Added:
>
>

Background Categories (BKGCAT)

http://lhcb-release-area.web.cern.ch/LHCb-release-area/DOC/davinci/releases/latest/doxygen/df/d88/class_i_background_category.html
 

Branches

  • Note: This was tested in DaVinci v33r5.
Line: 39 to 43
 # not recommended: from Configurables import DecayTreeTuple tuple = DecayTreeTuple("tuple")
Changed:
<
<
tuple.Branches = { ... } %ENDSYNTAX% The new addBranches() method provides a wrapper to the bare 'Branches' member, and does a couple of checks.

So far, only the name of the K+ in the tuple file has been affected by our changes. To actually configure the branch and add TupleTools to it, you first have to use the function:

%SYNTAX{ syntax="python"}%

>
>
tuple.Branches = { "MyBranch" : ... , ... }
 tuple.addTool(TupleToolDecay, name = 'MyBranch') %ENDSYNTAX%
Changed:
<
<
Afterwards, you can configure your branch.
>
>
The new addBranches() method provides a wrapper to the bare 'Branches' member, and does a couple of other things. Now, you can configure your branch.
  %SYNTAX{ syntax="python"}% tuple.MyBranch.ToolList = ["TupleToolPropertime"]
Line: 69 to 67
  %SYNTAX{ syntax="python"}% # divide the tuple into branches:
Changed:
<
<
tuple.Branches = {
>
>
tuple.addBranches({
  "head" : " B_s0 : B_s0 -> (J/psi(1S) => mu+ mu-) (phi(1020) -> K+ K-)", # Notice the weird syntax for the head "KMinus" : "B_s0 -> (J/psi(1S) => mu+ mu-) (phi(1020) -> K+ ^K-)", "KPlus" : "B_s0 -> (J/psi(1S) => mu+ mu-) (phi(1020) -> ^K+ K-)",
Line: 77 to 75
  "JPsi" : "B_s0 -> (^J/psi(1S) => mu+ mu-) (phi(1020) -> K+ K-)", "MuMinus" : "B_s0 -> (J/psi(1S) => mu+ ^mu-) (phi(1020) -> K+ K-)", "MuPlus" : "B_s0 -> (J/psi(1S) => ^mu+ mu-) (phi(1020) -> K+ K-)"
Changed:
<
<
}
>
>
})
  # add another tool to the KMinus branch with a different name
Changed:
<
<
tuple.addTool(TupleToolDecay, name = 'KMinus') # this is to be able to configure the branch
>
>
 LoKi_KMin=tuple.KMinus.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_KMin") LoKi_KMin.Variables = { "PID" : "ID" ,
Line: 95 to 93
  atool=branch.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_K") atool.Variables = { "PID" : "ID" , "P2" : "P*P" , "TrChi2" : "TRCHI2DOF" }
Deleted:
<
<
tuple.addTool(TupleToolDecay, name = 'KPlus')
 mySharedConf(tuple.KPlus) mySharedConf(tuple.KMinus) %ENDSYNTAX%

Revision 12013-07-26 - TillMoritzKarbach

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="TillMoritzKarbach"
<!--
These settings should configure the SYNTAXHIGHLIGHTINGPLUGIN, but they don't. Maybe I'm not allowed to override them. 
  • Set FORMAT_LINENUMBERS = %06d
  • Set FORMAT_PREPEND =
    
       * Set FORMAT_APPEND = 
Print out the value of the settings to the page: %SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_LINENUMBERS% %SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_LINENUMBERS% %SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_LINENUMBERS% -->

Notes on DaVinci option files, in alphabetic order.

Branches

DecayTreeTuple writes out an ntuple (TTree) that contains one entry per candidate. Its variables are grouped in 'Branches': the mother particle's variables, the first daughter particle's variables, and so on. Each particle is therefore a Branch. This Branch structure just configures what variables will be in the ntuple, not to be confused with TBranch.

Sometimes, e.g. to save disk space, you may wish to have different TupleTools for each particle in the decay tree. Another use case is to have a few instances of the same TupleTool, but in different configurations. To do that, you can 'add' branches, overriding the existing ones. In the most easy case, each branch consists of one particle. It can be configured like a DecayTreeTuple.

Here is how you define a branch that contains only the K+ particle:

<!-- SyntaxHighlightingPlugin -->
from DecayTreeTuple.Configuration import *
tuple = DecayTreeTuple("tuple")
tuple.addBranches({ "MyBranch" : "B_s0 -> (J/psi(1S) => mu+ mu-) (phi(1020) -> ^K+ K-)" })
<!-- end SyntaxHighlightingPlugin -->

The import statement loads DecayTreeTuple/Configuration.py .

The old way of adding branches used

<!-- SyntaxHighlightingPlugin -->
# not recommended:
from Configurables import DecayTreeTuple
tuple = DecayTreeTuple("tuple")
tuple.Branches = { ... }
<!-- end SyntaxHighlightingPlugin -->
The new addBranches() method provides a wrapper to the bare 'Branches' member, and does a couple of checks.

So far, only the name of the K+ in the tuple file has been affected by our changes. To actually configure the branch and add TupleTools to it, you first have to use the function:

<!-- SyntaxHighlightingPlugin -->
tuple.addTool(TupleToolDecay, name = 'MyBranch')
<!-- end SyntaxHighlightingPlugin -->

Afterwards, you can configure your branch.

<!-- SyntaxHighlightingPlugin -->
tuple.MyBranch.ToolList = ["TupleToolPropertime"]
<!-- end SyntaxHighlightingPlugin -->

Beware:

  • The branches inherit all TupleTools which were defined directly for the DecayTreeTuple. Since the latter already contains a few TupleTools by default, this might be very confusing. You might have to set its
    <!-- SyntaxHighlightingPlugin -->
tuple.ToolList = []
<!-- end SyntaxHighlightingPlugin -->
  • Other than in the root tuple, the head particle is not automatically added to the branch. You need a special syntax to add it to the branch. For reference, refer to the "head" branch in the example below.
  • You can not add the same particle to multiple branches (leads to undefined beviour without causing an error).
  • All particles that should be written out via a branch also have to be marked as "write out" ( using the " ^ "-sign), in the decay string of the DecayTreeTuple. Except for the head particle.

Recommendation:

  • Use one separate branch for each particle. The extra typing will lead to clearer code that will save you some confusion in the future.
  • Charges in particle names can cause confusion as you probably also write out the cc process. Some people prefer the 'lab0' syntax, where lab0 is the mother particle, etc.

Now let's go down to business and

<!-- SyntaxHighlightingPlugin -->
# divide the tuple into branches:
tuple.Branches = { 
      "head" : " B_s0 : B_s0 -> (J/psi(1S) => mu+ mu-) (phi(1020) -> K+ K-)", # Notice the weird syntax for the head
      "KMinus" : "B_s0 -> (J/psi(1S) => mu+ mu-) (phi(1020) -> K+ ^K-)",
      "KPlus" : "B_s0 -> (J/psi(1S) => mu+ mu-) (phi(1020) -> ^K+ K-)",
      "Phi" : "B_s0 -> (J/psi(1S) => mu+ mu-) (^phi(1020) -> K+ K-)",
      "JPsi" : "B_s0 -> (^J/psi(1S) => mu+ mu-) (phi(1020) -> K+ K-)",
      "MuMinus" : "B_s0 -> (J/psi(1S) => mu+ ^mu-) (phi(1020) -> K+ K-)",
      "MuPlus" : "B_s0 -> (J/psi(1S) => ^mu+ mu-) (phi(1020) -> K+ K-)"
      }

# add another tool to the KMinus branch with a different name 
tuple.addTool(TupleToolDecay, name = 'KMinus') # this is to be able to configure the branch
LoKi_KMin=tuple.KMinus.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_KMin") 
LoKi_KMin.Variables = { 
         "PID" : "ID" , 
         "BPVDIRA" : "BPVDIRA" , 
         "MassDiff_Bs0" : "DMASS('B_s0')" , 
         "VSep" : "MINTREE(ABSID=='J/psi(1S)',VFASPF(VZ))-MINTREE(ABSID=='phi(1020)',VFASPF(VZ))"
         }

# Or maybe you want two branches to have their tools configured in the same way. The best way to do this is with your own function:

def mySharedConf(branch): 
   atool=branch.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_K") 
   atool.Variables = { "PID" : "ID" , "P2" : "P*P" , "TrChi2" : "TRCHI2DOF" }

tuple.addTool(TupleToolDecay, name = 'KPlus')
mySharedConf(tuple.KPlus) 
mySharedConf(tuple.KMinus)
<!-- end SyntaxHighlightingPlugin -->

Database tags

Describe when they need to be set, and how to obtain the correct settings.

<!-- SyntaxHighlightingPlugin -->
DaVinci.DDDBtag="dddb-20120831"
DaVinci.CondDBtag="cond-20120831"
<!-- end SyntaxHighlightingPlugin -->

DataType

Describe when this needs to be set, and how to obtain the correct settings.

<!-- SyntaxHighlightingPlugin -->
DaVinci().DataType = "2012"
<!-- end SyntaxHighlightingPlugin -->

DecayDescriptor

Add a link to where the syntax is explained.

Add a comment about cc's and double counting. When does the mother particle need a cc?

Add a comment about the capitalization of cc.

  • See also: DecayTreeTuple, Branches

[[B0]cc -> (^D- => {^K- ^K+ ^pi-, ^K- ^pi+ ^pi-,^pi+ ^pi- ^pi-}) ^K+]cc

TupleToolDecayTreeFitter

  • See also: DecayTreeTuple, Branches

<!-- SyntaxHighlightingPlugin -->
dataTuple.lab0.ProtonHypothesisDsConst.daughtersToConstrain = [ "D_s-" ] 
# ^^ gets both charges, you can also write "D_s+" (but not "D_s" or "[D_s-]cc")
<!-- end SyntaxHighlightingPlugin -->
 
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