Major changes in the AliL3Transform class. The class has been made completely
authorvestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 26 Apr 2002 15:13:40 +0000 (15:13 +0000)
committervestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 26 Apr 2002 15:13:40 +0000 (15:13 +0000)
static, which means that no objects needs to be created anymore. This has also
made impact all classes which use this class (this is more or less all of them),
so that no private AliL3Transform* is needed anymore etc. I think I have managed
to implement the changes everywhere, at least it compiles successfully and exa/test.C
runs smoothly. The only rather important thing one has to remember is to initialize
the correct detector parameters by calling AliL3Transform::Init(path). If not,
default parameters will be used (currently corresponding to AliROOT version 3.06).

22 files changed:
HLT/src/AliL3ClustFinderNew.cxx
HLT/src/AliL3ClustFinderNew.h
HLT/src/AliL3ConfMapper.cxx
HLT/src/AliL3Display.cxx
HLT/src/AliL3Display.h
HLT/src/AliL3Evaluate.cxx
HLT/src/AliL3Evaluate.h
HLT/src/AliL3FileHandler.cxx
HLT/src/AliL3GlobalMerger.cxx
HLT/src/AliL3InterMerger.cxx
HLT/src/AliL3MemHandler.cxx
HLT/src/AliL3MemHandler.h
HLT/src/AliL3Merger.cxx
HLT/src/AliL3Merger.h
HLT/src/AliL3Track.cxx
HLT/src/AliL3TrackArray.cxx
HLT/src/AliL3TrackArray.h
HLT/src/AliL3TrackMerger.cxx
HLT/src/AliL3Transform.cxx
HLT/src/AliL3Transform.h
HLT/src/AliLevel3.cxx
HLT/src/AliLevel3.h

index c25b425..a33e5c9 100644 (file)
@@ -28,15 +28,6 @@ AliL3ClustFinderNew::AliL3ClustFinderNew()
   fDeconvTime = kTRUE;
 }
 
