BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page
//////////////////////////////////////////////////////////////////////////
// BrVertex
//
// Vertexing data object
// Feb 2000
// bjornhs
// 
//////////////////////////////////////////////////////////////////////////

//
// $Id: BrVertex.cxx,v 1.3 2001/08/07 12:42:16 cholm Exp $
// $Author: cholm $
// $Date: 2001/08/07 12:42:16 $
// 
#ifndef BRAT_BrVertex
#include "BrVertex.h"
#endif
#ifndef __IOSTREAM__
#include <iostream>
#endif
#ifndef __IOMANIP__
#include <iomanip>
#endif

//____________________________________________________________________
ClassImp(BrVertex);

//____________________________________________________________________
 BrVertex::BrVertex():BrDataObject() 
{
  // Default Constructor.
}


//____________________________________________________________________
 BrVertex::BrVertex(const Char_t* Name, const Char_t* Title)
  :BrDataObject(Name,Title) 
{  
  //Normal constructor

  Clear();
}

//____________________________________________________________________
 BrVertex::BrVertex(BrVertex &vtx) 
  : BrDataObject(vtx.GetName(),vtx.GetTitle()) 
{  
  //Copy constructor
  
  Clear();

  SetX(vtx.GetX());
  SetY(vtx.GetY());
  SetZ(vtx.GetZ());
  SetVertexFound(vtx.VertexFound());
  SetVertexMethodUsed(vtx.GetVertexMethodUsed());
  SetVertexChisq(vtx.GetVertexChisq());
  SetVertexYSigma(vtx.GetVertexYSigma());
  SetVertexZSigma(vtx.GetVertexZSigma());
  SetVertexVarianceY(vtx.GetVarianceY());
  SetVertexVarianceZ(vtx.GetVarianceZ());
}

//____________________________________________________________________
 BrVertex::~BrVertex() { //Destructor

}

//____________________________________________________________________
 void BrVertex::Clear(Option_t* option) 
{
  fVertex_x = 999;
  fVertex_y = 999;
  fVertex_z = 999;
  Vertex_found = 0;
  Vertex_method_used = 0;
  fVertex_chisq = 999;
  fVertex_sigma_y = 999;
  fVertex_sigma_z = 999;
  fVarianceZ = 999;
}

//____________________________________________________________________
 void BrVertex::Print(Option_t* option)  const 
{
  // Print information 
  // 
  TString opt(option); 
  opt.ToLower(); 

  cout << "BrVertex: " << GetName() << "(" << GetTitle() << ")" 
       << endl; 

  if (!Vertex_found) {
    cout << " No vertex found" << endl; 
    return;
  }
  
  cout << " Method:   " << flush; 
  switch (Vertex_method_used) {
  case 0:  cout << "none" << endl; break;
  case 1:  cout << "TPM1 Clusters" << endl;  break; 
  case 2:  cout << "TPM1 Tracks" << endl;   break; 
  case 3:  cout << "Beam-Beam counters" << endl;  break; 
  case 4:  cout << "Zero degree calorimeters" << endl; break;
  default: cout << "unknown" << endl;
  }
  cout << " Position: (" <<  setw(8) << fVertex_x 
       << "," << setw(8) << fVertex_y 
       << "," << setw(8) << fVertex_z << ")" << endl
       << " Sigma:    (0," << setw(8) << fVertex_sigma_y 
       << "," <<  setw(8) << fVertex_sigma_z << ")" << endl
       << " Variance: (0," << setw(8) << fVarianceY 
       << setw(8) << fVarianceZ << ")" << endl
       << "Chi^2:     " << fVertex_chisq << endl;
}


// $Log: BrVertex.cxx,v $
// Revision 1.3  2001/08/07 12:42:16  cholm
// Added standard Print method
//
// Revision 1.2  2001/06/25 14:41:19  cholm
// Made Print conform to TObject
//
// Revision 1.1.1.1  2001/06/21 14:55:04  hagel
// Initial revision of brat2
//
// Revision 1.10  2001/04/20 23:09:11  hagel
// Added copy constructor
//
// Revision 1.9  2000/12/19 19:39:16  hagel
// Implemented Clear method (to make using with tree's more convenient)
//
// Revision 1.8  2000/09/04 16:50:52  videbaek
// remove default values from .cxx file
//
// Revision 1.7  2000/07/15 14:09:03  oslo
// Added prelim. VarianceZ() to BrTPM1ClusterVertexModul// Revision 1.6  2000/06/10 14:43:42  bjornhs
// 1) Renamed vertexing-classes.
// Old BrVertex is now BrTPMTrackVertexModule
// Old BrHCVertex is now BrTPMClusterVertexModule
// Old BrVertexData is now BrVertex
//
// 2) Made the syntax more universal. Common usage:
//    - Generate vertexmodule-object
//    - In event-loop, use SetDetectorTracks() or SetDetectorHits()
//      to pass data to the vertexmodule
//    - vertexmodule->Event(inputnode, outputnode) adds a BrVertex-object
//      called "VtxData" to outputnode
//    - use BrVertex->GetVertex_found to determine if vertex was successfully
//      located
//






This page automatically generated by script docBrat by Christian Holm

Copyright ; 2002 BRAHMS Collaboration <brahmlib@rcf.rhic.bnl.gov>
Last Update on by

Validate HTML
Validate CSS