AliTPCParamSR::AliTPCParamSR()
+ :AliTPCParam(),
+ fInnerPRF(0),
+ fOuter1PRF(0),
+ fOuter2PRF(0),
+ fTimeRF(0),
+ fFacSigmaPadRow(0),
+ fFacSigmaPad(0),
+ fFacSigmaTime(0)
{
//
//constructor set the default parameters
- fInnerPRF=0;
- fOuter1PRF=0;
- fOuter2PRF=0;
- fTimeRF = 0;
+ //
+
fFacSigmaPadRow = Float_t(kFacSigmaPadRow);
fFacSigmaPad = Float_t(kFacSigmaPad);
fFacSigmaTime = Float_t(kFacSigmaTime);
Int_t fpadrow = TMath::Max(TMath::Nint(index[2]+xyz[0]-sfpadrow),0); //"first" padrow
Int_t fpad = TMath::Nint(xyz[1]-sfpad); //first pad
- Int_t ftime = TMath::Max(TMath::Nint(xyz[2]+xyz[3]+GetZOffset()/GetZWidth()-sftime-GetNTBinsL1()),0); // first time
+ Int_t ftime = TMath::Max(TMath::Nint(xyz[2]+xyz[3]+GetZOffset()/GetZWidth()-sftime),0); // first time
Int_t lpadrow = TMath::Min(TMath::Nint(index[2]+xyz[0]+sfpadrow),fpadrow+19); //"last" padrow
lpadrow = TMath::Min(GetNRow(index[1])-1,lpadrow);
Int_t lpad = TMath::Min(TMath::Nint(xyz[1]+sfpad),fpad+19); //last pad
- Int_t ltime = TMath::Min(TMath::Nint(xyz[2]+xyz[3]+GetZOffset()/GetZWidth()+sftime-GetNTBinsL1()),ftime+19); // last time
+ Int_t ltime = TMath::Min(TMath::Nint(xyz[2]+xyz[3]+GetZOffset()/GetZWidth()+sftime),ftime+19); // last time
ltime = TMath::Min(ltime,GetMaxTBin()-1);
//
Int_t npads = GetNPads(index[1],row);
//calculate time response function
Int_t time;
for (time = ftime;time<=ltime;time++)
- timeres[time-ftime]= fTimeRF->GetRF((-xyz[2]-xyz[3]+Float_t(time))*fZWidth+GetNTBinsL1());
+ timeres[time-ftime]= fTimeRF->GetRF((-xyz[2]-xyz[3]+Float_t(time))*fZWidth);
//write over threshold values to stack
for (padrow = fpadrow;padrow<=lpadrow;padrow++)
for (pad = fpad;pad<=lpad;pad++)
{
//transform relative coordinates to absolute
Bool_t rel = ( (option&2)!=0);
- Int_t index[2]={sector,padrow};
+ Int_t index[3]={sector,padrow,0};
if (rel==kTRUE) Transform4to3(xyz,index);//if the position is relative to pad row
Transform2to1(xyz,index);
}
//if option=2 X relative to pad row calculate sector
//if option=3 X relative use input sector
//!!!!!!!!! WE start to calculate rows from row = 0
- Int_t index[2];
+ Int_t index[3];
Bool_t rel = ( (option&2)!=0);
//option 0 and 2 means that we don't have information about sector
AliTPCParam::Streamer(R__b);
}
}
-Int_t AliTPCParamSR::CalcResponseFast(Float_t* xyz, Int_t * index, Int_t row)
+Int_t AliTPCParamSR::CalcResponseFast(Float_t* xyz, Int_t * index, Int_t row, Float_t phase)
{
//
//calculate bin response as function of the input position -x
Int_t npads = GetNPads(index[1],index[3]-1);
Int_t cpadrow = index[2]; // electrons are here
Int_t cpad = TMath::Nint(xyz[1]);
- Int_t ctime = TMath::Nint(xyz[2]+zoffset2+xyz[3]-GetNTBinsL1());
+ Int_t ctime = TMath::Nint(xyz[2]+zoffset2+xyz[3]);
//calulate deviation
Float_t dpadrow = xyz[0];
Float_t dpad = xyz[1]-cpad;
- Float_t dtime = xyz[2]+zoffset2+xyz[3]-ctime-GetNTBinsL1();
+ Float_t dtime = xyz[2]+zoffset2+xyz[3]-ctime+phase*0.25;
Int_t cindex =0;
Int_t cindex3 =0;
Int_t maxt =GetMaxTBin();
if ( (apadrow<0) || (apadrow>=2*kpadrn))
continue;
// pad angular correction
- Float_t angle = kTanMax*2.*(cpad+0.5)/Float_t(npads);
+ Float_t angle = 0.;
+ if (npads != 0)
+ angle = kTanMax*2.*(cpad+0.5)/Float_t(npads);
Float_t dpadangle =0;
if (index[1]<fNInnerSector){
dpadangle = angle*dpadrow*fInnerPadPitchLength/fInnerPadPitchWidth;