Splitting TPC library (T.Kuhr)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 18 May 2004 16:55:05 +0000 (16:55 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 18 May 2004 16:55:05 +0000 (16:55 +0000)
28 files changed:
ALIROOT/binaliroot.pkg
TPC/AliComplexCluster.h
TPC/AliSimDigits.cxx
TPC/AliTPC.cxx
TPC/AliTPC.h
TPC/AliTPCClustersArray.cxx
TPC/AliTPCFast.cxx [new file with mode: 0644]
TPC/AliTPCFast.h [new file with mode: 0644]
TPC/AliTPCReconstructor.cxx
TPC/AliTPCcluster.cxx
TPC/AliTPCcluster.h
TPC/AliTPCdigit.cxx [new file with mode: 0644]
TPC/AliTPCdigit.h [new file with mode: 0644]
TPC/AliTPCtracker.cxx
TPC/AliTPCtrackerMI.h
TPC/AliTPCtrackerParam.h
TPC/TPCLinkDef.h [deleted file]
TPC/TPCbaseLinkDef.h [new file with mode: 0644]
TPC/TPCfastLinkDef.h [moved from TPC/TPCBarrelLinkDef.h with 70% similarity]
TPC/TPCrecLinkDef.h [new file with mode: 0644]
TPC/TPCsimLinkDef.h [new file with mode: 0644]
TPC/libTPC.pkg [deleted file]
TPC/libTPCBarrel.pkg [deleted file]
TPC/libTPCbase.pkg [new file with mode: 0644]
TPC/libTPCfast.pkg [new file with mode: 0644]
TPC/libTPCrec.pkg [new file with mode: 0644]
TPC/libTPCsim.pkg [new file with mode: 0644]
build/module.dep

index d8a6119..76ffa5b 100644 (file)
@@ -3,7 +3,8 @@ CSRCS:=fpu.c
 
 ELIBSDIR:=
 
-ELIBS:= MUON TPC TPCBarrel ITS PMD TRD FMD TOF PHOS CRT RICH ZDC VZERO EMCAL \
+ELIBS:= MUON TPCbase TPCsim TPCrec TPCfast \
+       ITS PMD TRD FMD TOF PHOS CRT RICH ZDC VZERO EMCAL \
         STRUCT START EVGEN STEER CONTAINERS pythia6 AliPythia6 pdf THijing \
         hijing TMEVSIM mevsim THbtp HBTP THerwig herwig TEPEMGEN EPEMGEN \
         TPHIC FASTSIM microcern RAW
index 7ee134b..3eff8f5 100644 (file)
@@ -19,6 +19,7 @@ class AliComplexCluster : public TObject {
   friend class AliTPC;
   friend class AliTPCClusterFinder;
   friend class AliClusters;
+  friend class AliTPCFast;
 public:
 
   AliComplexCluster() {
index 3edbdfb..3cffe27 100644 (file)
@@ -34,7 +34,7 @@
 #include "AliArrayS.h"
 #include "AliDigits.h"
 #include "AliSimDigits.h"
-#include "AliTPC.h"
+#include "AliTPCdigit.h"
 #include <TClonesArray.h>
 
 
index 99a2e1c..6020cde 100644 (file)
 #include <TSystem.h>     
 #include <TTUBS.h>
 #include <TTree.h>
-#include <TVector.h>
 #include <TVirtualMC.h>
 #include <TString.h>
 #include <TF2.h>
 #include <TStopwatch.h>
 
 #include "AliArrayBranch.h"
-#include "AliClusters.h"
-#include "AliComplexCluster.h"
 #include "AliDigits.h"
 #include "AliMagF.h"
 #include "AliPoints.h"
@@ -66,8 +63,6 @@
 #include "AliSimDigits.h"
 #include "AliTPC.h"
 #include "AliTPC.h"
-#include "AliTPCClustersArray.h"
-#include "AliTPCClustersRow.h"
 #include "AliTPCDigitsArray.h"
 #include "AliTPCLoader.h"
 #include "AliTPCPRF2D.h"
 #include "AliTPCRF1D.h"
 #include "AliTPCTrackHits.h"
 #include "AliTPCTrackHitsV2.h"
-#include "AliTPCcluster.h"
 #include "AliTrackReference.h"
 #include "AliMC.h"
 #include "AliTPCDigitizer.h"
 #include "AliTPCBuffer.h"
 #include "AliTPCDDLRawData.h"
-#include "AliTPCclustererMI.h"
-#include "AliTPCtrackerMI.h"
-#include "AliTPCpidESD.h"
 
 
 ClassImp(AliTPC) 
@@ -109,18 +100,6 @@ AliTPCFastMatrix::AliTPCFastMatrix(Int_t rowlwb, Int_t rowupb, Int_t collwb, Int
    {
    };
 //_____________________________________________________________________________
-class AliTPCFastVector : public TVector {
-public :
-  AliTPCFastVector(Int_t size);
-  virtual ~AliTPCFastVector(){;}
-  Float_t & UncheckedAt(Int_t index) const  {return  fElements[index];} //fast acces  
-  
-};
-
-AliTPCFastVector::AliTPCFastVector(Int_t size):TVector(size){
-};
-
-//_____________________________________________________________________________
 AliTPC::AliTPC()
 {
   //
@@ -131,7 +110,6 @@ AliTPC::AliTPC()
   fDigits   = 0;
   fNsectors = 0;
   fDigitsArray = 0;
-  fClustersArray = 0;
   fDefaults = 0;
   fTrackHits = 0; 
   fTrackHitsOld = 0;   
@@ -155,7 +133,6 @@ AliTPC::AliTPC(const char *name, const char *title)
   fHits     = new TClonesArray("AliTPChit",  176);
   gAlice->GetMCApp()->AddHitList(fHits); 
   fDigitsArray = 0;
-  fClustersArray= 0;
   fDefaults = 0;
   //
   fTrackHits = new AliTPCTrackHitsV2;  
@@ -329,15 +306,6 @@ Int_t AliTPC::DistancetoPrimitive(Int_t , Int_t ) const
   return 9999;
 }
 
-void AliTPC::Clusters2Tracks() const 
- {
-  //-----------------------------------------------------------------
-  // This is a track finder.
-  //-----------------------------------------------------------------
-  Error("Clusters2Tracks",
-  "Dummy function !  Call AliTPCtracker::Clusters2Tracks(...) instead !");
- }
-
 
 //_____________________________________________________________________________
 void AliTPC::CreateMaterials()
@@ -852,16 +820,6 @@ void    AliTPC::SetActiveSectors(Int_t flag)
 
 
 
-void AliTPC::Digits2Clusters(Int_t /*eventnumber*/) const
-{
-  //-----------------------------------------------------------------
-  // This is a simple cluster finder.
-  //-----------------------------------------------------------------
-  Error("Digits2Clusters",
-  "Dummy function !  Call AliTPCclusterer::Digits2Clusters(...) instead !");
-}
-
-
 //_____________________________________________________________________________
 void AliTPC::Digits2Raw()
 {
@@ -962,390 +920,6 @@ void AliTPC::Digits2Raw()
 }
 
 
-extern Double_t SigmaY2(Double_t, Double_t, Double_t);
-extern Double_t SigmaZ2(Double_t, Double_t);
-//_____________________________________________________________________________
-void AliTPC::Hits2Clusters(Int_t /*eventn*/)
-{
-  //--------------------------------------------------------
-  // TPC simple cluster generator from hits
-  // obtained from the TPC Fast Simulator
-  // The point errors are taken from the parametrization
-  //--------------------------------------------------------
-
-  //-----------------------------------------------------------------
-  // Origin: Marek Kowalski  IFJ, Krakow, Marek.Kowalski@ifj.edu.pl
-  //-----------------------------------------------------------------
-  // Adopted to Marian's cluster data structure by I.Belikov, CERN,
-  // Jouri.Belikov@cern.ch
-  //----------------------------------------------------------------
-  
-  /////////////////////////////////////////////////////////////////////////////
-  //
-  //---------------------------------------------------------------------
-  //   ALICE TPC Cluster Parameters
-  //--------------------------------------------------------------------
-       
-  
-
-  // Cluster width in rphi
-  const Float_t kACrphi=0.18322;
-  const Float_t kBCrphi=0.59551e-3;
-  const Float_t kCCrphi=0.60952e-1;
-  // Cluster width in z
-  const Float_t kACz=0.19081;
-  const Float_t kBCz=0.55938e-3;
-  const Float_t kCCz=0.30428;
-
-
-  if (!fLoader) {
-     cerr<<"AliTPC::Hits2Clusters(): output file not open !\n";
-     return;
-  }
-
-  //if(fDefaults == 0) SetDefaults();
-
-  Float_t sigmaRphi,sigmaZ,clRphi,clZ;
-  //
-  TParticle *particle; // pointer to a given particle
-  AliTPChit *tpcHit; // pointer to a sigle TPC hit
-  Int_t sector;
-  Int_t ipart;
-  Float_t xyz[5];
-  Float_t pl,pt,tanth,rpad,ratio;
-  Float_t cph,sph;
-  
-  //---------------------------------------------------------------
-  //  Get the access to the tracks 
-  //---------------------------------------------------------------
-  
-  TTree *tH = TreeH();
-  if (tH == 0x0)
-   {
-     Fatal("Hits2Clusters","Can not find TreeH in folder");
-     return;
-   }
-  SetTreeAddress();
-  
-  Stat_t ntracks = tH->GetEntries();
-
-  //Switch to the output file
-  
-  if (fLoader->TreeR() == 0x0) fLoader->MakeTree("R");
-  
-  cout<<"fTPCParam->GetTitle() = "<<fTPCParam->GetTitle()<<endl;
-  
-  AliRunLoader* rl = (AliRunLoader*)fLoader->GetEventFolder()->FindObject(AliRunLoader::GetRunLoaderName());
-  rl->CdGAFile();
-  //fTPCParam->Write(fTPCParam->GetTitle());
-
-  AliTPCClustersArray carray;
-  carray.Setup(fTPCParam);
-  carray.SetClusterType("AliTPCcluster");
-  carray.MakeTree(fLoader->TreeR());
-
-  Int_t nclusters=0; //cluster counter
-  
-  //------------------------------------------------------------
-  // Loop over all sectors (72 sectors for 20 deg
-  // segmentation for both lower and upper sectors)
-  // Sectors 0-35 are lower sectors, 0-17 z>0, 17-35 z<0
-  // Sectors 36-71 are upper sectors, 36-53 z>0, 54-71 z<0
-  //
-  // First cluster for sector 0 starts at "0"
-  //------------------------------------------------------------
-   
-  for(Int_t isec=0;isec<fTPCParam->GetNSector();isec++){
-    //MI change
-    fTPCParam->AdjustCosSin(isec,cph,sph);
-    
-    //------------------------------------------------------------
-    // Loop over tracks
-    //------------------------------------------------------------
-    
-    for(Int_t track=0;track<ntracks;track++){
-      ResetHits();
-      tH->GetEvent(track);
-      //
-      //  Get number of the TPC hits
-      //     
-       tpcHit = (AliTPChit*)FirstHit(-1);
-
-      // Loop over hits
-      //
-       while(tpcHit){
-        if (tpcHit->fQ == 0.) {
-           tpcHit = (AliTPChit*) NextHit();
-           continue; //information about track (I.Belikov)
-        }
-       sector=tpcHit->fSector; // sector number
-
-       if(sector != isec){
-        tpcHit = (AliTPChit*) NextHit();
-        continue; 
-       }
-       ipart=tpcHit->Track();
-       particle=gAlice->GetMCApp()->Particle(ipart);
-       pl=particle->Pz();
-       pt=particle->Pt();
-       if(pt < 1.e-9) pt=1.e-9;
-       tanth=pl/pt;
-       tanth = TMath::Abs(tanth);
-       rpad=TMath::Sqrt(tpcHit->X()*tpcHit->X() + tpcHit->Y()*tpcHit->Y());
-       ratio=0.001*rpad/pt; // pt must be in MeV/c - historical reason
-
-       //   space-point resolutions
-       
-       sigmaRphi=SigmaY2(rpad,tanth,pt);
-       sigmaZ   =SigmaZ2(rpad,tanth   );
-       
-       //   cluster widths
-       
-       clRphi=kACrphi-kBCrphi*rpad*tanth+kCCrphi*ratio*ratio;
-       clZ=kACz-kBCz*rpad*tanth+kCCz*tanth*tanth;
-       
-       // temporary protection
-       
-       if(sigmaRphi < 0.) sigmaRphi=0.4e-3;
-       if(sigmaZ < 0.) sigmaZ=0.4e-3;
-       if(clRphi < 0.) clRphi=2.5e-3;
-       if(clZ < 0.) clZ=2.5e-5;
-       
-       //
-       
-       //
-       // smearing --> rotate to the 1 (13) or to the 25 (49) sector,
-       // then the inaccuracy in a X-Y plane is only along Y (pad row)!
-       //
-        Float_t xprim= tpcHit->X()*cph + tpcHit->Y()*sph;
-       Float_t yprim=-tpcHit->X()*sph + tpcHit->Y()*cph;
-       xyz[0]=gRandom->Gaus(yprim,TMath::Sqrt(sigmaRphi));   // y
-          Float_t alpha=(isec < fTPCParam->GetNInnerSector()) ?
-         fTPCParam->GetInnerAngle() : fTPCParam->GetOuterAngle();
-          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])>fTPCParam->GetZLength()) xyz[1]=tpcHit->Z(); 
-       xyz[2]=sigmaRphi;                                     // fSigmaY2
-       xyz[3]=sigmaZ;                                        // fSigmaZ2
-       xyz[4]=tpcHit->fQ;                                    // q
-
-        AliTPCClustersRow *clrow=carray.GetRow(sector,tpcHit->fPadRow);
-        if (!clrow) clrow=carray.CreateRow(sector,tpcHit->fPadRow);    
-
-        Int_t tracks[3]={tpcHit->Track(), -1, -1};
-       AliTPCcluster cluster(tracks,xyz);
-
-        clrow->InsertCluster(&cluster); nclusters++;
-
-        tpcHit = (AliTPChit*)NextHit();
-        
-
-      } // end of loop over hits
-
-    }   // end of loop over tracks
-
-    Int_t nrows=fTPCParam->GetNRow(isec);
-    for (Int_t irow=0; irow<nrows; irow++) {
-        AliTPCClustersRow *clrow=carray.GetRow(isec,irow);
-        if (!clrow) continue;
-        carray.StoreRow(isec,irow);
-        carray.ClearRow(isec,irow);
-    }
-
-  } // end of loop over sectors  
-
-  //  cerr<<"Number of made clusters : "<<nclusters<<"                        \n";
-  fLoader->WriteRecPoints("OVERWRITE");
-  
-  
-} // end of function
-
-//_________________________________________________________________
-void AliTPC::Hits2ExactClustersSector(Int_t isec)
-{
-  //--------------------------------------------------------
-  //calculate exact cross point of track and given pad row
-  //resulting values are expressed in "digit" coordinata
-  //--------------------------------------------------------
-
-  //-----------------------------------------------------------------
-  // Origin: Marian Ivanov  GSI Darmstadt, m.ivanov@gsi.de
-  //-----------------------------------------------------------------
-  //
-  if (fClustersArray==0){    
-    return;
-  }
-  //
-  TParticle *particle; // pointer to a given particle
-  AliTPChit *tpcHit; // pointer to a sigle TPC hit
-  //  Int_t sector,nhits;
-  Int_t ipart;
-  const Int_t kcmaxhits=30000;
-  AliTPCFastVector * xxxx = new AliTPCFastVector(kcmaxhits*4);
-  AliTPCFastVector & xxx = *xxxx;
-  Int_t maxhits = kcmaxhits;
-  //construct array for each padrow
-  for (Int_t i=0; i<fTPCParam->GetNRow(isec);i++) 
-    fClustersArray->CreateRow(isec,i);
-  
-  //---------------------------------------------------------------
-  //  Get the access to the tracks 
-  //---------------------------------------------------------------
-  
-  TTree *tH = TreeH();
-  if (tH == 0x0)
-   {
-     Fatal("Hits2Clusters","Can not find TreeH in folder");
-     return;
-   }
-  SetTreeAddress();
-
-  Stat_t ntracks = tH->GetEntries();
-  Int_t npart = gAlice->GetMCApp()->GetNtrack();
-  //MI change
-  TBranch * branch=0;
-  if (fHitType>1) branch = tH->GetBranch("TPC2");
-  else branch = tH->GetBranch("TPC");
-
-  //------------------------------------------------------------
-  // Loop over tracks
-  //------------------------------------------------------------
-
-  for(Int_t track=0;track<ntracks;track++){ 
-    Bool_t isInSector=kTRUE;
-    ResetHits();
-     isInSector = TrackInVolume(isec,track);
-    if (!isInSector) continue;
-    //MI change
-    branch->GetEntry(track); // get next track
-    //
-    //  Get number of the TPC hits and a pointer
-    //  to the particles
-    // Loop over hits
-    //
-    Int_t currentIndex=0;
-    Int_t lastrow=-1;  //last writen row
-
-    //M.I. changes
-
-    tpcHit = (AliTPChit*)FirstHit(-1);
-    while(tpcHit){
-      
-      Int_t sector=tpcHit->fSector; // sector number
-      if(sector != isec){
-       tpcHit = (AliTPChit*) NextHit();
-       continue; 
-      }
-
-      ipart=tpcHit->Track();
-      if (ipart<npart) particle=gAlice->GetMCApp()->Particle(ipart);
-      
-      //find row number
-
-      Float_t  x[3]={tpcHit->X(),tpcHit->Y(),tpcHit->Z()};
-      Int_t    index[3]={1,isec,0};
-      Int_t    currentrow = fTPCParam->GetPadRow(x,index) ;    
-      if (currentrow<0) {tpcHit = (AliTPChit*)NextHit(); continue;}
-      if (lastrow<0) lastrow=currentrow;
-      if (currentrow==lastrow){
-       if ( currentIndex>=maxhits){
-         maxhits+=kcmaxhits;
-         xxx.ResizeTo(4*maxhits);
-       }     
-       xxx(currentIndex*4)=x[0];
-       xxx(currentIndex*4+1)=x[1];
-       xxx(currentIndex*4+2)=x[2];     
-       xxx(currentIndex*4+3)=tpcHit->fQ;
-       currentIndex++; 
-      }
-      else 
-       if (currentIndex>2){
-         Float_t sumx=0;
-         Float_t sumx2=0;
-         Float_t sumx3=0;
-         Float_t sumx4=0;
-         Float_t sumy=0;
-         Float_t sumxy=0;
-         Float_t sumx2y=0;
-         Float_t sumz=0;
-         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;
-           x3*=x2;
-           x4*=x3;
-           sumx+=x;
-           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);
-         }
-         Float_t centralPad = (fTPCParam->GetNPads(isec,lastrow)-1)/2;
-         Float_t det=currentIndex*(sumx2*sumx4-sumx3*sumx3)-sumx*(sumx*sumx4-sumx2*sumx3)+
-           sumx2*(sumx*sumx3-sumx2*sumx2);
-         
-         Float_t detay=sumy*(sumx2*sumx4-sumx3*sumx3)-sumx*(sumxy*sumx4-sumx2y*sumx3)+
-           sumx2*(sumxy*sumx3-sumx2y*sumx2);
-         Float_t detaz=sumz*(sumx2*sumx4-sumx3*sumx3)-sumx*(sumxz*sumx4-sumx2z*sumx3)+
-           sumx2*(sumxz*sumx3-sumx2z*sumx2);
-         
-         Float_t detby=currentIndex*(sumxy*sumx4-sumx2y*sumx3)-sumy*(sumx*sumx4-sumx2*sumx3)+
-           sumx2*(sumx*sumx2y-sumx2*sumxy);
-         Float_t detbz=currentIndex*(sumxz*sumx4-sumx2z*sumx3)-sumz*(sumx*sumx4-sumx2*sumx3)+
-           sumx2*(sumx*sumx2z-sumx2*sumxz);
-         
-         if (TMath::Abs(det)<0.00001){
-            tpcHit = (AliTPChit*)NextHit();
-           continue;
-         }
-       
-         Float_t y=detay/det+centralPad;
-         Float_t z=detaz/det;  
-         Float_t by=detby/det; //y angle
-         Float_t bz=detbz/det; //z angle
-         sumy/=Float_t(currentIndex);
-         sumz/=Float_t(currentIndex);
-
-         AliTPCClustersRow * row = (fClustersArray->GetRow(isec,lastrow));
-         if (row!=0) {
-           AliComplexCluster* cl = new((AliComplexCluster*)row->Append()) AliComplexCluster ;
-           //    AliComplexCluster cl;
-           cl->fX=z;
-           cl->fY=y;
-           cl->fQ=sumq;
-           cl->fSigmaX2=bz;
-           cl->fSigmaY2=by;
-           cl->fTracks[0]=ipart;
-         }
-         currentIndex=0;
-         lastrow=currentrow;
-       } //end of calculating cluster for given row
-       
-       
-      tpcHit = (AliTPChit*)NextHit();
-    } // end of loop over hits
-  }   // end of loop over tracks 
-  //write padrows to tree 
-  for (Int_t ii=0; ii<fTPCParam->GetNRow(isec);ii++) {
-    fClustersArray->StoreRow(isec,ii);    
-    fClustersArray->ClearRow(isec,ii);        
-  }
-  xxxx->Delete();
-}
-
-
 
 //______________________________________________________________________
 AliDigitizer* AliTPC::CreateDigitizer(AliRunDigitizer* manager) const
