fResponseBin = 0;
fResponseWeight = 0;
fRotAngle = 0;
- // fChamberPos = fChamberRot = 0;
fTrackingMatrix = fClusterMatrix = fGlobalMatrix = 0;
SetTitle("75x40_100x60_150x60");
SetDefault();
if (fResponseBin!=0) delete [] fResponseBin;
if (fResponseWeight!=0) delete [] fResponseWeight;
if (fRotAngle !=0) delete [] fRotAngle;
- // if (fChamberPos !=0) delete [] fChamberPos;
- // if (fChamberRot !=0) delete [] fChamberRot;
-
-// if (fTrackingMatrix!=0) {
-// for(Int_t i=0;i<fNSector;i++)
-// delete fTrackingMatrix[i];
-// delete [] fTrackingMatrix;
-// }
-// if (fClusterMatrix!=0) {
-// for(Int_t i=0;i<fNSector;i++)
-// delete fClusterMatrix[i];
-// delete [] fClusterMatrix;
-// }
-// if (fGlobalMatrix!=0) {
-// for(Int_t i=0;i<fNSector;i++)
-// delete fGlobalMatrix[i];
-// delete [] fGlobalMatrix;
-// }
+
+ if (fTrackingMatrix) {
+ for(Int_t i = 0; i < fNSector; i++)
+ delete fTrackingMatrix[i];
+ delete [] fTrackingMatrix;
+ }
+
+ if (fClusterMatrix) {
+ for(Int_t i = 0; i < fNSector; i++)
+ delete fClusterMatrix[i];
+ delete [] fClusterMatrix;
+ }
+
+ if (fGlobalMatrix) {
+ for(Int_t i = 0; i < fNSector; i++)
+ delete fGlobalMatrix[i];
+ delete [] fGlobalMatrix;
+ }
+
}
static const Int_t kNResponseMax=100;
static const Float_t kResponseThreshold=0.01;
//L1 constants
- static const Float_t kGateDelay=6.1e-6; //In s
- static const Float_t kL1Delay=6.5e-6; //In s
- static const UShort_t kNTBinsBeforeL1=14;
+ // static const Float_t kGateDelay=6.1e-6; //In s
+ static const Float_t kGateDelay=0.; //For the moment no gating
+ // static const Float_t kL1Delay=6.5e-6; //In s
+ static const Float_t kL1Delay=0.; //For the moment no delay
+ // static const UShort_t kNTBinsBeforeL1=14;
+ static const UShort_t kNTBinsBeforeL1=0; //For the moment no shift
fbStatus = kFALSE;
//
//set sector parameters
}
AliAlignObjAngles o;
//
- if (fTrackingMatrix) delete [] fTrackingMatrix;
- fTrackingMatrix = new TGeoHMatrix*[fNSector];
- if (fClusterMatrix) delete [] fClusterMatrix;
- fClusterMatrix = new TGeoHMatrix*[fNSector];
+// if (fTrackingMatrix) delete [] fTrackingMatrix;
+// fTrackingMatrix = new TGeoHMatrix*[fNSector];
+// if (fClusterMatrix) delete [] fClusterMatrix;
+// fClusterMatrix = new TGeoHMatrix*[fNSector];
if (fGlobalMatrix) delete [] fGlobalMatrix;
fGlobalMatrix = new TGeoHMatrix*[fNSector];
//
return fRotAngle[isec*4+2];
}
-//inline void AliTPCParam::GetChamberPos(Int_t isec, Float_t* xyz) const
-//{
- //
- //return displacement and rotation of the readout chamber
- //with respect to the ideal geometry
-// xyz[0] = fChamberPos[isec*3];
-// xyz[1] = fChamberPos[isec*3+1];
-// xyz[2] = fChamberPos[isec*3+2];
-//}
-
-//inline void AliTPCParam::GetChamberRot(Int_t isec, Float_t* angles) const
-//{
- //
- //return displacement and rotation of the readout chamber
- //with respect to the ideal geometry
-// angles[0] = fChamberRot[isec*3];
-// angles[1] = fChamberRot[isec*3+1];
-// angles[2] = fChamberRot[isec*3+2];
-//}
-
-/* inline void AliTPCParam::Transform1to2(Float_t *xyz, Int_t *index) const */
-/* { */
-/* //transformation to rotated coordinates */
-/* //we must have information about sector! */
-/* //rotate to given sector */
-/* Double_t xyzmaster[3] = {xyz[0],xyz[1],xyz[2]}; */
-/* Double_t xyzlocal[3]; */
-/* fGlobalMatrix[index[1]]->MasterToLocal(xyzmaster,xyzlocal); */
-/* xyz[0] = xyzlocal[0]; */
-/* xyz[1] = xyzlocal[1]; */
-/* xyz[2] = TMath::Abs(xyzlocal[2]); */
-/* index[0]=2; */
-/* } */
inline void AliTPCParam::Transform1to2(Float_t *xyz, Int_t *index) const
{
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),0); // first time
+ Int_t ftime = TMath::Max(TMath::Nint(xyz[2]+xyz[3]+GetZOffset()/GetZWidth()-sftime-GetNTBinsL1()),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),ftime+19); // last time
+ Int_t ltime = TMath::Min(TMath::Nint(xyz[2]+xyz[3]+GetZOffset()/GetZWidth()+sftime-GetNTBinsL1()),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);
+ timeres[time-ftime]= fTimeRF->GetRF((-xyz[2]-xyz[3]+Float_t(time))*fZWidth+GetNTBinsL1());
//write over threshold values to stack
for (padrow = fpadrow;padrow<=lpadrow;padrow++)
for (pad = fpad;pad<=lpad;pad++)
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]);
+ Int_t ctime = TMath::Nint(xyz[2]+zoffset2+xyz[3]-GetNTBinsL1());
//calulate deviation
Float_t dpadrow = xyz[0];
Float_t dpad = xyz[1]-cpad;
- Float_t dtime = xyz[2]+zoffset2+xyz[3]-ctime;
+ Float_t dtime = xyz[2]+zoffset2+xyz[3]-ctime-GetNTBinsL1();
Int_t cindex =0;
Int_t cindex3 =0;
Int_t maxt =GetMaxTBin();
Float_t AliTPCclustererMI::GetSigmaY2(Int_t iz){
// sigma y2 = in digits - we don't know the angle
- Float_t z = iz*fParam->GetZWidth();
+ Float_t z = iz*fParam->GetZWidth()+fParam->GetNTBinsL1()*fParam->GetZWidth();
Float_t sd2 = (z*fParam->GetDiffL()*fParam->GetDiffL())/
(fPadWidth*fPadWidth);
Float_t sres = 0.25;
Float_t AliTPCclustererMI::GetSigmaZ2(Int_t iz){
//sigma z2 = in digits - angle estimated supposing vertex constraint
- Float_t z = iz*fZWidth;
+ Float_t z = iz*fZWidth+fParam->GetNTBinsL1()*fParam->GetZWidth();
Float_t sd2 = (z*fParam->GetDiffL()*fParam->GetDiffL())/(fZWidth*fZWidth);
Float_t angular = fPadLength*(fParam->GetZLength()-z)/(fRx*fZWidth);
angular*=angular;
c.SetSigmaZ2(s2*w*w);
c.SetY((meani - 2.5 - 0.5*fMaxPad)*fParam->GetPadPitchWidth(fSector));
c.SetZ(fZWidth*(meanj-3));
- c.SetZ(c.GetZ() - 3.*fParam->GetZSigma()); // PASA delay
+ c.SetZ(c.GetZ() - 3.*fParam->GetZSigma() + fParam->GetNTBinsL1()*fParam->GetZWidth()); // PASA delay + L1 delay
c.SetZ(fSign*(fParam->GetZLength() - c.GetZ()));
if (ki<=1 || ki>=fMaxPad-1 || kj==1 || kj==fMaxTime-2) {
//first loop - for "gold cluster"
fLoop=1;
Int_t *b=&fBins[-1]+2*fMaxTime;
- Int_t crtime = Int_t((fParam->GetZLength()-AliTPCReconstructor::GetCtgRange()*fRx)/fZWidth-5);
+ Int_t crtime = Int_t((fParam->GetZLength()-AliTPCReconstructor::GetCtgRange()*fRx)/fZWidth-fParam->GetNTBinsL1()-5);
for (Int_t i=2*fMaxTime; i<fMaxBin-2*fMaxTime; i++) {
b++;