// $Id: BrGeantHit.cxx,v 1.6 1998/07/28 21:31:00 videbaek Exp $
// $Log: BrGeantHit.cxx,v $
// Revision 1.6 1998/07/28 21:31:00 videbaek
// Change units to MeV
//
// Revision 1.5 1998/07/20 17:42:57 videbaek
// Added Pid hit to hit structure. Needed for effecient handling
// of detector response.
//
// Revision 1.4 1998/06/21 14:34:51 hagel
// Correct problem in BrDigitizeDC; clean up tests
//
// Revision 1.3 1998/06/06 21:45:10 hagel
// Add ostream capabilities to some objects
//
// Revision 1.2 1998/04/30 17:12:34 videbaek
// Added functionality to BrGeantInput
//
// Revision 1.1.1.1 1998/03/04 21:33:10 brahmlib
// Brat geant
//
//
#include "BrGeantHit.h"
ClassImp(BrGeantHit)
/////////////////////////////////////////////////////////////
//
// BrGeantHit is a BRAHMS data class for storing information for
// one detector GEANT hit. The class is derived from TObject and can
// as such be manipulated by ROOT.
//
//////////////////////////////////////////////////////////////
BrGeantHit::BrGeantHit()
{
//
// Dummy constructor. All object members are reset
//
fDetectorID = 0;
for( Int_t i=0;i<3;i++) {
fLocalPosIn[i] = (float)0.0;
fLocalPosOut[i] = (float)0.0;
fGlobalPosIn[i] = (float)0.0;
fGlobalPosOut[i] = (float)0.0;
}
fTof = (float)0.0;
fDedx = (float)0.0;
fPdet = (float)0.0;
fIsub = 0;
fPid = 0;
}
BrGeantHit::BrGeantHit(GeantStreamHits& fHits)
{
//
// Constructor. The membeer objects are filled with the values as gotten from
// the input structure GeantStreamHits.
//
fTrackNo = fHits.trackno;
fDetectorID = fHits.DetectorId;
for( Int_t i=0;i<3;i++) {
fLocalPosIn[i] = fHits.LocalPositionIn[i];
fLocalPosOut[i] = fHits.LocalPositionOut[i];
fGlobalPosIn[i] = fHits.GlobalPositionIn[i];
fGlobalPosOut[i] = fHits.GlobalPositionOut[i];
}
fTof = fHits.Tof * (float)1.e9;
fDedx = fHits.dedx * (float)1.e3;
fPdet = fHits.Etot*1.e3;
fIsub = fHits.Isub;
fPid = fHits.Pid;
}
ostream& operator<< (ostream & os,BrGeantHit *ghit)
{
os<<"Trackno,DetectorID,DeDx = "<<ghit->TrackNo()<<","<<ghit->DetectorID()<<","<<ghit->Dedx()<<endl;
os<<" Local x,y,z In = "<<ghit->LocalPosIn()[0];
os<<","<<ghit->LocalPosIn()[1];
os<<","<<ghit->LocalPosIn()[2];
os<<" "<<" Out = "<<ghit->LocalPosOut()[0];
os<<","<<ghit->LocalPosOut()[1];
os<<","<<ghit->LocalPosOut()[2];
os<<endl;
return os;
}
ROOT page - Class index - 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.