@@ -2524,23 +2098,6 @@ void AliTPC::TransportElectron(Float_t *xyz, Int_t *index)
   //add nonisochronity (not implemented yet)  
 }
   
-ClassImp(AliTPCdigit)
-//_____________________________________________________________________________
-AliTPCdigit::AliTPCdigit(Int_t *tracks, Int_t *digits):
-  AliDigit(tracks)
-{
-  //
-  // Creates a TPC digit object
-  //
-  fSector     = digits[0];
-  fPadRow     = digits[1];
-  fPad        = digits[2];
-  fTime       = digits[3];
-  fSignal     = digits[4];
-}
-
 ClassImp(AliTPChit)
  
 //_____________________________________________________________________________
@@ -2997,177 +2554,6 @@ void AliTPC::LoadPoints3(Int_t)
 
 
 
-void AliTPC::FindTrackHitsIntersection(TClonesArray * /*arr*/)
-{
-
-  //
-  //fill clones array with intersection of current point with the
-  //middle of the row
-  Int_t sector;
-  Int_t ipart;
-  
-  const Int_t kcmaxhits=30000;
-  AliTPCFastVector * xxxx = new AliTPCFastVector(kcmaxhits*4);
-  AliTPCFastVector & xxx = *xxxx;
-  Int_t maxhits = kcmaxhits;
-      
-  //
-  AliTPChit * tpcHit=0;
-  tpcHit = (AliTPChit*)FirstHit2(-1);
-  Int_t currentIndex=0;
-  Int_t lastrow=-1;  //last writen row
-
-  while (tpcHit){
-    if (tpcHit==0) continue;
-    sector=tpcHit->fSector; // sector number
-    ipart=tpcHit->Track();
-    
-    //find row number
-    
-    Float_t  x[3]={tpcHit->X(),tpcHit->Y(),tpcHit->Z()};
-    Int_t    index[3]={1,sector,0};
-    Int_t    currentrow = fTPCParam->GetPadRow(x,index) ;      
-    if (currentrow<0) continue;
-    if (lastrow<0) lastrow=currentrow;
-    if (currentrow==lastrow){
-      if ( currentIndex>=maxhits){
-       maxhits+=kcmaxhits;
-       xxx.ResizeTo(4*maxhits);
-      }     
-      xxx(currentIndex*4)=x[0];
-      xxx(currentIndex*4+1)=x[1];
-      xxx(currentIndex*4+2)=x[2];      
-      xxx(currentIndex*4+3)=tpcHit->fQ;
-      currentIndex++;  
-    }
-    else 
-      if (currentIndex>2){
-       Float_t sumx=0;
-       Float_t sumx2=0;
-       Float_t sumx3=0;
-       Float_t sumx4=0;
-       Float_t sumy=0;
-       Float_t sumxy=0;
-       Float_t sumx2y=0;
-       Float_t sumz=0;
-       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;
-         x3*=x2;
-         x4*=x3;
-         sumx+=x;
-         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);
-       }
-       Float_t centralPad = (fTPCParam->GetNPads(sector,lastrow)-1)/2;
-       Float_t det=currentIndex*(sumx2*sumx4-sumx3*sumx3)-sumx*(sumx*sumx4-sumx2*sumx3)+
-         sumx2*(sumx*sumx3-sumx2*sumx2);
-       
-       Float_t detay=sumy*(sumx2*sumx4-sumx3*sumx3)-sumx*(sumxy*sumx4-sumx2y*sumx3)+
-         sumx2*(sumxy*sumx3-sumx2y*sumx2);
-       Float_t detaz=sumz*(sumx2*sumx4-sumx3*sumx3)-sumx*(sumxz*sumx4-sumx2z*sumx3)+
-         sumx2*(sumxz*sumx3-sumx2z*sumx2);
-       
-       Float_t detby=currentIndex*(sumxy*sumx4-sumx2y*sumx3)-sumy*(sumx*sumx4-sumx2*sumx3)+
-         sumx2*(sumx*sumx2y-sumx2*sumxy);
-       Float_t detbz=currentIndex*(sumxz*sumx4-sumx2z*sumx3)-sumz*(sumx*sumx4-sumx2*sumx3)+
-         sumx2*(sumx*sumx2z-sumx2*sumxz);
-       
-       Float_t y=detay/det+centralPad;
-       Float_t z=detaz/det;    
-       Float_t by=detby/det; //y angle
-       Float_t bz=detbz/det; //z angle
-       sumy/=Float_t(currentIndex);
-       sumz/=Float_t(currentIndex);
-       
-       AliComplexCluster cl;
-       cl.fX=z;
-       cl.fY=y;
-       cl.fQ=sumq;
-       cl.fSigmaX2=bz;
-       cl.fSigmaY2=by;
-       cl.fTracks[0]=ipart;
-       
-       AliTPCClustersRow * row = (fClustersArray->GetRow(sector,lastrow));
-       if (row!=0) row->InsertCluster(&cl);
-       currentIndex=0;
-       lastrow=currentrow;
-      } //end of calculating cluster for given row
-               
-  } // end of loop over hits
-  xxxx->Delete();
-
-}
-//_______________________________________________________________________________
-void AliTPC::Digits2Reco(Int_t firstevent,Int_t lastevent)
-{
-  // produces rec points from digits and writes them on the root file
-  // AliTPCclusters.root
-
-  TDirectory *cwd = gDirectory;
-
-
-  AliTPCParamSR *dig=(AliTPCParamSR *)gDirectory->Get("75x40_100x60");
-  if(dig){
-    printf("You are running 2 pad-length geom hits with 3 pad-length geom digits\n");
-    delete dig;
-    dig = new AliTPCParamSR();
-  }
-  else
-  {
-   dig=(AliTPCParamSR *)gDirectory->Get("75x40_100x60_150x60"); 
-  }
-  if(!dig){
-   printf("No TPC parameters found\n");
-   exit(3);
-  }
-   
-  SetParam(dig);
-  cout<<"AliTPC::Digits2Reco: TPC parameteres have been set"<<endl; 
-  TFile *out;
-  if(!gSystem->Getenv("CONFIG_FILE")){
-    out=TFile::Open("AliTPCclusters.root","recreate");
-  }
-  else {
-    const char *tmp1;
-    const char *tmp2;
-    char tmp3[80];
-    tmp1=gSystem->Getenv("CONFIG_FILE_PREFIX");
-    tmp2=gSystem->Getenv("CONFIG_OUTDIR");
-    sprintf(tmp3,"%s%s/AliTPCclusters.root",tmp1,tmp2);
-    out=TFile::Open(tmp3,"recreate");
-  }
-
-  TStopwatch timer;
-  cout<<"AliTPC::Digits2Reco - determination of rec points begins"<<endl;
-  timer.Start();
-  cwd->cd();
-  for(Int_t iev=firstevent;iev<lastevent+1;iev++){
-
-    printf("Processing event %d\n",iev);
-    Digits2Clusters(iev);
-  }
-  cout<<"AliTPC::Digits2Reco - determination of rec points ended"<<endl;
-  timer.Stop();
-  timer.Print();
-  out->Close();
-  cwd->cd(); 
-
-
-}
-
 AliLoader* AliTPC::MakeLoader(const char* topfoldername)
 {
 //Makes TPC loader
@@ -3222,46 +2608,3 @@ AliTPCParam* AliTPC::LoadTPCParam(TFile *file) {
 }
 
 
-//____________________________________________________________________________
-Double_t SigmaY2(Double_t r, Double_t tgl, Double_t pt)
-{
-  //
-  // Parametrised error of the cluster reconstruction (pad direction)
-  //
-  // Sigma rphi
-  const Float_t kArphi=0.41818e-2;
-  const Float_t kBrphi=0.17460e-4;
-  const Float_t kCrphi=0.30993e-2;
-  const Float_t kDrphi=0.41061e-3;
-
-  pt=TMath::Abs(pt)*1000.;
-  Double_t x=r/pt;
-  tgl=TMath::Abs(tgl);
-  Double_t s=kArphi - kBrphi*r*tgl + kCrphi*x*x + kDrphi*x;
-  if (s<0.4e-3) s=0.4e-3;
-  s*=1.3; //Iouri Belikov
-
-  return s;
-}
-
-
-//____________________________________________________________________________
-Double_t SigmaZ2(Double_t r, Double_t tgl)
-{
-  //
-  // Parametrised error of the cluster reconstruction (drift direction)
-  //
-  // Sigma z
-  const Float_t kAz=0.39614e-2;
-  const Float_t kBz=0.22443e-4;
-  const Float_t kCz=0.51504e-1;
-
-
-  tgl=TMath::Abs(tgl);
-  Double_t s=kAz - kBz*r*tgl + kCz*tgl*tgl;
-  if (s<0.4e-3) s=0.4e-3;
-  s*=1.3; //Iouri Belikov
-
-  return s;
-}
-
index e646fd1..f7a64f6 100644 (file)
@@ -11,9 +11,7 @@
 #include "AliDetector.h"
 #include "AliHit.h" 
 #include "AliDigit.h" 
-//#include "TLorentzVector.h" 
-
-//#include "AliTPCLoader.h"
+#include <TVector.h>
 
 
 class TMatrix;
@@ -25,7 +23,6 @@ class TTree;
 class TFile;
 class AliTPCParam;
 class AliTPCDigitsArray;
-class AliTPCClustersArray;
 class AliTPCTrackHitsV2; // M.I.
 class AliTPCTrackHits; // M.I.  -MI4 old hits - to be removed later
 //class TLorentzVector;
@@ -47,8 +44,6 @@ public:
   virtual void  BuildGeometry();
   virtual void  CreateGeometry() {}
   virtual void  CreateMaterials();
-  virtual void  Hits2Clusters(Int_t eventn=0);
-  virtual void  Hits2ExactClustersSector(Int_t isec); // MI change calculate "exact" cluster position
   
   virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
   virtual void  SDigits2Digits(){;} //MI change -cycling to production
@@ -57,14 +52,11 @@ public:
   virtual void  Hits2SDigits(); // MI - cycling around
   virtual void  Hits2SDigits2(Int_t eventnumber=0);
 
-  virtual void  Digits2Reco(Int_t firstevent=0,Int_t lastevent=0);
   virtual void  Hits2Digits();
   virtual void  Hits2Digits(Int_t eventnumber);   //MI change
   virtual void  Hits2DigitsSector(Int_t isec);  //MI change
   virtual void  Init();
   virtual Int_t IsVersion() const =0;
-  virtual void  Digits2Clusters(Int_t eventnumber=0) const;
-  virtual void  Clusters2Tracks() const;
 
   virtual void  Digits2Raw();
 
@@ -86,11 +78,9 @@ public:
   virtual void  StepManager()=0;
   virtual void  DrawDetector() {}
   AliTPCDigitsArray*  GetDigitsArray() {return fDigitsArray;} //MI change
-  AliTPCClustersArray* GetClustersArray(){return fClustersArray;} //MI change
   AliTPCParam *GetParam(){return fTPCParam;} // M.K, M.I changes
   void SetParam(AliTPCParam *param){fTPCParam=param;} // M.K, M.I changes
   void SetDigitsArray(AliTPCDigitsArray* param) {fDigitsArray=param;}  //MI change
-  void SetClustersArray(AliTPCClustersArray *clusters) {fClustersArray = clusters;} //MI change
 
 // additional function neccesary for the new hits 
    virtual void MakeBranch2(Option_t *opt=" ", const char *file=0);  //
@@ -108,9 +98,6 @@ public:
    virtual void LoadPoints3(Int_t dumy);
    virtual void FinishPrimary();
    virtual void RemapTrackHitIDs(Int_t *map);
-   virtual void FindTrackHitsIntersection(TClonesArray * arr);
-   //fill clones array with intersection of current point with the
-   //middle of the row
    void SetHitType(Int_t type){fHitType =type;} //set type of hit container
    void SetDigitsSwitch(Int_t sw){fDigitsSwitch = sw;}
    void SetDefSwitch(Int_t def){fDefaults = def;}
@@ -120,6 +107,7 @@ public:
    void    SetActiveSectors(Int_t * sectors, Int_t n);  //set active sectors
    Int_t GetHitType() const {return fHitType;}
    void    SetActiveSectors(Int_t flag=0); //loop over al hits and set active only hitted sectors
+   Bool_t  TrackInVolume(Int_t id,Int_t track);  //return true if current track is in volume
 
 // static functions
    static AliTPCParam* LoadTPCParam(TFile *file); 
@@ -133,7 +121,6 @@ protected:
   Int_t          fNsectors;         // Number of sectors in TPC
   //MI changes
   AliTPCDigitsArray * fDigitsArray;              //!detector digit object  
-  AliTPCClustersArray * fClustersArray; //!detector cluster object
   AliTPCParam *fTPCParam;           // pointer to TPC parameters 
   AliTPCTrackHitsV2 *fTrackHits;      //!hits for given track M.I.
   AliTPCTrackHits *fTrackHitsOld;      //!hits for given track M.I. MIold -
@@ -151,7 +138,6 @@ protected:
    
  private:
   //
-   Bool_t  TrackInVolume(Int_t id,Int_t track);  //return true if current track is in volume
   void SetDefaults();
   void DigitizeRow(Int_t irow,Int_t isec,TObjArray **rowTriplet);
   Float_t GetSignal(TObjArray *p1, Int_t ntr, AliTPCFastMatrix *m1, 
@@ -174,25 +160,6 @@ protected:
 
 
 //_____________________________________________________________________________
-
-class AliTPCdigit : public AliDigit {
-public:
-   Int_t     fSector;     //array of volumes
-   Int_t     fPadRow;     //Row number
-   Int_t     fPad ;       //Pad number
-   Int_t     fTime;       //Time bucket
-   Int_t     fSignal;     //Signal amplitude
-public:
-   AliTPCdigit() {}
-   AliTPCdigit(Int_t *tracks, Int_t *digits);
-   virtual ~AliTPCdigit() {}
-   ClassDef(AliTPCdigit,1)  // Time Projection Chamber digits
-};
-//_____________________________________________________________________________
  
 class AliTPChit : public AliHit {
 public:
@@ -211,6 +178,15 @@ public:
    ClassDef(AliTPChit,1)  // Time Projection Chamber hits
 };
 
+//_____________________________________________________________________________
+class AliTPCFastVector : public TVector {
+public :
+  AliTPCFastVector(Int_t size):TVector(size){};
+  virtual ~AliTPCFastVector(){;}
+  Float_t & UncheckedAt(Int_t index) const  {return  fElements[index];} //fast acces  
+  
+};
+
 #endif
 
 
index fde8834..e53db4c 100644 (file)
@@ -24,7 +24,6 @@
 //                                                                           //
 //                                                                          //
 ///////////////////////////////////////////////////////////////////////////////
-#include "AliTPC.h"
 #include "AliTPCParam.h" 
 #include "AliSegmentArray.h" 
 #include "AliComplexCluster.h"
diff --git a/TPC/AliTPCFast.cxx b/TPC/AliTPCFast.cxx
new file mode 100644 (file)
index 0000000..d6d3169
--- /dev/null
@@ -0,0 +1,598 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  fast TPC cluster simulation                                              //
+//                                                                          //
+///////////////////////////////////////////////////////////////////////////////
+
+#include <TParticle.h>
+
+#include "AliRunLoader.h"
+#include "AliRun.h"
+#include "AliMC.h"
+#include "AliTPC.h"
+#include "AliTPCParam.h"
+#include "AliTPCClustersArray.h"
+#include "AliTPCClustersRow.h"
+#include "AliTPCcluster.h"
+#include "AliComplexCluster.h"
+#include "AliTPCFast.h"
+
+
+ClassImp(AliTPCFast)
+
+
+//_____________________________________________________________________________
+void AliTPCFast::Hits2Clusters(AliRunLoader* runLoader) const
+{
+  //--------------------------------------------------------
+  // TPC simple cluster generator from hits
+  // obtained from the TPC Fast Simulator
+  // The point errors are taken from the parametrization
+  //--------------------------------------------------------
+
+  //-----------------------------------------------------------------
+  // Origin: Marek Kowalski  IFJ, Krakow, Marek.Kowalski@ifj.edu.pl
+  //-----------------------------------------------------------------
+  // Adopted to Marian's cluster data structure by I.Belikov, CERN,
+  // Jouri.Belikov@cern.ch
+  //----------------------------------------------------------------
+  
+  /////////////////////////////////////////////////////////////////////////////
+  //
+  //---------------------------------------------------------------------
+  //   ALICE TPC Cluster Parameters
+  //--------------------------------------------------------------------
+       
+  
+
+  // Cluster width in rphi
+  const Float_t kACrphi=0.18322;
+  const Float_t kBCrphi=0.59551e-3;
+  const Float_t kCCrphi=0.60952e-1;
+  // Cluster width in z
+  const Float_t kACz=0.19081;
+  const Float_t kBCz=0.55938e-3;
+  const Float_t kCCz=0.30428;
+
+
+  AliLoader* loader = runLoader->GetLoader("TPCLoader");
+  if (!loader) {
+    Error("Hits2Clusters", "No TPC loader found");
+    return;
+  }
+  if (!runLoader->GetAliRun()) runLoader->LoadgAlice();
+  AliRun* aliRun = runLoader->GetAliRun();
+  if (!aliRun) {
+    Error("Hits2Clusters", "Couldn't get AliRun object");
+    return;
+  }
+  AliTPC* tpc = (AliTPC*) aliRun->GetDetector("TPC");
+  if (!tpc) {
+    Error("Hits2Clusters", "Couldn't get TPC detector");
+    return;
+  }
+  AliTPCParam* param = tpc->GetParam();
+  if (!param) {
+    Error("Hits2Clusters", "No TPC parameters available");
+    return;
+  }
+
+  //if(fDefaults == 0) SetDefaults();
+
+  Float_t sigmaRphi,sigmaZ,clRphi,clZ;
+  //
+  TParticle *particle; // pointer to a given particle
+  AliTPChit *tpcHit; // pointer to a sigle TPC hit
+  Int_t sector;
+  Int_t ipart;
+  Float_t xyz[5];
+  Float_t pl,pt,tanth,rpad,ratio;
+  Float_t cph,sph;
+  
+  //---------------------------------------------------------------
+  //  Get the access to the tracks 
+  //---------------------------------------------------------------
+  
+  TTree *tH = loader->TreeH();
+  if (tH == 0x0)
+   {
+     Fatal("Hits2Clusters","Can not find TreeH in folder");
+     return;
+   }
+  tpc->SetTreeAddress();
+  
+  Stat_t ntracks = tH->GetEntries();
+
+  //Switch to the output file
+  
+  if (loader->TreeR() == 0x0) loader->MakeTree("R");
+  
+  cout<<"param->GetTitle() = "<<param->GetTitle()<<endl;
+  
+  runLoader->CdGAFile();
+  //param->Write(param->GetTitle());
+
+  AliTPCClustersArray carray;
+  carray.Setup(param);
+  carray.SetClusterType("AliTPCcluster");
+  carray.MakeTree(loader->TreeR());
+
+  Int_t nclusters=0; //cluster counter
+  
+  //------------------------------------------------------------
+  // Loop over all sectors (72 sectors for 20 deg
+  // segmentation for both lower and upper sectors)
+  // Sectors 0-35 are lower sectors, 0-17 z>0, 17-35 z<0
+  // Sectors 36-71 are upper sectors, 36-53 z>0, 54-71 z<0
+  //
+  // First cluster for sector 0 starts at "0"
+  //------------------------------------------------------------
+   
+  for(Int_t isec=0;isec<param->GetNSector();isec++){
+    //MI change
+    param->AdjustCosSin(isec,cph,sph);
+    
+    //------------------------------------------------------------
+    // Loop over tracks
+    //------------------------------------------------------------
+    
+    for(Int_t track=0;track<ntracks;track++){
+      tpc->ResetHits();
+      tH->GetEvent(track);
+      //
+      //  Get number of the TPC hits
+      //     
+       tpcHit = (AliTPChit*)tpc->FirstHit(-1);
+
+      // Loop over hits
+      //
+       while(tpcHit){
+        if (tpcHit->fQ == 0.) {
+           tpcHit = (AliTPChit*) tpc->NextHit();
+           continue; //information about track (I.Belikov)
+        }
+       sector=tpcHit->fSector; // sector number
+
+       if(sector != isec){
+        tpcHit = (AliTPChit*) tpc->NextHit();
+        continue; 
+       }
+       ipart=tpcHit->Track();
+       particle=aliRun->GetMCApp()->Particle(ipart);
+       pl=particle->Pz();
+       pt=particle->Pt();
+       if(pt < 1.e-9) pt=1.e-9;
+       tanth=pl/pt;
+       tanth = TMath::Abs(tanth);
+       rpad=TMath::Sqrt(tpcHit->X()*tpcHit->X() + tpcHit->Y()*tpcHit->Y());
+       ratio=0.001*rpad/pt; // pt must be in MeV/c - historical reason
+
+       //   space-point resolutions
+       
+       sigmaRphi=AliTPCcluster::SigmaY2(rpad,tanth,pt);
+       sigmaZ   =AliTPCcluster::SigmaZ2(rpad,tanth   );
+       
+       //   cluster widths
+       
+       clRphi=kACrphi-kBCrphi*rpad*tanth+kCCrphi*ratio*ratio;
+       clZ=kACz-kBCz*rpad*tanth+kCCz*tanth*tanth;
+       
+       // temporary protection
+       
+       if(sigmaRphi < 0.) sigmaRphi=0.4e-3;
+       if(sigmaZ < 0.) sigmaZ=0.4e-3;
+       if(clRphi < 0.) clRphi=2.5e-3;
+       if(clZ < 0.) clZ=2.5e-5;
+       
+       //
+       
+       //
+       // smearing --> rotate to the 1 (13) or to the 25 (49) sector,
+       // then the inaccuracy in a X-Y plane is only along Y (pad row)!
+       //
+        Float_t xprim= tpcHit->X()*cph + tpcHit->Y()*sph;
+       Float_t yprim=-tpcHit->X()*sph + tpcHit->Y()*cph;
+       xyz[0]=gRandom->Gaus(yprim,TMath::Sqrt(sigmaRphi));   // y
+          Float_t alpha=(isec < param->GetNInnerSector()) ?
+         param->GetInnerAngle() : param->GetOuterAngle();
+          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(); 
+       xyz[2]=sigmaRphi;                                     // fSigmaY2
+       xyz[3]=sigmaZ;                                        // fSigmaZ2
+       xyz[4]=tpcHit->fQ;                                    // q
+
+        AliTPCClustersRow *clrow=carray.GetRow(sector,tpcHit->fPadRow);
+        if (!clrow) clrow=carray.CreateRow(sector,tpcHit->fPadRow);    
+
+        Int_t tracks[3]={tpcHit->Track(), -1, -1};
+       AliTPCcluster cluster(tracks,xyz);
+
+        clrow->InsertCluster(&cluster); nclusters++;
+
+        tpcHit = (AliTPChit*)tpc->NextHit();
+        
+
+      } // end of loop over hits
+
+    }   // end of loop over tracks
+
+    Int_t nrows=param->GetNRow(isec);
+    for (Int_t irow=0; irow<nrows; irow++) {
+        AliTPCClustersRow *clrow=carray.GetRow(isec,irow);
+        if (!clrow) continue;
+        carray.StoreRow(isec,irow);
+        carray.ClearRow(isec,irow);
+    }
+
+  } // end of loop over sectors  
+
+  //  cerr<<"Number of made clusters : "<<nclusters<<"                        \n";
+  loader->WriteRecPoints("OVERWRITE");
+  
+  
+} // end of function
+
+//_________________________________________________________________
+void AliTPCFast::Hits2ExactClustersSector(AliRunLoader* runLoader,
+                                         AliTPCClustersArray* clustersArray,
+                                         Int_t isec) const
+{
+  //--------------------------------------------------------
+  //calculate exact cross point of track and given pad row
+  //resulting values are expressed in "digit" coordinata
+  //--------------------------------------------------------
+
+  //-----------------------------------------------------------------
+  // Origin: Marian Ivanov  GSI Darmstadt, m.ivanov@gsi.de
+  //-----------------------------------------------------------------
+  //
+  if (clustersArray==0){    
+    return;
+  }
+  AliLoader* loader = runLoader->GetLoader("TPCLoader");
+  if (!loader) {
+    Error("Hits2ExactClustersSector", "No TPC loader found");
+    return;
+  }
+  if (!runLoader->GetAliRun()) runLoader->LoadgAlice();
+  AliRun* aliRun = runLoader->GetAliRun();
+  if (!aliRun) {
+    Error("Hits2ExactClustersSector", "Couldn't get AliRun object");
+    return;
+  }
+  AliTPC* tpc = (AliTPC*) aliRun->GetDetector("TPC");
+  if (!tpc) {
+    Error("Hits2ExactClustersSector", "Couldn't get TPC detector");
+    return;
+  }
+  AliTPCParam* param = tpc->GetParam();
+  if (!param) {
+    Error("Hits2ExactClustersSector", "No TPC parameters available");
+    return;
+  }
+  //
+  TParticle *particle; // pointer to a given particle
+  AliTPChit *tpcHit; // pointer to a sigle TPC hit
+  //  Int_t sector,nhits;
+  Int_t ipart;
+  const Int_t kcmaxhits=30000;
+  AliTPCFastVector * xxxx = new AliTPCFastVector(kcmaxhits*4);
+  AliTPCFastVector & xxx = *xxxx;
+  Int_t maxhits = kcmaxhits;
+  //construct array for each padrow
+  for (Int_t i=0; i<param->GetNRow(isec);i++) 
+    clustersArray->CreateRow(isec,i);
+  
+  //---------------------------------------------------------------
+  //  Get the access to the tracks 
+  //---------------------------------------------------------------
+  
+  TTree *tH = loader->TreeH();
+  if (tH == 0x0)
+   {
+     Fatal("Hits2Clusters","Can not find TreeH in folder");
+     return;
+   }
+  tpc->SetTreeAddress();
+
+  Stat_t ntracks = tH->GetEntries();
+  Int_t npart = aliRun->GetMCApp()->GetNtrack();
+  //MI change
+  TBranch * branch=0;
+  if (tpc->GetHitType()>1) branch = tH->GetBranch("TPC2");
+  else branch = tH->GetBranch("TPC");
+
+  //------------------------------------------------------------
+  // Loop over tracks
+  //------------------------------------------------------------
+
+  for(Int_t track=0;track<ntracks;track++){ 
+    Bool_t isInSector=kTRUE;
+    tpc->ResetHits();
+     isInSector = tpc->TrackInVolume(isec,track);
+    if (!isInSector) continue;
+    //MI change
+    branch->GetEntry(track); // get next track
+    //
+    //  Get number of the TPC hits and a pointer
+    //  to the particles
+    // Loop over hits
+    //
+    Int_t currentIndex=0;
+    Int_t lastrow=-1;  //last writen row
+
+    //M.I. changes
+
+    tpcHit = (AliTPChit*)tpc->FirstHit(-1);
+    while(tpcHit){
+      
+      Int_t sector=tpcHit->fSector; // sector number
+      if(sector != isec){
+       tpcHit = (AliTPChit*) tpc->NextHit();
+       continue; 
+      }
+
+      ipart=tpcHit->Track();
+      if (ipart<npart) particle=aliRun->GetMCApp()->Particle(ipart);
+      
+      //find row number
+
+      Float_t  x[3]={tpcHit->X(),tpcHit->Y(),tpcHit->Z()};
+      Int_t    index[3]={1,isec,0};
+      Int_t    currentrow = param->GetPadRow(x,index) ;        
+      if (currentrow<0) {tpcHit = (AliTPChit*)tpc->NextHit(); continue;}
+      if (lastrow<0) lastrow=currentrow;
+      if (currentrow==lastrow){
+       if ( currentIndex>=maxhits){
+         maxhits+=kcmaxhits;
+         xxx.ResizeTo(4*maxhits);
+       }     
+       xxx(currentIndex*4)=x[0];
+       xxx(currentIndex*4+1)=x[1];
+       xxx(currentIndex*4+2)=x[2];     
+       xxx(currentIndex*4+3)=tpcHit->fQ;
+       currentIndex++; 
+      }
+      else 
+       if (currentIndex>2){
+         Float_t sumx=0;
+         Float_t sumx2=0;
+         Float_t sumx3=0;
+         Float_t sumx4=0;
+         Float_t sumy=0;
+         Float_t sumxy=0;
+         Float_t sumx2y=0;
+         Float_t sumz=0;
+         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;
+           x3*=x2;
+           x4*=x3;
+           sumx+=x;
+           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);
+         }
+         Float_t centralPad = (param->GetNPads(isec,lastrow)-1)/2;
+         Float_t det=currentIndex*(sumx2*sumx4-sumx3*sumx3)-sumx*(sumx*sumx4-sumx2*sumx3)+
+           sumx2*(sumx*sumx3-sumx2*sumx2);
+         
+         Float_t detay=sumy*(sumx2*sumx4-sumx3*sumx3)-sumx*(sumxy*sumx4-sumx2y*sumx3)+
+           sumx2*(sumxy*sumx3-sumx2y*sumx2);
+         Float_t detaz=sumz*(sumx2*sumx4-sumx3*sumx3)-sumx*(sumxz*sumx4-sumx2z*sumx3)+
+           sumx2*(sumxz*sumx3-sumx2z*sumx2);
+         
+         Float_t detby=currentIndex*(sumxy*sumx4-sumx2y*sumx3)-sumy*(sumx*sumx4-sumx2*sumx3)+
+           sumx2*(sumx*sumx2y-sumx2*sumxy);
+         Float_t detbz=currentIndex*(sumxz*sumx4-sumx2z*sumx3)-sumz*(sumx*sumx4-sumx2*sumx3)+
+           sumx2*(sumx*sumx2z-sumx2*sumxz);
+         
+         if (TMath::Abs(det)<0.00001){
+            tpcHit = (AliTPChit*)tpc->NextHit();
+           continue;
+         }
+       
+         Float_t y=detay/det+centralPad;
+         Float_t z=detaz/det;  
+         Float_t by=detby/det; //y angle
+         Float_t bz=detbz/det; //z angle
+         sumy/=Float_t(currentIndex);
+         sumz/=Float_t(currentIndex);
+
+         AliTPCClustersRow * row = (clustersArray->GetRow(isec,lastrow));
+         if (row!=0) {
+           AliComplexCluster* cl = new((AliComplexCluster*)row->Append()) AliComplexCluster ;
+           //    AliComplexCluster cl;
+           cl->fX=z;
+           cl->fY=y;
+           cl->fQ=sumq;
+           cl->fSigmaX2=bz;
+           cl->fSigmaY2=by;
+           cl->fTracks[0]=ipart;
+         }
+         currentIndex=0;
+         lastrow=currentrow;
+       } //end of calculating cluster for given row
+       
+       
+      tpcHit = (AliTPChit*)tpc->NextHit();
+    } // end of loop over hits
+  }   // end of loop over tracks 
+  //write padrows to tree 
+  for (Int_t ii=0; ii<param->GetNRow(isec);ii++) {
+    clustersArray->StoreRow(isec,ii);    
+    clustersArray->ClearRow(isec,ii);        
+  }
+  xxxx->Delete();
+}
+
+
+void AliTPCFast::FindTrackHitsIntersection(AliRunLoader* runLoader,
+                                          AliTPCClustersArray* clustersArray) const
+{
+
+  //
+  //fill clones array with intersection of current point with the
+  //middle of the row
+  AliLoader* loader = runLoader->GetLoader("TPCLoader");
+  if (!loader) {
+    Error("FindTrackHitsIntersection", "No TPC loader found");
+    return;
+  }
+  if (!runLoader->GetAliRun()) runLoader->LoadgAlice();
+  AliRun* aliRun = runLoader->GetAliRun();
+  if (!aliRun) {
+    Error("FindTrackHitsIntersection", "Couldn't get AliRun object");
+    return;
+  }
+  AliTPC* tpc = (AliTPC*) aliRun->GetDetector("TPC");
+  if (!tpc) {
+    Error("FindTrackHitsIntersection", "Couldn't get TPC detector");
+    return;
+  }
+  AliTPCParam* param = tpc->GetParam();
+  if (!param) {
+    Error("FindTrackHitsIntersection", "No TPC parameters available");
+    return;
+  }
+
+  Int_t sector;
+  Int_t ipart;
+  
+  const Int_t kcmaxhits=30000;
+  AliTPCFastVector * xxxx = new AliTPCFastVector(kcmaxhits*4);
+  AliTPCFastVector & xxx = *xxxx;
+  Int_t maxhits = kcmaxhits;
+      
+  //
+  AliTPChit * tpcHit=0;
+  tpcHit = (AliTPChit*)tpc->FirstHit2(-1);
+  Int_t currentIndex=0;
+  Int_t lastrow=-1;  //last writen row
+
+  while (tpcHit){
+    if (tpcHit==0) continue;
+    sector=tpcHit->fSector; // sector number
+    ipart=tpcHit->Track();
+    
+    //find row number
+    
+    Float_t  x[3]={tpcHit->X(),tpcHit->Y(),tpcHit->Z()};
+    Int_t    index[3]={1,sector,0};
+    Int_t    currentrow = param->GetPadRow(x,index) ;  
+    if (currentrow<0) continue;
+    if (lastrow<0) lastrow=currentrow;
+    if (currentrow==lastrow){
+      if ( currentIndex>=maxhits){
+       maxhits+=kcmaxhits;
+       xxx.ResizeTo(4*maxhits);
+      }     
+      xxx(currentIndex*4)=x[0];
+      xxx(currentIndex*4+1)=x[1];
+      xxx(currentIndex*4+2)=x[2];      
+      xxx(currentIndex*4+3)=tpcHit->fQ;
+      currentIndex++;  
+    }
+    else 
+      if (currentIndex>2){
+       Float_t sumx=0;
+       Float_t sumx2=0;
+       Float_t sumx3=0;
+       Float_t sumx4=0;
+       Float_t sumy=0;
+       Float_t sumxy=0;
+       Float_t sumx2y=0;
+       Float_t sumz=0;
+       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;
+         x3*=x2;
+         x4*=x3;
+         sumx+=x;
+         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);
+       }
+       Float_t centralPad = (param->GetNPads(sector,lastrow)-1)/2;
+       Float_t det=currentIndex*(sumx2*sumx4-sumx3*sumx3)-sumx*(sumx*sumx4-sumx2*sumx3)+
+         sumx2*(sumx*sumx3-sumx2*sumx2);
+       
+       Float_t detay=sumy*(sumx2*sumx4-sumx3*sumx3)-sumx*(sumxy*sumx4-sumx2y*sumx3)+
+         sumx2*(sumxy*sumx3-sumx2y*sumx2);
+       Float_t detaz=sumz*(sumx2*sumx4-sumx3*sumx3)-sumx*(sumxz*sumx4-sumx2z*sumx3)+
+         sumx2*(sumxz*sumx3-sumx2z*sumx2);
+       
+       Float_t detby=currentIndex*(sumxy*sumx4-sumx2y*sumx3)-sumy*(sumx*sumx4-sumx2*sumx3)+
+         sumx2*(sumx*sumx2y-sumx2*sumxy);
+       Float_t detbz=currentIndex*(sumxz*sumx4-sumx2z*sumx3)-sumz*(sumx*sumx4-sumx2*sumx3)+
+         sumx2*(sumx*sumx2z-sumx2*sumxz);
+       
+       Float_t y=detay/det+centralPad;
+       Float_t z=detaz/det;    
+       Float_t by=detby/det; //y angle
+       Float_t bz=detbz/det; //z angle
+       sumy/=Float_t(currentIndex);
+       sumz/=Float_t(currentIndex);
+       
+       AliComplexCluster cl;
+       cl.fX=z;
+       cl.fY=y;
+       cl.fQ=sumq;
+       cl.fSigmaX2=bz;
+       cl.fSigmaY2=by;
+       cl.fTracks[0]=ipart;
+       
+       AliTPCClustersRow * row = (clustersArray->GetRow(sector,lastrow));
+       if (row!=0) row->InsertCluster(&cl);
+       currentIndex=0;
+       lastrow=currentrow;
+      } //end of calculating cluster for given row
+               
+  } // end of loop over hits
+  xxxx->Delete();
+
+}
+
diff --git a/TPC/AliTPCFast.h b/TPC/AliTPCFast.h
new file mode 100644 (file)
index 0000000..6a3c845
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef ALITPCFAST_H
+#define ALITPCFAST_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+////////////////////////////////////////////////
+//  fast TPC cluster simulation               //
+////////////////////////////////////////////////
+
+#include <TObject.h>
+
+class AliRunLoader;
+class AliTPCClustersArray;
+
+
+class AliTPCFast : public TObject {
+
+public:
+  void Hits2Clusters(AliRunLoader* runLoader) const;
+  void Hits2ExactClustersSector(AliRunLoader* runLoader,
+                               AliTPCClustersArray* clustersArray,
+                               Int_t isec) const;
+  void FindTrackHitsIntersection(AliRunLoader* runLoader,
+                                AliTPCClustersArray* clustersArray) const;
+
+  ClassDef(AliTPCFast,0)  // fast TPC cluster simulation
+};
+
+#endif
index b0923e8..4df397b 100644 (file)
@@ -25,7 +25,6 @@
 #include "AliTPCReconstructor.h"
 #include "AliRunLoader.h"
 #include "AliRun.h"
