#include <TParticle.h>
#include <TVector.h>
+#include <TRandom.h>
#include "AliRunLoader.h"
#include "AliRun.h"
#include "AliLog.h"
ClassImp(AliTPCFast)
+ //____________________________________________________________________
+AliTPCFast::AliTPCFast(const AliTPCFast ¶m)
+ :TObject(param),fParam(0)
+{
+ //
+ // copy constructor - dummy
+ //
+ fParam = param.fParam;
+}
+AliTPCFast & AliTPCFast::operator =(const AliTPCFast & param)
+{
+ //
+ // assignment operator - dummy
+ //
+ fParam=param.fParam;
+ return (*this);
+}
//_____________________________________________________________________________
void AliTPCFast::Hits2Clusters(AliRunLoader* runLoader) const
Float_t ymax=xprim*TMath::Tan(0.5*alpha);
if (TMath::Abs(xyz[0])>ymax) xyz[0]=yprim;
xyz[1]=gRandom->Gaus(tpcHit->Z(),TMath::Sqrt(sigmaZ)); // z
- if (TMath::Abs(xyz[1])>param->GetZLength()) xyz[1]=tpcHit->Z();
+ if (TMath::Abs(xyz[1])>param->GetZLength(isec)) xyz[1]=tpcHit->Z();
xyz[2]=sigmaRphi; // fSigmaY2
xyz[3]=sigmaZ; // fSigmaZ2
xyz[4]=tpcHit->fQ; // q
Float_t sumxz=0;
Float_t sumx2z=0;
Float_t sumq=0;
- for (Int_t index=0;index<currentIndex;index++){
- Float_t x,x2,x3,x4;
- x=x2=x3=x4=xxx(index*4);
- x2*=x;
+ for (Int_t cindex=0;cindex<currentIndex;cindex++){
+ Float_t x1,x2,x3,x4;
+ x1=x2=x3=x4=xxx(cindex*4);
+ x2*=x1;
x3*=x2;
x4*=x3;
- sumx+=x;
+ sumx+=x1;
sumx2+=x2;
sumx3+=x3;
sumx4+=x4;
- sumy+=xxx(index*4+1);
- sumxy+=xxx(index*4+1)*x;
- sumx2y+=xxx(index*4+1)*x2;
- sumz+=xxx(index*4+2);
- sumxz+=xxx(index*4+2)*x;
- sumx2z+=xxx(index*4+2)*x2;
- sumq+=xxx(index*4+3);
+ sumy+=xxx(cindex*4+1);
+ sumxy+=xxx(cindex*4+1)*x1;
+ sumx2y+=xxx(cindex*4+1)*x2;
+ sumz+=xxx(cindex*4+2);
+ sumxz+=xxx(cindex*4+2)*x1;
+ sumx2z+=xxx(cindex*4+2)*x2;
+ sumq+=xxx(cindex*4+3);
}
Float_t det=currentIndex*(sumx2*sumx4-sumx3*sumx3)-sumx*(sumx*sumx4-sumx2*sumx3)+
sumx2*(sumx*sumx3-sumx2*sumx2);
sigmay2 = TMath::Min(sigmay2,1.);
//
//
- z = sign*(param->GetZLength() - z);
- if (TMath::Abs(z)< param->GetZLength()-1){
+ z = sign*(param->GetZLength(isec) - z);
+ if (TMath::Abs(z)< param->GetZLength(isec)-1){
AliTPCClustersRow * row = (clustersArray->GetRow(isec,lastrow));
if (row!=0) {
AliTPCclusterMI* cl = new((AliTPCclusterMI*)row->Append()) AliTPCclusterMI ;