fRefLayers[0] = 3;
fRefLayers[1] = 2;
fRefLayers[2] = 1;
- zChannelGen();
+ GenerateZChannelMap();
}
AliTRDgtuParam::~AliTRDgtuParam()
Int_t AliTRDgtuParam::GetRefLayer(Int_t refLayerIdx) const
{
+ // returns the reference layer indexed by refLayerIdx
+
if (refLayerIdx >= 0 && refLayerIdx < fgkNRefLayers)
return fRefLayers[refLayerIdx];
else
return -1;
}
-Int_t AliTRDgtuParam::zChannelGen()
+Int_t AliTRDgtuParam::GenerateZChannelMap()
{
// generate the z-channel map
// assuming that the tracks come from the vertex
for (Int_t iStack = 0; iStack < fGeo->Nstack(); iStack++) {
- Float_t X[6] = { 0 };
- Float_t Z[6][16] = {{ 0 }};
+ Float_t x[6] = { 0 };
+ Float_t z[6][16] = {{ 0 }};
Float_t dZ[6][16] = {{ 0 }};
for (Int_t iLayer = 0; iLayer < fGeo->Nlayer(); iLayer++) {
AliTRDpadPlane *pp = fGeo->GetPadPlane(iLayer, iStack);
- X[iLayer] = fGeo->GetTime0(iLayer) - fGeo->CdrHght(); // ???
+ x[iLayer] = fGeo->GetTime0(iLayer) - fGeo->CdrHght(); // ???
for (Int_t iRow = 0; iRow < fGeo->GetRowMax(iLayer, iStack, iSec); iRow++) {
- Z[iLayer][iRow] = pp->GetRowPos(iRow); // this is the right (pos. z-direction) border of the pad
+ z[iLayer][iRow] = pp->GetRowPos(iRow); // this is the right (pos. z-direction) border of the pad
dZ[iLayer][iRow] = pp->GetRowSize(iRow); // length of the pad in z-direction
for (Int_t i = 0; i < fgkNZChannels; i++)
fZSubChannel[iStack][i][iLayer][iRow] = 0;
for (Int_t fixRow = 0; fixRow < fGeo->GetRowMax(fgkFixLayer, iStack, iSec); fixRow++) {
- Double_t fixZmin = Z[fgkFixLayer][fixRow] - dZ[fgkFixLayer][fixRow];
- Double_t fixZmax = Z[fgkFixLayer][fixRow];
- Double_t fixX = X[fgkFixLayer] + 1.5; // ??? 1.5 from where?
+ Double_t fixZmin = z[fgkFixLayer][fixRow] - dZ[fgkFixLayer][fixRow];
+ Double_t fixZmax = z[fgkFixLayer][fixRow];
+ Double_t fixX = x[fgkFixLayer] + 1.5; // ??? 1.5 from where?
for (Int_t iLayer = 0; iLayer < fGeo->Nlayer(); iLayer++) {
Double_t leftZ, rightZ;
if (iLayer <= fgkFixLayer) {
- leftZ = (fixZmin + fVertexSize) * (X[iLayer] + 1.5) / fixX - fVertexSize;
- rightZ = (fixZmax - fVertexSize) * (X[iLayer] + 1.5) / fixX + fVertexSize;
+ leftZ = (fixZmin + fVertexSize) * (x[iLayer] + 1.5) / fixX - fVertexSize;
+ rightZ = (fixZmax - fVertexSize) * (x[iLayer] + 1.5) / fixX + fVertexSize;
}
else {
- leftZ = (fixZmin - fVertexSize) * (X[iLayer] + 1.5) / fixX + fVertexSize;
- rightZ = (fixZmax + fVertexSize) * (X[iLayer] + 1.5) / fixX - fVertexSize;
+ leftZ = (fixZmin - fVertexSize) * (x[iLayer] + 1.5) / fixX + fVertexSize;
+ rightZ = (fixZmax + fVertexSize) * (x[iLayer] + 1.5) / fixX - fVertexSize;
}
Double_t epsilon = 0.001;
for (Int_t iRow = 0; iRow < fGeo->GetRowMax(iLayer, iStack, iSec); iRow++) {
- if ( (Z[iLayer][iRow] ) > (leftZ + epsilon) &&
- (Z[iLayer][iRow] - dZ[iLayer][iRow] ) < (rightZ - epsilon) ) {
+ if ( (z[iLayer][iRow] ) > (leftZ + epsilon) &&
+ (z[iLayer][iRow] - dZ[iLayer][iRow] ) < (rightZ - epsilon) ) {
fZChannelMap[iStack][fixRow][iLayer][iRow] = 1;
if (fZSubChannel[iStack][fixRow % fgkNZChannels][iLayer][iRow] != 0) {
AliError("Collision in Z-Channel assignment occured! No reliable tracking!!!");
{
// get the constant for the calculation of alpha
- Int_t Ci = (Int_t) (GetChamberThickness() / fGeo->GetTime0(layer) * GetBinWidthY() / GetBinWidthdY() * (1 << (GetBitExcessAlpha() + GetBitExcessY() + 1)) );
- return Ci;
+ Int_t ci = (Int_t) (GetChamberThickness() / fGeo->GetTime0(layer) * GetBinWidthY() / GetBinWidthdY() * (1 << (GetBitExcessAlpha() + GetBitExcessY() + 1)) );
+ return ci;
}
Int_t AliTRDgtuParam::GetCiYProj(Int_t layer) const
{
// get the constant for the calculation of y_proj
- Float_t Xmid = (fGeo->GetTime0(0) + fGeo->GetTime0(fGeo->Nlayer()-1)) / 2.;
- Int_t Ci = (Int_t) (- (fGeo->GetTime0(layer) - Xmid) / GetChamberThickness() * GetBinWidthdY() / GetBinWidthY() * (1 << GetBitExcessYProj()) );
- return Ci;
+ Float_t xmid = (fGeo->GetTime0(0) + fGeo->GetTime0(fGeo->Nlayer()-1)) / 2.;
+ Int_t ci = (Int_t) (- (fGeo->GetTime0(layer) - xmid) / GetChamberThickness() * GetBinWidthdY() / GetBinWidthY() * (1 << GetBitExcessYProj()) );
+ return ci;
}
Int_t AliTRDgtuParam::GetYt(Int_t stack, Int_t layer, Int_t zrow) const
Bool_t AliTRDgtuParam::GenerateRecoCoefficients(Int_t trackletMask)
{
+ // calculate the coefficients for the straight line fit
+ // depending on the mask of contributing tracklets
+
fCurrTrackletMask = trackletMask;
TMatrix a(GetNLayers(), 3);
return ( (l1 >= 0) && (l2 >= 0) );
}
-Float_t AliTRDgtuParam::GetRadius(Int_t a, Float_t b, Float_t x1, Float_t x2)
+Float_t AliTRDgtuParam::GetRadius(Int_t a, Float_t b, Float_t x1, Float_t x2) const
{
// get the radius for the track
Float_t d = (1 + b * b /2 ) * (x2 - x1);