#include "AliTOFcluster.h"
ClassImp(AliTOFcluster)
AliTOFcluster::AliTOFcluster():
AliCluster3D(),
fIdx(-1),
fQuality(-100),
fR(0),
fPhi(0),
fTDC(0),
fToT(0),
fADC(0),
fTdcND(0),
fTdcRAW(0),
fStatus(kTRUE),
fDeltaBC(0),
fL0L1Latency(0),
fESDID(-1)
{
Int_t ii;
for (ii=0; ii<5; ii++) fdetIndex[ii] = -1;
}
AliTOFcluster::AliTOFcluster(UShort_t volId,
Float_t x, Float_t y, Float_t z,
Float_t sx2, Float_t sxy, Float_t sxz,
Float_t sy2, Float_t syz,
Float_t sz2,
Int_t *lab, Int_t * const ind,
Int_t *par, Bool_t status, Int_t idx):
AliCluster3D(volId,x,y,z,sx2,sxy,sxz,sy2,syz,sz2,lab),
fIdx(idx),
fQuality(-100),
fR(0),
fPhi(0),
fTDC(par[0]),
fToT(par[1]),
fADC(par[2]),
fTdcND(par[3]),
fTdcRAW(par[4]),
fStatus(status),
fDeltaBC(par[5]),
fL0L1Latency(par[6]),
fESDID(-1)
{
Int_t ii;
for (ii=0; ii<5; ii++) fdetIndex[ii] = ind[ii];
Float_t xyz[3];
GetGlobalXYZ(xyz);
fR = TMath::Sqrt(xyz[0]*xyz[0] + xyz[1]*xyz[1]);
fPhi = TMath::ATan2(xyz[1], xyz[0]);
}
AliTOFcluster::AliTOFcluster(const AliTOFcluster & cluster):
AliCluster3D(cluster),
fIdx(cluster.fIdx),
fQuality(cluster.fQuality),
fR(cluster.fR),
fPhi(cluster.fPhi),
fTDC(cluster.fTDC),
fToT(cluster.fToT),
fADC(cluster.fADC),
fTdcND(cluster.fTdcND),
fTdcRAW(cluster.fTdcRAW),
fStatus(cluster.fStatus),
fDeltaBC(cluster.fDeltaBC),
fL0L1Latency(cluster.fL0L1Latency),
fESDID(-1)
{
Int_t ii;
for (ii=0; ii<5; ii++) fdetIndex[ii] = cluster.fdetIndex[ii];
}
AliTOFcluster & AliTOFcluster::operator = (const AliTOFcluster & cluster)
{
if (this == &cluster)
return *this;
TObject::operator=(cluster);
fIdx=cluster.fIdx;
fQuality=cluster.fQuality;
fR=cluster.fR;
fPhi=cluster.fPhi;
fTDC=cluster.fTDC;
fToT=cluster.fToT;
fADC=cluster.fADC;
fTdcND=cluster.fTdcND;
fTdcRAW=cluster.fTdcRAW;
fStatus=cluster.fStatus;
fDeltaBC=cluster.fDeltaBC;
fL0L1Latency=cluster.fL0L1Latency;
fESDID = -1;
for (Int_t ii=0; ii<5; ii++)
fdetIndex[ii] = cluster.fdetIndex[ii];
return *this;
}
AliTOFcluster::~AliTOFcluster() {
}