-#include "AliTPC.h"
 #include "AliTPCclustererMI.h"
 #include "AliTPCtrackerMI.h"
 #include "AliTPCpidESD.h"
@@ -104,19 +103,12 @@ AliTPCParam* AliTPCReconstructor::GetTPCParam(AliRunLoader* runLoader) const
 {
 // get the TPC parameters
 
-  if (!runLoader->GetAliRun()) runLoader->LoadgAlice();
-  if (!runLoader->GetAliRun()) {
-    Error("GetTPCParam", "couldn't get AliRun object");
-    return NULL;
-  }
-  AliTPC* tpc = (AliTPC*) runLoader->GetAliRun()->GetDetector("TPC");
-  if (!tpc) {
-    Error("GetTPCParam", "couldn't get TPC detector");
-    return NULL;
-  }
-  if (!tpc->GetParam()) {
-    Error("GetTPCParam", "no TPC parameters available");
-    return NULL;
-  }
-  return tpc->GetParam();
+  TDirectory* saveDir = gDirectory;
+  runLoader->CdGAFile();
+
+  AliTPCParam* param = (AliTPCParam*) gDirectory->Get("75x40_100x60_150x60");
+  if (!param) Error("GetTPCParam", "no TPC parameters found");
+
+  saveDir->cd();
+  return param;
 }
