Vertexing in Athena







The examples



VertexPrimary: in this example, only the primary vertex is fitted. All the tracks that survive a few quality cuts are used in the fit.
Iteration to delete tracks with the higest Chi^2 contribution is applied. Just set true the NoLoop1 parameter.
Here are the properties set in the jobOptions file:

VertexPrimary.DoVertexFit = true;   // true: do the fit 
VertexPrimary.PatReco = "XKAL"; // Pettern Recognition type
VertexPrimary.FitMode = 1;   // 1 only primary vtx; 2 only secondary vtx;
 3 both;
VertexPrimary.VertexLocation = "Vertex";
VertexPrimary.RetrieveVertex = 0; // Enable the retrieving and print out 
of the vertex after storing in the TDS

// Primary Vertex properties
VertexPrimary.A0ImpactParameter = 0.03; // in cm 
VertexPrimary.PTCut = .5;   // pT cut
VertexPrimary.NumSiHits = 9; // Number of precision hits
VertexPrimary.BlayerHits = 1; // B layer hit: 1 = yes 0 = no
VertexPrimary.NumPxlHits = 2; // Number of pixel hits
VertexPrimary.NoLoop1 = false; // true inibit Chi2 selection for primary 
vtx 
VertexPrimary.C2Contr = 0.1; // C2/ndof of each track contribute to verte
x



VertexExampleSecUserTracks: in this example, only a secondary vertex is fitted. Tracks to be fitted are put "by hand" in the code by the user. 4 vertices are fitted for each event, with the same tracks but with different mass constraints.
NB: It is just a test of the technicalities. The track selection and the mass constraints have been chosen without thinking at any particular analysis.
Here are the properties set in the jobOptions file:

// GENERAL properties
VertexExampleSecUserTracks.DoVertexFit = true;   // true: do the fit 
VertexExampleSecUserTracks.PatReco = "XKAL"; // Pettern Recognition type
VertexExampleSecUserTracks.FitMode = 2;   // 1 only primary vtx; 2 only secondary vtx; 3 both;
VertexExampleSecUserTracks.VertexLocation = "Vertex";
VertexExampleSecUserTracks.RetrieveVertex = 0; // Enable the retrieving and print out of the vertex after storing in the TDS

// Sec. Vertices properties
VertexExampleSecUserTracks.NumSecVtx = 4; // Maximum Number of sec vertex to be looked for if mode=3
VertexExampleSecUserTracks.NoLoop2 = true; // true inhibit Chi2 selection for secondary vtx
VertexExampleSecUserTracks.C2ContrSec = 0.5; //  C2/ndof of each track contribute to SECONDARY vertex
VertexExampleSecUserTracks.GetSimInfo = 0; // 1 -> get sim. info about vertices
VertexExampleSecUserTracks.NumConstrSec = 1; // # of mass constraints used to fit secondary v.
VertexExampleSecUserTracks.ExternTrackList = 1; // Enable the use of a user define track list to be used in the sec. v. fit; 0 == use of seeds




VertexExampleSecSeed: in this example, both primary and secondary vertices are fitted. The secondary vertices are fitted using the tracks in a cone around the direction of a genz seed (a b quark). No mass constraints are used.

NB: It is just a test of the technicalities, not a b-analysis.

VertexExampleSecSeed.OutputLevel = 1;

// GENERAL properties
VertexExampleSecSeed.DoVertexFit = true;   // true: do the fit 
VertexExampleSecSeed.PatReco = "XKAL"; // Pettern Recognition type
VertexExampleSecSeed.FitMode = 3;   // 1 only primary vtx; 2 only secondary vtx; 3 both;
VertexExampleSecSeed.VertexLocation = "Vertex"; 
VertexExampleSecSeed.RetrieveVertex = 0; // Enable the retrieving and print out of the vertex after storing in the TDS

