BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page
//____________________________________________________________________
// 
// Simple class containing the tof hit Id (namely the slat number) that 
// matched the global track and is  returned by the tof pid module
// in a table called <tof name> Pid
//
// This class derives from BrPid to benefit from the info included in it
// 
// This class also contains the velocity beta, mass squared and 
// energy deposited
//____________________________________________________________________
//
// $Id: BrTofPid.cxx,v 1.2 2001/10/03 09:54:48 ouerdane Exp $
// $Author: ouerdane $
// $Date: 2001/10/03 09:54:48 $
// $Copyright: (C) 2001 BRAHMS Collaboration <brahmlib@rhic.bnl.gov>
//
#ifndef __IOSTREAM__
#include <iostream.h>
#endif
#ifndef BRAT_BrTofPid
#include "BrTofPid.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif

//____________________________________________________________________
ClassImp(BrTofPid);

//____________________________________________________________________
 BrTofPid::BrTofPid() 
  : BrPid()
{
  // default constructor
  UInt_t id = GetUniqueID();
  id = 0xff + (0xff << 8) + (0xff << 16) + (0xff << 24);
  SetUniqueID(id);

  fBeta     = -1;
  fMomentum = -1111;
  fMass2    = -1111;
  fDE       = -1; 
}


//____________________________________________________________________
 void BrTofPid::Print(Option_t* option) const 
{
  //
  // Print out the content of an object
  // Options:
  //   "" 
  //   P  physical quantities
  //   M  matching ids
  //   A  all

  TString opt(option);
  opt.ToUpper();

  if (opt.Contains("P"))
    cout << "              Beta:  " << fBeta        << endl
	 << "          Momentum:  " << fMomentum    << endl
	 << "             Mass2:  " << fMass2       << endl
	 << "  Energy deposited:  " << fDE          << endl;
  
  if (opt.Contains("M"))
    cout << "          Track Id:  " << fTrackId     << endl
	 << "      Tof Panel Id:  " << GetPanelId() << endl
	 << "      1st Tof slat:  " << GetHitId()   << endl
	 << "      2nd Tof slat:  " << GetHit2Id()  << endl;

  if (opt.Contains("A"))
    BrPid::Print(option);

}
//____________________________________________________________________
 Int_t BrTofPid::GetPanelId() const 
{
  UInt_t id = GetUniqueID();
  return (id >> 16) & 0xff;
}

//____________________________________________________________________
 Int_t BrTofPid::GetHitId() const 
{
  UInt_t id = GetUniqueID();
  return (id >> 8) & 0xff;
}

//____________________________________________________________________
 Int_t BrTofPid::GetHit2Id() const
{
  UInt_t id = GetUniqueID();
  return id & 0xff;
}


//____________________________________________________________________
//
// $Log: BrTofPid.cxx,v $
// Revision 1.2  2001/10/03 09:54:48  ouerdane
// Modified Print options
//
// Revision 1.1  2001/10/02 01:41:47  ouerdane
// Added new holding the tof pid
//
//



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