-AliL3ClustFinderNew::AliL3ClustFinderNew(AliL3Transform *transform)
-{
-  fTransform = transform;
-  fMatch = 4;
-  fThreshold =10;
-  fDeconvTime = kTRUE;
-  fDeconvPad = kTRUE;
-}
-
 AliL3ClustFinderNew::~AliL3ClustFinderNew()
 {
 
@@ -170,7 +161,7 @@ void AliL3ClustFinderNew::ProcessRow(AliL3DigitRowData *tempPt)
 
       while(1) //Loop over current sequence
        {
-         if(data[bin].fTime >= fTransform->GetNTimeBins())
+         if(data[bin].fTime >= AliL3Transform::GetNTimeBins())
            {
              LOG(AliL3Log::kFatal,"AliL3ClustFinderNew::ProcessRow","Digits")
                <<"Timebin out of range "<<(Int_t)data[bin].fTime<<ENDLOG;
@@ -315,8 +306,8 @@ void AliL3ClustFinderNew::WriteClusters(Int_t n_clusters,ClusterData *list)
       Float_t fpad=(Float_t)list[j].fPad/(Float_t)list[j].fTotalCharge;
       Float_t ftime=(Float_t)list[j].fTime/(Float_t)list[j].fTotalCharge;
       //printf("padrow %d number of pads %d totalcharge %d\n",fCurrentRow,list[j].fFlags,list[j].fTotalCharge);
-      fTransform->Slice2Sector(fCurrentSlice,fCurrentRow,thissector,thisrow);
-      fTransform->Raw2Local(xyz,thissector,thisrow,fpad,ftime);
+      AliL3Transform::Slice2Sector(fCurrentSlice,fCurrentRow,thissector,thisrow);
+      AliL3Transform::Raw2Local(xyz,thissector,thisrow,fpad,ftime);
       if(xyz[0]==0) LOG(AliL3Log::kError,"AliL3ClustFinder","Cluster Finder")
        <<AliL3Log::kDec<<"Zero cluster"<<ENDLOG;
       if(fNClusters >= fMaxNClusters)
index 4c39986..bce5ddd 100644 (file)
@@ -18,7 +18,6 @@ struct ClusterData
 typedef struct ClusterData ClusterData;
 
 class AliL3DigitRowData;
-class AliL3Transform;
 class AliL3SpacePointData;
 
 class AliL3ClustFinderNew {
@@ -26,7 +25,6 @@ class AliL3ClustFinderNew {
  private:
   
   AliL3DigitRowData *fDigitRowData; //!
-  AliL3Transform *fTransform; //!
   AliL3SpacePointData *fSpacePointData; //!
   Bool_t fDeconvTime;
   Bool_t fDeconvPad;
@@ -49,7 +47,6 @@ class AliL3ClustFinderNew {
   
  public:
   AliL3ClustFinderNew();
-  AliL3ClustFinderNew(AliL3Transform *transform);
   virtual ~AliL3ClustFinderNew();
   
   void Read(UInt_t ndigits,AliL3DigitRowData *ptr);
@@ -62,7 +59,6 @@ class AliL3ClustFinderNew {
 
   void SetXYError(Float_t f) {fXYErr = f;}
   void SetZError(Float_t f) {fZErr = f;}
-  void SetTransformer(AliL3Transform *transform) {fTransform = transform;}
   void SetDeconv(Bool_t f) {fDeconvPad=f; fDeconvTime=f;}
   
   Int_t GetNumberOfClusters() {return fNClusters;}
index d0aff87..fc287a6 100644 (file)
@@ -11,7 +11,6 @@
 
 #include "AliL3Defs.h"
 #include "AliL3Logging.h" 
-#include "AliL3Transform.h"
 #include "AliL3Vertex.h"
 #include "AliL3ConfMapTrack.h"
 #include "AliL3ConfMapPoint.h"
@@ -90,8 +89,8 @@ void AliL3ConfMapper::InitVolumes()
   memset(fVolume,0,fBounds*sizeof(AliL3ConfMapContainer));
   memset(fRow,0,fNumRowSegmentPlusOne*sizeof(AliL3ConfMapContainer));
   
-  Int_t max_num_of_tracks = 150;
-  Int_t max_num_of_hits = 3000;
+  Int_t max_num_of_tracks = 1000;
+  Int_t max_num_of_hits = 50000;
   
   if(fHit)
     delete [] fHit;
@@ -130,8 +129,8 @@ void AliL3ConfMapper::InitSector(Int_t sector,Int_t *rowrange,Float_t *etarange)
   else
     {
       fEtaMin = 0;
-      fEtaMax = sector < 18 ? 1 : -1;
-      //fEtaMax = sector < 18 ? 0.9 : -0.9;
+      //fEtaMax = sector < 18 ? 1 : -1;
+      fEtaMax = sector < 18 ? 0.9 : -0.9;
     }
   
   //Set the angles to sector 2:
index d7bc868..9e91787 100644 (file)
@@ -46,7 +46,7 @@ AliL3Display::AliL3Display(Int_t *slice)
 {
   //Ctor. Specify which slices you want to look at.
 
-  TFile *file = new TFile("/prog/alice/data/GEO/alice.geom");
+  TFile *file = new TFile("$(LEVEL3)/GEO/alice.geom");
   if(!file) printf("NO FILE\n");
   if(!file->IsOpen())
     LOG(AliL3Log::kError,"AliL3Display::AliL3Display","File Open")
@@ -56,7 +56,6 @@ AliL3Display::AliL3Display(Int_t *slice)
   fMinSlice = slice[0];
   fMaxSlice = slice[1];
 
-  fTransform = new AliL3Transform();
   file->Close();
   delete file;
 }
@@ -66,8 +65,6 @@ AliL3Display::~AliL3Display()
 
   if(fTracks)
     delete fTracks;
-  if(fTransform)
-    delete fTransform;
 }
 
 void AliL3Display::Setup(Char_t *trackfile,Char_t *path)
@@ -260,7 +257,7 @@ void AliL3Display::DisplayAll(Int_t min_hits)
   v->SetRange(-430,-560,-430,430,560,1710);
   c1->Clear();
   c1->SetFillColor(1);
-  c1->SetTheta(180.);
+  c1->SetTheta(90.);
   c1->SetPhi(0.);
   
   for(Int_t s=fMinSlice; s<=fMaxSlice; s++)
@@ -371,10 +368,9 @@ void AliL3Display::DisplayClusterRow(Int_t slice,Int_t padrow,Char_t *digitsFile
   TTree *TD=(TTree*)file->Get("TreeD_75x40_100x60_0");
   AliSimDigits da, *digits=&da;
   TD->GetBranch("Segment")->SetAddress(&digits); //Return pointer to branch segment.
-  AliL3Transform *transform = new AliL3Transform();
   
   Int_t sector,row;
-  transform->Slice2Sector(slice,padrow,sector,row);
+  AliL3Transform::Slice2Sector(slice,padrow,sector,row);
   Int_t npads = param->GetNPads(sector,row);
   Int_t ntimes = param->GetMaxTBin();
   TH2F *histdig = new TH2F("histdig","",npads,0,npads-1,ntimes,0,ntimes-1);
@@ -430,7 +426,7 @@ void AliL3Display::DisplayClusterRow(Int_t slice,Int_t padrow,Char_t *digitsFile
          xyz[0] = points[i].fX;
          xyz[1] = points[i].fY;
          xyz[2] = points[i].fZ;
-         transform->Global2Raw(xyz,sector,row);
+         AliL3Transform::Global2Raw(xyz,sector,row);
          histfast->Fill(xyz[1],xyz[2],1);
          
          
index e26a7a4..e734c3e 100644 (file)
@@ -8,7 +8,6 @@
 
 class AliL3SpacePointData;
 class AliL3TrackArray;
-class AliL3Transform;
 
 class AliL3Display : public TObject {
 
@@ -17,7 +16,6 @@ class AliL3Display : public TObject {
   AliL3SpacePointData *fClusters[36][6]; //!
   AliL3TrackArray *fTracks; //!
   UInt_t fNcl[36][6];
-  AliL3Transform *fTransform; //!
 
   Int_t fMinSlice;
   Int_t fMaxSlice;
index 03a1430..ebf46aa 100644 (file)
@@ -45,7 +45,6 @@ AliL3Evaluate::AliL3Evaluate()
   fMcId = 0;
   fMinSlice=0;
   fMaxSlice=0;
-  fTransform = new AliL3Transform();
 }
 
 AliL3Evaluate::AliL3Evaluate(Char_t *mcfile,Int_t *slice)
@@ -56,7 +55,6 @@ AliL3Evaluate::AliL3Evaluate(Char_t *mcfile,Int_t *slice)
   fEventFile = new TFile(mcfile,"READ");
     
   fParam = (AliTPCParam*)fEventFile->Get("75x40_100x60");
-  fTransform = new AliL3Transform();
   
   fMinSlice = slice[0];
   fMaxSlice = slice[1];
@@ -71,7 +69,6 @@ AliL3Evaluate::AliL3Evaluate(Int_t *slice)
 
   fMinSlice = slice[0];
   fMaxSlice = slice[1];
-  fTransform = new AliL3Transform();
 
 }
 
@@ -82,7 +79,6 @@ AliL3Evaluate::~AliL3Evaluate()
     fDigitsFile->Close();
     delete fDigitsFile;
   }
-  if(fTransform) delete fTransform;
   if(fTracks) delete fTracks;
   if(fPtRes) delete fPtRes;
   if(fNGoodTracksPt) delete fNGoodTracksPt;
@@ -196,7 +192,7 @@ Bool_t AliL3Evaluate::InitMC()
          if(!fDigitsTree->GetEvent(i)) continue;
          Int_t se,ro,slice,slicerow;
          fParam->AdjustSectorRow(fDigits->GetID(),se,ro);
-         fTransform->Sector2Slice(slice,slicerow,se,ro);
+         AliL3Transform::Sector2Slice(slice,slicerow,se,ro);
          fRowid[slice][slicerow] = i;
        }
     }
@@ -283,7 +279,7 @@ void AliL3Evaluate::DefineGoodTracks(Int_t *slice,Int_t *padrow,Int_t good_numbe
          Int_t sec,row,sl,lr;
          AliSegmentID *s = carray.LoadEntry(i);
          fParam->AdjustSectorRow(s->GetID(),sec,row);
-         fTransform->Sector2Slice(sl,lr,sec,row);
+         AliL3Transform::Sector2Slice(sl,lr,sec,row);
          
          if(sl != slice[0]) {carray.ClearRow(sec,row); continue;}
          if(lr < padrow[0]) {carray.ClearRow(sec,row); continue;}
@@ -328,7 +324,7 @@ void AliL3Evaluate::DefineGoodTracks(Int_t *slice,Int_t *padrow,Int_t good_numbe
                   && fDigits->GetDigit(it-1,ip) <= fParam->GetZeroSup())
                  continue;
              
-             fTransform->Raw2Local(xyz,sec,row,ip,it);
+             AliL3Transform::Raw2Local(xyz,sec,row,ip,it);
              if(fParam->GetPadRowRadii(sec,row)<230./250.*fabs(xyz[2]))
                continue;
              
@@ -501,7 +497,8 @@ Int_t AliL3Evaluate::GetMCTrackLabel(AliL3Track *track){
   //Returns the MCtrackID of the belonging clusters.
   //If MCLabel < 0, means that track is fake.
   //Fake track means that more than 10 percent of clusters are assigned incorrectly.
-
+  
+#ifdef do_mc
   Int_t num_of_clusters = track->GetNumberOfPoints();
   S *s=new S[num_of_clusters];
   Int_t i;
@@ -572,6 +569,10 @@ Int_t AliL3Evaluate::GetMCTrackLabel(AliL3Track *track){
     }
   
   return lab;
+#else //If we are running with mc_ids or not
+  return 0;
+#endif
+
 }
 
 
@@ -615,8 +616,8 @@ Int_t **AliL3Evaluate::GetClusterIDs(AliL3Track *track)
       //sector = points[pos].fSector;
       padrow = points[pos].fPadRow;
       Int_t se,ro;
-      fTransform->Slice2Sector(slice,padrow,se,ro);
-      fTransform->Global2Raw(xyz,se,ro);
+      AliL3Transform::Slice2Sector(slice,padrow,se,ro);
+      AliL3Transform::Global2Raw(xyz,se,ro);
       
       if(fIsSlow)
        {
@@ -904,7 +905,7 @@ TNtuple *AliL3Evaluate::CalculateResiduals()
              xyz[1] = points[pos].fY;
              xyz[2] = points[pos].fZ;
              padrow = points[pos].fPadRow;
-             //fTransform->Global2Local(xyz,slice);
+             //AliL3Transform::Global2Local(xyz,slice);
              
              Float_t xyz_cross[3];
              track->GetCrossingPoint(padrow,xyz_cross);
@@ -965,7 +966,7 @@ TNtuple *AliL3Evaluate::EvaluatePoints(Char_t *rootfile)
       
       //Get the found clusters:
       Int_t slice,padrow;
-      fTransform->Sector2Slice(slice,padrow,cursec,currow);
+      AliL3Transform::Sector2Slice(slice,padrow,cursec,currow);
       if(slice<fMinSlice || slice>fMaxSlice) continue;
       AliL3SpacePointData *points = fClusters[slice][0];
       
@@ -987,13 +988,13 @@ TNtuple *AliL3Evaluate::EvaluatePoints(Char_t *rootfile)
              
              Float_t xyz_cl[3] = {points[c].fX,points[c].fY,points[c].fZ};
              Float_t xyz_ex[3];
-             fTransform->Global2Raw(xyz_cl,cursec,currow);
+             AliL3Transform::Global2Raw(xyz_cl,cursec,currow);
              if(fDigits->GetTrackID((Int_t)rint(xyz_cl[2]),(Int_t)rint(xyz_cl[1]),0)!=mcId &&
                 fDigits->GetTrackID((Int_t)rint(xyz_cl[2]),(Int_t)rint(xyz_cl[1]),1)!=mcId &&
                 fDigits->GetTrackID((Int_t)rint(xyz_cl[2]),(Int_t)rint(xyz_cl[1]),2)!=mcId)
                continue;
-             fTransform->Raw2Local(xyz_ex,cursec,currow,cluster->fY,cluster->fX);
-             fTransform->Raw2Local(xyz_cl,cursec,currow,xyz_cl[1],xyz_cl[2]);
+             AliL3Transform::Raw2Local(xyz_ex,cursec,currow,cluster->fY,cluster->fX);
+             AliL3Transform::Raw2Local(xyz_cl,cursec,currow,xyz_cl[1],xyz_cl[2]);
              Float_t resy = xyz_cl[1] - xyz_ex[1];//cluster->GetY()
              Float_t resz = xyz_cl[2] - xyz_ex[2];//cluster->GetZ()
              
@@ -1016,7 +1017,7 @@ void AliL3Evaluate::GetCFeff(Char_t *outfile)
   TPC->SetParam(fParam);
   
   Int_t ver = TPC->IsVersion();
-  LOG(AliL3Log::kInformational,"AliL3Evaluate::DefineGoodTracks","TPC version")
+  LOG(AliL3Log::kInformational,"AliL3Evaluate::GetCFeff","TPC version")
     <<"TPC version "<<ver<<" found on file"<<ENDLOG;
   
   Int_t zero=TPC->GetParam()->GetZeroSup();
@@ -1049,7 +1050,7 @@ void AliL3Evaluate::GetCFeff(Char_t *outfile)
                 && fDigits->GetDigit(it-1,ip) <= fParam->GetZeroSup())
                continue;
            
-           fTransform->Raw2Local(xyz,sec,row,ip,it);
+           AliL3Transform::Raw2Local(xyz,sec,row,ip,it);
            if(fParam->GetPadRowRadii(sec,row)<230./250.*fabs(xyz[2]))
              continue;
            
@@ -1066,17 +1067,20 @@ void AliL3Evaluate::GetCFeff(Char_t *outfile)
          for (Int_t j=0; j<np; j++) 
            {
              if (count[j]>1) //at least two digits at this padrow 
-               crossed++;
-             count[j]=0;
+               {
+                 crossed++;
+                 count[j]=0;
+               }
            }
          AliL3SpacePointData *points = fClusters[sl][0];
-         for(Int_t l=0; l<fNcl[sl][0]; l++)
+         for(UInt_t k=0; k<fNcl[sl][0]; k++)
            {
-             if(points[l].fPadRow != i) continue;
+             if(points[k].fPadRow!=i) continue;
              recs++;
            }
          ntuppel->Fill(i,crossed,recs);
        }
+      
     }
   delete[] count;
   
@@ -1104,7 +1108,7 @@ Bool_t AliL3Evaluate::GetParticleCrossingPoint(TParticle *part,Int_t slice,Int_t
   
   Float_t angl[1] = {part->Phi()};
   
-  fTransform->Global2LocalAngle(angl,slice);
+  AliL3Transform::Global2LocalAngle(angl,slice);
   
   Double_t charge = -1.*kappa;
   Double_t trackPhi0 = angl[0] + charge*0.5*Pi/fabs(charge);
@@ -1116,7 +1120,7 @@ Bool_t AliL3Evaluate::GetParticleCrossingPoint(TParticle *part,Int_t slice,Int_t
   
   //printf("radius %f xc %f yc %f\n",radius,xc,yc);
 
-  Double_t xHit = fTransform->Row2X(padrow);
+  Double_t xHit = AliL3Transform::Row2X(padrow);
   xyz[0] = xHit;
   Double_t aa = (xHit - xc)*(xHit - xc);
   Double_t r2 = radius*radius;
index 7c49a9e..98e4702 100644 (file)
@@ -25,7 +25,6 @@ class TFile;
 class AliL3TrackArray;
 class AliL3SpacePointData;
 class TH1F;
-class AliL3Transform;
 class AliTPCParam;
 class TTree;
 class AliSimDigits;
@@ -44,7 +43,6 @@ class AliL3Evaluate : public TObject {
   AliL3TrackArray *fTracks; //!
   AliTPCParam *fParam;
   AliL3SpacePointData *fClusters[36][6]; //!
-  AliL3Transform *fTransform; //!
   AliSimDigits *fDigits;
   TTree *fDigitsTree;
   Int_t fMinSlice;
index 431f7fd..9685842 100644 (file)
@@ -230,12 +230,6 @@ AliL3DigitRowData * AliL3FileHandler::AliDigits2Memory(UInt_t & nrow,Int_t event
     <<"No Input avalible: TFile not opend"<<ENDLOG;
     return 0;
   }
-  if(!fTransformer)
-    {
-      LOG(AliL3Log::kWarning,"AliL3FileHandler::AliDigits2Memory","Transformer")
-       <<"No transformer object"<<ENDLOG;
-      return 0;
-    }
   
   if(!fDigitsTree)
     GetDigitsTree(event);
@@ -252,7 +246,7 @@ AliL3DigitRowData * AliL3FileHandler::AliDigits2Memory(UInt_t & nrow,Int_t event
     {
       fDigitsTree->GetEvent(n);
       fParam->AdjustSectorRow(fDigits->GetID(),sector,row);
-      fTransformer->Sector2Slice(lslice,lrow,sector,row);
+      AliL3Transform::Sector2Slice(lslice,lrow,sector,row);
       //if(fSlice != lslice || lrow<fRowMin || lrow>fRowMax) continue;
       if(lslice < fSlice) continue;
       if(lslice != fSlice) break;
@@ -272,7 +266,7 @@ AliL3DigitRowData * AliL3FileHandler::AliDigits2Memory(UInt_t & nrow,Int_t event
              && fDigits->GetDigit(time-1,pad) <= fParam->GetZeroSup())
             continue;
 
-        fTransformer->Raw2Local(xyz,sector,row,pad,time);
+        AliL3Transform::Raw2Local(xyz,sector,row,pad,time);
         if(fParam->GetPadRowRadii(sector,row)<230./250.*fabs(xyz[2]))
           continue;
 
@@ -297,7 +291,7 @@ AliL3DigitRowData * AliL3FileHandler::AliDigits2Memory(UInt_t & nrow,Int_t event
       fDigitsTree->GetEvent(n);
       Float_t xyz[3];
       fParam->AdjustSectorRow(fDigits->GetID(),sector,row);
-      fTransformer->Sector2Slice(lslice,lrow,sector,row);
+      AliL3Transform::Sector2Slice(lslice,lrow,sector,row);
       //if(fSlice != lslice || lrow<fRowMin || lrow>fRowMax) continue;
       if(lslice < fSlice) continue;
       if(lslice != fSlice) break;
@@ -321,7 +315,7 @@ AliL3DigitRowData * AliL3FileHandler::AliDigits2Memory(UInt_t & nrow,Int_t event
              fDigits->GetDigit(time+1,pad) <= fParam->GetZeroSup()) continue;
 
         //Exclude data outside cone:
-        fTransformer->Raw2Local(xyz,sector,row,pad,time);
+        AliL3Transform::Raw2Local(xyz,sector,row,pad,time);
         if(fParam->GetPadRowRadii(sector,row)<230./250.*fabs(xyz[2]))
           continue;
 
@@ -390,11 +384,6 @@ void AliL3FileHandler::AliDigits2RootFile(AliL3DigitRowData *rowPt,Char_t *new_d
       printf("AliL3FileHandler::AliDigits2RootFile : No parameter object. Run on rootfile\n");
       return;
     }
-  if(!fTransformer)
-    {
-      printf("AliL3FileHandler::AliDigits2RootFile : No transform object\n");
-      return;
-    }
   
   //Get the original digitstree:
   fInAli->cd();
@@ -456,7 +445,7 @@ void AliL3FileHandler::AliDigits2RootFile(AliL3DigitRowData *rowPt,Char_t *new_d
       if((Int_t)rowPt->fRow != i) printf("AliL3FileHandler::AliDigits2RootFile : Mismatching row numbering!!!\n");
             
       Int_t sector,row;
-      fTransformer->Slice2Sector(fSlice,i,sector,row);
+      AliL3Transform::Slice2Sector(fSlice,i,sector,row);
       AliSimDigits * dig = (AliSimDigits*)arr->CreateRow(sector,row);
       AliSimDigits *old_dig = (AliSimDigits*)old_array->LoadRow(sector,row);
       if(!old_dig)
@@ -480,7 +469,7 @@ void AliL3FileHandler::AliDigits2RootFile(AliL3DigitRowData *rowPt,Char_t *new_d
          Int_t s_time = time - 1;
          while(trackID[0] < 0)
            {
-             if(s_time >= 0 && s_time < fTransformer->GetNTimeBins() && s_pad >= 0 && s_pad < fTransformer->GetNPads(i))
+             if(s_time >= 0 && s_time < AliL3Transform::GetNTimeBins() && s_pad >= 0 && s_pad < AliL3Transform::GetNPads(i))
                {
                  if(old_dig->GetTrackID(s_time,s_pad,0) > 0)
                    {
@@ -552,12 +541,7 @@ AliL3SpacePointData * AliL3FileHandler::AliPoints2Memory(UInt_t & npoint){
     <<"No Input avalible: TFile not opend"<<ENDLOG;
     return 0;
   }
-  if(!fTransformer)
-    {
-      LOG(AliL3Log::kWarning,"AliL3FileHandler::AliPoints2Memory","Transformer")
-       <<"No transformer object"<<ENDLOG;
-      return 0;
-    }
+
   TDirectory *savedir = gDirectory;
   fInAli->cd();
   
@@ -584,7 +568,7 @@ AliL3SpacePointData * AliL3FileHandler::AliPoints2Memory(UInt_t & npoint){
     rows[i] = row;
     sects[i] = sector;
     clusterrow[i] = 0;
-    fTransformer->Sector2Slice(lslice,lrow,sector,row);
+    AliL3Transform::Sector2Slice(lslice,lrow,sector,row);
     if(fSlice != lslice || lrow<fRowMin || lrow>fRowMax) continue;
     clusterrow[i] = carray.GetRow(sector,row);
     if(clusterrow[i])
@@ -602,7 +586,7 @@ AliL3SpacePointData * AliL3FileHandler::AliPoints2Memory(UInt_t & npoint){
     if(!clusterrow[i]) continue;
     Int_t row = rows[i];
     Int_t sector = sects[i];
-    fTransformer->Sector2Slice(lslice,lrow,sector,row);
+    AliL3Transform::Sector2Slice(lslice,lrow,sector,row);
     Int_t entries_in_row = clusterrow[i]->GetArray()->GetEntriesFast();
     for(Int_t j = 0;j<entries_in_row;j++){
       AliTPCcluster *c = (AliTPCcluster*)(*clusterrow[i])[j];
index 73cba00..005d3fb 100644 (file)
@@ -56,7 +56,7 @@ Double_t AliL3GlobalMerger::CheckTracks(AliL3Track *innertrack,AliL3Track *outer
   
   
   Float_t angle = PI/36;//5 degrees = perpendicular to padrowplane (in local system)
-  fTransformer->Local2GlobalAngle(&angle,slice);
+  AliL3Transform::Local2GlobalAngle(&angle,slice);
   Double_t dx[2],dy[2],dz[2];
   Double_t diff =-1;
   AliL3Track *tracks[2];
@@ -71,7 +71,7 @@ Double_t AliL3GlobalMerger::CheckTracks(AliL3Track *innertrack,AliL3Track *outer
   point[0]=innertrack->GetLastPointX();
   point[1]=innertrack->GetLastPointY();
   point[2]=innertrack->GetLastPointZ();
-  fTransformer->Global2Local(point,slice,kTRUE);
+  AliL3Transform::Global2Local(point,slice,kTRUE);
   
   outertrack->CalculateReferencePoint(angle,point[0]);//local x = global distance to padrowplane
   if(!outertrack->IsPoint()) return diff;
@@ -82,7 +82,7 @@ Double_t AliL3GlobalMerger::CheckTracks(AliL3Track *innertrack,AliL3Track *outer
   point[0]=innertrack->GetFirstPointX();
   point[1]=innertrack->GetFirstPointY();
   point[2]=innertrack->GetFirstPointZ();
-  fTransformer->Global2Local(point,slice,kTRUE);
+  AliL3Transform::Global2Local(point,slice,kTRUE);
   
   outertrack->CalculateReferencePoint(angle,point[0]);//local x = global distance to padrowplane
   if(!outertrack->IsPoint()) return diff;
@@ -112,7 +112,7 @@ void AliL3GlobalMerger::SlowMerge(){
     if(slice2==fNSlices) slice2 =0; 
     AliL3TrackArray *ttt1=GetInTracks(slice2);
     Float_t angle = PI/18.; //10 degrees -> the border of the slices
-    fTransformer->Local2GlobalAngle(&angle,slice);
+    AliL3Transform::Local2GlobalAngle(&angle,slice);
     if(i==0)
       ttt0->QSort();
     ttt1->QSort();
@@ -199,7 +199,7 @@ void AliL3GlobalMerger::Merge(){
     if(slice2==fNSlices) slice2 =0;
     AliL3TrackArray *ttt1=GetInTracks(slice2);
     Float_t angle = PI/18.; //10 degrees -> the border of the slices
-    fTransformer->Local2GlobalAngle(&angle,slice);
+    AliL3Transform::Local2GlobalAngle(&angle,slice);
     if(i==0)
       ttt0->QSort();
     ttt1->QSort();
index a45f27e..7beef83 100644 (file)
@@ -93,7 +93,7 @@ void AliL3InterMerger::MMerge(){
 
 Int_t AliL3InterMerger::Merge(){
   Int_t nrow= fRowMax-fRowMin+1;
-  Double_t xval =fTransformer->Row2X((fRowMax+fRowMin)/2);
+  Double_t xval =AliL3Transform::Row2X((fRowMax+fRowMin)/2);
   AliL3TrackArray * tracks = GetInTracks(0);
   const Int_t  kNIn =tracks->GetNTracks();
   AliL3Track *tr[2];
index ac7726f..327add4 100644 (file)
@@ -94,7 +94,6 @@ AliL3MemHandler::AliL3MemHandler()
   fNGenerate = 0;
   fNUsed = 0;
   fNDigits = 0;
-  fTransformer = 0;
   Int_t row[2] = {0,175};
   Init(0,0,row);
   ResetROI();
@@ -151,11 +150,11 @@ void AliL3MemHandler::SetROI(Float_t *eta,Int_t *slice)
       
       Float_t thetamax = 2*atan(exp(-1.*eta[1]));
       
-      xyz[0] = fTransformer->Row2X(i);
+      xyz[0] = AliL3Transform::Row2X(i);
       xyz[1]=0;
       xyz[2] = xyz[0]/tan(thetamax);
-      fTransformer->Slice2Sector(fSlice,i,sector,row);
-      fTransformer->Local2Raw(xyz,sector,row);
+      AliL3Transform::Slice2Sector(fSlice,i,sector,row);
+      AliL3Transform::Local2Raw(xyz,sector,row);
       
       fEtaMinTimeBin[i] = (Int_t)xyz[2];
       
@@ -164,11 +163,11 @@ void AliL3MemHandler::SetROI(Float_t *eta,Int_t *slice)
       else
        {
          Float_t thetamin = 2*atan(exp(-1.*eta[0]));
-         xyz[0] = fTransformer->Row2X(i);
-         xyz[1] = fTransformer->GetMaxY(i);
+         xyz[0] = AliL3Transform::Row2X(i);
+         xyz[1] = AliL3Transform::GetMaxY(i);
          Float_t radii = sqrt(pow(xyz[0],2) + pow(xyz[1],2));
          xyz[2] = radii/tan(thetamin);
-         fTransformer->Local2Raw(xyz,sector,row);
+         AliL3Transform::Local2Raw(xyz,sector,row);
          fEtaMaxTimeBin[i] = (Int_t)xyz[2];
        }
     }
@@ -381,7 +380,7 @@ UInt_t AliL3MemHandler::GetRandomSize()
 {
   Int_t nrandom = 0;
   for(Int_t r=fRowMin;r<=fRowMax;r++){
-    Int_t npad=fTransformer->GetNPads(r);
+    Int_t npad=AliL3Transform::GetNPads(r);
     nrandom  += Int_t (fNGenerate * ((Double_t) npad/141.));
   }
   return 9 * nrandom * sizeof(AliL3DigitData);
@@ -394,10 +393,10 @@ void AliL3MemHandler::Generate(Int_t row)
   if(!IsRandom) return;
   ResetRandom();
   fNDigits = 0;
-  Int_t npad=fTransformer->GetNPads(row);
+  Int_t npad=AliL3Transform::GetNPads(row);
   Int_t ntime = fEtaMaxTimeBin[row] - fEtaMinTimeBin[row];
   Int_t nrandom  = Int_t (fNGenerate * ((Double_t) npad/141.) * 
-                         (Double_t) ntime/(Double_t) fTransformer->GetNTimeBins() );
+                         (Double_t) ntime/(Double_t) AliL3Transform::GetNTimeBins() );
   
   for(Int_t n=0;n<nrandom;n++){
     Int_t pad = (int)((float)rand()/RAND_MAX*npad);
@@ -425,8 +424,8 @@ void AliL3MemHandler::DigitizePoint(Int_t row, Int_t pad,
       Int_t dpad  = j + pad;
       Int_t dtime = k + time;
       
-      if(dpad<0||dpad>=fTransformer->GetNPads(row))  continue;
-      if(dtime<0||dtime>=fTransformer->GetNTimeBins()) continue;
+      if(dpad<0||dpad>=AliL3Transform::GetNPads(row))  continue;
+      if(dtime<0||dtime>=AliL3Transform::GetNTimeBins()) continue;
       
       fDigits[fNDigits].fCharge = dcharge;
       fDigits[fNDigits].fRow = row;
@@ -986,17 +985,13 @@ Bool_t AliL3MemHandler::Transform(UInt_t npoint,AliL3SpacePointData *data,Int_t
     <<"Pointer to AliL3SpacePointData = 0x0 "<<ENDLOG;
     return kFALSE;
   }
-  if(!fTransformer){
-    LOG(AliL3Log::kError,"AliL3MemHandler::Transform","Object")
-    <<"Pointer to AliL3Transform = 0x0 "<<ENDLOG;
-    return kFALSE;
-  }
+  
   for(UInt_t i=0;i<npoint;i++){
     Float_t xyz[3];
     xyz[0] = data[i].fX;
     xyz[1] = data[i].fY;
     xyz[2] = data[i].fZ;
-    fTransformer->Local2Global(xyz,slice);
+    AliL3Transform::Local2Global(xyz,slice);
     data[i].fX = xyz[0];
     data[i].fY = xyz[1];
     data[i].fZ = xyz[2];
@@ -1257,12 +1252,7 @@ Bool_t AliL3MemHandler::Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *d
     <<"Pointer to AliL3TrackArray = 0x0 "<<ENDLOG;
     return kFALSE;
   }
-  if(!fTransformer){
-    LOG(AliL3Log::kError,"AliL3MemHandler::Memory2TrackArray","Object")
-    <<"Pointer to AliL3Transform = 0x0 "<<ENDLOG;
-    return kFALSE;
-  }
-  array->FillTracks(ntrack,data,slice,fTransformer);
+  array->FillTracks(ntrack,data,slice);
   return kTRUE;
 }
 
index abd7681..2484a15 100644 (file)
@@ -5,7 +5,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "AliL3DigitData.h"
-#include "AliL3Transform.h"
+
 class AliL3SpacePointData;
 class AliL3DigitRowData;
 class AliL3TrackSegmentData;
@@ -52,14 +52,12 @@ class AliL3MemHandler{
 
   Int_t fEtaMinTimeBin[176];
   Int_t fEtaMaxTimeBin[176];
-  AliL3Transform *fTransformer;//!
 
  public:
   AliL3MemHandler();
   virtual ~AliL3MemHandler();
   
   void Reset(){CloseBinaryInput();CloseBinaryOutput();Free();}  
-  void SetTransformer(AliL3Transform *t){fTransformer = t;}
   void Init(Int_t s,Int_t p,const Int_t* row){fSlice=s;fPatch=p;fRowMin=row[0];fRowMax=row[1]; ResetROI();}
 
   Bool_t SetBinaryInput(char *name);
index c55adb5..a015c46 100644 (file)
@@ -28,7 +28,6 @@ ClassImp(AliL3Merger)
 
 AliL3Merger::AliL3Merger(){
   //Default constructor
-  fTransformer= 0;
   SetArray(0);
 }
 
@@ -86,7 +85,8 @@ void AliL3Merger::FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr){
   //Read tracks from shared memory (or memory)
   AliL3TrackArray *destination = GetInTracks(fCurrentTracks);
   if(Is2Global())
-    destination->FillTracks(ntracks, tr, fSlice, fTransformer);
+    destination->FillTracks(ntracks, tr, fSlice);
+    //destination->FillTracks(ntracks, tr, fSlice, fTransformer);
   else
     destination->FillTracks(ntracks, tr);
 }
index c6f0787..cb096f7 100644 (file)
@@ -7,7 +7,6 @@
 class AliL3Track;
 class AliL3TrackSegmentData;
 class AliL3Vertex;
-class AliL3Transform;
 class AliL3TrackArray;
 
 class AliL3Merger {
@@ -30,7 +29,6 @@ class AliL3Merger {
   Int_t fCurrentTracks;
   Int_t fSlice;
   AliL3Vertex *fVertex;//!
-  AliL3Transform *fTransformer;//!  
   Bool_t f2Global;
   Bool_t Is2Global(Bool_t is){f2Global=is;return f2Global;}
 
@@ -44,7 +42,6 @@ class AliL3Merger {
   AliL3TrackArray *GetOutTracks(){return fOutTrack;}
 
   Bool_t Is2Global(){return f2Global;}
-  void SetTransformer(AliL3Transform *trans){fTransformer = trans;}
   void SetVertex(AliL3Vertex *vertex){fVertex=vertex;}
   void Reset();
   void SetParameter(Double_t maxy=1., Double_t maxz=1., Double_t maxkappa=0.001, Double_t maxpsi=0.05, Double_t maxtgl=0.1);
index e721ac8..6f85aac 100644 (file)
@@ -110,22 +110,21 @@ void AliL3Track::Rotate(Int_t slice,Bool_t tolocal)
   //If flag tolocal is set, the track is rotated
   //to local coordinates.
 
-  AliL3Transform *transform = new AliL3Transform();
   
   Float_t psi[1] = {GetPsi()};
   if(!tolocal)
-    transform->Local2GlobalAngle(psi,slice);
+    AliL3Transform::Local2GlobalAngle(psi,slice);
   else
-    transform->Global2LocalAngle(psi,slice);
+    AliL3Transform::Global2LocalAngle(psi,slice);
   SetPsi(psi[0]);
   Float_t first[3];
   first[0] = GetFirstPointX();
   first[1] = GetFirstPointY();
   first[2] = GetFirstPointZ();
   if(!tolocal)
-    transform->Local2Global(first,slice);
+    AliL3Transform::Local2Global(first,slice);
   else
-    transform->Global2Local(first,slice,kTRUE);
+    AliL3Transform::Global2Local(first,slice,kTRUE);
   
   SetFirstPoint(first[0],first[1],first[2]);
   Float_t last[3];
@@ -133,16 +132,16 @@ void AliL3Track::Rotate(Int_t slice,Bool_t tolocal)
   last[1] = GetLastPointY();
   last[2] = GetLastPointZ();
   if(!tolocal)
-    transform->Local2Global(last,slice);
+    AliL3Transform::Local2Global(last,slice);
   else
-    transform->Global2Local(last,slice,kTRUE);
+    AliL3Transform::Global2Local(last,slice,kTRUE);
   SetLastPoint(last[0],last[1],last[2]);
   
   Float_t center[3] = {GetCenterX(),GetCenterY(),0};
   if(!tolocal)
-    transform->Local2Global(center,slice);
+    AliL3Transform::Local2Global(center,slice);
   else
-    transform->Global2Local(center,slice,kTRUE);
+    AliL3Transform::Global2Local(center,slice,kTRUE);
   SetCenterX(center[0]);
   SetCenterY(center[1]);
   
@@ -150,7 +149,6 @@ void AliL3Track::Rotate(Int_t slice,Bool_t tolocal)
     fIsLocal=kFALSE;
   else
     fIsLocal=kTRUE;
-  delete transform;
 }
 
 void AliL3Track::CalculateHelix(){
@@ -198,15 +196,13 @@ Bool_t AliL3Track::GetCrossingPoint(Int_t padrow,Float_t *xyz)
 {
   //Assumes the track is given in local coordinates
 
-  AliL3Transform *transform = new AliL3Transform();
-  
   if(!IsLocal())
     {
       printf("GetCrossingPoint: Track is given on global coordinates\n");
       return false;
     }
   
-  Double_t xHit = transform->Row2X(padrow);
+  Double_t xHit = AliL3Transform::Row2X(padrow);
 
   xyz[0] = xHit;
   Double_t aa = (xHit - GetCenterX())*(xHit - GetCenterX());
@@ -232,7 +228,6 @@ Bool_t AliL3Track::GetCrossingPoint(Int_t padrow,Float_t *xyz)
   Double_t zHit = GetFirstPointZ() + s_tot*GetTgl();
   xyz[2] = zHit;
   
-  delete transform;
   return true;
 }
 
index 183e13f..b179dae 100644 (file)
@@ -203,7 +203,7 @@ void AliL3TrackArray::FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr){
   }
 }
 
-void AliL3TrackArray::FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr,Int_t slice, AliL3Transform* trans){
+void AliL3TrackArray::FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr,Int_t slice){
   //Read tracks from shared memory (or memory)
   AliL3TrackSegmentData *trs = tr;
   for(Int_t i=0; i<ntracks; i++){
@@ -211,18 +211,18 @@ void AliL3TrackArray::FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr,Int_t
     track->SetPt(trs->fPt);
     Float_t psi[1];
     psi[0]=trs->fPsi;
-    trans->Local2GlobalAngle(psi,slice);
+    AliL3Transform::Local2GlobalAngle(psi,slice);
     track->SetPsi(psi[0]);
     track->SetTgl(trs->fTgl);
     track->SetNHits(trs->fNPoints);
     track->SetCharge(trs->fCharge);
     Float_t first[3];
     first[0]=trs->fX;first[1]=trs->fY;first[2]=trs->fZ;
-    trans->Local2Global(first,slice);
+    AliL3Transform::Local2Global(first,slice);
     track->SetFirstPoint(first[0],first[1],first[2]);
     Float_t last[3];
     last[0]=trs->fLastX;last[1]=trs->fLastY;last[2]=trs->fLastZ;
-    trans->Local2Global(last,slice);
+    AliL3Transform::Local2Global(last,slice);
     track->SetLastPoint(last[0],last[1],last[2]);
     track->SetHits( trs->fNPoints, trs->fPointIDs );
     UChar_t *tmpP = (UChar_t*)trs;
index 0539c98..31e1661 100644 (file)
@@ -5,7 +5,6 @@
 class AliL3ConfMapTrack;
 class AliL3Track;
 class AliL3TrackSegmentData;
-class AliL3Transform;
 
 class AliL3TrackArray{
  private:
@@ -47,8 +46,7 @@ class AliL3TrackArray{
   Int_t TrackCompare(AliL3Track *a, AliL3Track *b);
 
 
-  void FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr,Int_t slice, 
-                           AliL3Transform* trans); //Fill tracks and transform
+  void FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr,Int_t slice); //Fill tracks and transform
   void FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr); //Fill tracks
   UInt_t WriteTracks(AliL3TrackSegmentData* tr); //Write tracks
   UInt_t WriteTracks(UInt_t & ntracks,AliL3TrackSegmentData* tr); //Write tracks
index 734a747..d8bbb47 100644 (file)
@@ -120,7 +120,7 @@ void AliL3TrackMerger::InterMerge(){
 
   for(Int_t patch=0;patch< GetNIn();patch++){
     AliL3TrackArray * tracks = GetInTracks(patch);
-    Double_t xval = fTransformer->Row2X((fRowMax[patch]+fRowMin[patch])/2);
+    Double_t xval = AliL3Transform::Row2X((fRowMax[patch]+fRowMin[patch])/2);
     Int_t nrow= fRowMax[patch]-fRowMin[patch]+1;
     const Int_t  kNIn =tracks->GetNTracks();
     AliL3Track *tr[2];
@@ -176,8 +176,8 @@ void AliL3TrackMerger::Merge(){
     AliL3TrackArray *tout = GetOutTracks();
     if(i==subsec) tout = GetInTracks(subsec+1);
     AliL3TrackArray *tin = GetInTracks(i);
-    Double_t xval = fTransformer->Row2X(fRowMax[i]);
-    Double_t xmax = fTransformer->Row2X(fRowMax[i+1]);
+    Double_t xval = AliL3Transform::Row2X(fRowMax[i]);
+    Double_t xmax = AliL3Transform::Row2X(fRowMax[i+1]);
     Double_t ymax = xval*tan(edge0);
     for(Int_t out=0;out<tout->GetNTracks();out++){
       AliL3Track *outtrack=tout->GetCheckedTrack(out);
index e9748fe..a118daf 100644 (file)
@@ -1,6 +1,6 @@
 /* $Id$
 // Author: Anders Vestbo <mailto:vestbo@fi.uib.no>, Uli Frankenfeld <mailto:franken@fi.uib.no>
-// -- Copyright &copy AV
+//*-- Copyright &copy ASV
 // changes done by Constantin Loizides <mailto:loizides@ikf.physik.uni-frankfurt.de>
 */
 
 // AliL3Transform
 //
 // Transformation class for ALICE TPC.
-
-ClassImp(AliL3Transform);
-
-
-AliL3Transform::AliL3Transform()
-{
-  //constructor
-  
-  LOG(AliL3Log::kWarning,"AliL3Transform::AliL3Transform()","Init")
-    <<"You are using the _old_ version of parameter inits. V3.06 only! Use the constructor AliL3Transform(char*) instead."<<ENDLOG;
-  Init();
-}
-
-AliL3Transform::AliL3Transform(const Char_t* pathname){
-  //constructor
-  Init(pathname);
-}
-
-AliL3Transform::~AliL3Transform(){
-}
-
-/// old init function used by Anders for AliRoot version 3.06
-void AliL3Transform::Init()
+//
+// Class which contains all detector specific parameters for the TPC,
+// and different useful functions for coordinate transforms.
+//
+// The class is completely static, which means that no object needs
+// to be instantiated. Function calls should then be done like:
+//
+// AliL3Transform::GetEta(xyz);
+//
+// IMPORTANT: If used as is, default detector parameters will be used,
+//            and you really have to make sure that these correspond to
+//            the AliROOT version you are currently working on!!
+//            You should therefore always initialize the parameters by
+//
+//            AliL3Transform::Init(path);
+// 
+//            where path is a char*, giving the path to where file containing
+//            the detector parameter is located. This file should be called
+//            "l3transform.config", and can be created with macro exa/Make_Init.C.
+
+ClassImp(AliL3Transform)
+
+Int_t AliL3Transform::fVersion = 0;
+Int_t AliL3Transform::fNTimeBins = 446 ;
+Int_t AliL3Transform::fNRowLow = 64 ;
+Int_t AliL3Transform::fNRowUp = 112 ;
+Int_t AliL3Transform::fNSectorLow = 36 ;
+Int_t AliL3Transform::fNSectorUp = 36 ;
+Int_t AliL3Transform::fNSector = 72 ;
+Double_t AliL3Transform::fPadPitchWidthLow = 0.400000 ;
+Double_t AliL3Transform::fPadPitchWidthUp = 0.600000 ;
+Double_t AliL3Transform::fZWidth = 0.56599998474121093750 ;
+Double_t AliL3Transform::fZSigma = 0.22880849748219134199 ;
+Double_t AliL3Transform::fZOffset = 0.68642549244657402596;
+Double_t AliL3Transform::fZLength = 250.;
+Int_t AliL3Transform::fNSlice = 36 ;
+Int_t AliL3Transform::fNRow = 176 ;
+Double_t AliL3Transform::fNRotShift = 0.5 ;
+Double_t AliL3Transform::fPi = 3.141592653589793 ;
+Double_t AliL3Transform::fX[176] = {84.570007324218750,
+                                    85.320007324218750,
+                                    86.070007324218750,
+                                    86.820007324218750,
+                                    87.570007324218750,
+                                    88.320007324218750,
+                                    89.070007324218750,
+                                    89.820007324218750,
+                                    90.570007324218750,
+                                    91.320007324218750,
+                                    92.070007324218750,
+                                    92.820007324218750,
+                                    93.570007324218750,
+                                    94.320007324218750,
+                                    95.070007324218750,
+                                    95.820007324218750,
+                                    96.570007324218750,
+                                    97.320007324218750,
+                                    98.070007324218750,
+                                    98.820007324218750,
+                                    99.570007324218750,
+                                    100.320007324218750,
+                                    101.070007324218750,
+                                    101.820007324218750,
+                                    102.570007324218750,
+                                    103.320007324218750,
+                                    104.070007324218750,
+                                    104.820007324218750,
+                                    105.570007324218750,
+                                    106.320007324218750,
+                                    107.070007324218750,
+                                    107.820007324218750,
+                                    108.570007324218750,
+                                    109.320007324218750,
+                                    110.070007324218750,
+                                    110.820007324218750,
+                                    111.570007324218750,
+                                    112.320007324218750,
+                                    113.070007324218750,
+                                    113.820007324218750,
+                                    114.570007324218750,
+                                    115.320007324218750,
+                                    116.070007324218750,
+                                    116.820007324218750,
+                                    117.570007324218750,
+                                    118.320007324218750,
+                                    119.070007324218750,
+                                    119.820007324218750,
+                                    120.570007324218750,
+                                    121.320007324218750,
+                                    122.070007324218750,
+                                    122.820007324218750,
+                                    123.570007324218750,
+                                    124.320007324218750,
+                                    125.070007324218750,
+                                    125.820007324218750,
+                                    126.570007324218750,
+                                    127.320007324218750,
+                                    128.070007324218750,
+                                    128.820007324218750,
+                                    129.570007324218750,
+                                    130.320007324218750,
+                                    131.070007324218750,
+                                    131.820007324218750,
+                                    135.054992675781250,
+                                    136.054992675781250,
+                                    137.054992675781250,
+                                    138.054992675781250,
+                                    139.054992675781250,
+                                    140.054992675781250,
+                                    141.054992675781250,
+                                    142.054992675781250,
+                                    143.054992675781250,
+                                    144.054992675781250,
+                                    145.054992675781250,
+                                    146.054992675781250,
+                                    147.054992675781250,
+                                    148.054992675781250,
+                                    149.054992675781250,
+                                    150.054992675781250,
+                                    151.054992675781250,
+                                    152.054992675781250,
+                                    153.054992675781250,
+                                    154.054992675781250,
+                                    155.054992675781250,
+                                    156.054992675781250,
+                                    157.054992675781250,
+                                    158.054992675781250,
+                                    159.054992675781250,
+                                    160.054992675781250,
+                                    161.054992675781250,
+                                    162.054992675781250,
+                                    163.054992675781250,
+                                    164.054992675781250,
+                                    165.054992675781250,
+                                    166.054992675781250,
+                                    167.054992675781250,
+                                    168.054992675781250,
+                                    169.054992675781250,
+                                    170.054992675781250,
+                                    171.054992675781250,
+                                    172.054992675781250,
+                                    173.054992675781250,
+                                    174.054992675781250,
+                                    175.054992675781250,
+                                    176.054992675781250,
+                                    177.054992675781250,
+                                    178.054992675781250,
+                                    179.054992675781250,
+                                    180.054992675781250,
+                                    181.054992675781250,
+                                    182.054992675781250,
+                                    183.054992675781250,
+                                    184.054992675781250,
+                                    185.054992675781250,
+                                    186.054992675781250,
+                                    187.054992675781250,
+                                    188.054992675781250,
+                                    189.054992675781250,
+                                    190.054992675781250,
+                                    191.054992675781250,
+                                    192.054992675781250,
+                                    193.054992675781250,
+                                    194.054992675781250,
+                                    195.054992675781250,
+                                    196.054992675781250,
+                                    197.054992675781250,
+                                    198.054992675781250,
+                                    199.054992675781250,
+                                    200.054992675781250,
+                                    201.054992675781250,
+                                    202.054992675781250,
+                                    203.054992675781250,
+                                    204.054992675781250,
+                                    205.054992675781250,
+                                    206.054992675781250,
+                                    207.054992675781250,
+                                    208.054992675781250,
+                                    209.054992675781250,
+                                    210.054992675781250,
+                                    211.054992675781250,
+                                    212.054992675781250,
+                                    213.054992675781250,
+                                    214.054992675781250,
+                                    215.054992675781250,
+                                    216.054992675781250,
+                                    217.054992675781250,
+                                    218.054992675781250,
+                                    219.054992675781250,
+                                    220.054992675781250,
+                                    221.054992675781250,
+                                    222.054992675781250,
+                                    223.054992675781250,
+                                    224.054992675781250,
+                                    225.054992675781250,
+                                    226.054992675781250,
+                                    227.054992675781250,
+                                    228.054992675781250,
+                                    229.054992675781250,
+                                    230.054992675781250,
+                                    231.054992675781250,
+                                    232.054992675781250,
+                                    233.054992675781250,
+                                    234.054992675781250,
+                                    235.054992675781250,
+                                    236.054992675781250,
+                                    237.054992675781250,
+                                    238.054992675781250,
+                                    239.054992675781250,
+                                    240.054992675781250,
+                                    241.054992675781250,
+                                    242.054992675781250,
+                                    243.054992675781250,
+                                    244.054992675781250,
+                                    245.054992675781250,
+                                    246.054992675781250,
+};
+
+Int_t AliL3Transform::fNPads[176] = {67,
+                                     67,
+                                     67,
+                                     69,
+                                     69,
+                                     69,
+                                     71,
+                                     71,
+                                     71,
+                                     73,
+                                     73,
+                                     73,
+                                     75,
+                                     75,
+                                     75,
+                                     77,
+                                     77,
+                                     77,
+                                     79,
+                                     79,
+                                     79,
+                                     81,
+                                     81,
+                                     81,
+                                     83,
+                                     83,
+                                     83,
+                                     85,
+                                     85,
+                                     85,
+                                     87,
+                                     87,
+                                     87,
+                                     89,
+                                     89,
+                                     89,
+                                     91,
+                                     91,
+                                     91,
+                                     93,
+                                     93,
+                                     93,
+                                     95,
+                                     95,
+                                     95,
+                                     97,
+                                     97,
+                                     97,
+                                     99,
+                                     99,
+                                     99,
+                                     101,
+                                     101,
+                                     101,
+                                     103,
+                                     103,
+                                     103,
+                                     105,
+                                     105,
+                                     105,
+                                     107,
+                                     107,
+                                     107,
+                                     109,
+                                     73,
+                                     75,
+                                     75,
+                                     75,
+                                     77,
+                                     77,
+                                     77,
+                                     77,
+                                     79,
+                                     79,
+                                     79,
+                                     81,
+                                     81,
+                                     81,
+                                     83,
+                                     83,
+                                     83,
+                                     83,
+                                     85,
+                                     85,
+                                     85,
+                                     87,
+                                     87,
+                                     87,
+                                     87,
+                                     89,
+                                     89,
+                                     89,
+                                     91,
+                                     91,
+                                     91,
+                                     93,
+                                     93,
+                                     93,
+                                     93,
+                                     95,
+                                     95,
+                                     95,
+                                     97,
+                                     97,
+                                     97,
+                                     97,
+                                     99,
+                                     99,
+                                     99,
+                                     101,
+                                     101,
+                                     101,
+                                     103,
+                                     103,
+                                     103,
+                                     103,
+                                     105,
+                                     105,
+                                     105,
+                                     107,
+                                     107,
+                                     107,
+                                     107,
+                                     109,
+                                     109,
+                                     109,
+                                     111,
+                                     111,
+                                     111,
+                                     113,
+                                     113,
+                                     113,
+                                     113,
+                                     115,
+                                     115,
+                                     115,
+                                     117,
+                                     117,
+                                     117,
+                                     117,
+                                     119,
+                                     119,
+                                     119,
+                                     121,
+                                     121,
+                                     121,
+                                     123,
+                                     123,
+                                     123,
+                                     123,
+                                     125,
+                                     125,
+                                     125,
+                                     127,
+                                     127,
+                                     127,
+                                     127,
+                                     129,
+                                     129,
+                                     129,
+                                     131,
+                                     131,
+                                     131,
+                                     133,
+                                     133,
+                                     133,
+                                     133,
+                                     135,
+                                     135,
+                                     135,
+                                     137,
+                                     137,
+                                     137,
+                                     137,
+                                     139,
+                                     139,
+};
+
+
+
+void AliL3Transform::Init(const Char_t* path)
 {
-  fVersion = 0;
+  //Overwrite the parameters with values stored in file "l3transform.config" in path.
+  //If file does not exist, old default values will be used.
   
-  //sector:
-  fNTimeBins = 446;
-  fNRowLow = 64;
-  fNRowUp = 112;
-  fNSectorLow = 36;
-  fNSectorUp = 36;
-  fNSector = 72;
-  fPadPitchWidthLow = 0.400000;
-  fPadPitchWidthUp = 0.600000;
-  fZWidth = 0.56599998474121093750;
-  fZSigma = 0.22880849748219134199;
-  fZOffset = 0.68642549244657402596;
-  fZLength = 250.;
-
-  //slices:
-  fNSlice = 36;
-  fNRow = 176;
-  fPi = 3.141592653589793;
-
-  fNRotShift=0.5;
-  for(Int_t i=0;i<36;i++){
-    fCos[i] = cos( (2*fPi/18) * (i+fNRotShift) );
-    fSin[i] = sin( (2*fPi/18) * (i+fNRotShift) );
-  }
-
-  fX[0] = 84.570007324218750;
-  fX[1] = 85.320007324218750;
-  fX[2] = 86.070007324218750;
-  fX[3] = 86.820007324218750;
-  fX[4] = 87.570007324218750;
-  fX[5] = 88.320007324218750;
-  fX[6] = 89.070007324218750;
-  fX[7] = 89.820007324218750;
-  fX[8] = 90.570007324218750;
-  fX[9] = 91.320007324218750;
-  fX[10] = 92.070007324218750;
-  fX[11] = 92.820007324218750;
-  fX[12] = 93.570007324218750;
-  fX[13] = 94.320007324218750;
-  fX[14] = 95.070007324218750;
-  fX[15] = 95.820007324218750;
-  fX[16] = 96.570007324218750;
-  fX[17] = 97.320007324218750;
-  fX[18] = 98.070007324218750;
-  fX[19] = 98.820007324218750;
-  fX[20] = 99.570007324218750;
-  fX[21] = 100.320007324218750;
-  fX[22] = 101.070007324218750;
-  fX[23] = 101.820007324218750;
-  fX[24] = 102.570007324218750;
-  fX[25] = 103.320007324218750;
-  fX[26] = 104.070007324218750;
-  fX[27] = 104.820007324218750;
-  fX[28] = 105.570007324218750;
-  fX[29] = 106.320007324218750;
-  fX[30] = 107.070007324218750;
-  fX[31] = 107.820007324218750;
-  fX[32] = 108.570007324218750;
-  fX[33] = 109.320007324218750;
-  fX[34] = 110.070007324218750;
-  fX[35] = 110.820007324218750;
-  fX[36] = 111.570007324218750;
-  fX[37] = 112.320007324218750;
-  fX[38] = 113.070007324218750;
-  fX[39] = 113.820007324218750;
-  fX[40] = 114.570007324218750;
-  fX[41] = 115.320007324218750;
-  fX[42] = 116.070007324218750;
-  fX[43] = 116.820007324218750;
-  fX[44] = 117.570007324218750;
-  fX[45] = 118.320007324218750;
-  fX[46] = 119.070007324218750;
-  fX[47] = 119.820007324218750;
-  fX[48] = 120.570007324218750;
-  fX[49] = 121.320007324218750;
-  fX[50] = 122.070007324218750;
-  fX[51] = 122.820007324218750;
-  fX[52] = 123.570007324218750;
-  fX[53] = 124.320007324218750;
-  fX[54] = 125.070007324218750;
-  fX[55] = 125.820007324218750;
-  fX[56] = 126.570007324218750;
-  fX[57] = 127.320007324218750;
-  fX[58] = 128.070007324218750;
-  fX[59] = 128.820007324218750;
-  fX[60] = 129.570007324218750;
-  fX[61] = 130.320007324218750;
-  fX[62] = 131.070007324218750;
-  fX[63] = 131.820007324218750;
-  fX[64] = 135.054992675781250;
-  fX[65] = 136.054992675781250;
-  fX[66] = 137.054992675781250;
-  fX[67] = 138.054992675781250;
-  fX[68] = 139.054992675781250;
-  fX[69] = 140.054992675781250;
-  fX[70] = 141.054992675781250;
-  fX[71] = 142.054992675781250;
-  fX[72] = 143.054992675781250;
-  fX[73] = 144.054992675781250;
-  fX[74] = 145.054992675781250;
-  fX[75] = 146.054992675781250;
-  fX[76] = 147.054992675781250;
-  fX[77] = 148.054992675781250;
-  fX[78] = 149.054992675781250;
-  fX[79] = 150.054992675781250;
-  fX[80] = 151.054992675781250;
-  fX[81] = 152.054992675781250;
-  fX[82] = 153.054992675781250;
-  fX[83] = 154.054992675781250;
-  fX[84] = 155.054992675781250;
-  fX[85] = 156.054992675781250;
-  fX[86] = 157.054992675781250;
-  fX[87] = 158.054992675781250;
-  fX[88] = 159.054992675781250;
-  fX[89] = 160.054992675781250;
-  fX[90] = 161.054992675781250;
-  fX[91] = 162.054992675781250;
-  fX[92] = 163.054992675781250;
-  fX[93] = 164.054992675781250;
-  fX[94] = 165.054992675781250;
-  fX[95] = 166.054992675781250;
-  fX[96] = 167.054992675781250;
-  fX[97] = 168.054992675781250;
-  fX[98] = 169.054992675781250;
-  fX[99] = 170.054992675781250;
-  fX[100] = 171.054992675781250;
-  fX[101] = 172.054992675781250;
-  fX[102] = 173.054992675781250;
-  fX[103] = 174.054992675781250;
-  fX[104] = 175.054992675781250;
-  fX[105] = 176.054992675781250;
-  fX[106] = 177.054992675781250;
-  fX[107] = 178.054992675781250;
-  fX[108] = 179.054992675781250;
-  fX[109] = 180.054992675781250;
-  fX[110] = 181.054992675781250;
-  fX[111] = 182.054992675781250;
-  fX[112] = 183.054992675781250;
-  fX[113] = 184.054992675781250;
-  fX[114] = 185.054992675781250;
-  fX[115] = 186.054992675781250;
-  fX[116] = 187.054992675781250;
-  fX[117] = 188.054992675781250;
-  fX[118] = 189.054992675781250;
-  fX[119] = 190.054992675781250;
-  fX[120] = 191.054992675781250;
-  fX[121] = 192.054992675781250;
-  fX[122] = 193.054992675781250;
-  fX[123] = 194.054992675781250;
-  fX[124] = 195.054992675781250;
-  fX[125] = 196.054992675781250;
-  fX[126] = 197.054992675781250;
-  fX[127] = 198.054992675781250;
-  fX[128] = 199.054992675781250;
-  fX[129] = 200.054992675781250;
-  fX[130] = 201.054992675781250;
-  fX[131] = 202.054992675781250;
-  fX[132] = 203.054992675781250;
-  fX[133] = 204.054992675781250;
-  fX[134] = 205.054992675781250;
-  fX[135] = 206.054992675781250;
-  fX[136] = 207.054992675781250;
-  fX[137] = 208.054992675781250;
-  fX[138] = 209.054992675781250;
-  fX[139] = 210.054992675781250;
-  fX[140] = 211.054992675781250;
-  fX[141] = 212.054992675781250;
-  fX[142] = 213.054992675781250;
-  fX[143] = 214.054992675781250;
-  fX[144] = 215.054992675781250;
-  fX[145] = 216.054992675781250;
-  fX[146] = 217.054992675781250;
-  fX[147] = 218.054992675781250;
-  fX[148] = 219.054992675781250;
-  fX[149] = 220.054992675781250;
-  fX[150] = 221.054992675781250;
-  fX[151] = 222.054992675781250;
-  fX[152] = 223.054992675781250;
-  fX[153] = 224.054992675781250;
-  fX[154] = 225.054992675781250;
-  fX[155] = 226.054992675781250;
-  fX[156] = 227.054992675781250;
-  fX[157] = 228.054992675781250;
-  fX[158] = 229.054992675781250;
-  fX[159] = 230.054992675781250;
-  fX[160] = 231.054992675781250;
-  fX[161] = 232.054992675781250;
-  fX[162] = 233.054992675781250;
-  fX[163] = 234.054992675781250;
-  fX[164] = 235.054992675781250;
-  fX[165] = 236.054992675781250;
-  fX[166] = 237.054992675781250;
-  fX[167] = 238.054992675781250;
-  fX[168] = 239.054992675781250;
-  fX[169] = 240.054992675781250;
-  fX[170] = 241.054992675781250;
-  fX[171] = 242.054992675781250;
-  fX[172] = 243.054992675781250;
-  fX[173] = 244.054992675781250;
-  fX[174] = 245.054992675781250;
-  fX[175] = 246.054992675781250;
-  fNPads[0] = 67;
-  fNPads[1] = 67;
-  fNPads[2] = 67;
-  fNPads[3] = 69;
-  fNPads[4] = 69;
-  fNPads[5] = 69;
-  fNPads[6] = 71;
-  fNPads[7] = 71;
-  fNPads[8] = 71;
-  fNPads[9] = 73;
-  fNPads[10] = 73;
-  fNPads[11] = 73;
-  fNPads[12] = 75;
-  fNPads[13] = 75;
-  fNPads[14] = 75;
-  fNPads[15] = 77;
-  fNPads[16] = 77;
-  fNPads[17] = 77;
-  fNPads[18] = 79;
-  fNPads[19] = 79;
-  fNPads[20] = 79;
-  fNPads[21] = 81;
-  fNPads[22] = 81;
-  fNPads[23] = 81;
-  fNPads[24] = 83;
-  fNPads[25] = 83;
-  fNPads[26] = 83;
-  fNPads[27] = 85;
-  fNPads[28] = 85;
-  fNPads[29] = 85;
-  fNPads[30] = 87;
-  fNPads[31] = 87;
-  fNPads[32] = 87;
-  fNPads[33] = 89;
-  fNPads[34] = 89;
-  fNPads[35] = 89;
-  fNPads[36] = 91;
-  fNPads[37] = 91;
-  fNPads[38] = 91;
-  fNPads[39] = 93;
-  fNPads[40] = 93;
-  fNPads[41] = 93;
-  fNPads[42] = 95;
-  fNPads[43] = 95;
-  fNPads[44] = 95;
-  fNPads[45] = 97;
-  fNPads[46] = 97;
-  fNPads[47] = 97;
-  fNPads[48] = 99;
-  fNPads[49] = 99;
-  fNPads[50] = 99;
-  fNPads[51] = 101;
-  fNPads[52] = 101;
-  fNPads[53] = 101;
-  fNPads[54] = 103;
-  fNPads[55] = 103;
-  fNPads[56] = 103;
-  fNPads[57] = 105;
-  fNPads[58] = 105;
-  fNPads[59] = 105;
-  fNPads[60] = 107;
-  fNPads[61] = 107;
-  fNPads[62] = 107;
-  fNPads[63] = 109;
-  fNPads[64] = 73;
-  fNPads[65] = 75;
-  fNPads[66] = 75;
-  fNPads[67] = 75;
-  fNPads[68] = 77;
-  fNPads[69] = 77;
-  fNPads[70] = 77;
-  fNPads[71] = 77;
-  fNPads[72] = 79;
-  fNPads[73] = 79;
-  fNPads[74] = 79;
-  fNPads[75] = 81;
-  fNPads[76] = 81;
-  fNPads[77] = 81;
-  fNPads[78] = 83;
-  fNPads[79] = 83;
-  fNPads[80] = 83;
-  fNPads[81] = 83;
-  fNPads[82] = 85;
-  fNPads[83] = 85;
-  fNPads[84] = 85;
-  fNPads[85] = 87;
-  fNPads[86] = 87;
-  fNPads[87] = 87;
-  fNPads[88] = 87;
-  fNPads[89] = 89;
-  fNPads[90] = 89;
-  fNPads[91] = 89;
-  fNPads[92] = 91;
-  fNPads[93] = 91;
-  fNPads[94] = 91;
-  fNPads[95] = 93;
-  fNPads[96] = 93;
-  fNPads[97] = 93;
-  fNPads[98] = 93;
-  fNPads[99] = 95;
-  fNPads[100] = 95;
-  fNPads[101] = 95;
-  fNPads[102] = 97;
-  fNPads[103] = 97;
-  fNPads[104] = 97;
-  fNPads[105] = 97;
-  fNPads[106] = 99;
-  fNPads[107] = 99;
-  fNPads[108] = 99;
-  fNPads[109] = 101;
-  fNPads[110] = 101;
-  fNPads[111] = 101;
-  fNPads[112] = 103;
-  fNPads[113] = 103;
-  fNPads[114] = 103;
-  fNPads[115] = 103;
-  fNPads[116] = 105;
-  fNPads[117] = 105;
-  fNPads[118] = 105;
-  fNPads[119] = 107;
-  fNPads[120] = 107;
-  fNPads[121] = 107;
-  fNPads[122] = 107;
-  fNPads[123] = 109;
-  fNPads[124] = 109;
-  fNPads[125] = 109;
-  fNPads[126] = 111;
-  fNPads[127] = 111;
-  fNPads[128] = 111;
-  fNPads[129] = 113;
-  fNPads[130] = 113;
-  fNPads[131] = 113;
-  fNPads[132] = 113;
-  fNPads[133] = 115;
-  fNPads[134] = 115;
-  fNPads[135] = 115;
-  fNPads[136] = 117;
-  fNPads[137] = 117;
-  fNPads[138] = 117;
-  fNPads[139] = 117;
-  fNPads[140] = 119;
-  fNPads[141] = 119;
-  fNPads[142] = 119;
-  fNPads[143] = 121;
-  fNPads[144] = 121;
-  fNPads[145] = 121;
-  fNPads[146] = 123;
-  fNPads[147] = 123;
-  fNPads[148] = 123;
-  fNPads[149] = 123;
-  fNPads[150] = 125;
-  fNPads[151] = 125;
-  fNPads[152] = 125;
-  fNPads[153] = 127;
-  fNPads[154] = 127;
-  fNPads[155] = 127;
-  fNPads[156] = 127;
-  fNPads[157] = 129;
-  fNPads[158] = 129;
-  fNPads[159] = 129;
-  fNPads[160] = 131;
-  fNPads[161] = 131;
-  fNPads[162] = 131;
-  fNPads[163] = 133;
-  fNPads[164] = 133;
-  fNPads[165] = 133;
-  fNPads[166] = 133;
-  fNPads[167] = 135;
-  fNPads[168] = 135;
-  fNPads[169] = 135;
-  fNPads[170] = 137;
-  fNPads[171] = 137;
-  fNPads[172] = 137;
-  fNPads[173] = 137;
-  fNPads[174] = 139;
-  fNPads[175] = 139;
-}
-
-void AliL3Transform::Init(const Char_t* path){
-  Init(); //call the old init function to have some initial values
-
   Char_t *pathname=new Char_t[1024];
   strcpy(pathname,path);
   strcat(pathname,"/l3transform.config");
-
+  
   FILE *fptr=fopen(pathname,"r");
   if(!fptr){
     LOG(AliL3Log::kWarning,"AliL3Transform::Init","File Open")
@@ -469,14 +463,10 @@ void AliL3Transform::Init(const Char_t* path){
     }
   }
 
-  for(Int_t i=0;i<36;i++){
-    fCos[i] = cos( (2*fPi/18) * (i+fNRotShift) );
-    fSin[i] = sin( (2*fPi/18) * (i+fNRotShift) );
-  }
-
   fclose(fptr);
   delete pathname;
   fVersion=1; //new version
+
 }
 
 
@@ -511,7 +501,8 @@ Double_t AliL3Transform::GetPhi(Float_t *xyz)
   return phi;
 }
 
-Bool_t AliL3Transform::Slice2Sector(Int_t slice, Int_t slicerow, Int_t & sector, Int_t &row) const{
+Bool_t AliL3Transform::Slice2Sector(Int_t slice, Int_t slicerow, Int_t & sector, Int_t &row)
+{
   if(slicerow<0&&slicerow>=fNRow) return kFALSE;
   if(slice<0||slice>=fNSlice) return kFALSE;
 
@@ -526,14 +517,16 @@ Bool_t AliL3Transform::Slice2Sector(Int_t slice, Int_t slicerow, Int_t & sector,
   return kTRUE;
 }
 
-Bool_t AliL3Transform::Sector2Slice(Int_t & slice, Int_t  sector) const{
+Bool_t AliL3Transform::Sector2Slice(Int_t & slice, Int_t  sector)
+{
   if(sector<0||sector>=fNSector) return kFALSE;
   if(sector<fNSectorLow) slice = sector;
   else          slice = sector - fNSectorLow;
   return kTRUE;
 }
 
-Bool_t AliL3Transform::Sector2Slice(Int_t & slice, Int_t & slicerow,Int_t  sector, Int_t row) const{
+Bool_t AliL3Transform::Sector2Slice(Int_t & slice, Int_t & slicerow,Int_t  sector, Int_t row)
+{
   if(sector<0||sector>=fNSector||row<0) return kFALSE;
   if(sector<fNSectorLow){
     if(row>=fNRowLow) return kFALSE;
@@ -559,8 +552,8 @@ void AliL3Transform::Local2Global(Float_t *xyz,Int_t slice)
   Float_t x0 = xyz[0];
   Float_t y0 = xyz[1];
   Float_t cs,sn;
-  cs = fCos[slice];
-  sn = fSin[slice];
+  cs = cos( (2*fPi/18) * (slice+fNRotShift) );
+  sn = sin( (2*fPi/18) * (slice+fNRotShift) );
   xyz[0]=x0*cs-y0*sn;
   xyz[1]=x0*sn+y0*cs;
   xyz[2]=xyz[2];//global z=local z
@@ -599,6 +592,7 @@ void AliL3Transform::Raw2Local(Float_t *xyz,Int_t sector,Int_t row,Float_t pad,F
     xyz[2]=fZLength-xyz[2];
   else
     xyz[2]=xyz[2]-fZLength;
+  
 }
 
 void AliL3Transform::Local2Global(Float_t *xyz,Int_t sector,Int_t row)
@@ -607,8 +601,8 @@ void AliL3Transform::Local2Global(Float_t *xyz,Int_t sector,Int_t row)
   Int_t slice,slicerow;
   Sector2Slice(slice, slicerow, sector, row);  
   Float_t r=Row2X(slicerow);
-  Float_t cs = fCos[slice];
-  Float_t sn = fSin[slice];
+  Float_t cs = cos( (2*fPi/18) * (slice+fNRotShift) );
+  Float_t sn = sin( (2*fPi/18) * (slice+fNRotShift) );
 
   xyz[0]=r*cs-xyz[1]*sn;
   xyz[1]=r*sn+xyz[1]*cs;
@@ -617,12 +611,13 @@ void AliL3Transform::Local2Global(Float_t *xyz,Int_t sector,Int_t row)
 
 Double_t AliL3Transform::GetMaxY(Int_t slicerow)
 {
+
  if(slicerow < fNRowLow)
      return fPadPitchWidthLow*fNPads[slicerow]/2; 
  
  else
      return fPadPitchWidthUp*fNPads[slicerow]/2;
+
 }
 
 void AliL3Transform::Global2Local(Float_t *xyz,Int_t sector,Bool_t isSlice)
@@ -633,8 +628,8 @@ void AliL3Transform::Global2Local(Float_t *xyz,Int_t sector,Bool_t isSlice)
     Sector2Slice(slice, sector);  
   else
     slice = sector;
-  Float_t cs = fCos[slice];
-  Float_t sn = fSin[slice];
+  Float_t cs = cos( (2*fPi/18) * (slice+fNRotShift) );
+  Float_t sn = sin( (2*fPi/18) * (slice+fNRotShift) );
   Float_t x1 = xyz[0]*cs + xyz[1]*sn;
   Float_t y1 = -xyz[0]*sn + xyz[1]*cs;
   xyz[0] = x1;
@@ -652,7 +647,7 @@ void AliL3Transform::Raw2Global(Float_t *xyz,Int_t sector,Int_t row,Float_t pad,
 void AliL3Transform::Local2Raw(Float_t *xyz,Int_t sector,Int_t row)
 {
   //Transformation from local coordinates to raw
-  
+
   Int_t slice,slicerow;
   Sector2Slice(slice, slicerow, sector, row);  
    
@@ -667,6 +662,7 @@ void AliL3Transform::Local2Raw(Float_t *xyz,Int_t sector,Int_t row)
   if ((sector<nis/2) || ((sector-nis)<nos/2)) sign=1; 
   xyz[2]=fZLength-sign*xyz[2];
   xyz[2]=(xyz[2]+fZOffset)/fZWidth;
+
 }
 
 void AliL3Transform::Global2Raw(Float_t *xyz,Int_t sector,Int_t row)
index 552329d..eab53b8 100644 (file)
@@ -2,71 +2,68 @@
 #define ALIL3TRANSFORM_H
 
 #include "AliL3RootTypes.h"
-class TFile;
 
 class AliL3Transform {
+
  private:
-  Int_t fNTimeBins;
-  Int_t fNRowLow;
-  Int_t fNRowUp;
-  Int_t fNSectorLow;
-  Int_t fNSectorUp;
-  Double_t fPadPitchWidthLow;
-  Double_t fPadPitchWidthUp;
-  Double_t fZWidth;
-  Double_t fZSigma;
-  Int_t fNSector;
-  Int_t fNSlice;
-  Int_t fNRow;
-  Double_t fPi;
-  Double_t fNRotShift;
-  Double_t fZLength;
-  Double_t fZOffset;
-  Double_t fCos[36]; //fill this following Init
-  Double_t fSin[36]; //fill this following Init
-  Double_t fX[176];  //fill this following Init
-  Int_t fNPads[176]; //fill this following Init
-  Int_t fVersion; //flags which version one is using
-  void Init(); //old init used by Anders for AliRoot <= 3.06
- public:
-  AliL3Transform();
-  AliL3Transform(const char *pathname);
-  virtual ~AliL3Transform();
-  Int_t GetVersion(){return fVersion;}
-  void Init(const Char_t* path); //new init for all AliRoot versions
+  
+  static Int_t fNTimeBins;
+  static Int_t fNRowLow;
+  static Int_t fNRowUp;
+  static Int_t fNSectorLow;
+  static Int_t fNSectorUp;
+  static Double_t fPadPitchWidthLow;
+  static Double_t fPadPitchWidthUp;
+  static Double_t fZWidth;
+  static Double_t fZSigma;
+  static Int_t fNSector;
+  static Int_t fNSlice;
+  static Int_t fNRow;
+  static Double_t fPi;
+  static Double_t fNRotShift;
+  static Double_t fZLength;
+  static Double_t fZOffset;
+  static Int_t fNPads[176]; //fill this following Init
+  static Double_t fX[176];  //fill this following Init
+  static Int_t fVersion; //flags which version one is using
 
-  Double_t GetPadPitchWidthLow() {return fPadPitchWidthLow;}
-  Double_t GetPadPitchWidthUp() {return fPadPitchWidthUp;}
-  Double_t GetPadPitchWidth(Int_t patch) {if(patch<=2) return fPadPitchWidthLow; else return fPadPitchWidthUp;}
-  Double_t GetZWidth() {return fZWidth;}
-  Double_t GetZLength() {return fZLength;}
-  Double_t GetZOffset() {return fZOffset;}
-  Int_t GetNSectorLow() {return fNSectorLow;}
-  Int_t GetNSectorUp() {return fNSectorUp;}
+ public:
+  
+  static void Init(const Char_t* path); //new init for all AliRoot versions
+  
+  static Int_t GetVersion(){return fVersion;}
+  static Double_t GetPadPitchWidthLow() {return fPadPitchWidthLow;}
+  static Double_t GetPadPitchWidthUp() {return fPadPitchWidthUp;}
+  static Double_t GetPadPitchWidth(Int_t patch) {if(patch<=2) return fPadPitchWidthLow; else return fPadPitchWidthUp;}
+  static Double_t GetZWidth() {return fZWidth;}
+  static Double_t GetZLength() {return fZLength;}
+  static Double_t GetZOffset() {return fZOffset;}
+  static Int_t GetNSectorLow() {return fNSectorLow;}
+  static Int_t GetNSectorUp() {return fNSectorUp;}
   
-  Bool_t Slice2Sector(Int_t slice, Int_t slicerow, Int_t &sector, Int_t &row) const;
-  Bool_t Sector2Slice(Int_t &slice, Int_t sector) const;
-  Bool_t Sector2Slice(Int_t &slice, Int_t &slicerow, Int_t sector, Int_t row) const;
+  static Bool_t Slice2Sector(Int_t slice, Int_t slicerow, Int_t &sector, Int_t &row);
+  static Bool_t Sector2Slice(Int_t &slice, Int_t sector);
+  static Bool_t Sector2Slice(Int_t &slice, Int_t &slicerow, Int_t sector, Int_t row);
 
-  Int_t GetNPads(Int_t row){return (row<fNRow)?fNPads[row]:0;}
-  Int_t GetNTimeBins(){return fNTimeBins;}
-  Double_t Row2X(Int_t slicerow);
-  Double_t GetMaxY(Int_t slicerow);
-  Double_t GetEta(Float_t *xyz);
-  Double_t GetEta(Int_t row, Int_t pad, Int_t time);
-  Double_t GetPhi(Float_t *xyz);
+  static Int_t GetNPads(Int_t row){return (row<fNRow)?fNPads[row]:0;}
+  static Int_t GetNTimeBins(){return fNTimeBins;}
+  static Double_t Row2X(Int_t slicerow);
+  static Double_t GetMaxY(Int_t slicerow);
+  static Double_t GetEta(Float_t *xyz);
+  static Double_t GetEta(Int_t row, Int_t pad, Int_t time);
+  static Double_t GetPhi(Float_t *xyz);
 
-  void XYZtoRPhiEta(Float_t *rpe, Float_t *xyz);
-  void Local2Global(Float_t *xyz, Int_t slice);
-  void Local2GlobalAngle(Float_t *angle, Int_t slice);
-  void Global2LocalAngle(Float_t *angle, Int_t slice);
+  static void XYZtoRPhiEta(Float_t *rpe, Float_t *xyz);
+  static void Local2Global(Float_t *xyz, Int_t slice);
+  static void Local2GlobalAngle(Float_t *angle, Int_t slice);
+  static void Global2LocalAngle(Float_t *angle, Int_t slice);
 
-  void Raw2Local(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time);
-  void Local2Global(Float_t *xyz, Int_t sector, Int_t row);
-  void Global2Local(Float_t *xyz, Int_t sector, Bool_t isSlice=kFALSE);
-  void Raw2Global(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time);
-  void Local2Raw(Float_t *xyz, Int_t sector, Int_t row);
-  void Global2Raw(Float_t *xyz, Int_t sector, Int_t row);
+  static void Raw2Local(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time);
+  static void Local2Global(Float_t *xyz, Int_t sector, Int_t row);
+  static void Global2Local(Float_t *xyz, Int_t sector, Bool_t isSlice=kFALSE);
+  static void Raw2Global(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time);
+  static void Local2Raw(Float_t *xyz, Int_t sector, Int_t row);
+  static void Global2Raw(Float_t *xyz, Int_t sector, Int_t row);
   
   ClassDef(AliL3Transform,1) //Transformation class for ALICE TPC
 };
index 4c66ae5..ed9a669 100644 (file)
@@ -99,9 +99,10 @@ void AliLevel3::Init(Char_t *path,Bool_t binary=kTRUE,Int_t npatches=6)
        <<"You have not supplied the input rootfile; use the appropriate ctor!"<<ENDLOG;
       return;
     }
+  
+  AliL3Transform::Init(path);//Initialize the detector parameters.
   fWriteOut = kFALSE;
   fGlobalMerger=0;
-  fTransformer = new AliL3Transform(path);
   fDoRoi = kFALSE;
   fDoNonVertex = kFALSE;
   fClusterDeconv = kTRUE;
@@ -184,7 +185,6 @@ AliLevel3::~AliLevel3(){
   if(fVertexFinder)  delete fVertexFinder;
   if(fVertex)  delete fVertex;
   if(fTracker) delete fTracker;
-  if(fTransformer) delete fTransformer;
   if(fTrackMerger) delete fTrackMerger;
   if(fInterMerger) delete fInterMerger;
   if(fFileHandler) delete fFileHandler;
@@ -224,7 +224,6 @@ void AliLevel3::ProcessEvent(Int_t first,Int_t last,Int_t event){
   for(Int_t i=first; i<=last; i++){
     ProcessSlice(i);
     fGlobalMerger->SetVertex(fVertex);
-    fGlobalMerger->SetTransformer(fTransformer);
     fGlobalMerger->InitSlice(i);
     fGlobalMerger->FillTracks(fNTrackData,fTrackData);
     fFileHandler->Free();   //free the memory
@@ -233,8 +232,8 @@ void AliLevel3::ProcessEvent(Int_t first,Int_t last,Int_t event){
   }
   fBenchmark->Start("Global Merger");
   //fGlobalMerger->AddAllTracks();
-  //fGlobalMerger->Merge();
-  fGlobalMerger->SlowMerge();
+  fGlobalMerger->Merge();
+  //fGlobalMerger->SlowMerge();
   fBenchmark->Stop("Global Merger");
 
   if(fWriteOut) WriteResults(); 
@@ -255,11 +254,9 @@ void AliLevel3::ProcessSlice(Int_t slice){
   AliL3MemHandler *memory = new AliL3MemHandler();
   
   fTrackMerger->Reset();
-  fTrackMerger->SetTransformer(fTransformer);
   fTrackMerger->SetRows(fRow[0]);
   for(Int_t patch=fNPatch-1;patch>=0;patch--){
     fFileHandler->Init(slice,patch,fRow[patch]);
-    fFileHandler->SetTransformer(fTransformer);
     UInt_t npoints=0;
     AliL3SpacePointData *points =0;
     UInt_t ndigits=0;
@@ -355,7 +352,7 @@ void AliLevel3::ProcessSlice(Int_t slice){
 
       points = (AliL3SpacePointData *) memory->Allocate(pointsize);
   
-      fClusterFinder = new AliL3ClustFinderNew(fTransformer);
+      fClusterFinder = new AliL3ClustFinderNew();
       fClusterFinder->InitSlice(slice,patch,fRow[patch][0],fRow[patch][1]
                                ,maxpoints);
       fClusterFinder->SetDeconv(fClusterDeconv);
@@ -460,7 +457,6 @@ void AliLevel3::ProcessSlice(Int_t slice){
     }
     */
     fInterMerger->Reset();
-    fInterMerger->SetTransformer(fTransformer);
     fInterMerger->Init(fRow[patch],patch);
 
     fInterMerger->FillTracks(ntracks0,trackdata0);
@@ -514,7 +510,6 @@ void AliLevel3::WriteSpacePoints(UInt_t npoints,AliL3SpacePointData *points,
   char name[256];
   sprintf(name,"%spoints_%d_%d.raw",fWriteOutPath,slice,patch);
   AliL3MemHandler * memory = new AliL3MemHandler();
-  memory->SetTransformer(fTransformer);
   memory->SetBinaryOutput(name);
   memory->Transform(npoints,points,slice);
   memory->Memory2Binary(npoints,points);
index b367a79..75a5f11 100644 (file)
@@ -11,14 +11,12 @@ class AliL3SpacePointData;
 class AliL3DigitRowData;
 class AliL3TrackSegmentData;
 class AliL3DigitData;
-class AliL3Transform;
 class AliL3ConfMapper;
 class AliL3Vertex;
 class AliL3VertexFinder;
 class AliL3TrackMerger;
 class AliL3GlobalMerger;
 class TDirectory;
-class AliL3Transform;
 class AliL3ClustFinderNew;
 class AliL3Merger;
 class AliL3InterMerger;
@@ -51,7 +49,6 @@ class AliLevel3 : public TObject {
   Int_t fRow[6][2];
   Char_t fPath[256];
   Char_t fWriteOutPath[256];
-  AliL3Transform *fTransformer; //!
   TDirectory *savedir;
   TFile *fInputFile;
   Bool_t fFindVertex;