// Primary Vertex properties
VertexExampleSecSeed.A0ImpactParameter = 0.03; // in cm 
VertexExampleSecSeed.PTCut = .5;   // pT cut
VertexExampleSecSeed.NumSiHits = 9; // Number of precision hits
VertexExampleSecSeed.BlayerHits = 1; // B layer hit: 1 = yes 0 = no
VertexExampleSecSeed.NumPxlHits = 2; // Number of pixel hits
VertexExampleSecSeed.NoLoop1 = true; // true inibit Chi2 selection for primary vtx
VertexExampleSecSeed.C2Contr = 0.1; // C2/ndof of each track contribute to vertex


// Sec. Vertices properties  
VertexExampleSecSeed.NumSecVtx = 2; // Maximum Number of sec vertex to be looked for if mode=3
VertexExampleSecSeed.NoLoop2 = true; // true inibit Chi2 selection for secondary vtx
VertexExampleSecSeed.C2ContrSec = 0.5; //  C2/ndof of each track contribute to SECONDARY vertex
VertexExampleSecSeed.GetSimInfo = 0; // 1 -> get sim. info about vertices
VertexExampleSecSeed.A0ImpactParSec1 = 0.006; // for sec. v.:  min impact par. : ParSec1 < ParSec2
VertexExampleSecSeed.A0ImpactParSec2 = 0.03; // for sec. v.: max impact par.
VertexExampleSecSeed.PTCutSec = .5;   // pT cut for sec vtx
VertexExampleSecSeed.DeltaR = 1.4; // DR around seed
VertexExampleSecSeed.NumSecVtx = 2; // Maximum Number of sec vertex to be looked for if mode=3
VertexExampleSecSeed.NumConstrSec = 0; // # of mass constraints used to fit secondary v.
VertexExampleSecSeed.ConstrMass1 = 1.; // Constraint #1 mass
VertexExampleSecSeed.ConstrMass2 = 1.2; // Constraint #2 mass
VertexExampleSecSeed.ConstrMass3 = 2.; // Constraint #3 mass
VertexExampleSecSeed.ConstrMass4 = 1.8; // Constraint #4 mass
VertexExampleSecSeed.ExternTrackList = 0; // Enable the use of a user define track list to be used in the sec. v. fit; 0 == use of seeds;




VertexExampleScheme: this example is just a scheme of the methods used. Only the part needed to fit the primary vertex is operational; all methods needed in the secondary vertex fit are left empty.





Description of the packages

          CTVMFT: a pseudo-package to link the ctvmft library (in external). Details about the code here.

          VertexFit: it contains all the classes and methods to handle the fit; it "talks" with CTVMFT.

          SimpleVertex: it contains the class SimpleVertex, used to store in the TDS the information about the vertex reconstructed.







Detailed description of methods and parameters used in the packages.

A set of parameters can be modified using Vertex_jobOption.txt; they are a few quality cuts to pre-select tracks and a few fit options.


The fit options are:

DoVertexFit : to enable the fit;
FitMode: mode 1: only primary vertex; mode 2: only secondary vertices; 
       mode 3: both primary and secondary.
C2Contr: maximum Chi2 contribution allowed to the single track (in primary 
       vertex fit).
C2ContrSec: maximum Chi2 contribution allowed to the single track (in primary 
          vertex fit).
NumSecVtx: maximum number of secondary vertices to be fitted in the same event;
NoLoop1: flag that inhibits the loop over the Chi2 contribution of the single
       track to the vertex; for primary vertex fit only;
NoLoop2: flag that inhibits the loop over the Chi2 contribution of the single
       track to the vertex; for secondary vertices fit only;
DeltaR:  open angle of the cone around the seed, chosen to find secondary
       vertices (used only if ExtTrackList disabled);
PatReco: Pattern recognition method (up to now XKAL only);
GetSimInfo: flag to inhibit the storage of simulated information;
NumConstrSec: number of mass constraints (only sec. vertices);
ConstrMass#: mass of constraint # (max 4);
ExtTrackList: for sec. v. only: if 0 seed mode is selected; if 1 a track list
            must be provided and the fit is done using this list.