index 1074178..69296d0 100644 (file)
 
 ClassImp(AliTPCcluster)
 
+//____________________________________________________________________________
+Double_t AliTPCcluster::SigmaY2(Double_t r, Double_t tgl, Double_t pt)
+{
+  //
+  // Parametrised error of the cluster reconstruction (pad direction)
+  //
+  // Sigma rphi
+  const Float_t kArphi=0.41818e-2;
+  const Float_t kBrphi=0.17460e-4;
+  const Float_t kCrphi=0.30993e-2;
+  const Float_t kDrphi=0.41061e-3;
+
+  pt=TMath::Abs(pt)*1000.;
+  Double_t x=r/pt;
+  tgl=TMath::Abs(tgl);
+  Double_t s=kArphi - kBrphi*r*tgl + kCrphi*x*x + kDrphi*x;
+  if (s<0.4e-3) s=0.4e-3;
+  s*=1.3; //Iouri Belikov
+
+  return s;
+}
+
+
+//____________________________________________________________________________
+Double_t AliTPCcluster::SigmaZ2(Double_t r, Double_t tgl)
+{
+  //
+  // Parametrised error of the cluster reconstruction (drift direction)
+  //
+  // Sigma z
+  const Float_t kAz=0.39614e-2;
+  const Float_t kBz=0.22443e-4;
+  const Float_t kCz=0.51504e-1;
+
+
+  tgl=TMath::Abs(tgl);
+  Double_t s=kAz - kBz*r*tgl + kCz*tgl*tgl;
+  if (s<0.4e-3) s=0.4e-3;
+  s*=1.3; //Iouri Belikov
+
+  return s;
+}
+
index 3b84475..a8d2d62 100644 (file)
@@ -25,6 +25,9 @@ public:
   Int_t IsUsed() const {return (fQ<0) ? 1 : 0;}
   Float_t GetQ() const {return TMath::Abs(fQ);}
 
