// something dependent on calibration values
//
- Int_t iBin = ((Int_t) (( - dist - fPRFlo) / fPRFwid));
+ Int_t iBin = ((Int_t) ((dist - fPRFlo) / fPRFwid));
Int_t iOff = layer * fPRFbin;
Int_t iBin0 = iBin - fPRFpad + iOff;
-
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
}
AliTRDReconstructor::SetRecoParam(rec);
}
+
}
//_____________________________________________________________________________
fRawVersion = AliTRDfeeParam::Instance()->GetRAWversion();
FillLUT();
+
}
//_____________________________________________________________________________
//_____________________________________________________________________________
UChar_t AliTRDclusterizer::GetStatus(Short_t &signal)
{
+ //
+ // Check if a pad is masked
+ //
+
UChar_t status = 0;
- // check if pad is masked
+
if(signal>0 && TESTBIT(signal, 10)){
CLRBIT(signal, 10);
for(int ibit=0; ibit<4; ibit++){
// Apply the gain and the tail cancelation via digital filter
TailCancelation(digitsIn
- ,digitsOut
- ,indexesIn
- ,fIndexesOut
- ,nTimeTotal
- ,adcThreshold
- ,calGainFactorROC
- ,calGainFactorDetValue);
+ ,digitsOut
+ ,indexesIn
+ ,fIndexesOut
+ ,nTimeTotal
+ ,adcThreshold
+ ,calGainFactorROC
+ ,calGainFactorDetValue);
Int_t row = 0;
Int_t col = 0;
UChar_t status[3]={0, 0, 0}, ipos = 0;
fIndexesOut->ResetCounters();
while (fIndexesOut->NextRCTbinIndex(row, col, time)){
+
Float_t signalM = TMath::Abs(digitsOut->GetDataUnchecked(row,col,time));
status[1] = digitsIn->GetPadStatus(row,col,time);
if(status[1]) SETBIT(ipos, AliTRDcluster::kMaskedCenter);
} else if(status[2] && signalL <= signalM && signalL >= sigThresh){
digitsOut->SetDataUnchecked(row,col,time,-signalM);
digitsOut->SetDataUnchecked(row, col, time-1, 0.);
- fIndexesMaxima->AddIndexTBin(row,col,time);
- padStatus.SetDataUnchecked(row, col, time, ipos);
+ fIndexesMaxima->AddIndexTBin(row,col,time);
+ padStatus.SetDataUnchecked(row, col, time, ipos);
}
}
} else { // wrong maximum pad
// Maximum found ?
if (digitsOut->GetDataUnchecked(row,col,time) < 0.0) {
+
for (iPad = 0; iPad < kNclus; iPad++) {
Int_t iPadCol = col - 1 + iPad;
clusterSignal[iPad] = TMath::Abs(digitsOut->GetDataUnchecked(row,iPadCol,time));
// Count the number of pads in the cluster
Int_t nPadCount = 0;
Int_t ii;
- // Look to the left
+ // Look to the right
ii = 0;
while (TMath::Abs(digitsOut->GetDataUnchecked(row,col-ii ,time)) >= sigThresh) {
nPadCount++;
ii++;
if (col-ii < 0) break;
}
- // Look to the right
+ // Look to the left
ii = 0;
while (TMath::Abs(digitsOut->GetDataUnchecked(row,col+ii+1,time)) >= sigThresh){
nPadCount++;
if (fivePadCluster){
for (iPad = 0; iPad < kNsig; iPad++) {
padSignal[iPad] = TMath::Abs(digitsOut->GetDataUnchecked(row
- ,col-1+iPad
- ,time));
+ ,col-1+iPad
+ ,time));
}
// Unfold the two maxima and set the signal on
// the overlapping pad to the ratio
if (AliTRDReconstructor::RecoParam()->IsLUT()) {
// Calculate the position of the cluster by using the
// lookup table method
- clusterPosCol = LUTposition(ilayer,clusterSignal[0]
- ,clusterSignal[1]
- ,clusterSignal[2]);
- } else {
+ clusterPosCol = LUTposition(ilayer,clusterSignal[2]
+ ,clusterSignal[1]
+ ,clusterSignal[0]);
+ }
+ else {
// Calculate the position of the cluster by using the
// center of gravity method
for (Int_t i = 0; i < kNsig; i++) {
padSignal[i] = 0.0;
}
padSignal[2] = TMath::Abs(digitsOut->GetDataUnchecked(row,col ,time)); // Central pad
- padSignal[1] = TMath::Abs(digitsOut->GetDataUnchecked(row,col-1,time)); // Left pad
- padSignal[3] = TMath::Abs(digitsOut->GetDataUnchecked(row,col+1,time)); // Right pad
-
+ padSignal[1] = TMath::Abs(digitsOut->GetDataUnchecked(row,col+1,time)); // Left pad
+ padSignal[3] = TMath::Abs(digitsOut->GetDataUnchecked(row,col-1,time)); // Right pad
if ((col > 2) &&
(TMath::Abs(digitsOut->GetDataUnchecked(row,col-2,time)) < padSignal[1])) {
- padSignal[0] = TMath::Abs(digitsOut->GetDataUnchecked(row,col-2,time));
+ padSignal[4] = TMath::Abs(digitsOut->GetDataUnchecked(row,col-2,time));
}
if ((col < nColMax - 3) &&
(TMath::Abs(digitsOut->GetDataUnchecked(row,col+2,time)) < padSignal[3])){
- padSignal[4] = TMath::Abs(digitsOut->GetDataUnchecked(row,col+2,time));
+ padSignal[0] = TMath::Abs(digitsOut->GetDataUnchecked(row,col+2,time));
}
clusterPosCol = GetCOG(padSignal);
}
// Here the calibration for T0, Vdrift and ExB is applied as well.
Double_t clusterXYZ[6];
clusterXYZ[0] = clusterPosCol;
- clusterXYZ[1] = clusterSignal[0];
+ clusterXYZ[1] = clusterSignal[2];
clusterXYZ[2] = clusterSignal[1];
- clusterXYZ[3] = clusterSignal[2];
+ clusterXYZ[3] = clusterSignal[0];
clusterXYZ[4] = 0.0;
clusterXYZ[5] = 0.0;
Int_t clusterRCT[3];
Double_t clusterCharge = clusterXYZ[3];
Char_t clusterTimeBin = ((Char_t) clusterRCT[2]);
AliTRDcluster *cluster = new AliTRDcluster(idet
- ,clusterCharge
- ,clusterPos
- ,clusterSig
- ,0x0
- ,((Char_t) nPadCount)
- ,signals
- ,((UChar_t) col)
- ,((UChar_t) row)
- ,((UChar_t) time)
- ,clusterTimeBin
- ,clusterPosCol
- ,volid);
+ ,clusterCharge
+ ,clusterPos
+ ,clusterSig
+ ,0x0
+ ,((Char_t) nPadCount)
+ ,signals
+ ,((UChar_t) col)
+ ,((UChar_t) row)
+ ,((UChar_t) time)
+ ,clusterTimeBin
+ ,clusterPosCol
+ ,volid);
cluster->SetInChamber(!out);
+
UChar_t maskPosition = padStatus.GetDataUnchecked(row, col, time);
- if(maskPosition){
+ if (maskPosition) {
cluster->SetPadMaskedPosition(maskPosition);
-
- if(maskPosition & AliTRDcluster::kMaskedLeft) cluster->SetPadMaskedStatus(status[0]);
- else if(maskPosition & AliTRDcluster::kMaskedCenter) cluster->SetPadMaskedStatus(status[1]);
- else cluster->SetPadMaskedStatus(status[2]);
+ if (maskPosition & AliTRDcluster::kMaskedLeft) {
+ cluster->SetPadMaskedStatus(status[0]);
+ }
+ else if (maskPosition & AliTRDcluster::kMaskedCenter) {
+ cluster->SetPadMaskedStatus(status[1]);
+ }
+ else {
+ cluster->SetPadMaskedStatus(status[2]);
+ }
}
// Temporarily store the row, column and time bin of the center pad
+ signal[3]
+ signal[4];
+ // ???????????? CBL
Double_t res = (0.0 * (-signal[0] + signal[4])
+ (-signal[1] + signal[3])) / sum;
// //
///////////////////////////////////////////////////////////////////////////////
-
#include <TGeoManager.h>
#include <TGeoPhysicalNode.h>
#include <TGeoMatrix.h>
#include "AliTRDcalibDB.h"
#include "AliTRDgeometry.h"
#include "AliTRDpadPlane.h"
+#include "AliTRDSimParam.h"
ClassImp(AliTRDgeometry)
padPlane->SetWidthOPad(0.515);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.635);
- padPlane->SetTiltingAngle(-2.0);
+ padPlane->SetTiltingAngle(2.0);
}
else {
// L0C1 type
padPlane->SetWidthOPad(0.515);
padPlane->SetLengthIPad(7.5);
padPlane->SetWidthIPad(0.635);
- padPlane->SetTiltingAngle(-2.0);
+ padPlane->SetTiltingAngle(2.0);
}
break;
case 1:
padPlane->SetWidthOPad(0.585);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.665);
- padPlane->SetTiltingAngle(2.0);
+ padPlane->SetTiltingAngle(-2.0);
}
else {
// L1C1 type
padPlane->SetWidthOPad(0.585);
padPlane->SetLengthIPad(7.5);
padPlane->SetWidthIPad(0.665);
- padPlane->SetTiltingAngle(2.0);
+ padPlane->SetTiltingAngle(-2.0);
}
break;
case 2:
padPlane->SetWidthOPad(0.705);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.695);
- padPlane->SetTiltingAngle(-2.0);
+ padPlane->SetTiltingAngle(2.0);
}
else {
// L2C1 type
padPlane->SetWidthOPad(0.705);
padPlane->SetLengthIPad(8.0);
padPlane->SetWidthIPad(0.695);
- padPlane->SetTiltingAngle(-2.0);
+ padPlane->SetTiltingAngle(2.0);
}
break;
case 3:
padPlane->SetWidthOPad(0.775);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.725);
- padPlane->SetTiltingAngle(2.0);
+ padPlane->SetTiltingAngle(-2.0);
}
else {
// L3C1 type
padPlane->SetWidthOPad(0.775);
padPlane->SetLengthIPad(8.5);
padPlane->SetWidthIPad(0.725);
- padPlane->SetTiltingAngle(2.0);
+ padPlane->SetTiltingAngle(-2.0);
}
break;
case 4:
padPlane->SetWidthOPad(0.845);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.755);
- padPlane->SetTiltingAngle(-2.0);
+ padPlane->SetTiltingAngle(2.0);
}
else {
// L4C1 type
padPlane->SetWidthOPad(0.845);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.755);
- padPlane->SetTiltingAngle(-2.0);
+ padPlane->SetTiltingAngle(2.0);
}
break;
case 5:
padPlane->SetWidthOPad(0.965);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.785);
- padPlane->SetTiltingAngle(2.0);
+ padPlane->SetTiltingAngle(-2.0);
}
else {
// L5C1 type
padPlane->SetWidthOPad(0.965);
padPlane->SetLengthIPad(9.0);
padPlane->SetWidthIPad(0.785);
- padPlane->SetTiltingAngle(2.0);
+ padPlane->SetTiltingAngle(-2.0);
}
break;
};
//
// Column direction
//
- Double_t col = fCwidth[ilayer] / 2.0
- + fgkCroW
- - padPlane->GetWidthRim();
+ Double_t col = - fCwidth[ilayer] / 2.0
+ - fgkCroW
+ + padPlane->GetWidthRim();
for (Int_t ic = 0; ic < padPlane->GetNcols(); ic++) {
padPlane->SetPadCol(ic,col);
- col -= padPlane->GetColSpacing();
+ col += padPlane->GetColSpacing();
if (ic == 0) {
- col -= padPlane->GetWidthOPad();
+ col += padPlane->GetWidthOPad();
}
else {
- col -= padPlane->GetWidthIPad();
+ col += padPlane->GetWidthIPad();
}
}
// Calculate the offset to translate from the local ROC system into
Char_t cTagV[6];
Char_t cTagM[5];
+ AliTRDSimParam *simParam = AliTRDSimParam::Instance();
+
// There are three TRD volumes for the supermodules in order to accomodate
// the different arrangements in front of PHOS
// UTR1: Default supermodule
Int_t iDet = GetDetectorSec(ilayer,istack);
Int_t iCopy = GetDetector(ilayer,istack,0) * 1000;
Int_t nMCMrow = GetRowMax(ilayer,istack,0);
- Float_t ySize = (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW)
+ Float_t ySize = (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW)
/ ((Float_t) nMCMrow);
Int_t nMCMcol = 8;
Float_t xSize = (GetChamberWidth(ilayer) - 2.0*fgkCpadW)
- / ((Float_t) nMCMcol);
+ / ((Float_t) nMCMcol + 6); // Introduce 6 gaps
+ Int_t iMCM[8] = { 1, 2, 3, 5, 8, 9, 10, 12 }; // 0..7 MCM + 6 gap structure
sprintf(cTagV,"UU%02d",iDet);
for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
- xpos = (0.5 + iMCMcol) * xSize + 1.0
+ xpos = (0.5 + iMCM[iMCMcol]) * xSize + 1.0
- fCwidth[ilayer]/2.0;
- ypos = (0.5 + iMCMrow) * ySize + 1.0
+ ypos = (0.5 + iMCMrow) * ySize + 1.0
- fClength[ilayer][istack]/2.0 + fgkHspace/2.0;
zpos = -0.4 + 0.742/2.0;
gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol,cTagV
,xpos,ypos,zpos,0,"ONLY");
- }
+ }
}
}
Int_t AliTRDpadPlane::GetPadColNumber(Double_t rphi) const
{
//
- // Finds the pad column number for a given global rphi-position
+ // Finds the pad column number for a given rphi-position
//
Int_t col = 0;
Int_t nbelow = 0;
Int_t middle = 0;
- if ((rphi > GetCol0() ) ||
- (rphi < GetColEnd())) {
+ if ((rphi < GetCol0() ) ||
+ (rphi > GetColEnd())) {
col = -1;
}
else {
- nabove = fNcols + 1;
+ nabove = fNcols;
nbelow = 0;
while (nabove - nbelow > 1) {
middle = (nabove + nbelow) / 2;
- if (rphi == fPadCol[middle-1]) {
+ if (rphi == fPadCol[middle]) {
col = middle;
}
- if (rphi > fPadCol[middle-1]) {
- nabove = middle;
+ if (rphi > fPadCol[middle]) {
+ nbelow = middle;
}
else {
- nbelow = middle;
+ nabove = middle;
}
}
- col = nbelow - 1;
+ col = nbelow;
}
/* $Id$ */
-//////////////////////////////////////////////////
-// //
-// TRD pad plane class //
-// //
-// Contains the information on pad postions, //
-// pad dimensions, tilting angle, etc. //
-// It also provides methods to identify the //
-// current pad number from global coordinates. //
-// //
-//////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+// //
+// TRD pad plane class //
+// //
+// Contains the information on ideal pad positions, pad dimensions, //
+// tilting angle, etc. //
+// It also provides methods to identify the current pad number from //
+// local tracking coordinates. //
+// //
+////////////////////////////////////////////////////////////////////////////
#include <TObject.h>
-
//_____________________________________________________________________________
class AliTRDpadPlane : public TObject {
Double_t GetPadRowOffset(Int_t row, Double_t z) const
{ if ((row < 0) || (row >= fNrows))
return -1.0;
- else
+ else
return fPadRow[row] + fPadRowSMOffset - z; };
Double_t GetPadRowOffsetROC(Int_t row, Double_t z) const
{ if ((row < 0) || (row >= fNrows))
{ if ((col < 0) || (col >= fNcols))
return -1.0;
else
- return fPadCol[col] - rphi; };
+ return rphi - fPadCol[col]; };
Double_t GetTiltingAngle() const { return fTiltingAngle; };
Double_t GetRowEnd() const { return fPadRow[fNrows-1] - fLengthOPad + fPadRowSMOffset; };
Double_t GetRowEndROC() const { return fPadRow[fNrows-1] - fLengthOPad; };
- Double_t GetColEnd() const { return fPadCol[fNcols-1] - fWidthOPad; };
+ Double_t GetColEnd() const { return fPadCol[fNcols-1] + fWidthOPad; };
Double_t GetRowPos(Int_t row) const { return fPadRow[row] + fPadRowSMOffset; };
Double_t GetRowPosROC(Int_t row) const { return fPadRow[row]; };
// apply ExB correction to the Y-position
// and move to the Z-position relative to the middle of the chamber
posLocal[0] = -xLocal;
- posLocal[1] = (fPadPlane->GetColPos(col) - (x[0] + 0.5) * colSize) - driftLength * exbCorr;
+ posLocal[1] = (fPadPlane->GetColPos(col) + (0.5 - x[0]) * colSize) - driftLength * exbCorr;
posLocal[2] = (fPadPlane->GetRowPos(row) - 0.5 * rowSize) - fZShiftIdeal;
// Go to tracking coordinates
x[5] = rowSize*rowSize / 12.0;
i[2] = TMath::Nint(timeT0Cal);
- // A.Bercuci for TRD tracking calibration awareness
- out = (i[2] < 0 || i[2] > Int_t(3.5*fSamplingFrequency/vdrift)) ? kTRUE : kFALSE;
+ // For TRD tracking calibration awareness
+ out = ((i[2] < 0) || (i[2] > Int_t(3.5 * fSamplingFrequency/vdrift))) ? kTRUE : kFALSE;
return kTRUE;
c->SetY(clusterXYZ[1]);
c->SetZ(clusterXYZ[2]);
c->SetLocalTimeBin(((Char_t) clusterRCT[2]));
- c->SetInChamber(!out);
+ c->SetInChamber(!out);
+
}