*/
-#include <iostream.h>
+#include <Riostream.h>
#include <TString.h>
#include <TPolyLine3D.h>
#include <TMath.h>
ClassImp(AliTPCLaserTracks)
-AliTPCLaserTracks::AliTPCLaserTracks():
+ AliTPCLaserTracks::AliTPCLaserTracks():TObject(),
fId(-1),
fSide(-1),
fRod(-1),
fBundle(-1),
fBeam(-1),
- fX(0),
- fY(0),
- fZ(0),
- fPhi(0),
- fTheta(0),
+ fX(0.),
+ fY(0.),
+ fZ(0.),
+ fTime(0.),
+ fPhi(0.),
+ fTheta(0.),
fMaxSize(0),
fNpoints(0),
fXarr(0x0),
}
//_______________________________________________________________________
-AliTPCLaserTracks::AliTPCLaserTracks(Int_t npoints):
+AliTPCLaserTracks::AliTPCLaserTracks(Int_t npoints):TObject(),
fId(-1),
fSide(-1),
fRod(-1),
fBundle(-1),
fBeam(-1),
- fX(0),
- fY(0),
- fZ(0),
- fPhi(0),
- fTheta(0),
+ fX(0.),
+ fY(0.),
+ fZ(0.),
+ fTime(0.),
+ fPhi(0.),
+ fTheta(0.),
fMaxSize(0),
fNpoints(0),
fXarr(0x0),
fNpoints = npoints;
InitPoints();
}
+//______________________________________________________________________
+AliTPCLaserTracks::AliTPCLaserTracks(const AliTPCLaserTracks ¶m):TObject(),
+ fId(-1),
+ fSide(-1),
+ fRod(-1),
+ fBundle(-1),
+ fBeam(-1),
+ fX(0.),
+ fY(0.),
+ fZ(0.),
+ fTime(0.),
+ fPhi(0.),
+ fTheta(0.),
+ fMaxSize(0),
+ fNpoints(0),
+ fXarr(0x0),
+ fYarr(0x0),
+ fZarr(0x0)
+{
+ //
+ // dummy
+ //
+ fPhi=param.fPhi;
+}
+//______________________________________________________________________
+AliTPCLaserTracks & AliTPCLaserTracks::operator=(const AliTPCLaserTracks & param)
+{
+ //
+ // assignment operator - dummy
+ //
+ fPhi=param.fPhi;
+ return (*this);
+}
//_______________________________________________________________________
Double_t AliTPCLaserTracks::FindBeamLength(TVector3 vF, TVector3 vP)
//if we cross two boarders on our way return the closer boarder
- if ( n1>0 && n2>0 )
+ if ( (n1>0) && (n2>0) ) {
if ( (vF-vI1).Mag() <= (vF-vI2).Mag() )
return (vF-vI1).Mag();
else
- return (vF-vI2).Mag();
+ return (vF-vI2).Mag();
+ }
if ( n1>0 )
return (vF-vI1).Mag();
//_______________________________________________________________________
TPolyLine3D* AliTPCLaserTracks::GetLine()
{
+ //
+ // Make a polilyne object oout of the points
+ //
if ( fNpoints ) return new TPolyLine3D(fNpoints,fXarr,fYarr,fZarr);
return 0x0;
}
//_______________________________________________________________________
-TObjArray* AliTPCLaserTracks::GetLines(Char_t* file, Char_t *cuts)
+TObjArray* AliTPCLaserTracks::GetLines(const Char_t* file, const Char_t *cuts)
{
-
+ //
+ // Read the input files with the laser track
+ // Make a array of polylines for visualization
+
TObjArray *array = new TObjArray;
TFile *f = TFile::Open(file,"read");
id = ltp->GetId();
}
}
-
- return id;
delete f;
+ return id;
}
//_______________________________________________________________________
//
// if ( fP ) delete fP;
- if ( fXarr ) delete fXarr;
- if ( fYarr ) delete fYarr;
- if ( fZarr ) delete fZarr;
+ if ( fXarr ) delete [] fXarr;
+ if ( fYarr ) delete [] fYarr;
+ if ( fZarr ) delete [] fZarr;
}