// $Header: /data/reve-cvs/reve/revecore/PODs.cxx,v 1.1.1.1 2005/12/04 19:42:49 aljam Exp $
#include "PODs.h"
using namespace Reve;
void Reve::DisablePODTObjectStreamers()
{
// Vector is not TObject
// MCTrack derives from TParticle
TParticle::Class()->IgnoreTObjectStreamer(true);
MCTrackRef::Class()->IgnoreTObjectStreamer(true);
Hit::Class()->IgnoreTObjectStreamer(true);
Cluster::Class()->IgnoreTObjectStreamer(true);
RecTrack::Class()->IgnoreTObjectStreamer(true);
// RecKink derives from RecTrack
RecV0::Class()->IgnoreTObjectStreamer(true);
GenInfo::Class()->IgnoreTObjectStreamer(true);
}
//______________________________________________________________________
// Point
//
ClassImp(Reve::Vector);
Float_t Vector::Eta() const
{
Float_t cosTheta = CosTheta();
if (cosTheta*cosTheta < 1) return -0.5* TMath::Log( (1.0-cosTheta)/(1.0+cosTheta) );
Warning("Eta","transverse momentum = 0! return +/- 10e10");
return (z >= 0) ? 10e10 : -10e10;
}
/**************************************************************************/
/**************************************************************************/
//ClassImp(Hit);
//ClassImp(RecTrack);
/**************************************************************************/
// PointContainer
/**************************************************************************/
ClassImp(Reve::PointContainer);
PointContainer::~PointContainer()
{
delete [] fPointLabels;
delete [] fPoints;
}
/**************************************************************************/
void PointContainer::Reset(Int_t n_points)
{
if(n_points != fNPoints) {
delete [] fPointLabels;
delete [] fPoints;
fNPoints = n_points;
if(fNPoints > 0) {
fPointLabels = new Int_t[fNPoints];
fPoints = new Float_t[3*fNPoints];
} else {
fPointLabels = 0;
fPoints = 0;
}
}
}
/**************************************************************************/
void PointContainer::SetPoint(Int_t i, Int_t label, Float_t* pos)
{
fPointLabels[i] = label;
Float_t* p = fPoints + 3*i;
p[0] = pos[0]; p[1] = pos[1]; p[2] = pos[2];
}
void PointContainer::SetPoint(Int_t i, Int_t label,
Float_t x, Float_t y, Float_t z)
{
fPointLabels[i] = label;
Float_t* p = fPoints + 3*i;
p[0] = x; p[1] = y; p[2] = z;
}
/**************************************************************************/
void PointContainer::Print()
{
Float_t* p = fPoints;
for(Int_t i=0; i<fNPoints; i++, p+=3) {
printf("Point %d [%d] V(%f,%f,%f)n", i, fPointLabels[i], p[0], p[1], p[2]);
}
}
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.