+  static Double_t SigmaY2(Double_t r, Double_t tgl, Double_t pt);
+  static Double_t SigmaZ2(Double_t r, Double_t tgl);
+
 private:
   Float_t   fQ ;       //Q of cluster (in ADC counts)
   
diff --git a/TPC/AliTPCdigit.cxx b/TPC/AliTPCdigit.cxx
new file mode 100644 (file)
index 0000000..97ff00b
--- /dev/null
@@ -0,0 +1,42 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
+///////////////////////////////////////////////////////////////////////////////
+///                                                                          //
+///  Time Projection Chamber Digit                                           //
+///                                                                          //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliTPCdigit.h"
+
+
+ClassImp(AliTPCdigit)
+//_____________________________________________________________________________
+AliTPCdigit::AliTPCdigit(Int_t *tracks, Int_t *digits):
+  AliDigit(tracks)
+{
+  //
+  // Creates a TPC digit object
+  //
+  fSector     = digits[0];
+  fPadRow     = digits[1];
+  fPad        = digits[2];
+  fTime       = digits[3];
+  fSignal     = digits[4];
+}
+
diff --git a/TPC/AliTPCdigit.h b/TPC/AliTPCdigit.h
new file mode 100644 (file)
index 0000000..2ca2f4e
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef ALITPCDIGIT_H
+#define ALITPCDIGIT_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+////////////////////////////////////////////////
+// Digit class for TPC                        //
+////////////////////////////////////////////////
+#include "AliDigit.h" 
+
+
+class AliTPCdigit : public AliDigit {
+public:
+   Int_t     fSector;     //array of volumes
+   Int_t     fPadRow;     //Row number
+   Int_t     fPad ;       //Pad number
+   Int_t     fTime;       //Time bucket
+   Int_t     fSignal;     //Signal amplitude
+public:
+   AliTPCdigit() {}
+   AliTPCdigit(Int_t *tracks, Int_t *digits);
+   virtual ~AliTPCdigit() {}
+   ClassDef(AliTPCdigit,1)  // Time Projection Chamber digits
+};
+
+#endif
index 6bd18b1..83b2813 100644 (file)
@@ -32,9 +32,6 @@
 #include "AliTPCParam.h"
 #include "AliClusters.h"
 
