BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page
//____________________________________________________________________
// 
// Base class for particle identification classes. Contains pdg code,
// confidence level, track id and detector.
// 

//____________________________________________________________________
//
// $Id: BrPid.cxx,v 1.3 2001/10/02 01:43:47 ouerdane Exp $
// $Author: ouerdane $
// $Date: 2001/10/02 01:43:47 $
// $Copyright: (C) 2001 BRAHMS Collaboration <brahmlib@rhic.bnl.gov>
//

#ifndef BRAT_BrPid
#include "BrPid.h"
#endif
#ifndef ROOT_TDatabasePDG
#include "TDatabasePDG.h"
#endif

#include <iostream>
//____________________________________________________________________
ClassImp(BrPid);

//____________________________________________________________________
 BrPid::BrPid()
{
  // default contructor
  fPdgCode1 = 0;
  fPdgCode2 = 0;
  fPdgCode3 = 0;
}

//____________________________________________________________________
 void BrPid::Print(Option_t* option) const 
{
  // Print information on this object. 
  if (fPdgCode1!=0) 
    cout << "  Pdg Code1: " << fPdgCode1 
	 << "  (" << GetNameOfPdgParticle(fPdgCode1) << ") @ " 
	 << fConfidenceLevel1 * 100 << "% CL" << endl;
  if ((fPdgCode2!=0)&&(fPdgCode3!=0)) {
    cout << "  Pdg Code2: " << fPdgCode2 
	 << "  (" << GetNameOfPdgParticle(fPdgCode2) << ") @ " 
	 << fConfidenceLevel2 * 100 << "% CL" << endl;
    cout << "  Pdg Code3: " << fPdgCode3 
	 << "  (" << GetNameOfPdgParticle(fPdgCode3) << ") @ " 
	 << fConfidenceLevel3 * 100 << "% CL" << endl;
  }
}

//____________________________________________________________________
 const Char_t* BrPid::GetNameOfPdgParticle(Int_t pdg) const 
{
  return TDatabasePDG::Instance()->GetParticle(pdg)->GetName();
}

  

//____________________________________________________________________
//
// $Log: BrPid.cxx,v $
// Revision 1.3  2001/10/02 01:43:47  ouerdane
// Pid classes derive now from TObject, removed useless named contructor
//
// Revision 1.2  2001/09/25 23:04:56  sanders
// Fixed constness problem with return value for GetNameOfPdgParticle
//
// Revision 1.1  2001/09/03 17:57:16  ekman
// Added BrPid class.
//
//

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