03 July 2003
How to run the FlavourTagging for the TDR.
First in your options files after the execution of your selection
algorithm(s) you must include the following lines:
  #include "$FLAVOURTAGGINGOPTS/CombinedFlavourTagging.opts"
  CombTagging.HypothesisLocations = { "/Event/Phys/MyBLocation" };
where { "/Event/Phys/MyBLocation" } has to be replaced
according to your algorithm output location.
This will print a summary line for each event with the following ordered information:
  INFO TAGGING SUMMARY 410200103  45 : 1 0 : 1 1 :  1  0  1  0  0 : 4 :  1
  The different fields contains in order:
  - run number,
  - event number,
  - L0 trigger,
  - L1 trigger,
  - number of reconstructed primary vertices,
  - number of visible interactions,
  - muon tag,
  - electron tag,
  - kaon opposite-side tag,
  - kaon same-side tag,
  - vertex tag,
  - combined tag category,
  - combined tag.
  Each tag is 3 times the charge of the b quark in the tagged B or 0.
You can also get the result of the Flavour Tagging from the 
Transient Event Store (TES).
In order to do that you need to execute after the Flavour Tagging
an algorithm that will retrieve the information, so you could
put in in an ntuple for example.
The results of the flavour tagging is stored in a data class called
FlavourTag. 
This class contains the tagging info including a pointer to the B to
which the tagging refers to.
A direct link to the FlavourTag class doxygen documentation with its
methods is available from the DaVinci v8r3 web documentation.  
Below you will find a little example of code retrieving the info: 
  SmartDataPtr<FlavourTags> tags( eventSvc(), FlavourTagLocation::User );
  for( FlavourTags::const_iterator iTag=tags->begin(); tags->end()!=iTag;
       ++iTag ) {
     // Pointer to the B to which the tagging refers to
     const Particle* taggedB = (*iTag)->taggedB();
     switch( (*iTag)->decision() ) {
     case FlavourTag::none:
       msg << MSG::DEBUG << "Tagging decision is 0" << endreq;
       break;
     case FlavourTag::b:
       msg << MSG::DEBUG << "Tagging decision is -1" << endreq;
       break;
     case FlabourTag::bbar:
       mgs << MSG::DEBUG << "Tagging decision is 1" << endreq;
       break;
     }
  }
  The meaning of the decision is 0 for untagged otherwise 3 times the
  charge of the b quark in the tagged B and it is an enum with the
  mnemonic above.
                              Odie and Gloria