-extern Double_t SigmaY2(Double_t, Double_t, Double_t);
-extern Double_t SigmaZ2(Double_t, Double_t);
-
 ClassImp(AliTPCtracker)
 
 //_____________________________________________________________________________
@@ -313,8 +310,8 @@ Int_t AliTPCtracker::FollowProlongation(AliTPCseed& t, Int_t rf) {
     Double_t maxchi2=kMaxCHI2;
     const AliTPCRow &krow=fSectors[s][nr];
     Double_t pt=t.GetConvConst()/(100/0.299792458/0.2)/t.Get1Pt();
-    Double_t sy2=SigmaY2(t.GetX(),t.GetTgl(),pt);
-    Double_t sz2=SigmaZ2(t.GetX(),t.GetTgl());
+    Double_t sy2=AliTPCcluster::SigmaY2(t.GetX(),t.GetTgl(),pt);
+    Double_t sz2=AliTPCcluster::SigmaZ2(t.GetX(),t.GetTgl());
     Double_t road=4.*sqrt(t.GetSigmaY2() + sy2), y=t.GetY(), z=t.GetZ();
 
     if (road>kMaxROAD) {
@@ -450,8 +447,8 @@ Int_t AliTPCtracker::FollowBackProlongation
     Int_t index=0;
     Double_t maxchi2=kMaxCHI2;
     Double_t pt=seed.GetConvConst()/(100/0.299792458/0.2)/seed.Get1Pt();
-    Double_t sy2=SigmaY2(seed.GetX(),seed.GetTgl(),pt);
-    Double_t sz2=SigmaZ2(seed.GetX(),seed.GetTgl());
+    Double_t sy2=AliTPCcluster::SigmaY2(seed.GetX(),seed.GetTgl(),pt);
+    Double_t sz2=AliTPCcluster::SigmaZ2(seed.GetX(),seed.GetTgl());
     Double_t road=4.*sqrt(seed.GetSigmaY2() + sy2), z=seed.GetZ();
     if (road>kMaxROAD) {
       Warning("FollowBackProlongation","Too broad road !"); 
index 529b637..4a13d1e 100644 (file)
@@ -141,7 +141,6 @@ public:
    //   
    AliCluster * GetCluster (int) const {return 0;}
    AliTPCclusterMI *GetClusterMI(Int_t index) const;
-   Int_t Clusters2Tracks(const TFile */*in*/, TFile */*out*/) const {return 0;}
    Int_t Clusters2Tracks();
    virtual void  CookLabel(AliTPCseed *t,Float_t wrong) const; 
    
@@ -157,7 +156,6 @@ public:
    Int_t UpdateClusters(AliTPCseed& t,  Int_t nr);
    Int_t FollowToNextCluster( AliTPCseed& t, Int_t nr);
 
-   virtual Int_t PropagateBack (const TFile *, TFile *) const {return 0;}
    Int_t PropagateBack(TObjArray * arr);
    Int_t PropagateBack(AliESD * event);
    Int_t PropagateBack(AliTPCseed *pt, Int_t row0, Int_t row1);   
index 598ed2a..a965077 100644 (file)
@@ -27,6 +27,8 @@
 //#include "AliTrackReference.h"
 //----------------------------
 
+class AliTPC;
+
 class AliTPCtrackerParam:
   public TObject
 {
diff --git a/TPC/TPCLinkDef.h b/TPC/TPCLinkDef.h
deleted file mode 100644 (file)
index 18e61c2..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-#ifdef __CINT__
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-/* $Id$ */
-
-#pragma link off all globals;
-#pragma link off all classes;
-#pragma link off all functions;
-#pragma link C++ class  AliTPC+;
-#pragma link C++ class  AliTPCv0+;
-#pragma link C++ class  AliTPCv1+;
-#pragma link C++ class  AliTPCv2+;
-#pragma link C++ class  AliTPCv3+;
-#pragma link C++ class  AliTPChit+;
-#pragma link C++ class  AliTPCdigit+;
-#pragma link C++ class  AliTPCcluster+;
-#pragma link C++ class  AliTPCtrack+;
-#pragma link C++ class  AliTPCtracker+;
-
-
-#pragma link C++ class  AliTPCParam+;
-#pragma link C++ class  AliTPCParamSR-;
-#pragma link C++ class  AliTPCParamCR-;
-#pragma link C++ class  AliTPCRF1D-;
-#pragma link C++ class  AliTPCPRF2D-;
-
-
-#pragma link C++ class AliDetectorParam+;
-
-#pragma link C++ class AliComplexCluster+;
-#pragma link C++ class AliClusters+;
-#pragma link C++ class AliClustersArray+;
-
-#pragma link C++ class AliTPCClustersRow+;
-#pragma link C++ class AliTPCClustersArray+;
-
-
-#pragma link C++ class AliSimDigits+;
-#pragma link C++ class AliDigitsArray+;
-#pragma link C++ class AliTPCDigitsArray+;
-
-
-
-#pragma link C++ class AliTPCTrackHits+;
-#pragma link C++ class AliTPCTrackHitsV2+;
-
-#pragma link C++ class AliTrackHitsInfo+;
-#pragma link C++ class AliTrackHitsParam+;
-#pragma link C++ class AliTrackHitsParamV2+;
-#pragma link C++ class AliHitInfo+;
-
-
-#pragma link C++ class AliTPCclusterer+;
-#pragma link C++ class AliTPCDigitizer;
-#pragma link C++ class AliTPCtrackerParam; 
-
-#pragma link C++ class AliTPCLoader+;
-#pragma link C++ class AliTPCkineGrid;
-
-// points used in new cluster finder
-#pragma link C++ class  AliTPCExactPoint+;
-#pragma link C++ class  AliTPCTrackerPoint+;
-#pragma link C++ class  AliTPCClusterPoint+;
-#pragma link C++ class  AliTPCTrackPoint+;
-#pragma link C++ class  AliTPCTrackPoint2+;
-#pragma link C++ class  AliTPCTrackPointRef+;
-
-#pragma link C++ class  AliTPCclustererMI+;
-#pragma link C++ class  AliTPCclusterMI+;
-#pragma link C++ class  AliTPCclusterLMI+;
-#pragma link C++ class  AliTPCtrackerMI+;
-#pragma link C++ class  AliTPCseed+;
-#pragma link C++ class  AliTPCpolyTrack+;
-
-
-#pragma link C++ class  AliTPCBuffer+;
-#pragma link C++ class  AliTPCDDLRawData+;
-
-#pragma link C++ class  AliTPCpidESD+;
-#pragma link C++ class  AliTPCtrackPid+;
-#pragma link C++ class  AliHelix+;
-
-#pragma link C++ class  AliTPCReconstructor+;
-
-
-
-#endif
-
diff --git a/TPC/TPCbaseLinkDef.h b/TPC/TPCbaseLinkDef.h
new file mode 100644 (file)
index 0000000..9db3fd7
--- /dev/null
@@ -0,0 +1,27 @@
+#ifdef __CINT__
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+#pragma link C++ class AliTPCLoader+;
+
+#pragma link C++ class AliTPCRF1D-;
+#pragma link C++ class AliTPCPRF2D-;
+
+#pragma link C++ class AliDetectorParam+;
+#pragma link C++ class AliTPCParam+;
+#pragma link C++ class AliTPCParamSR-;
+#pragma link C++ class AliTPCParamCR-;
+
+#pragma link C++ class AliTPCdigit+;
+#pragma link C++ class AliSimDigits+;
+#pragma link C++ class AliDigitsArray+;
+#pragma link C++ class AliTPCDigitsArray+;
+
+#endif
+
similarity index 70%
rename from TPC/TPCBarrelLinkDef.h
rename to TPC/TPCfastLinkDef.h
index ca2fed0..b748e28 100644 (file)
@@ -4,13 +4,14 @@
 
 /* $Id$ */
 
-
 #pragma link off all globals;
 #pragma link off all classes;
 #pragma link off all functions;
  
-#pragma link C++ class  AliTPCPid+;
+#pragma link C++ class AliTPCFast;
 
+#pragma link C++ class AliTPCtrackerParam; 
+#pragma link C++ class AliTPCkineGrid;
 
 #endif
 
diff --git a/TPC/TPCrecLinkDef.h b/TPC/TPCrecLinkDef.h
new file mode 100644 (file)
index 0000000..e59a523
--- /dev/null
@@ -0,0 +1,47 @@
+#ifdef __CINT__
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+#pragma link C++ class AliTPCcluster+;
+#pragma link C++ class AliTPCclusterMI+;
+#pragma link C++ class AliTPCclusterLMI+;     // defined in AliTPCclusterMI.h
+
+#pragma link C++ class AliComplexCluster+;
+#pragma link C++ class AliTPCTrackerPoint+;   // defined in AliComplexCluster.h
+#pragma link C++ class AliTPCClusterPoint+;   // defined in AliComplexCluster.h
+#pragma link C++ class AliTPCExactPoint+;     // defined in AliComplexCluster.h
+#pragma link C++ class AliTPCTrackPoint+;     // defined in AliComplexCluster.h
+#pragma link C++ class AliTPCTrackPoint2+;    // defined in AliComplexCluster.h
+#pragma link C++ class AliTPCTrackPointRef+;  // defined in AliComplexCluster.h
+
+#pragma link C++ class AliClusters+;
+#pragma link C++ class AliTPCClustersRow+;
+
+#pragma link C++ class AliClustersArray+;
+#pragma link C++ class AliTPCClustersArray+;
+
+#pragma link C++ class AliTPCclusterer+;
+#pragma link C++ class AliTPCclustererMI+;
+
+#pragma link C++ class AliTPCtrack+;
+#pragma link C++ class AliTPCtracker+;
+
+#pragma link C++ class AliHelix+;
+#pragma link C++ class AliTPCpolyTrack+;
+#pragma link C++ class AliTPCseed+;           // defined in AliTPCtrackerMI.h
+#pragma link C++ class AliTPCtrackerMI+;
+
+#pragma link C++ class AliTPCPid+;
+#pragma link C++ class AliTPCtrackPid+;
+#pragma link C++ class AliTPCpidESD+;
+
+#pragma link C++ class AliTPCReconstructor+;
+
+#endif
+
diff --git a/TPC/TPCsimLinkDef.h b/TPC/TPCsimLinkDef.h
new file mode 100644 (file)
index 0000000..df44602
--- /dev/null
@@ -0,0 +1,32 @@
+#ifdef __CINT__
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+#pragma link C++ class AliTPChit+;    // defined in AliTPC.h
+#pragma link C++ class AliTPC+;
+#pragma link C++ class AliTPCv0+;
+#pragma link C++ class AliTPCv1+;
+#pragma link C++ class AliTPCv2+;
+#pragma link C++ class AliTPCv3+;
+
+#pragma link C++ class AliTrackHitsInfo+;    // defined in AliTPCTrackHits.h
+#pragma link C++ class AliTrackHitsParam+;   // defined in AliTPCTrackHits.h
+#pragma link C++ class AliHitInfo+;          // defined in AliTPCTrackHits.h
+#pragma link C++ class AliTPCTrackHits+;
+
+#pragma link C++ class AliTrackHitsParamV2+; // defined in AliTPCTrackHitsV2.h
+#pragma link C++ class AliTPCTrackHitsV2+;
+
+#pragma link C++ class AliTPCDigitizer;
+
+#pragma link C++ class AliTPCBuffer+;
+#pragma link C++ class AliTPCDDLRawData+;
+
+#endif
+
diff --git a/TPC/libTPC.pkg b/TPC/libTPC.pkg
deleted file mode 100644 (file)
index bd7b408..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-SRCS:=  AliTPCLoader.cxx\
-        AliTPC.cxx AliTPCv0.cxx AliTPCv1.cxx AliTPCv2.cxx  \
-        AliTPCv3.cxx AliDetectorParam.cxx AliTPCParam.cxx \
-        AliTPCParamSR.cxx AliTPCParamCR.cxx  AliTPCPRF2D.cxx \
-        AliTPCRF1D.cxx \
-        AliSimDigits.cxx AliDigitsArray.cxx  AliTPCDigitsArray.cxx \
-        AliComplexCluster.cxx AliClusters.cxx AliClustersArray.cxx \
-        AliTPCClustersRow.cxx \
-        AliTPCClustersArray.cxx \
-        AliTPCcluster.cxx AliTPCclusterer.cxx \
-        AliTPCtrack.cxx AliTPCtracker.cxx \
-       AliTPCTrackHits.cxx \
-       AliTPCDigitizer.cxx\
-       AliTPCTrackHitsV2.cxx AliTPCtrackerParam.cxx AliTPCkineGrid.cxx \
-       AliTPCclustererMI.cxx AliTPCclusterMI.cxx  AliTPCtrackerMI.cxx \
-       AliTPCpolyTrack.cxx \
-       AliTPCBuffer.cxx AliTPCDDLRawData.cxx \
-       AliTPCtrackPid.cxx AliTPCpidESD.cxx AliHelix.cxx \
-       AliTPCReconstructor.cxx
-
-HDRS:= $(SRCS:.cxx=.h)
-
-DHDR:= TPCLinkDef.h
-
-EINCLUDE:= CONTAINERS RAW
-
diff --git a/TPC/libTPCBarrel.pkg b/TPC/libTPCBarrel.pkg
deleted file mode 100644 (file)
index 5212ee4..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-SRCS:=  AliTPCPid.cxx
-HDRS:= $(SRCS:.cxx=.h)
-
-
-DHDR:= TPCBarrelLinkDef.h
-
-EINCLUDE:= CONTAINERS RAW
-
diff --git a/TPC/libTPCbase.pkg b/TPC/libTPCbase.pkg
new file mode 100644 (file)
index 0000000..b9eec91
--- /dev/null
@@ -0,0 +1,14 @@
+SRCS:=  AliTPCLoader.cxx \
+        AliTPCPRF2D.cxx AliTPCRF1D.cxx \
+        AliDetectorParam.cxx AliTPCParam.cxx \
+        AliTPCParamSR.cxx AliTPCParamCR.cxx \
+        AliTPCdigit.cxx \
+        AliSimDigits.cxx AliDigitsArray.cxx AliTPCDigitsArray.cxx
+       
+
+HDRS:= $(SRCS:.cxx=.h)
+
+DHDR:= TPCbaseLinkDef.h
+
+EINCLUDE:= CONTAINERS RAW
+
diff --git a/TPC/libTPCfast.pkg b/TPC/libTPCfast.pkg
new file mode 100644 (file)
index 0000000..82c9575
--- /dev/null
@@ -0,0 +1,11 @@
+SRCS:=  AliTPCFast.cxx \
+        AliTPCtrackerParam.cxx AliTPCkineGrid.cxx
+        
+       
+
+HDRS:= $(SRCS:.cxx=.h)
+
+DHDR:= TPCfastLinkDef.h
+
+EINCLUDE:= CONTAINERS RAW
+
diff --git a/TPC/libTPCrec.pkg b/TPC/libTPCrec.pkg
new file mode 100644 (file)
index 0000000..71654b4
--- /dev/null
@@ -0,0 +1,16 @@
+SRCS:=  AliTPCcluster.cxx \
+        AliTPCclusterMI.cxx AliComplexCluster.cxx \
+       AliClusters.cxx AliTPCClustersRow.cxx \
+        AliClustersArray.cxx AliTPCClustersArray.cxx \
+       AliTPCclusterer.cxx AliTPCclustererMI.cxx \
+       AliTPCtrack.cxx AliTPCtracker.cxx \
+       AliHelix.cxx AliTPCpolyTrack.cxx AliTPCtrackerMI.cxx \
+       AliTPCPid.cxx AliTPCtrackPid.cxx AliTPCpidESD.cxx \
+       AliTPCReconstructor.cxx
+        
+HDRS:= $(SRCS:.cxx=.h)
+
+DHDR:= TPCrecLinkDef.h
+
+EINCLUDE:= CONTAINERS RAW
+
diff --git a/TPC/libTPCsim.pkg b/TPC/libTPCsim.pkg
new file mode 100644 (file)
index 0000000..20fc998
--- /dev/null
@@ -0,0 +1,13 @@
+SRCS:=  AliTPC.cxx \
+        AliTPCv0.cxx AliTPCv1.cxx AliTPCv2.cxx AliTPCv3.cxx \
+        AliTPCTrackHits.cxx AliTPCTrackHitsV2.cxx \
+        AliTPCDigitizer.cxx \
+        AliTPCBuffer.cxx AliTPCDDLRawData.cxx
+
+
+HDRS:= $(SRCS:.cxx=.h)
+
+DHDR:= TPCsimLinkDef.h
+
+EINCLUDE:= CONTAINERS RAW
+
index 05ab17d..1d99514 100644 (file)
@@ -40,7 +40,7 @@ THerwig/module.mk:     THerwig/libTHerwig.pkg
 THijing/module.mk:      THijing/libTHijing.pkg
 TMEVSIM/module.mk:      TMEVSIM/libTMEVSIM.pkg
 TOF/module.mk:          TOF/libTOF.pkg
-TPC/module.mk:          TPC/libTPC.pkg TPC/libTPCBarrel.pkg
+TPC/module.mk:          TPC/libTPCbase.pkg TPC/libTPCsim.pkg TPC/libTPCrec.pkg TPC/libTPCfast.pkg
 TPHIC/module.mk:        TPHIC/libTPHIC.pkg
 TRD/module.mk:          TRD/libTRD.pkg
 VZERO/module.mk:        VZERO/libVZERO.pkg