//_____________________________________________________________________________
AliTRDmcmTracklet::AliTRDmcmTracklet()
:TObject()
+ ,fGeo(0)
,fDetector(-1)
,fRow(-1)
,fTrackLabel(-1)
fCol[time] = 0;
}
+ fGeo = new AliTRDgeometry();
+
}
//_____________________________________________________________________________
AliTRDmcmTracklet::AliTRDmcmTracklet(Int_t det, Int_t row, Int_t n)
:TObject()
+ ,fGeo(0)
,fDetector(det)
,fRow(row)
,fTrackLabel(-1)
fGPos = new TGraph(0);
fGAmp = new TGraph(0);
+ fGeo = new AliTRDgeometry();
+
}
//_____________________________________________________________________________
AliTRDmcmTracklet::AliTRDmcmTracklet(const AliTRDmcmTracklet &t)
:TObject(t)
+ ,fGeo(0)
,fDetector(t.fDetector)
,fRow(t.fRow)
,fTrackLabel(t.fTrackLabel)
((AliTRDmcmTracklet &) t).fCol[time] = 0;
}
+ if (fGeo) {
+ delete fGeo;
+ }
+ fGeo = new AliTRDgeometry();
+
}
//_____________________________________________________________________________
if (fGPos != 0) delete fGPos;
if (fGAmp != 0) delete fGAmp;
+ if (fGeo) {
+ delete fGeo;
+ }
+
}
//_____________________________________________________________________________
return;
}
- AliTRDCommonParam* commonParam = AliTRDCommonParam::Instance();
- if (!commonParam) {
+ if (!AliTRDCommonParam::Instance()) {
AliError("No common parameters.");
return;
}
return;
}
- Int_t iplan, icham;
+ Int_t ilayer, istack;
- iplan = geo->GetPlane(fDetector);
- icham = geo->GetChamber(fDetector);
+ ilayer = geo->GetLayer(fDetector);
+ istack = geo->GetStack(fDetector);
- AliTRDpadPlane *padPlane = commonParam->GetPadPlane(iplan,icham);
+ AliTRDpadPlane *padPlane = fGeo->GetPadPlane(ilayer,istack);
- Float_t samplFreq = calibration->GetSamplingFrequency();
+ Float_t samplFreq = AliTRDCommonParam::Instance()->GetSamplingFrequency();
Int_t time, col;
Float_t amp[3];
if (amp[0] < 0.0 || amp[1] < 0.0 || amp[2] < 0.0) continue;
- ypos = GetClusY(amp,iplan);
+ ypos = GetClusY(amp,ilayer);
colSize = padPlane->GetColSize(col);
vDrift = calibration->GetVdrift(fDetector,col,fRow);
lorentzAngle = TMath::ATan(omegaTau)*180.0/TMath::Pi();
xpos = (time+0.5) * timeBinSize;
- xpos = geo->GetTime0(iplan) - xpos;
+ xpos = geo->GetTime0(ilayer) - xpos;
ypos = padPlane->GetColPos(col) - (ypos + 0.5) * colSize;
// ExB correction
- xzero = geo->GetTime0(iplan);
+ xzero = geo->GetTime0(ilayer);
ypos = ypos + (xpos-xzero) * omegaTau;
// tilted pads correction
- thetaSlope = - padPlane->GetRowPos(fRow)/geo->GetTime0(iplan);
+ thetaSlope = - padPlane->GetRowPos(fRow)/geo->GetTime0(ilayer);
tiltingAngle = padPlane->GetTiltingAngle()/180.0*TMath::Pi();
ypos = ypos - (xpos-xzero) * thetaSlope * TMath::Sin(tiltingAngle);
fGPos->Set(npg);
- fTime0 = geo->GetTime0(iplan) - AliTRDgeometry::CdrHght() - 0.5*AliTRDgeometry::CamHght();
+ fTime0 = geo->GetTime0(ilayer) - AliTRDgeometry::CdrHght() - 0.5*AliTRDgeometry::CamHght();
fRowz = padPlane->GetRowPos(fRow) - padPlane->GetRowSize(fRow)/2.0;
Double_t xMin = 0;
}
//_____________________________________________________________________________
-Float_t AliTRDmcmTracklet::GetClusY(Float_t *adc, Int_t pla) const
+Float_t AliTRDmcmTracklet::GetClusY(Float_t *adc, Int_t layer) const
{
//
// Cluster position in the phi direction in pad units (relative to the pad border)
Float_t sigma = 0.0;
- switch(pla) {
+ switch(layer) {
case 0:
sigma = 0.515; break;
case 1:
case 5:
sigma = 0.463; break;
default:
- AliError("Wrong plane number.");
+ AliError("Wrong layer number.");
return 0.0;
}