In method execute:

  1. declare the objects that will be used:
    FnP -> to store and retrieve flags and parameters
    Vt -> vertex object to store temporary information
    Vs -> object to handle information from simulation
    VfSeed -> direction, type and info of the seed (if used)
  2. declare seeds (ExtTrackList = 0 only):
    for each secondary vertex to be fitted, a seed's direction is given. Only tracks in the cone with angle DR around this direction will be used in the fit of secondary vertices. A seed object vector is created to store the information got by GetSeed. GetSeed (and its methods) are strongly dependent on the type of sec. v. the user is looking for. They MUST be modified depending on the user analysis.
  3. M3 is the flag that is used only in mode 3. It is needed to enable the program to perform first the fit of the primary and then the fits of the secondary.
  4. Secflag: is the number of fitted secondary vertices.
  5. A do-loop allows the program to perform all the fits.
  6. An external list of tracks to be used in the sec. v. fit must be introduced if mode ExtTrackList has been selected.
  7. ClearVt: clean the temporary vertex variables.
  8. TrackSelection: select the tracks to be fitted and store them (as pointers) in the SelectedTracks list.
    It uses the seed's direction or the external track list as input.
  9. TrackSim: if enabled, it retrieves the KINE simulated information about tracks. The method VerTrack (used for the sec. v.) is dependent on the type of sec. v. and must be modified by the user.
  10. DoFit: perform the fit. The result is stored in Vt.
  11. FillVertex: the result of the fit is added to the vertex collection of the event analysed.
  12. The list of the selected tracks is deleted.


More details about methods.

In the main algorithm:


In VertexFit:

How can the user use the program?

If the user wants to fit only primary vertices, he can use VertexPrimary algorithm.

If the user wants to fit secondary vertices, he needs also to modify and recompile the code. The easiest way to do this is to check-out one of the examples.

The parts the user should modify are in the code.

As an example, in package VertexExampleSecUserTracks:

In VertexExampleSecUserTracks.cxx:
in method execute introduce the list of tracks (MyTracks) to be used in the fit (only if ExternTrackList = 1).
In method TrkMass (if mass constraints used) set the track mass (by default the pion mass) and the number of the constraint to which the track is associated.
In SetFnP set the fit parameters that control CTVMFT and the mass of the constraints. To change paramters that control CTVMFT see the CTVMFT dcumentation.






CBNT variables

NVtx: number of fitted vertices
Ntr(NVtx): number of tracks per vertex
Npresel(NVtx): number of tracks at a preselection level
NTrue(NVtx): number of fitted tracks coming from the vertex (from simulation)
NprTrue(NVtx): number of fitted tracks coming from the vertex (from simulation) at a preselection level
Xvtx(NVtx): vertex X coordinate
Yvtx(NVtx): vertex Y coordinate
Zvtx(NVtx): vertex Z coordinate
C2(NVtx): vertex fit chi**2
Ndof(NVtx): fit degrees of freedom
C2rid(NVtx): reduced chi**2
SPx(NVtx): x error on momentum
SPy(NVtx): y error on momentum
SPz(NVtx): z error on momentum
SE(NVtx): error on energy


SigmaX(NVtx)
SigmaY(NVtx)
SigmaZ(NVtx) ------------- covariance matrix
CovXY(NVtx)
CovXZ(NVtx)
CovYZ(NVtx)


Kind(NVtx): kind of vertex (primary, secondary, fit failed)
PrimX(NVtx): primary vertex x coordinate (from simulation)
PrimY(NVtx): primary vertex y coordinate (from simulation)
PrimZ(NVtx): primary vertex z coordinate (from simulation)
BX(NVtx): secondary vertex x coordinate (from simulation)
BY(NVtx): secondary vertex y coordinate (from simulation)
BZ(NVtx): secondary vertex z coordinate (from simulation)





Last modified 10-Mar-2003 by Fabrizio Ferro