IP Profiling Home Page


"Event-dependent" IP has been released. (May 22, 2001)
IpProfile class can use event-dependent IP profile with BELLE_LEVEL b20010428_0741 or later.
Event-dependent IP profile is available for the data reprocessed with b20010507_0455 or later library.

Usage is described here.
The "ip" package is updated for the archive database.
If you have to access the old version IP profile, please use b20001111_1109 or newer library. (Or use "get_packages")(Nov. 24, 2000)

The default value of "ip" package is corrected!
Please use new version with "get_packages" (Mar. 29, 2000)

New package "ip" has been created.(Feb. 20, 2000)
Please "get_packages ip", and use it.
The usage is here.


How to use IP profile

The information of primary vertex distribution is stored in the database.
Usually there is no need to use these tables directly. Please use "IpProfile" class.

Panther tables :

IP_Profile_General : IP profile information for users.
    It contains IP profile in the form of mean position and
    its error matrix. And quality flag means
0 : Not calculated correctly.
1 : It is calculated from Bhabha information only.
2 : It is calculated from Hadron information only.
3 : Hadron and Bhabha information is converged.
    Generally you should use quality > 0.

IP_Profile_Hadron : IP profile information from HadronC data.
    This is for experts.

IP_Profile_Bhabha : IP profile information from Bhabha data.
    This is for experts.

Accelerator_info : Beam size information from accelerator.

These tables are defined in run_info.tdf.

Relation between PntDB version and BELLE_LEVEL is shown here.

To get data from database :

...
#include "panther/panther.h"

#include RUN_INFO_H

// for database access
#include "pntdb/TPntFDDB.h"
#include "pntdb/TPntDB.h"

...
// @begin_run
// Get Panther table managers
  Ip_profile_general_Manager& General_mgr = Ip_profile_general_Manager::get_manager();
  Ip_profile_hadron_Manager& Hadron_mgr = Ip_profile_hadron_Manager::get_manager();
  Ip_profile_bhabha_Manager& Bhabha_mgr = Ip_profile_bhabha_Manager::get_manager();
  Accelerator_info_Manager& Ainfo_mgr = Accelerator_info_Manager::get_manager();

// Remove old tables
  General_mgr.remove();
  Hadron_mgr.remove();
  Bhabha_mgr.remove();
  Ainfo_mgr.remove();

// Open database
  TPntFDDB fddb("rif");
  TPntDB db(fddb, "beam_profile");
  if(!db.IsOK()){
    cerr << "Error : Cannot access rif::beam_profile.\n";
    return 1;
  }

// Get data from database
// function Get returns size nRead
// <= 0 error
// You can check whether DB is filled or not.
  if(db.Get(exp, run, version) <= 0){
    cerr << "Error : Cannot get data from database correctly.\n";
    return 1;
  }

// Set non_clear flag
  db.non_clear(IP_PROFILE_GENERAL);
  db.non_clear(IP_PROFILE_HADRON);
  db.non_clear(IP_PROFILE_BHABHA);
  db.non_clear(ACCELERATOR_INFO);

...

To obtain primary vertex from KFitter and IP profile :

...
#include "panther/panther.h"

#include RUN_INFO_H

#include "particle/utility.h"

#include "kfitter/kvertexfitter.h"

...

// Get Panther table manager
  Ip_profile_general_Manager& IP_mgr = Ip_profile_general_Manager::get_manager();

// Get IP_Profile_General table
  vector<Ip_profile_general>::iterator itip = IP_mgr.begin();
  if(!itip) return;

// Check quality flag
// <= 0 : error
  if(itip->quality() <= 0) return;

// IP mean position
  HepPoint3D ip_position(itip->IPx(), itip->IPy(), itip->IPz());

// Fill error matrix
  HepSymMatrix ip_err(3, 0);
  ip_err(1, 1) = itip->IPerror(0);
  ip_err(2, 1) = itip->IPerror(1);
  ip_err(2, 2) = itip->IPerror(2);
  ip_err(3, 1) = itip->IPerror(3);
  ip_err(3, 2) = itip->IPerror(4);
  ip_err(3, 3) = itip->IPerror(5);

  kvertexfitter kv;

// Add particle that comes from IP
  addTrack2fit(kv, Particle);
// Add IP profile information
  addBeam2fit(kv, ip_position, ip_err);

// Fit
  unsigned int err = kv.fit();
  if(err) return;

...

To compile codes using pntdb, some Postgres header files and libraries are required. Please refer to
$BELLE_TOP_DIR/docsrc/examples/pntdb/examples/basf_if/Makefile (for basf modules)
or
$BELLE_TOP_DIR/docsrc/examples/pntdb/examples/basics/Makefile .

How to use Event by Event Primary Vertex

It is calculated by EvtVtx module.
EvtVtx module fills Evtvtx_Primary_Vertex Panther table.
The tracks used in primary vertex calculation are stored in
Evtvtx_trk Panther table. These tables are defined in evtvtx.tdf.


Back to BELLE SVD/VTX Software Homepage



If you have any questions, please ask T.Tomura (tomura@hep.phys.s.u-tokyo.ac.jp).