]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Cleaned up code for coding conventions.
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Jun 2004 16:06:33 +0000 (16:06 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Jun 2004 16:06:33 +0000 (16:06 +0000)
35 files changed:
HLT/src/AliHLTReconstructor.cxx
HLT/src/AliHLTReconstructor.h
HLT/src/AliL3ClustFinderNew.cxx
HLT/src/AliL3ClustFinderNew.h
HLT/src/AliL3ConfMapFit.cxx
HLT/src/AliL3ConfMapPoint.cxx
HLT/src/AliL3ConfMapPoint.h
HLT/src/AliL3ConfMapTrack.cxx
HLT/src/AliL3ConfMapTrack.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/AliL3FileHandler.h
HLT/src/AliL3Log.h
HLT/src/AliL3Logger.cxx
HLT/src/AliL3Logger.h
HLT/src/AliL3MemHandler.cxx
HLT/src/AliL3MemHandler.h
HLT/src/AliL3Merger.cxx
HLT/src/AliL3Merger.h
HLT/src/AliL3RawDataFileHandler.cxx
HLT/src/AliL3RawDataFileHandler.h
HLT/src/AliL3Track.cxx
HLT/src/AliL3Track.h
HLT/src/AliL3TrackArray.cxx
HLT/src/AliL3TrackArray.h
HLT/src/AliL3Transform.cxx
HLT/src/AliL3Transform.h
HLT/src/AliL3VertexArray.cxx
HLT/src/AliL3VertexArray.h
HLT/src/AliLevel3.cxx
HLT/src/AliLevel3.h

index daf1b0ee6f5393d1ce675dacf79db54077e7cfa6..1c1e32eeb2e750eb46b5f98bea314ca2f36739be 100644 (file)
 #include <TSystem.h>
 #include <TArrayF.h>
 
+#include <AliRunLoader.h>
+#include <AliHeader.h>
+#include <AliGenEventHeader.h>
+#include <AliESD.h>
+#include <AliESDHLTtrack.h>
+
 #include "AliL3StandardIncludes.h"
 #include "AliL3Logging.h"
 #include "AliLevel3.h"
 #include "AliL3Track.h"
 #include "AliL3HoughTrack.h"
 #include "AliL3TrackArray.h"
-#include "AliRunLoader.h"
-#include "AliHeader.h"
-#include "AliGenEventHeader.h"
-#include "AliESD.h"
-#include "AliESDHLTtrack.h"
 
 #if __GNUC__== 3
 using namespace std;
@@ -39,7 +40,8 @@ using namespace std;
 ClassImp(AliHLTReconstructor)
 
 AliHLTReconstructor::AliHLTReconstructor(): AliReconstructor() 
-{
+{ 
+  //constructor
   AliL3Log::fgLevel=AliL3Log::kWarning;
   fDoTracker=1;
   fDoHough=1;
@@ -48,7 +50,8 @@ AliHLTReconstructor::AliHLTReconstructor(): AliReconstructor()
 }
 
 AliHLTReconstructor::AliHLTReconstructor(Bool_t doTracker, Bool_t doHough): AliReconstructor() 
-{
+{ 
+  //constructor
   AliL3Log::fgLevel=AliL3Log::kWarning;
   fDoTracker=doTracker;
   fDoHough=doHough;
@@ -57,7 +60,8 @@ AliHLTReconstructor::AliHLTReconstructor(Bool_t doTracker, Bool_t doHough): AliR
 }
 
 AliHLTReconstructor::~AliHLTReconstructor()
-{
+{ 
+  //deconstructor
   if(fDoCleanUp){
     char name[256];
     gSystem->Exec("rm -rf hlt");
@@ -71,6 +75,7 @@ AliHLTReconstructor::~AliHLTReconstructor()
 
 void AliHLTReconstructor::Reconstruct(AliRunLoader* runLoader) const
 {
+  // do the standard and hough reconstruction chain
   if(!runLoader) {
     LOG(AliL3Log::kFatal,"AliHLTReconstructor::Reconstruct","RunLoader")
       <<" Missing RunLoader! 0x0"<<ENDLOG;
@@ -100,6 +105,7 @@ void AliHLTReconstructor::Reconstruct(AliRunLoader* runLoader) const
 
 void AliHLTReconstructor::ReconstructWithConformalMapping(AliRunLoader* runLoader,Int_t iEvent) const
 {
+  // reconstruct with conformal mapper
   AliLevel3 *fHLT = new AliLevel3(runLoader);
   fHLT->Init("./", AliLevel3::kRunLoader, 1);
 
@@ -147,6 +153,7 @@ void AliHLTReconstructor::ReconstructWithConformalMapping(AliRunLoader* runLoade
 
 void AliHLTReconstructor::ReconstructWithHoughTransform(AliRunLoader* runLoader,Int_t iEvent) const
 {
+  //reconstruct with hough
   Float_t ptmin = 0.1*AliL3Transform::GetSolenoidField();
 
   Float_t zvertex = 0;
@@ -189,6 +196,7 @@ void AliHLTReconstructor::ReconstructWithHoughTransform(AliRunLoader* runLoader,
 void AliHLTReconstructor::FillESD(AliRunLoader* runLoader, 
                                  AliESD* esd) const
 {
+  //fill the esd file with found tracks
   Int_t iEvent = runLoader->GetEventNumber();
 
   if(fDoTracker) FillESDforConformalMapping(esd,iEvent);
@@ -197,7 +205,7 @@ void AliHLTReconstructor::FillESD(AliRunLoader* runLoader,
 
 void AliHLTReconstructor::FillESDforConformalMapping(AliESD* esd,Int_t iEvent) const
 {
-  //Assign MC labels for found tracks
+  //fill esd with tracks from conformal mapping
   Int_t slicerange[2]={0,35};
   Int_t good = (int)(0.4*AliL3Transform::GetNRows());
   Int_t nclusters = (int)(0.4*AliL3Transform::GetNRows());
@@ -243,6 +251,7 @@ void AliHLTReconstructor::FillESDforConformalMapping(AliESD* esd,Int_t iEvent) c
 
 void AliHLTReconstructor::FillESDforHoughTransform(AliESD* esd,Int_t iEvent) const
 {
+  //fill esd with tracks from hough
   char filename[256];
   sprintf(filename,"./hough/tracks_%d.raw",iEvent);
   
index 6a60bbbdcf5a07855cef6959d14acf361b9bae7a..42cf7d316fe0502e9de9a2e388221a31bc656970 100644 (file)
@@ -7,7 +7,6 @@
 
 #ifdef use_reconstruction
 #include "AliReconstructor.h"
-#include "AliL3Logging.h"
 
 class AliHLTReconstructor: public AliReconstructor {
 public:
index be01eab07dfa13a57e23ae79a06564b965f903b2..2f2a5178a2a01c186577ee6b2308f17c93f38ba2 100644 (file)
@@ -85,6 +85,7 @@ ClassImp(AliL3ClustFinderNew)
 
 AliL3ClustFinderNew::AliL3ClustFinderNew()
 {
+  //constructor
   fMatch = 1;
   fThreshold = 10;
   fXYErr = 0.2;
@@ -100,10 +101,13 @@ AliL3ClustFinderNew::AliL3ClustFinderNew()
 
 AliL3ClustFinderNew::~AliL3ClustFinderNew()
 {
+  //destructor
+  ;
 }
 
 void AliL3ClustFinderNew::InitSlice(Int_t slice,Int_t patch,Int_t firstrow, Int_t lastrow,Int_t nmaxpoints)
 {
+  //init slice
   fNClusters = 0;
   fMaxNClusters = nmaxpoints;
   fCurrentSlice = slice;
@@ -114,6 +118,7 @@ void AliL3ClustFinderNew::InitSlice(Int_t slice,Int_t patch,Int_t firstrow, Int_
 
 void AliL3ClustFinderNew::InitSlice(Int_t slice,Int_t patch,Int_t nmaxpoints)
 {
+  //init slice
   fNClusters = 0;
   fMaxNClusters = nmaxpoints;
   fCurrentSlice = slice;
@@ -124,11 +129,13 @@ void AliL3ClustFinderNew::InitSlice(Int_t slice,Int_t patch,Int_t nmaxpoints)
 
 void AliL3ClustFinderNew::SetOutputArray(AliL3SpacePointData *pt)
 {
+  //set pointer to output
   fSpacePointData = pt;
 }
 
 void AliL3ClustFinderNew::Read(UInt_t ndigits,AliL3DigitRowData *ptr)
 {
+  //set input pointer
   fNDigitRowData = ndigits;
   fDigitRowData = ptr;
 }
@@ -136,7 +143,6 @@ void AliL3ClustFinderNew::Read(UInt_t ndigits,AliL3DigitRowData *ptr)
 void AliL3ClustFinderNew::ProcessDigits()
 {
   //Loop over rows, and call processrow
-  
   AliL3DigitRowData *tempPt = (AliL3DigitRowData*)fDigitRowData;
   
   for(Int_t i=fFirstRow; i<=fLastRow; i++)
@@ -160,15 +166,15 @@ void AliL3ClustFinderNew::ProcessDigits()
 
 void AliL3ClustFinderNew::ProcessRow(AliL3DigitRowData *tempPt)
 {
-
+  //process row
   UInt_t last_pad = 123456789;
 
-  ClusterData *pad1[5000]; //2 lists for internal memory=2pads
-  ClusterData *pad2[5000]; //2 lists for internal memory=2pads
-  ClusterData clusterlist[10000]; //Clusterlist
+  AliClusterData *pad1[5000]; //2 lists for internal memory=2pads
+  AliClusterData *pad2[5000]; //2 lists for internal memory=2pads
+  AliClusterData clusterlist[10000]; //Clusterlist
 
-  ClusterData **currentPt;  //List of pointers to the current pad
-  ClusterData **previousPt; //List of pointers to the previous pad
+  AliClusterData **currentPt;  //List of pointers to the current pad
+  AliClusterData **previousPt; //List of pointers to the previous pad
   currentPt = pad2;
   previousPt = pad1;
   UInt_t n_previous=0,n_current=0,n_total=0;
@@ -290,7 +296,7 @@ void AliL3ClustFinderNew::ProcessRow(AliL3DigitRowData *tempPt)
 
          if(difference <= fMatch) //There is a match here!!
            {
-             ClusterData *local = previousPt[p];
+             AliClusterData *local = previousPt[p];
 
              if(fDeconvPad)
                {
@@ -333,7 +339,7 @@ void AliL3ClustFinderNew::ProcessRow(AliL3DigitRowData *tempPt)
          //current pad will be previous pad on next pad.
 
          //Add to the clusterlist:
-         ClusterData *tmp = &clusterlist[n_total];
+         AliClusterData *tmp = &clusterlist[n_total];
          tmp->fTotalCharge = seq_charge;
          tmp->fPad = pad_mean;
          tmp->fPad2 = pad_error;
@@ -362,8 +368,9 @@ void AliL3ClustFinderNew::ProcessRow(AliL3DigitRowData *tempPt)
   WriteClusters(n_total,clusterlist);
 }
 
-void AliL3ClustFinderNew::WriteClusters(Int_t n_clusters,ClusterData *list)
+void AliL3ClustFinderNew::WriteClusters(Int_t n_clusters,AliClusterData *list)
 {
+  //write cluster to output pointer
   Int_t thisrow,thissector;
   UInt_t counter = fNClusters;
   
@@ -381,7 +388,7 @@ void AliL3ClustFinderNew::WriteClusters(Int_t n_clusters,ClusterData *list)
       if(fCalcerr) { //calc the errors, otherwice take the fixed error 
        Int_t patch = AliL3Transform::GetPatch(fCurrentRow);
 
-       Float_t sy2=(Float_t)list[j].fPad2/(Float_t)list[j].fTotalCharge - fpad*fpad;
+       Double_t sy2=(Float_t)list[j].fPad2/(Float_t)list[j].fTotalCharge - fpad*fpad;
        if(sy2 < 0) {
            LOG(AliL3Log::kError,"AliL3ClustFinderNew::WriteClusters","Cluster width")
              <<"SigmaY2 negative "<<sy2<<" on row "<<fCurrentRow<<" "<<fpad<<" "<<ftime<<ENDLOG;
@@ -396,7 +403,7 @@ void AliL3ClustFinderNew::WriteClusters(Int_t n_clusters,ClusterData *list)
            }
          } else fpad2=sy2; //take the width not the error
        }
-       Float_t sz2=(Float_t)list[j].fTime2/(Float_t)list[j].fTotalCharge - ftime*ftime;
+       Double_t sz2=(Float_t)list[j].fTime2/(Float_t)list[j].fTotalCharge - ftime*ftime;
        if(sz2 < 0){
          LOG(AliL3Log::kError,"AliL3ClustFinderNew::WriteClusters","Cluster width")
            <<"SigmaZ2 negative "<<sz2<<" on row "<<fCurrentRow<<" "<<fpad<<" "<<ftime<<ENDLOG;
@@ -466,6 +473,7 @@ void AliL3ClustFinderNew::WriteClusters(Int_t n_clusters,ClusterData *list)
 #ifdef do_mc
 void AliL3ClustFinderNew::GetTrackID(Int_t pad,Int_t time,Int_t *trackID)
 {
+  //get mc id
   AliL3DigitRowData *rowPt = (AliL3DigitRowData*)fDigitRowData;
   
   trackID[0]=trackID[1]=trackID[2]=-2;
index 2affe8438be22cdcb77a757a6fe50ab704895673..294b3ef1713b25af9332a97cafdc8b23d493e75a 100644 (file)
@@ -6,7 +6,7 @@
 #include "AliL3RootTypes.h"
 
 
-struct ClusterData
+struct AliClusterData
 {
   UInt_t fTotalCharge;
   UInt_t fPad;
@@ -19,7 +19,7 @@ struct ClusterData
   UInt_t fLastCharge;    //for deconvolution
   UInt_t fLastMergedPad; //dont merge twice per pad
 };
-typedef struct ClusterData ClusterData;
+typedef struct AliClusterData AliClusterData;
 
 class AliL3DigitRowData;
 class AliL3SpacePointData;
@@ -36,18 +36,18 @@ class AliL3ClustFinderNew {
   Bool_t fCalcerr;    //calculate centroid sigmas
   Bool_t fRawSP;      //store centroids in raw system
 
-  UInt_t fNDigitRowData;
-  Int_t fFirstRow;
-  Int_t fLastRow;
-  Int_t fCurrentRow;
-  Int_t fCurrentSlice;
-  Int_t fCurrentPatch;
-  Int_t fMatch;
-  UInt_t fThreshold;
-  Int_t fNClusters;
-  Int_t fMaxNClusters;
-  Float_t fXYErr;
-  Float_t fZErr;
+  UInt_t fNDigitRowData; //ndigts on row
+  Int_t fFirstRow;       //first row
+  Int_t fLastRow;        //last row
+  Int_t fCurrentRow;     //current active row
+  Int_t fCurrentSlice;   //current slice
+  Int_t fCurrentPatch;   //current patch
+  Int_t fMatch;          //size of match
+  UInt_t fThreshold;     //threshold for clusters
+  Int_t fNClusters;      //number of found clusters
+  Int_t fMaxNClusters;   //max. number of clusters
+  Float_t fXYErr;        //fixed error in XY
+  Float_t fZErr;         //fixed error in Z
 
 #ifdef do_mc
   void GetTrackID(Int_t pad,Int_t time,Int_t *trackID);
@@ -63,7 +63,7 @@ class AliL3ClustFinderNew {
   void ProcessDigits();
   void ProcessRow(AliL3DigitRowData *tempPt);
   void SetOutputArray(AliL3SpacePointData *pt);
-  void WriteClusters(Int_t n_clusters,ClusterData *list);
+  void WriteClusters(Int_t n_clusters,AliClusterData *list);
 
   void SetXYError(Float_t f) {fXYErr=f;}
   void SetZError(Float_t f) {fZErr=f;}
@@ -73,7 +73,7 @@ class AliL3ClustFinderNew {
   void SetSTDOutput(Bool_t f=kFALSE) {fStdout=f;}  
   void SetCalcErr(Bool_t f=kTRUE) {fCalcerr=f;}
   void SetRawSP(Bool_t f=kFALSE) {fRawSP=f;}
-  Int_t GetNumberOfClusters() {return fNClusters;}
+  Int_t GetNumberOfClusters() const {return fNClusters;}
   
   ClassDef(AliL3ClustFinderNew,1) //Fast cluster finder
 
index 05e12a70b3d07f1a6cd14ddcff3997abdf1e0bad..e3bb87b445c35a44ef67f04b34d173f059fb09aa 100644 (file)
@@ -33,6 +33,7 @@ AliL3ConfMapFit::AliL3ConfMapFit(AliL3ConfMapTrack *track,AliL3Vertex *vertex)
 
 Int_t AliL3ConfMapFit::FitHelix()
 {
+  //fit the helix
   if(FitCircle())
     {
       LOG(AliL3Log::kError,"AliL3ConfMapFit::FitHelix","TrackFit")<<AliL3Log::kDec<<
@@ -72,7 +73,7 @@ Int_t AliL3ConfMapFit::FitCircle()
   for(fTrack->StartLoop(); fTrack->LoopDone(); fTrack->GetNextHit())
     {
       co++;
-      AliL3ConfMapPoint *cHit = (AliL3ConfMapPoint*)fTrack->currentHit;
+      AliL3ConfMapPoint *cHit = (AliL3ConfMapPoint*)fTrack->GetCurrentHit();
       cHit->SetXYWeight( 1./ (Double_t)(cHit->GetXerr()*cHit->GetXerr() + cHit->GetYerr()*cHit->GetYerr()) );
       wsum      += cHit->GetXYWeight() ;
       xav       += cHit->GetXYWeight() * cHit->GetX() ;
@@ -101,7 +102,7 @@ Int_t AliL3ConfMapFit::FitCircle()
   for(fTrack->StartLoop(); fTrack->LoopDone(); fTrack->GetNextHit())
     { 
       //AliL3ConfMapPoint *cHit = (AliL3ConfMapPoint *)hits->At(hit_counter);
-      AliL3ConfMapPoint *cHit = (AliL3ConfMapPoint*)fTrack->currentHit;
+      AliL3ConfMapPoint *cHit = (AliL3ConfMapPoint*)fTrack->GetCurrentHit();
       xi        = cHit->GetX() - xav ;
       yi        = cHit->GetY() - yav ;
       xxav     += xi * xi * cHit->GetXYWeight() ;
@@ -185,7 +186,7 @@ Int_t AliL3ConfMapFit::FitCircle()
   for(fTrack->StartLoop(); fTrack->LoopDone(); fTrack->GetNextHit())  
     { 
       //AliL3ConfMapPoint *cHit = (AliL3ConfMapPoint*)hits->At(hit_counter);  
-      AliL3ConfMapPoint* cHit = (AliL3ConfMapPoint*)fTrack->currentHit;
+      AliL3ConfMapPoint* cHit = (AliL3ConfMapPoint*)fTrack->GetCurrentHit();
 
       xold = cHit->GetX() - xav ;
       yold = cHit->GetY() - yav ;
@@ -346,7 +347,7 @@ Int_t AliL3ConfMapFit::FitCircle()
   //Set the first point on the track to the space point coordinates of the innermost track
   //This will be updated to lie on the fit later on (AliL3Track::UpdateToFirstPoint).
   Double_t x0,y0,psi,pt ;
-  AliL3ConfMapPoint *lHit = (AliL3ConfMapPoint*)fTrack->lastHit;
+  AliL3ConfMapPoint *lHit = (AliL3ConfMapPoint*)fTrack->GetLastHit();
   x0 = lHit->GetX();
   y0 = lHit->GetY();
   fTrack->SetFirstPoint(x0,y0,0); //Z-value is set in FitLine
@@ -396,13 +397,13 @@ Int_t AliL3ConfMapFit::FitLine ( )
 
   if (0)// fTrack->ComesFromMainVertex() == true ) 
     {
-      dx = ((AliL3ConfMapPoint*)fTrack->firstHit)->GetX() - fVertex->GetX();
-      dy = ((AliL3ConfMapPoint*)fTrack->firstHit)->GetY() - fVertex->GetY() ;
+      dx = ((AliL3ConfMapPoint*)fTrack->GetFirstHit())->GetX() - fVertex->GetX();
+      dy = ((AliL3ConfMapPoint*)fTrack->GetFirstHit())->GetY() - fVertex->GetY() ;
     }
   else 
     {
-      dx = ((AliL3ConfMapPoint *)fTrack->firstHit)->GetX() - ((AliL3ConfMapPoint *)fTrack->lastHit)->GetX() ;
-      dy = ((AliL3ConfMapPoint *)fTrack->firstHit)->GetY() - ((AliL3ConfMapPoint *)fTrack->lastHit)->GetY() ;
+      dx = ((AliL3ConfMapPoint *)fTrack->GetFirstHit())->GetX() - ((AliL3ConfMapPoint *)fTrack->GetLastHit())->GetX() ;
+      dy = ((AliL3ConfMapPoint *)fTrack->GetFirstHit())->GetY() - ((AliL3ConfMapPoint *)fTrack->GetLastHit())->GetY() ;
       //dx = ((AliL3ConfMapPoint *)hits->First())->GetX() - ((AliL3ConfMapPoint *)hits->Last())->GetX() ;
       //dy = ((AliL3ConfMapPoint *)hits->First())->GetY() - ((AliL3ConfMapPoint *)hits->Last())->GetY() ;
     }
@@ -430,9 +431,9 @@ Int_t AliL3ConfMapFit::FitLine ( )
   for(fTrack->StartLoop(); fTrack->LoopDone(); fTrack->GetNextHit())  
     {
       // AliL3ConfMapPoint *cHit = (AliL3ConfMapPoint*)hits->At(hit_counter);
-      AliL3ConfMapPoint *cHit = (AliL3ConfMapPoint*)fTrack->currentHit;
-      // if ( currentHit != firstHit ) 
-      if(cHit != fTrack->firstHit)//  hits->First())
+      AliL3ConfMapPoint *cHit = (AliL3ConfMapPoint*)fTrack->GetCurrentHit();
+      // if ( GetCurrentHit() != GetFirstHit() ) 
+      if(cHit != fTrack->GetFirstHit())//  hits->First())
        {
          dx   = cHit->GetX() - previousHit->GetX() ;
          dy   = cHit->GetY() - previousHit->GetY() ;
@@ -479,7 +480,7 @@ Int_t AliL3ConfMapFit::FitLine ( )
   for(fTrack->StartLoop(); fTrack->LoopDone(); fTrack->GetNextHit())  
     {
       //AliL3ConfMapPoint *cHit = (AliL3ConfMapPoint*)hits->At(hit_counter);
-      AliL3ConfMapPoint *cHit = (AliL3ConfMapPoint*)fTrack->currentHit;
+      AliL3ConfMapPoint *cHit = (AliL3ConfMapPoint*)fTrack->GetCurrentHit();
       r1   = cHit->GetZ() - tanl * cHit->GetS() - z0 ;
       chi2 += (Double_t) ( (Double_t)cHit->GetZWeight() * (r1 * r1) );
     }
index bdadde2db59fc1928e91db8bc212431785997972..09e22b68133314afaf2a962778b165d188575be5 100644 (file)
@@ -22,7 +22,7 @@
 
 ClassImp(AliL3ConfMapPoint)
 
-Bool_t AliL3ConfMapPoint::fDontMap=kFALSE;
+Bool_t AliL3ConfMapPoint::fgDontMap=kFALSE;
 
 AliL3ConfMapPoint::AliL3ConfMapPoint()
 {
@@ -52,11 +52,12 @@ AliL3ConfMapPoint::AliL3ConfMapPoint()
 AliL3ConfMapPoint::~AliL3ConfMapPoint()
 {
   // Destructor.
-  // Does nothing except destruct. 
+  ;
 }
 
-Bool_t AliL3ConfMapPoint::ReadHits(AliL3SpacePointData* hits ){
-  
+Bool_t AliL3ConfMapPoint::ReadHits(AliL3SpacePointData* hits )
+{
+  //read the hits
   SetHitNumber(hits->fID);
   SetPadRow(hits->fPadRow);
   Int_t slice = (hits->fID>>25) & 0x7f;
@@ -82,16 +83,17 @@ void AliL3ConfMapPoint::Reset()
 
 void AliL3ConfMapPoint::Setup(AliL3Vertex *vertex)
 {
-  //Setup. Sets the vertex, conformal coordinates, and phi and eta of each hit.
+  //Setup. Sets the vertex, conformal coordinates, 
+  //and phi and eta of each hit.
   
   SetIntPoint(vertex->GetX(),    vertex->GetY(),    vertex->GetZ(),
               vertex->GetXErr(), vertex->GetYErr(), vertex->GetZErr());
   SetShiftedCoord();
   SetConfCoord();
-  // The angles are set properly if they are set after the interaction point and the shifted coordinates
+  // The angles are set properly if they are set after 
+  // the interaction point and the shifted coordinates
   SetAngles();
   //SetDist(0., 0.);
-  
   return;
 }
 
@@ -155,11 +157,11 @@ void AliL3ConfMapPoint::SetConfCoord()
   // assumed to be at (0, 0, 0). Otherwise the function will use the
   // interaction point specified by fXt and fYt.
 
-  if(fDontMap){
-    fXprime = x;
-    fYprime = y;
+  if(fgDontMap){
+    fXprime = fx;
+    fYprime = fy;
     fWxy = 0;
-    s = 0; //track trajectory
+    fs = 0; //track trajectory
     fWz = 0;
     return;
   }
@@ -174,9 +176,9 @@ void AliL3ConfMapPoint::SetConfCoord()
       fYprime = -fYv / r2;
       
       //set weights:
-      fWxy = r2*r2 / ((xyErrorScale*xyErrorScale)*((xerr*xerr)+(yerr*yerr)));
-      s = 0; //track trajectory
-      fWz = (Double_t)(1./(szErrorScale*zerr*zerr));
+      fWxy = r2*r2 / ((xyErrorScale*xyErrorScale)*((fxerr*fxerr)+(fyerr*fyerr)));
+      fs = 0; //track trajectory
+      fWz = (Double_t)(1./(szErrorScale*fzerr*fzerr));
     } else {
     fXprime    = 0.;
     fYprime    = 0.;
@@ -184,7 +186,7 @@ void AliL3ConfMapPoint::SetConfCoord()
     fYprimeerr = 0.;
     fWxy = 0;
     fWz = 0;
-    s = 0;
+    fs = 0;
   }
 
   return;
@@ -225,13 +227,14 @@ void AliL3ConfMapPoint::SetAngles()
   }
   */
   //fPhi = TMath::ATan2(y,x);
-  fPhi = atan2(y,x);
+  fPhi = atan2(fy,fx);
   //if(fPhi<0) fPhi = fPhi + 2*TMath::Pi();
   
   //fEta = 0.5 * TMath::Log((r3dim + fZv)/(r3dim - fZv));
   fEta = 0.5 * log((r3dim + fZv)/(r3dim - fZv));
   return;
 }
+
 /*
 AliL3ConfMapTrack *AliL3ConfMapPoint::GetTrack(TClonesArray *tracks) const
 {
index 94aaa3af698337d9504a65e18034112741795976..eec4de2de0f48b3040667edefe14573e2a539189 100644 (file)
@@ -13,24 +13,24 @@ class AliL3ConfMapPoint {
 
  private:
 
-  Int_t fHitNumber;
-  Int_t fTrackNumber;
-  Int_t fNextHitNumber;
-  Bool_t fUsed;
-  Int_t fPadrow;
-  Int_t fSector;
+  Int_t fHitNumber;     //hit number
+  Int_t fTrackNumber;   //track number
+  Int_t fNextHitNumber; //next hit number
+  Bool_t fUsed;         //flag is used
+  Int_t fPadrow;        //padrow
+  Int_t fSector;        //sector
 
   //global coordinates and their errors
-  Double_t x;
-  Double_t y;
-  Double_t z;
-  Double_t xerr;
-  Double_t yerr;
-  Double_t zerr;
+  Double_t fx;    //glob x
+  Double_t fy;    //glob y
+  Double_t fz;    //glob z
+  Double_t fxerr; //glob xerr
+  Double_t fyerr; //glob yerr
+  Double_t fzerr; //glob zerr
 
   Double_t fWxy;  // x-y weight on x-y
   Double_t fWz;   // z weight on z
-  Float_t s;     //track trajectory
+  Float_t fs;      //track trajectory
   
    // Interaction point
   Double_t   fXt;          // x-value of the interaction point
@@ -63,7 +63,7 @@ class AliL3ConfMapPoint {
   Double_t   fPhi;         // angle phi
   Double_t   fEta;         // pseudorapidity
   
-  static Bool_t fDontMap; //flag to switch off mapping  
+  static Bool_t fgDontMap; //flag to switch off mapping  
 
  public:
 
@@ -77,26 +77,26 @@ class AliL3ConfMapPoint {
   AliL3ConfMapPoint *nextRowHit;  //!
   
   AliL3ConfMapPoint *nextTrackHit; //! Linked chain of points in a track
-  Short_t phiIndex;
-  Short_t etaIndex;
+  Short_t phiIndex; //phi index
+  Short_t etaIndex; //eta index
  
-  Double_t xyChi2;
-  Double_t szChi2;
+  Double_t xyChi2; //xy chi
+  Double_t szChi2; //z chi
   Int_t fMCTrackID[3]; //MClabel of tracks, may overlap
 
    // getter
-  Double_t GetX() const {return x;}
-  Double_t GetY() const {return y;}
-  Double_t GetZ() const {return z;}
-  Double_t GetXerr() const {return xerr;}
-  Double_t GetYerr() const {return yerr;}
-  Double_t GetZerr() const {return zerr;}
+  Double_t GetX() const {return fx;}
+  Double_t GetY() const {return fy;}
+  Double_t GetZ() const {return fz;}
+  Double_t GetXerr() const {return fxerr;}
+  Double_t GetYerr() const {return fyerr;}
+  Double_t GetZerr() const {return fzerr;}
   Int_t GetPadRow() const {return fPadrow;}
   Int_t GetSector() const {return fSector;}
   
   Double_t GetXYWeight() const {return fWxy;}
   Double_t GetZWeight() const {return fWz;}
-  Float_t GetS()        const {return s;}
+  Float_t GetS()        const {return fs;}
 
   //AliL3ConfMapTrack *GetTrack(TClonesArray *tracks) const;
   
@@ -126,24 +126,24 @@ class AliL3ConfMapPoint {
   Int_t GetHitNumber() const {return fHitNumber;}
   Int_t GetNextHitNumber() const {return fNextHitNumber;}
   Int_t GetTrackNumber() const {return fTrackNumber;}
-  //  Int_t const *GetMCTrackID()     const {return fMCTrackID;}
+  //Int_t const *GetMCTrackID()     const {return fMCTrackID;}
   
   // setter
-  static void SetDontMap(Bool_t b){fDontMap=b;}
-
-  void SetX(Double_t f) {x=f;}
-  void SetY(Double_t f) {y=f;}
-  void SetZ(Double_t f) {z=f;}
-  void SetXerr(Double_t f) {xerr=f;}
-  void SetYerr(Double_t f) {yerr=f;}
-  void SetZerr(Double_t f) {zerr=f;}
+  static void SetDontMap(Bool_t b){fgDontMap=b;}
+
+  void SetX(Double_t f) {fx=f;}
+  void SetY(Double_t f) {fy=f;}
+  void SetZ(Double_t f) {fz=f;}
+  void SetXerr(Double_t f) {fxerr=f;}
+  void SetYerr(Double_t f) {fyerr=f;}
+  void SetZerr(Double_t f) {fzerr=f;}
   void SetPadRow(Int_t f) {fPadrow=f;}
   void SetSector(Int_t f) {fSector=f;}
   void SetMCTrackID(Int_t f,Int_t g,Int_t h) {fMCTrackID[0] = f; fMCTrackID[1]=g; fMCTrackID[2]=h;}
 
   void SetXYWeight(Float_t f) {fWxy = f;}
   void SetZWeight(Float_t f) {fWz = f;}
-  void SetS(Float_t f) {s = f;}
+  void SetS(Float_t f) {fs = f;}
 
   void SetUsage(Bool_t f) {fUsed=f;}
     
index 9d7973de2aff9f7c90bae886e69f1c6c0df347e0..1de688efbff9a0baa5fecaf8104c0bbf89cea2d0 100644 (file)
@@ -29,14 +29,13 @@ ClassImp(AliL3ConfMapTrack)
 AliL3ConfMapTrack::AliL3ConfMapTrack()
 {
   //Constructor
-
   fChiSq[0] = 0.;
   fChiSq[1] = 0.;
 }
 
 AliL3ConfMapTrack::~AliL3ConfMapTrack()
 {
-
+  //deconstructor
 }
 
 void AliL3ConfMapTrack::DeleteCandidate()
@@ -44,7 +43,7 @@ void AliL3ConfMapTrack::DeleteCandidate()
   //Deletes this track by resetting all its parameters. Does not delete
   //the object itself.
 
-  AliL3ConfMapPoint *curHit = (AliL3ConfMapPoint*)firstHit;
+  AliL3ConfMapPoint *curHit = (AliL3ConfMapPoint*)fFirstHit;
   AliL3ConfMapPoint *nextHit;
   
   while(curHit != 0)
@@ -77,10 +76,9 @@ void AliL3ConfMapTrack::DeleteCandidate()
 void AliL3ConfMapTrack::SetProperties(Bool_t usage)
 {
   //Set the hits to this track to 'usage'
-  
   for(StartLoop(); LoopDone(); GetNextHit())
     {
-      AliL3ConfMapPoint *p = (AliL3ConfMapPoint*)currentHit;
+      AliL3ConfMapPoint *p = (AliL3ConfMapPoint*)fCurrentHit;
       p->SetUsage(usage);
     }
   return;
@@ -91,19 +89,19 @@ void AliL3ConfMapTrack::Reset()
   //Resets the fit parameters of this track.
 
   //xy-plane
-  s11Xy   = 0;
-  s12Xy   = 0;
-  s22Xy   = 0;
-  g1Xy    = 0;
-  g2Xy    = 0;
+  fs11Xy   = 0;
+  fs12Xy   = 0;
+  fs22Xy   = 0;
+  fg1Xy    = 0;
+  fg2Xy    = 0;
   fChiSq[0]  = 0.;
     
   //sz-plane
-  s11Sz = 0;
-  s12Sz = 0;
-  s22Sz = 0;
-  g1Sz  = 0;
-  g2Sz  = 0;
+  fs11Sz = 0;
+  fs12Sz = 0;
+  fs22Sz = 0;
+  fg1Sz  = 0;
+  fg2Sz  = 0;
   fChiSq[1] = 0; 
   SetLength(0);
   SetNHits(0);
@@ -125,37 +123,37 @@ void AliL3ConfMapTrack::UpdateParam(AliL3ConfMapPoint *thisHit)
   //Set the hit pointers:
   //if(fNHits == 1)
   if(GetNHits()==1)  
-    firstHit = thisHit;
+    fFirstHit = thisHit;
   else
-    ((AliL3ConfMapPoint*)lastHit)->nextTrackHit = thisHit;
-  lastHit = thisHit;
+    ((AliL3ConfMapPoint*)fLastHit)->nextTrackHit = thisHit;
+  fLastHit = thisHit;
 
   
-  s11Xy = s11Xy + thisHit->GetXYWeight() ;
-  s12Xy = s12Xy + thisHit->GetXYWeight() * thisHit->GetXprime() ;
-  s22Xy = s22Xy + thisHit->GetXYWeight() * pow((thisHit->GetXprime()),2) ;
-  g1Xy  = g1Xy  + thisHit->GetXYWeight() * thisHit->GetYprime() ;
-  g2Xy  = g2Xy  + thisHit->GetXYWeight() * thisHit->GetXprime() * thisHit->GetYprime() ;
+  fs11Xy = fs11Xy + thisHit->GetXYWeight() ;
+  fs12Xy = fs12Xy + thisHit->GetXYWeight() * thisHit->GetXprime() ;
+  fs22Xy = fs22Xy + thisHit->GetXYWeight() * pow((thisHit->GetXprime()),2) ;
+  fg1Xy  = fg1Xy  + thisHit->GetXYWeight() * thisHit->GetYprime() ;
+  fg2Xy  = fg2Xy  + thisHit->GetXYWeight() * thisHit->GetXprime() * thisHit->GetYprime() ;
     
-  ddXy  = s11Xy * s22Xy - pow((s12Xy),2) ;
-  if ( ddXy != 0 ) 
+  fddXy  = fs11Xy * fs22Xy - pow((fs12Xy),2) ;
+  if ( fddXy != 0 ) 
     {
-      a1Xy  = ( g1Xy * s22Xy - g2Xy * s12Xy ) / ddXy ;
-      a2Xy  = ( g2Xy * s11Xy - g1Xy * s12Xy ) / ddXy ;
+      fa1Xy  = ( fg1Xy * fs22Xy - fg2Xy * fs12Xy ) / fddXy ;
+      fa2Xy  = ( fg2Xy * fs11Xy - fg1Xy * fs12Xy ) / fddXy ;
     }
 
   //     Now in the sz plane
-  s11Sz = s11Sz + thisHit->GetZWeight() ;
-  s12Sz = s12Sz + thisHit->GetZWeight() * thisHit->GetS() ;
-  s22Sz = s22Sz + thisHit->GetZWeight() * thisHit->GetS() * thisHit->GetS() ;
-  g1Sz  = g1Sz  + thisHit->GetZWeight() * thisHit->GetZ() ;
-  g2Sz  = g2Sz  + thisHit->GetZWeight() * thisHit->GetS() * thisHit->GetZ() ;
+  fs11Sz = fs11Sz + thisHit->GetZWeight() ;
+  fs12Sz = fs12Sz + thisHit->GetZWeight() * thisHit->GetS() ;
+  fs22Sz = fs22Sz + thisHit->GetZWeight() * thisHit->GetS() * thisHit->GetS() ;
+  fg1Sz  = fg1Sz  + thisHit->GetZWeight() * thisHit->GetZ() ;
+  fg2Sz  = fg2Sz  + thisHit->GetZWeight() * thisHit->GetS() * thisHit->GetZ() ;
   
         
-  ddSz  = s11Sz * s22Sz -  s12Sz * s12Sz ;
-  if ( ddSz != 0 ) {
-    a1Sz  = ( g1Sz * s22Sz - g2Sz * s12Sz ) / ddSz ;
-    a2Sz  = ( g2Sz * s11Sz - g1Sz * s12Sz ) / ddSz ;
+  fddSz  = fs11Sz * fs22Sz -  fs12Sz * fs12Sz ;
+  if ( fddSz != 0 ) {
+    fa1Sz  = ( fg1Sz * fs22Sz - fg2Sz * fs12Sz ) / fddSz ;
+    fa2Sz  = ( fg2Sz * fs11Sz - fg1Sz * fs12Sz ) / fddSz ;
   }
 }
 
@@ -164,8 +162,8 @@ void AliL3ConfMapTrack::Fill(AliL3Vertex *vertex,Double_t max_Dca)
 {
   //Fill track variables with or without fit.
   
-  //fRadius = sqrt(a2Xy*a2Xy+1)/(2*fabs(a1Xy));
-  Double_t radius = sqrt(a2Xy*a2Xy+1)/(2*fabs(a1Xy));
+  //fRadius = sqrt(fa2Xy*fa2Xy+1)/(2*fabs(fa1Xy));
+  Double_t radius = sqrt(fa2Xy*fa2Xy+1)/(2*fabs(fa1Xy));
   SetRadius(radius);
 
   //fPt = (Double_t)(AliL3Transform::GetBFieldValue() * fRadius);
@@ -178,8 +176,8 @@ void AliL3ConfMapTrack::Fill(AliL3Vertex *vertex,Double_t max_Dca)
       ComesFromMainVertex(AliLevel3::DoVertexFit());
       fit->FitHelix();
       
-      //AliL3ConfMapPoint *lHit = (AliL3ConfMapPoint*)lastHit;
-      AliL3ConfMapPoint *fHit = (AliL3ConfMapPoint*)firstHit;
+      //AliL3ConfMapPoint *lHit = (AliL3ConfMapPoint*)fLastHit;
+      AliL3ConfMapPoint *fHit = (AliL3ConfMapPoint*)fFirstHit;
       SetLastPoint(fHit->GetX(),fHit->GetY(),fHit->GetZ());
       
       UpdateToFirstPoint();
index 2fcbb1dc171a7219634dee82e1e31bfd9cf5a1bb..ec303329f11a3cec5a0c863b86fc8b46c7354477 100644 (file)
 class AliL3Vertex;
 
 class AliL3ConfMapTrack :public AliL3Track {
-  
- private:
 
-  
  public:
   
   AliL3ConfMapTrack();
   virtual ~AliL3ConfMapTrack();
   void Fill(AliL3Vertex *vertex,Double_t max_Dca);
-  //void UpdateToFirstPoint();
   void Reset();
   void UpdateParam(AliL3ConfMapPoint *hit);
   void DeleteCandidate();
 
-  void StartLoop() {currentHit = firstHit;}  //!
-  void GetNextHit() {currentHit = ((AliL3ConfMapPoint*)currentHit)->nextTrackHit;} //!
-  Int_t LoopDone() {return currentHit != 0;}  //!
-  AliL3ConfMapPoint *currentHit;  //!
-  AliL3ConfMapPoint *lastHit;  //!
-  AliL3ConfMapPoint *firstHit;  //!
+  void StartLoop() {fCurrentHit = fFirstHit;}
+  void GetNextHit() {fCurrentHit = ((AliL3ConfMapPoint*)fCurrentHit)->nextTrackHit;}
+  Int_t LoopDone() const {return fCurrentHit != 0;}
 
+  // setter   
+  void  SetChiSq1(Double_t f) {fChiSq[0]=f;} 
+  void  SetChiSq2(Double_t f) {fChiSq[1]=f;}
+  void  SetProperties(Bool_t fUsage);
 
   // getter
   Double_t const  *GetChiSq()   const { return fChiSq;}
+  Double_t GetChiSq1() const { return fChiSq[0]; }
+  Double_t GetChiSq2() const { return fChiSq[1]; }
+
+  /*
+  Double_t GetS11Xy() const {return fs11Xy;}
+  Double_t GetS12Xy() const {return fs12Xy;}
+  Double_t GetS22Xy() const {return fs22Xy;}
+  Double_t GetG1Xy()  const {return fg1Xy;}
+  Double_t GetG2Xy()  const {return fg2Xy;}
+  Double_t GetS11Sz() const {return fs11Sz;}
+  Double_t GetS12Sz() const {return fs12Sz;}
+  Double_t GetS22z()  const {return fs22Sz;}
+  Double_t GetG1Sz()  const {return fg1Sz;}
+  Double_t GetG2Sz()  const { return fg2Sz;}
+  */
+
+  Double_t GetDDXy() const {return fddXy;} 
+  Double_t GetA1Xy() const {return fa1Xy;} 
+  Double_t GetA2Xy() const {return fa2Xy;}   
+  Double_t GetDDSz() const {return fddSz;} 
+  Double_t GetA1Sz() const {return fa1Sz;} 
+  Double_t GetA2Sz() const {return fa2Sz;}  
+
+  AliL3ConfMapPoint* GetFirstHit()   const {return fFirstHit;}
+  AliL3ConfMapPoint* GetLastHit()    const {return fLastHit;}
+  AliL3ConfMapPoint* GetCurrentHit() const {return fCurrentHit;}
   Int_t GetMCLabel();
 
-  // setter   
-  void  SetChiSq1(Double_t f) {fChiSq[0]=f;} 
-  void  SetChiSq2(Double_t f) {fChiSq[1]=f;}
-  void   SetProperties(Bool_t fUsage);
+ protected:
+
+  AliL3ConfMapPoint *fCurrentHit;  //!
+  AliL3ConfMapPoint *fLastHit;  //!
+  AliL3ConfMapPoint *fFirstHit;  //!
+
 
-  Double_t fChiSq[2];
+  Double_t fChiSq[2]; //chi squared
   
   //fit parameters. Bad naming convention, i know...
-  Double_t    s11Xy  ; 
-  Double_t    s12Xy  ;
-  Double_t    s22Xy  ;
-  Double_t    g1Xy   ;
-  Double_t    g2Xy   ;       
-  Double_t    s11Sz  ;
-  Double_t    s12Sz  ;
-  Double_t    s22Sz  ;
-  Double_t    g1Sz   ;
-  Double_t    g2Sz   ; 
+  Double_t    fs11Xy; //helper
+  Double_t    fs12Xy; //helper
+  Double_t    fs22Xy; //helper
+  Double_t    fg1Xy;  //helper
+  Double_t    fg2Xy;  //helper       
+  Double_t    fs11Sz; //helper
+  Double_t    fs12Sz; //helper
+  Double_t    fs22Sz; //helper
+  Double_t    fg1Sz;  //helper
+  Double_t    fg2Sz;  //helper 
   
-  Double_t    ddXy, a1Xy, a2Xy ;    /*fit par in xy */
-  Double_t    ddSz, a1Sz, a2Sz ;    /*fit par in sz */
+  Double_t    fddXy, fa1Xy, fa2Xy ;    /*fit par in xy */
+  Double_t    fddSz, fa1Sz, fa2Sz ;    /*fit par in sz */
   
   ClassDef(AliL3ConfMapTrack,1) //Conformal mapping track class
 };
index f31ff8cdc3161ffce20ae145509e56a2dbafc7d5..fd1d4181301fc3cdaa75c828a2ae9505ba4fdc89 100644 (file)
@@ -44,7 +44,6 @@ AliL3ConfMapper::AliL3ConfMapper()
 AliL3ConfMapper::~AliL3ConfMapper()
 {
   // Destructor.
-
   if(fVolume) {
     delete [] fVolume;
   }
@@ -150,6 +149,7 @@ void AliL3ConfMapper::InitSector(Int_t sector,Int_t *rowrange,Float_t *etarange)
 
 Bool_t AliL3ConfMapper::ReadHits(UInt_t count, AliL3SpacePointData* hits )
 {
+  //read hits
   Int_t nhit=(Int_t)count; 
   for (Int_t i=0;i<nhit;i++)
     {
@@ -353,6 +353,7 @@ void AliL3ConfMapper::MainVertexSettings(Int_t trackletlength, Int_t tracklength
 void AliL3ConfMapper::NonVertexSettings(Int_t trackletlength, Int_t tracklength,
                                        Int_t rowscopetracklet, Int_t rowscopetrack)
 {
+  //set parameters for non-vertex tracking
   SetTrackletLength(trackletlength,(Bool_t)false);
   SetRowScopeTracklet(rowscopetracklet, (Bool_t)false);
   SetRowScopeTrack(rowscopetrack, (Bool_t)false);
@@ -497,27 +498,26 @@ void AliL3ConfMapper::CreateTrack(AliL3ConfMapPoint *hit)
          tracks++;
                                  
          //define variables to keep the total chi:
-         Double_t xyChi2 = track->fChiSq[0];
-         Double_t szChi2 = track->fChiSq[1];
+         Double_t xyChi2 = track->GetChiSq1();
+         Double_t szChi2 = track->GetChiSq2();
          
          for(point = fTrackletLength[fVertexConstraint]; point <= fNumRowSegment; point++)
            {
-             track->fChiSq[0] = fHitChi2Cut[fVertexConstraint];
-             closest_hit = GetNextNeighbor((AliL3ConfMapPoint*)track->lastHit,track);
+             track->SetChiSq1(fHitChi2Cut[fVertexConstraint]);
+             closest_hit = GetNextNeighbor((AliL3ConfMapPoint*)track->GetLastHit(),track);
              
              if(closest_hit)
                {
-                 
                  //keep total chi:
-                 Double_t lxyChi2 = track->fChiSq[0]-track->fChiSq[1];
+                 Double_t lxyChi2 = track->GetChiSq1()-track->GetChiSq2();
                  xyChi2 += lxyChi2;
                  closest_hit->xyChi2 = lxyChi2;
                                  
                  //update track length:
                  //track->fLength = closest_hit->GetS();
                  track->SetLength(closest_hit->GetS());
-                 szChi2 += track->fChiSq[1];
-                 closest_hit->szChi2 = track->fChiSq[1];
+                 szChi2 += track->GetChiSq2();
+                 closest_hit->szChi2 = track->GetChiSq2();
                  
                  track->UpdateParam(closest_hit);
                  trackhitnumber[track->GetNumberOfPoints()-1] = closest_hit->GetHitNumber();
@@ -537,9 +537,9 @@ void AliL3ConfMapper::CreateTrack(AliL3ConfMapPoint *hit)
            }//create tracks
          
          //store track chi2:
-         track->fChiSq[0] = xyChi2;
-         track->fChiSq[1] = szChi2;
-         Double_t normalized_chi2 = (track->fChiSq[0]+track->fChiSq[1])/track->GetNumberOfPoints();
+         track->SetChiSq1(xyChi2);
+         track->SetChiSq2(szChi2);
+         Double_t normalized_chi2 = (track->GetChiSq1()+track->GetChiSq2())/track->GetNumberOfPoints();
          
          //remove tracks with not enough points already now
          if(track->GetNumberOfPoints() < fMinPoints[fVertexConstraint] || normalized_chi2 > fTrackChi2Cut[fVertexConstraint])
@@ -716,13 +716,13 @@ Int_t AliL3ConfMapper::EvaluateHit(AliL3ConfMapPoint *start_hit,AliL3ConfMapPoin
   //Check if space point gives a fit with acceptable chi2.
   
   Double_t temp,dxy,lchi2,dx,dy,slocal,dsz,lszChi2;
-  temp = (track->a2Xy*hit->GetXprime()-hit->GetYprime()+track->a1Xy);
-  dxy = temp*temp/(track->a2Xy*track->a2Xy + 1.);
+  temp = (track->GetA2Xy()*hit->GetXprime()-hit->GetYprime()+track->GetA1Xy());
+  dxy = temp*temp/(track->GetA2Xy()*track->GetA2Xy() + 1.);
   
   //Calculate chi2
   lchi2 = (dxy*hit->GetXYWeight());
   
-  if(lchi2 > track->fChiSq[0])//chi2 was worse than before.
+  if(lchi2 > track->GetChiSq1())//chi2 was worse than before.
     return 0;
     
   //calculate s and the distance hit-line
@@ -731,8 +731,8 @@ Int_t AliL3ConfMapper::EvaluateHit(AliL3ConfMapPoint *start_hit,AliL3ConfMapPoin
   //slocal = track->fLength+sqrt(dx*dx+dy*dy);
   slocal = track->GetLength()+sqrt(dx*dx+dy*dy);
   
-  temp = (track->a2Sz*slocal-hit->GetZ()+track->a1Sz);
-  dsz = temp*temp/(track->a2Sz*track->a2Sz+1);
+  temp = (track->GetA2Sz()*slocal-hit->GetZ()+track->GetA1Sz());
+  dsz = temp*temp/(track->GetA2Sz()*track->GetA2Sz()+1);
   
   //calculate chi2
   lszChi2 = dsz*hit->GetZWeight();
@@ -740,10 +740,10 @@ Int_t AliL3ConfMapper::EvaluateHit(AliL3ConfMapPoint *start_hit,AliL3ConfMapPoin
   
     
   //check whether chi2 is better than previous one:
-  if(lchi2 < track->fChiSq[0])
+  if(lchi2 < track->GetChiSq1())
     {
-      track->fChiSq[0] = lchi2;
-      track->fChiSq[1] = lszChi2;
+      track->SetChiSq1(lchi2);
+      track->SetChiSq2(lszChi2);
     
       hit->SetS(slocal);
   
@@ -800,7 +800,7 @@ Double_t AliL3ConfMapper::TrackletAngle(AliL3ConfMapTrack *track,Int_t n) const
   Int_t counter=0;
   for(track->StartLoop(); track->LoopDone(); track->GetNextHit())
     {
-      AliL3ConfMapPoint *p = (AliL3ConfMapPoint*)track->currentHit;
+      AliL3ConfMapPoint *p = (AliL3ConfMapPoint*)track->GetCurrentHit();
       if( (n-1) == counter)
        {
          x1[0] = p->GetX();
@@ -856,25 +856,23 @@ Int_t AliL3ConfMapper::FillTracks()
   //which should be done in order to get nice tracks.
   
   Int_t num_of_tracks = nTracks;
-  LOG(AliL3Log::kInformational,"AliL3ConfMapper::FillTracks","nTracks")<<AliL3Log::kDec<<
-    "Number of found tracks: "<<nTracks<<ENDLOG;
-  
   if(nTracks == 0)
     {
       LOG(AliL3Log::kError,"AliL3ConfMapper::FillTracks","nTracks")<<AliL3Log::kDec<<
        "No tracks found!!"<<ENDLOG;
       return 0;
     }
+
+  LOG(AliL3Log::kInformational,"AliL3ConfMapper::FillTracks","nTracks")<<AliL3Log::kDec<<
+    "Number of found tracks: "<<nTracks<<ENDLOG;
   
   //  fTrack->Sort();
-  for(int i=0; i<num_of_tracks; i++)
+  for(Int_t i=0; i<num_of_tracks; i++)
     {
       AliL3ConfMapTrack *track = (AliL3ConfMapTrack*)fTrack->GetTrack(i);
       track->Fill(fVertex,fMaxDca);
-      
     }
   return 1;
-
 }
 
 Double_t AliL3ConfMapper::CpuTime()
@@ -883,5 +881,4 @@ Double_t AliL3ConfMapper::CpuTime()
  struct timeval tv;
  gettimeofday( &tv, NULL );
  return tv.tv_sec+(((Double_t)tv.tv_usec)/1000000.);
- //return (Double_t)(clock()) / CLOCKS_PER_SEC;
 }
index 2e4b6e20187da3efe00830e69fabe440ac8a8557..42870a3940a5af9a76b27ce62e79b3ec6daf78dd 100644 (file)
@@ -47,6 +47,7 @@ ClassImp(AliL3Display)
 
 AliL3Display::AliL3Display()
 {
+  //constructor
   fGeom = NULL;
   fTracks = NULL;
 }
@@ -73,7 +74,7 @@ AliL3Display::AliL3Display(Int_t *slice,Char_t *gfile)
 
 AliL3Display::~AliL3Display()
 {
-
+  //destructor
   if(fTracks)
     delete fTracks;
 }
index f070b693b21b009b62b5ab684da9b5ff60059688..7971cf43911b88c23279c3d6d0ae576ff5dc2cd7 100644 (file)
@@ -14,13 +14,12 @@ class AliL3TrackArray;
 class AliL3Display : public TObject {
 
  private:
-  TGeometry *fGeom;
+  TGeometry *fGeom; //!
   AliL3SpacePointData *fClusters[36][6]; //!
   AliL3TrackArray *fTracks; //!
-  UInt_t fNcl[36][6];
-
-  Int_t fMinSlice;
-  Int_t fMaxSlice;
+  UInt_t fNcl[36][6]; //number of cluster
+  Int_t fMinSlice; //min slice
+  Int_t fMaxSlice; //max slice
   
  public:
   AliL3Display();
index 99902fe3076d6de879bce746ae5573a739b44b76..719aeeb389884e567c00cc550971edc740ab4866 100644 (file)
@@ -4,11 +4,14 @@
 //*-- Copyright &copy ALICE HLT Group
 
 #include "AliL3StandardIncludes.h"
+#include <TObject.h>
 #include <TFile.h>
 #include <TH1.h>
 #include <TParticle.h>
 #include <TTree.h>
 #include <TClonesArray.h>
+#include <TTree.h>
+#include <TNtuple.h>
 
 #include <AliRun.h>
 #include <AliSimDigits.h>
@@ -52,12 +55,14 @@ using namespace std;
 ClassImp(AliL3Evaluate)
 
 AliL3Evaluate::AliL3Evaluate()
-{
+{ 
+  //constructor
   Clear();
 }
 
 AliL3Evaluate::AliL3Evaluate(Char_t *datapath,Int_t min_clusters,Int_t minhits,Double_t minpt,Double_t maxpt,Int_t *slice)
-{
+{ 
+  //constructor
   Clear();
 
   if(slice)
@@ -79,7 +84,8 @@ AliL3Evaluate::AliL3Evaluate(Char_t *datapath,Int_t min_clusters,Int_t minhits,D
 }
 
 AliL3Evaluate::~AliL3Evaluate()
-{
+{ 
+  //destructor
   if(fGoodTracks) delete[] fGoodTracks;
   if(fTracks) delete fTracks;
   if(fPtRes) delete fPtRes;
@@ -108,7 +114,8 @@ AliL3Evaluate::~AliL3Evaluate()
 }
 
 void AliL3Evaluate::Clear()
-{
+{ 
+  //clear
   fTracks = 0;
   fMinSlice=0;
   fMaxSlice=0;
@@ -148,7 +155,8 @@ void AliL3Evaluate::Clear()
 }
 
 void AliL3Evaluate::LoadData(Int_t event,Bool_t sp)
-{
+{ 
+  //load cluster points
   Char_t fname[1024];
 
   for(Int_t s=fMinSlice; s<=fMaxSlice; s++)
@@ -202,7 +210,8 @@ void AliL3Evaluate::LoadData(Int_t event,Bool_t sp)
 }
 
 void AliL3Evaluate::AssignPIDs()
-{
+{ 
+  //assign pid 
   if(!fTracks) return;
   fTracks->QSort();
   LOG(AliL3Log::kDebug,"AliL3Evaluate::AssignPIDs","Track Loop")
@@ -221,7 +230,7 @@ void AliL3Evaluate::AssignPIDs()
 }
   
 void AliL3Evaluate::AssignIDs()
-{
+{ 
   //Assign MC id to the tracks.
 #ifndef do_mc
   cerr<<"AliL3Evaluate::AssignIDs() : You need to compile with the do_mc flag!"<<endl;
@@ -246,7 +255,8 @@ void AliL3Evaluate::AssignIDs()
 }
 
 Float_t AliL3Evaluate::GetTrackPID(AliL3Track *track)
-{
+{ 
+  //get track pid
   track->CalculateHelix();
   // Track dEdx
   Int_t nc=track->GetNHits();
@@ -301,7 +311,8 @@ Float_t AliL3Evaluate::GetTrackPID(AliL3Track *track)
 }
 
 struct S {Int_t lab; Int_t max;};
-Int_t AliL3Evaluate::GetMCTrackLabel(AliL3Track *track){ 
+Int_t AliL3Evaluate::GetMCTrackLabel(AliL3Track *track)
+{ 
   //Returns the MCtrackID of the belonging clusters.
   //If MCLabel < 0, means that track is fake.
   //Definitions are identical to offline.
@@ -481,15 +492,15 @@ void AliL3Evaluate::GetGoodParticles(Char_t *path,Int_t event,Int_t *padrowrange
   if(fGoodTracks)
     delete [] fGoodTracks;
   fGoodGen=0;
-  fGoodTracks = new GoodTrack[MaxTracks];
+  fGoodTracks = new AliGoodTrack[MaxTracks];
   
   if(fStandardComparison){
-    while (in>>fGoodTracks[fGoodGen].label>>fGoodTracks[fGoodGen].code>>
-          fGoodTracks[fGoodGen].px>>fGoodTracks[fGoodGen].py>>fGoodTracks[fGoodGen].pz>>
-          fGoodTracks[fGoodGen].x>>fGoodTracks[fGoodGen].y>>fGoodTracks[fGoodGen].z)
+    while (in>>fGoodTracks[fGoodGen].flabel>>fGoodTracks[fGoodGen].fcode>>
+          fGoodTracks[fGoodGen].fpx>>fGoodTracks[fGoodGen].fpy>>fGoodTracks[fGoodGen].fpz>>
+          fGoodTracks[fGoodGen].fx>>fGoodTracks[fGoodGen].fy>>fGoodTracks[fGoodGen].fz)
       {
-        fGoodTracks[fGoodGen].nhits=-1;
-        fGoodTracks[fGoodGen].sector=-1; 
+        fGoodTracks[fGoodGen].fnhits=-1;
+        fGoodTracks[fGoodGen].fsector=-1; 
        fGoodGen++;
        if (fGoodGen==MaxTracks) 
          {
@@ -498,9 +509,10 @@ void AliL3Evaluate::GetGoodParticles(Char_t *path,Int_t event,Int_t *padrowrange
          }
       }
   } else {
-    while (in>>fGoodTracks[fGoodGen].label>>fGoodTracks[fGoodGen].code>>
-          fGoodTracks[fGoodGen].px>>fGoodTracks[fGoodGen].py>>fGoodTracks[fGoodGen].pz>>
-          fGoodTracks[fGoodGen].x>>fGoodTracks[fGoodGen].y >>fGoodTracks[fGoodGen].z>>fGoodTracks[fGoodGen].nhits>>fGoodTracks[fGoodGen].sector) 
+    while (in>>fGoodTracks[fGoodGen].flabel>>fGoodTracks[fGoodGen].fcode>>
+          fGoodTracks[fGoodGen].fpx>>fGoodTracks[fGoodGen].fpy>>fGoodTracks[fGoodGen].fpz>>
+          fGoodTracks[fGoodGen].fx>>fGoodTracks[fGoodGen].fy >>fGoodTracks[fGoodGen].fz>>
+          fGoodTracks[fGoodGen].fnhits>>fGoodTracks[fGoodGen].fsector) 
       {
        fGoodGen++;
        if (fGoodGen==MaxTracks) 
@@ -512,10 +524,10 @@ void AliL3Evaluate::GetGoodParticles(Char_t *path,Int_t event,Int_t *padrowrange
   }
 }
 
-//has to be modified for fakes.
-
 void AliL3Evaluate::FillEffHistos()
-{  
+{ 
+  //has to be modified for fakes.
+
   if(!fGoodTracks)
     {
       cerr<<"AliL3Evaluate::FillEffHistos : No good tracks"<<endl;
@@ -528,10 +540,10 @@ void AliL3Evaluate::FillEffHistos()
     {
       //cout<<"Checking particle "<<i<<endl;
       if(!fStandardComparison) 
-       if(fGoodTracks[i].nhits < fMinHitsFromParticle) continue;
-      Float_t ptg = TMath::Sqrt(fGoodTracks[i].px*fGoodTracks[i].px + fGoodTracks[i].py*fGoodTracks[i].py);
+       if(fGoodTracks[i].fnhits < fMinHitsFromParticle) continue;
+      Float_t ptg = TMath::Sqrt(fGoodTracks[i].fpx*fGoodTracks[i].fpx + fGoodTracks[i].fpy*fGoodTracks[i].fpy);
       if(ptg < fMinGoodPt || ptg > fMaxGoodPt) continue;
-      Float_t pzg=fGoodTracks[i].pz;
+      Float_t pzg=fGoodTracks[i].fpz;
       Float_t dipangle=TMath::ATan2(pzg,ptg)*180./TMath::Pi();
       
       //If we are only considering tracks on one side of the TPC:
@@ -552,10 +564,10 @@ void AliL3Evaluate::FillEffHistos()
          Int_t tracklabel;
          tracklabel = track->GetMCid();
          
-         if(TMath::Abs(tracklabel) != fGoodTracks[i].label) continue;
+         if(TMath::Abs(tracklabel) != fGoodTracks[i].flabel) continue;
          found=1;
          Float_t pt=track->GetPt();
-         if(tracklabel == fGoodTracks[i].label) 
+         if(tracklabel == fGoodTracks[i].flabel) 
            {
              fNFoundTracksPt->Fill(ptg); 
              fNFoundTracksEta->Fill(dipangle);
@@ -585,10 +597,10 @@ void AliL3Evaluate::FillEffHistosNAIVE()
   for(Int_t i=0; i<fGoodGen; i++)
     {
       if(!fStandardComparison) 
-       if(fGoodTracks[i].nhits < fMinHitsFromParticle) continue;
-      Double_t ptg=TMath::Sqrt(fGoodTracks[i].px*fGoodTracks[i].px + fGoodTracks[i].py*fGoodTracks[i].py);
+       if(fGoodTracks[i].fnhits < fMinHitsFromParticle) continue;
+      Double_t ptg=TMath::Sqrt(fGoodTracks[i].fpx*fGoodTracks[i].fpx + fGoodTracks[i].fpy*fGoodTracks[i].fpy);
       if(ptg < fMinGoodPt || ptg > fMaxGoodPt) continue;
-      Double_t pzg=fGoodTracks[i].pz;
+      Double_t pzg=fGoodTracks[i].fpz;
       Float_t dipangle=TMath::ATan2(pzg,ptg)*180./TMath::Pi();
       //printf("filling particle with pt %f and dipangle %f\n",ptg,dipangle);
       fNGoodTracksPt->Fill(ptg);
@@ -609,12 +621,12 @@ void AliL3Evaluate::FillEffHistosNAIVE()
       //Float_t pt=track->GetPt();
       //fPtRes->Fill((pt-ptg)/ptg*100.);
       //fNtuppel->Fill(ptg,pt,nHits);
-            
     }
 }
 
 void AliL3Evaluate::CalcEffHistos()
-{  
+{ 
+  //calc eff histos
 
   Stat_t ngood=fNGoodTracksPt->GetEntries();
   Stat_t nfound=fNFoundTracksPt->GetEntries();
@@ -682,7 +694,8 @@ void AliL3Evaluate::Write2File(Char_t *outputfile)
 }
 
 TNtuple *AliL3Evaluate::GetNtuple()
-{
+{ 
+  //get ntuple
   if(!fNtupleRes)
     {
       fNtupleRes = new TNtuple("ntuppel","Residuals","residual_trans:residual_long:zHit:pt:dipangle:beta:padrow:nHits");
@@ -692,8 +705,8 @@ TNtuple *AliL3Evaluate::GetNtuple()
 }
 
 void AliL3Evaluate::CalculateResiduals()
-{
-
+{ 
+  //calculate residuals
   TNtuple *ntuppel = GetNtuple();
   
   for(Int_t i=0; i<fTracks->GetNTracks(); i++)
@@ -944,7 +957,6 @@ void AliL3Evaluate::EvaluatePoints(Char_t *rootfile,Char_t *exactfile,Char_t *to
   ntuppel->Write();
   ntuppel2->Write();
   ofile->Close();
-  
 #endif
 }
 
index 0d769b10ad62da4f29248e3439dd560b81823656..d923ef1cc1561ee22cba3e90c96b38a1c5f4dc72 100644 (file)
@@ -5,26 +5,20 @@
 
 
 class TClonesArray;
-
-#include <TObject.h>
-#include <TH1.h>
-#include <TTree.h>
 #include <TNtuple.h>
-#include "AliSimDigits.h"
-
+#include <TH1F.h>
 
-struct GoodTrack 
+struct AliGoodTrack 
 {
-  Int_t label;
-  Double_t eta;
-  Int_t code;
-  Double_t px,py,pz;
-  Double_t x,y,z;
-  Int_t nhits;
-  Int_t sector;
+  Int_t flabel;  //label
+  Double_t feta; //eta
+  Int_t fcode;   //pcode
+  Double_t fpx,fpy,fpz; //momentum
+  Double_t fx,fy,fz;    //pos at entrance 
+  Int_t fnhits;  //nhits
+  Int_t fsector; //sector number
 };
-typedef struct GoodTrack GoodTrack;
-
+typedef struct AliGoodTrack AliGoodTrack;
 
 class AliL3Track;
 class TClonesArray;
@@ -44,44 +38,41 @@ class AliL3Evaluate {
  private:
 
   AliL3TrackArray *fTracks; //!
-  //AliTPCParam *fParam;
   AliL3SpacePointData *fClusters[36][6]; //!
   AliL3FileHandler *fClustersFile[36][6]; //!
-  //TTree *fDigitsTree;
-  //AliSimDigits *fDigits;
-  Char_t fPath[1024];
-  Int_t fMinSlice;
-  Int_t fMaxSlice;
-  UInt_t fNcl[36][6];
-  Int_t fRowid[36][176];
-  Int_t fMinPointsOnTrack;  //Minimum points on track to be considered.
-  Int_t fMinHitsFromParticle;
-  GoodTrack *fGoodTracks; //!
-  Float_t fMaxFalseClusters;
+  Char_t fPath[1024];      //path
+  Int_t fMinSlice;         //min slice
+  Int_t fMaxSlice;         //max slice
+  UInt_t fNcl[36][6];      //cluster numbers
+  Int_t fRowid[36][176];   //row ids
+  Int_t fMinPointsOnTrack;    //minimum points on track to be considered.
+  Int_t fMinHitsFromParticle; //minimums hits a particle has to create
+  AliGoodTrack *fGoodTracks; //!
+  Float_t fMaxFalseClusters;  //maximum number of false assigned clusters
   
-  Int_t fNFastPoints;
+  Int_t fNFastPoints; //fast access to points
   UInt_t *fMcIndex;//!
   Int_t *fMcId;//!
-  Int_t fGoodFound;
-  Int_t fGoodGen;
-  Double_t fMinGoodPt;
-  Double_t fMaxGoodPt;
+  Int_t fGoodFound;    //good found
+  Int_t fGoodGen;      //good generated found
+  Double_t fMinGoodPt; //min pt
+  Double_t fMaxGoodPt; //max pt
   
   //Histograms
-  TNtuple *fNtuppel;
-  TH1F *fPtRes;
-  TH1F *fNGoodTracksPt;
-  TH1F *fNFoundTracksPt;
-  TH1F *fNFakeTracksPt;
-  TH1F *fTrackEffPt;
-  TH1F *fFakeTrackEffPt;
-  TH1F *fNGoodTracksEta;
-  TH1F *fNFoundTracksEta;
-  TH1F *fNFakeTracksEta;
-  TH1F *fTrackEffEta;
-  TH1F *fFakeTrackEffEta;
-  TNtuple *fNtupleRes;
-  Bool_t fStandardComparison;
+  TNtuple *fNtuppel;//!
+  TH1F *fPtRes;//!
+  TH1F *fNGoodTracksPt;//!
+  TH1F *fNFoundTracksPt;//!
+  TH1F *fNFakeTracksPt;//!
+  TH1F *fTrackEffPt;//!
+  TH1F *fFakeTrackEffPt;//!
+  TH1F *fNGoodTracksEta;//!
+  TH1F *fNFoundTracksEta;//!
+  TH1F *fNFakeTracksEta;//!
+  TH1F *fTrackEffEta;//!
+  TH1F *fFakeTrackEffEta;//!
+  TNtuple *fNtupleRes;//!
+  Bool_t fStandardComparison; // take standard macro
   
   void Clear();
  public:
@@ -111,8 +102,8 @@ class AliL3Evaluate {
   void SetMaxFalseClusters(Float_t f) {fMaxFalseClusters = f;}
   void SetStandardComparison(Bool_t b) {fStandardComparison = b;}  
   TNtuple *GetNtuple();
-  Int_t GetNGoodTracks() {return fGoodGen;}
-  Int_t GetNFoundTracks() {return fGoodFound;}
+  Int_t GetNGoodTracks() const {return fGoodGen;}
+  Int_t GetNFoundTracks() const {return fGoodFound;}
   TH1F *GetTrackEffPt() {return fTrackEffPt;}
   TH1F *GetTrackEffEta() {return fTrackEffEta;}
   TH1F *GetFakeEffEta() {return fFakeTrackEffEta;}
index 4d70ae4bab8a1446247250d1a078daa2643a4e26..846331c9bef6f7f47325d88ac904fd2e572a8aef 100644 (file)
@@ -72,23 +72,24 @@ using namespace std;
 ClassImp(AliL3FileHandler)
 
 // of course on start up the index is not created
-Bool_t AliL3FileHandler::fStaticIndexCreated=kFALSE;
-Int_t  AliL3FileHandler::fStaticIndex[36][159]; 
+Bool_t AliL3FileHandler::fgStaticIndexCreated=kFALSE;
+Int_t  AliL3FileHandler::fgStaticIndex[36][159]; 
 
 void AliL3FileHandler::CleanStaticIndex() 
-{ // use this static call to clean static index after
+{ 
+  // use this static call to clean static index after
   // running over one event
-
   for(Int_t i=0;i<AliL3Transform::GetNSlice();i++){
     for(Int_t j=0;j<AliL3Transform::GetNRows();j++)
-      fStaticIndex[i][j]=-1;
+      fgStaticIndex[i][j]=-1;
   }
-  fStaticIndexCreated=kFALSE;
+  fgStaticIndexCreated=kFALSE;
 }
 
 Int_t AliL3FileHandler::SaveStaticIndex(Char_t *prefix,Int_t event) 
-{ // use this static call to store static index after
-  if(!fStaticIndexCreated) return -1;
+{ 
+  // use this static call to store static index after
+  if(!fgStaticIndexCreated) return -1;
 
   Char_t fname[1024];
   if(prefix)
@@ -101,7 +102,7 @@ Int_t AliL3FileHandler::SaveStaticIndex(Char_t *prefix,Int_t event)
 
   for(Int_t i=0;i<AliL3Transform::GetNSlice();i++){
     for(Int_t j=0;j<AliL3Transform::GetNRows();j++)
-      file << fStaticIndex[i][j] << " ";
+      file << fgStaticIndex[i][j] << " ";
     file << endl;
   }
   file.close();
@@ -109,8 +110,9 @@ Int_t AliL3FileHandler::SaveStaticIndex(Char_t *prefix,Int_t event)
 }
 
 Int_t AliL3FileHandler::LoadStaticIndex(Char_t *prefix,Int_t event) 
-{ // use this static call to store static index after
-  if(fStaticIndexCreated){
+{ 
+  // use this static call to store static index after
+  if(fgStaticIndexCreated){
       LOG(AliL3Log::kWarning,"AliL3FileHandler::LoadStaticIndex","Inxed")
        <<"Static index already created, will overwrite"<<ENDLOG;
       CleanStaticIndex();
@@ -127,11 +129,11 @@ Int_t AliL3FileHandler::LoadStaticIndex(Char_t *prefix,Int_t event)
 
   for(Int_t i=0;i<AliL3Transform::GetNSlice();i++){
     for(Int_t j=0;j<AliL3Transform::GetNRows();j++)
-      file >> fStaticIndex[i][j];
+      file >> fgStaticIndex[i][j];
   }
   file.close();
 
-  fStaticIndexCreated=kTRUE;
+  fgStaticIndexCreated=kTRUE;
   return 0;
 }
 
@@ -153,7 +155,7 @@ AliL3FileHandler::AliL3FileHandler(Bool_t b)
     for(Int_t j=0;j<AliL3Transform::GetNRows();j++) 
       fIndex[i][j]=-1;
 
-  if(fUseStaticIndex&&!fStaticIndexCreated) CleanStaticIndex();
+  if(fUseStaticIndex&&!fgStaticIndexCreated) CleanStaticIndex();
 }
 
 AliL3FileHandler::~AliL3FileHandler()
@@ -165,7 +167,8 @@ AliL3FileHandler::~AliL3FileHandler()
 }
 
 void AliL3FileHandler::FreeDigitsTree()
-{
+{ 
+  //free digits tree
   if(!fDigitsTree)
     {
       LOG(AliL3Log::kInformational,"AliL3FileHandler::FreeDigitsTree()","Pointer")
@@ -187,7 +190,8 @@ void AliL3FileHandler::FreeDigitsTree()
 }
 
 Bool_t AliL3FileHandler::SetMCOutput(Char_t *name)
-{
+{ 
+  //set mc input
   fMC = fopen(name,"w");
   if(!fMC){
     LOG(AliL3Log::kWarning,"AliL3FileHandler::SetMCOutput","File Open")
@@ -198,7 +202,8 @@ Bool_t AliL3FileHandler::SetMCOutput(Char_t *name)
 }
 
 Bool_t AliL3FileHandler::SetMCOutput(FILE *file)
-{
+{ 
+  //set mc output
   fMC = file;
   if(!fMC){
     LOG(AliL3Log::kWarning,"AliL3FileHandler::SetMCOutput","File Open")
@@ -209,7 +214,8 @@ Bool_t AliL3FileHandler::SetMCOutput(FILE *file)
 }
 
 void AliL3FileHandler::CloseMCOutput()
-{
+{ 
+  //close mc output
   if(!fMC){
     LOG(AliL3Log::kWarning,"AliL3FileHandler::CloseMCOutPut","File Close")
       <<"Nothing to Close"<<ENDLOG;
@@ -220,7 +226,8 @@ void AliL3FileHandler::CloseMCOutput()
 }
 
 Bool_t AliL3FileHandler::SetAliInput()
-{
+{ 
+  //set ali input
 #ifdef use_newio
   fInAli->CdGAFile();
   fParam = AliTPC::LoadTPCParam(gFile);
@@ -261,7 +268,7 @@ Bool_t AliL3FileHandler::SetAliInput()
 }
 
 Bool_t AliL3FileHandler::SetAliInput(Char_t *name)
-{
+{ 
   //Open the AliROOT file with name.
 #ifdef use_newio
   fInAli= AliRunLoader::Open(name);
@@ -278,7 +285,8 @@ Bool_t AliL3FileHandler::SetAliInput(Char_t *name)
 
 #ifdef use_newio
 Bool_t AliL3FileHandler::SetAliInput(AliRunLoader *runLoader)
-{
+{ 
+  //set ali input as runloader
   fInAli=runLoader;
   fUseRunLoader = kTRUE;
   if(!fInAli){
@@ -293,13 +301,14 @@ Bool_t AliL3FileHandler::SetAliInput(AliRunLoader *runLoader)
 #ifdef use_newio
 Bool_t AliL3FileHandler::SetAliInput(TFile */*file*/)
 {
+  //Specify already opened AliROOT file to use as an input.
   LOG(AliL3Log::kFatal,"AliL3FileHandler::SetAliInput","File Open")
     <<"This function is not supported for NEWIO, check ALIHLT_USENEWIO settings in Makefile.conf"<<ENDLOG;
   return kFALSE;
 }
 #else
 Bool_t AliL3FileHandler::SetAliInput(TFile *file)
-{
+{ 
   //Specify already opened AliROOT file to use as an input.
   fInAli=file;
   if(!fInAli){
@@ -312,7 +321,8 @@ Bool_t AliL3FileHandler::SetAliInput(TFile *file)
 #endif
 
 void AliL3FileHandler::CloseAliInput()
-{
+{ 
+  //close ali input
 #ifdef use_newio
   if(fUseRunLoader) return;
 #endif
@@ -369,6 +379,7 @@ Bool_t AliL3FileHandler::IsDigit(Int_t event)
 ///////////////////////////////////////// Digit IO  
 Bool_t AliL3FileHandler::AliDigits2Binary(Int_t event,Bool_t altro)
 {
+  //save alidigits as binary
   Bool_t out = kTRUE;
   UInt_t nrow;
   AliL3DigitRowData* data = 0;
@@ -403,7 +414,7 @@ Bool_t AliL3FileHandler::CreateIndex()
   //create the access index or copy from static index
   fIndexCreated=kFALSE;
 
-  if(!fStaticIndexCreated || !fUseStaticIndex) { //we have to create index 
+  if(!fgStaticIndexCreated || !fUseStaticIndex) { //we have to create index 
     LOG(AliL3Log::kInformational,"AliL3FileHandler::CreateIndex","Index")
       <<"Starting to create index, this can take a while."<<ENDLOG;
 
@@ -425,9 +436,9 @@ Bool_t AliL3FileHandler::CreateIndex()
     if(fUseStaticIndex) { // create static index
       for(Int_t i=0;i<AliL3Transform::GetNSlice();i++){
        for(Int_t j=0;j<AliL3Transform::GetNRows();j++)
-         fStaticIndex[i][j]=fIndex[i][j];
+         fgStaticIndex[i][j]=fIndex[i][j];
       }
-      fStaticIndexCreated=kTRUE; //remember that index has been created
+      fgStaticIndexCreated=kTRUE; //remember that index has been created
     }
 
   LOG(AliL3Log::kInformational,"AliL3FileHandler::CreateIndex","Index")
@@ -436,14 +447,12 @@ Bool_t AliL3FileHandler::CreateIndex()
   } else if(fUseStaticIndex) { //simply copy static index
     for(Int_t i=0;i<AliL3Transform::GetNSlice();i++){
       for(Int_t j=0;j<AliL3Transform::GetNRows();j++)
-       fIndex[i][j]=fStaticIndex[i][j];
+       fIndex[i][j]=fgStaticIndex[i][j];
     }
 
   LOG(AliL3Log::kInformational,"AliL3FileHandler::CreateIndex","Index")
     <<"Index successfully taken from static copy."<<ENDLOG;
-
   }
   fIndexCreated=kTRUE;
   return kTRUE;
 }
@@ -1191,7 +1200,9 @@ void AliL3FileHandler::AliDigits2RootFile(AliL3DigitRowData *rowPt,Char_t *new_d
 }
 
 ///////////////////////////////////////// Point IO  
-Bool_t AliL3FileHandler::AliPoints2Binary(Int_t eventn){
+Bool_t AliL3FileHandler::AliPoints2Binary(Int_t eventn)
+{
+  //points to binary
   Bool_t out = kTRUE;
   UInt_t npoint;
   AliL3SpacePointData *data = AliPoints2Memory(npoint,eventn);
@@ -1200,7 +1211,9 @@ Bool_t AliL3FileHandler::AliPoints2Binary(Int_t eventn){
   return out;
 }
 
-AliL3SpacePointData * AliL3FileHandler::AliPoints2Memory(UInt_t & npoint,Int_t eventn){
+AliL3SpacePointData * AliL3FileHandler::AliPoints2Memory(UInt_t & npoint,Int_t eventn)
+{
+  //points to memory
   AliL3SpacePointData *data = 0;
   npoint=0;
   if(!fInAli){
index 89eded663b288b0d6804af0d6af8dfabe3a459f6..2f076b56d3d474404910911809a687c4bd36f08a 100644 (file)
@@ -26,26 +26,26 @@ class AliL3FileHandler:public AliL3MemHandler{
 
  protected:
 #ifdef use_newio
-  AliRunLoader *fInAli;
-  Bool_t fUseRunLoader;
+  AliRunLoader *fInAli;//!
+  Bool_t fUseRunLoader; //use runloader
 #else
-  TFile *fInAli;
+  TFile *fInAli;//!
 #endif
 
-  AliTPCParam *fParam;
-  virtual Bool_t SetAliInput();
-  AliSimDigits *fDigits;
+  AliTPCParam *fParam;//!
+  AliSimDigits *fDigits;//!
 
-  TTree *fDigitsTree;
+  TTree *fDigitsTree;//!
   FILE *fMC;//!
   
   Bool_t fIndexCreated;   //is index created
   Int_t  fIndex[36][159]; //stores index over digitstree 
                           //for faster access w/o ASVVERSION
   Bool_t fUseStaticIndex; //take static index
-  static Bool_t fStaticIndexCreated;   //global index created
-  static Int_t  fStaticIndex[36][159]; //global index
+  static Bool_t fgStaticIndexCreated;   //global index created
+  static Int_t  fgStaticIndex[36][159]; //global index
 
+  virtual Bool_t SetAliInput();
   Bool_t GetDigitsTree(Int_t event);
   Bool_t CreateIndex();  //create the index
 
index 6c51991f90ed8740a8ea6a7d9185ab5ae0f1383f..627ef1457c4081fcce798c23de6d92e8a69f4ad8 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef ALIL3LOG_H
 #define ALIL3LOG_H
 
-class AliL3Log{
+class AliL3Log {
   public:
   enum TLogLevel { kNone = 0, kDebug= 0x01, kInformational = 0x02, kWarning = 0x04, kError = 0x08 , kFatal = 0x10, kPrimary = 0x80, kAll = 0x9F };
   enum TLogCmd { kEnd, kPrec, kHex, kDec };
@@ -13,11 +13,8 @@ class AliL3Log{
 #if __GNUC__ == 3
 #define LOG( lvl, origin, keyword ) \
  if (lvl>=AliL3Log::fgLevel) std::cerr<<"["<<origin<<": "<<keyword<<"] "
-//#define LOG( lvl, origin, keyword ) std::cerr<<"["<<origin<<": "<<keyword<<"] "
 #define ENDLOG std::endl
 #else
-//#define LOG( lvl, origin, keyword ) cerr<<"["<<origin<<": "<<keyword<<"] "
-//#define ENDLOG endl
 #define LOG( lvl, origin, keyword ) \
  if (lvl>=AliL3Log::fgLevel) cerr<<"["<<origin<<": "<<keyword<<"] "
 #define ENDLOG endl
index dd3607fdefe2aadd9ae26cf7f7bcd03dc21d5f6f..22ef0fc97e9dd63d73b94a6aea8c2c7fa006dcf0 100644 (file)
@@ -12,88 +12,183 @@ ClassImp(AliL3Logger)
 
 #ifdef use_logging
 
-Int_t AliL3Logger::kAll= AliL3Log::kAll;
-Int_t AliL3Logger::kDebug = AliL3Log::kDebug;
-Int_t AliL3Logger::kInformational = AliL3Log::kInformational;
-Int_t AliL3Logger::kWarning = AliL3Log::kWarning;
-Int_t AliL3Logger::kError = AliL3Log::kError;
-Int_t AliL3Logger::kFatal = AliL3Log::kFatal;
-
-AliL3Logger::AliL3Logger(){
-  gLogLevel=AliL3Log::kAll;
-  dn = so = se = sm =0;
-  of = 0;
-}
-AliL3Logger::~AliL3Logger(){
-  if(dn) {gLog.DelServer(dn);delete dn;}
-  if(so) {gLog.DelServer(so);delete so;}
-  if(se) {gLog.DelServer(se);delete se;}
-  if(sm) {gLog.DelServer(sm);delete sm;}
-  if(of) {of->close();delete of;}
-}
-void AliL3Logger::Set(Int_t l){gLogLevel |=l;}
-void AliL3Logger::UnSet(Int_t l){gLogLevel &=(~l);}
-void AliL3Logger::UseDevNull(){
-  if(dn) return;
-  dn = new AliL3DevNullLogServer();
+Int_t AliL3Logger::fgAll= AliL3Log::kAll;
+Int_t AliL3Logger::fgDebug = AliL3Log::kDebug;
+Int_t AliL3Logger::fgInformational = AliL3Log::kInformational;
+Int_t AliL3Logger::fgWarning = AliL3Log::kWarning;
+Int_t AliL3Logger::fgError = AliL3Log::kError;
+Int_t AliL3Logger::fgFatal = AliL3Log::kFatal;
+
+AliL3Logger::AliL3Logger()
+{
+  //constructor
+  gLogLevel=AliL3Log::fgAll;
+  fdn = fso = fse = fsm =0;
+  fof = 0;
+}
+
+AliL3Logger::~AliL3Logger()
+{
+  //destructor
+  if(fdn) {gLog.DelServer(fdn);delete fdn;}
+  if(fso) {gLog.DelServer(fso);delete fso;}
+  if(fse) {gLog.DelServer(fse);delete fse;}
+  if(fsm) {gLog.DelServer(fsm);delete fsm;}
+  if(fof) {fof->close();delete fof;}
+}
+
+void AliL3Logger::Set(Int_t l)
+{ 
+  //set logger
+  gLogLevel |=l;
+}
+
+void AliL3Logger::UnSet(Int_t l)
+{ 
+  //unset logger
+  gLogLevel &=(~l);
+}
+
+void AliL3Logger::UseDevNull()
+{
+  //use dev null
+  if(fdn) return;
+  fdn = new AliL3DevNullLogServer();
   gLog.AddServer(dn);
 }
-void AliL3Logger::UseStdout(){
-  if(so)return;
-  so = new AliL3StdoutLogServer(); 
-  gLog.AddServer(so);
-}
-void AliL3Logger::UseStderr(){
-  if(se) return;
-  se = new AliL3StderrLogServer();
-  gLog.AddServer(se);
-}
-
-void AliL3Logger::UseStream(Char_t *name){
-  if(sm) return;
-  if(of) of->close();
-  delete of;
-  of = 0;
-  of = new ofstream();
-  of->open(name);
-  sm = new  AliL3StreamLogServer(*of);
-  gLog.AddServer(sm);
-}
-void AliL3Logger::NotUseDevNull(){
-  if(dn) {gLog.DelServer(dn);delete dn;dn=0;}
-}
-void AliL3Logger::NotUseStdout(){
-  if(so) {gLog.DelServer(so);delete so;so=0;}
-}
-void AliL3Logger::NotUseStderr(){
-  if(se) {gLog.DelServer(se);delete se;se=0;}
-}
-
-void AliL3Logger::NotUseStream(){
-  if(sm) {gLog.DelServer(sm);delete sm;sm=0;}
-  if(of) {of->close();delete of;of=0;}
-}
-#else
-
-Int_t AliL3Logger::kAll= AliL3Log::kAll;
-Int_t AliL3Logger::kDebug = AliL3Log::kDebug;
-Int_t AliL3Logger::kInformational = AliL3Log::kInformational;
-Int_t AliL3Logger::kWarning = AliL3Log::kWarning;
-Int_t AliL3Logger::kError = AliL3Log::kError;
-Int_t AliL3Logger::kFatal = AliL3Log::kFatal;
-
-AliL3Logger::AliL3Logger(){;}
-AliL3Logger::~AliL3Logger(){;}
-void AliL3Logger::Set(Int_t /*l*/){;}
-void AliL3Logger::UnSet(Int_t /*l*/){;}
-void AliL3Logger::UseDevNull(){;}
-void AliL3Logger::UseStdout(){;}
-void AliL3Logger::UseStderr(){;}
-void AliL3Logger::UseStream(Char_t */*name*/){;}
-void AliL3Logger::NotUseDevNull(){;}
-void AliL3Logger::NotUseStdout(){;}
-void AliL3Logger::NotUseStderr(){;}
-void AliL3Logger::NotUseStream(){;}
+void AliL3Logger::UseStdout()
+{
+  //use stdout
+  if(fso)return;
+  fso = new AliL3StdoutLogServer(); 
+  gLog.AddServer(fso);
+}
+void AliL3Logger::UseStderr()
+{
+  //use stderr
+  if(fse) return;
+  fse = new AliL3StderrLogServer();
+  gLog.AddServer(fse);
+}
+
+void AliL3Logger::UseStream(Char_t *name)
+{
+  //use stream
+  if(fsm) return;
+  if(fof) fof->close();
+  delete fof;
+  fof = 0;
+  fof = new ofstream();
+  fof->open(name);
+  fsm = new  AliL3StreamLogServer(*fof);
+  gLog.AddServer(fsm);
+}
+
+void AliL3Logger::NotUseDevNull()
+{
+  //not dev null
+  if(fdn) {gLog.DelServer(fdn);delete fdn;fdn=0;}
+}
+
+void AliL3Logger::NotUseStdout()
+{
+  //not stdout
+  if(fso) {gLog.DelServer(fso);delete fso;fso=0;}
+}
+
+void AliL3Logger::NotUseStderr()
+{
+  //not stderr
+  if(fse) {gLog.DelServer(fse);delete fse;fse=0;}
+}
+
+void AliL3Logger::NotUseStream()
+{
+  //not stream
+  if(fsm) {gLog.DelServer(fsm);delete fsm;fsm=0;}
+  if(fof) {fof->close();delete fof;fof=0;}
+}
+
+#else /*not use_logging*/
+
+Int_t AliL3Logger::fgAll= AliL3Log::kAll;
+Int_t AliL3Logger::fgDebug = AliL3Log::kDebug;
+Int_t AliL3Logger::fgInformational = AliL3Log::kInformational;
+Int_t AliL3Logger::fgWarning = AliL3Log::kWarning;
+Int_t AliL3Logger::fgError = AliL3Log::kError;
+Int_t AliL3Logger::fgFatal = AliL3Log::kFatal;
+
+AliL3Logger::AliL3Logger()
+{
+  //
+  ;
+}
+
+AliL3Logger::~AliL3Logger()
+{
+  //
+  ;
+}
+
+void AliL3Logger::Set(Int_t /*l*/)
+{
+  //
+  ;
+}
+
+void AliL3Logger::UnSet(Int_t /*l*/)
+{
+  //
+  ;
+}
+
+void AliL3Logger::UseDevNull()
+{
+  //
+  ;
+}
+
+void AliL3Logger::UseStdout()
+{
+  //
+  ;
+}
+
+void AliL3Logger::UseStderr()
+{
+  //
+  ;
+}
+
+void AliL3Logger::UseStream(Char_t */*name*/)
+{
+  //
+  ;
+}
+
+void AliL3Logger::NotUseDevNull()
+{
+  //
+  ;
+}
+
+void AliL3Logger::NotUseStdout()
+{
+  //
+  ;
+}
+
+void AliL3Logger::NotUseStderr()
+{
+  //
+  ;
+}
+
+void AliL3Logger::NotUseStream()
+{
+  //
+  ;
+}
 #endif
 
 
index 17bdb528f0626fa802aa7056e7d9615ea64b2a59..cc95842b64171678a4dea484fdb81200ea4427a0 100644 (file)
@@ -8,16 +8,13 @@
 
 class MLUCLogServer;
 
-class AliL3Logger{
-  public:
-  static Int_t kAll;
-  static Int_t kDebug;
-  static Int_t kInformational;
-  static Int_t kWarning;
-  static Int_t kError;
-  static Int_t kFatal;
+class AliL3Logger {
+
+ public:
   AliL3Logger();
   virtual ~AliL3Logger();
+
   void Set(Int_t l);
   void UnSet(Int_t l);
   void UseDevNull();
@@ -28,15 +25,26 @@ class AliL3Logger{
   void NotUseStdout();
   void NotUseStderr();
   void NotUseStream();
-  private:
-  MLUCLogServer *dn; //!
-  MLUCLogServer *so; //!
-  MLUCLogServer *se; //!
-  MLUCLogServer *sm; //!
+
+ protected:
+
+  static Int_t fgAll;   //level all
+  static Int_t fgDebug; //level debug
+  static Int_t fgInformational; //level info
+  static Int_t fgWarning; //level warning
+  static Int_t fgError; //level error
+  static Int_t fgFatal; //level fatal
+
+ private:
+
+  MLUCLogServer *fdn; //!
+  MLUCLogServer *fso; //!
+  MLUCLogServer *fse; //!
+  MLUCLogServer *fsm; //!
 #if __GNUC__ == 3
-  std::ofstream *of; //!
+  std::ofstream *fof; //!
 #else  
-  ofstream *of; //!
+  ofstream *fof; //!
 #endif
 
   ClassDef(AliL3Logger,1)
index f6f3d46ea13c14f8f8c65ea20ee2db0b06175044..efa5edd38937d5c57a36aaa89f970336a3e9a1a9 100644 (file)
@@ -78,17 +78,16 @@ using namespace std;
 ClassImp(AliL3MemHandler)
   
 AliL3MemHandler::AliL3MemHandler()
-{
+{ 
   //Constructor
-  
   fPt = 0;
   fSize =0;
   fInBinary = 0;
   fOutBinary = 0;
   fNRandom = 0;
   Init(0,0);
-  IsRandom = kFALSE;
-  fDigits = 0;
+  fIsRandom = kFALSE;
+  fRandomDigits = 0;
   fDPt =0;
   fNGenerate = 0;
   fNUsed = 0;
@@ -101,12 +100,13 @@ AliL3MemHandler::~AliL3MemHandler()
 {
   //Destructor
   if(fPt) delete[] fPt;
-  if(fDigits) delete [] fDigits;
+  if(fRandomDigits) delete [] fRandomDigits;
   if(fDPt) delete [] fDPt;
 }
 
 void AliL3MemHandler::Init(Int_t s,Int_t p, Int_t *r)
 {
+  //init handler
   fSlice=s;fPatch=p;
   if(r) {
     fRowMin=r[0];
@@ -121,7 +121,6 @@ void AliL3MemHandler::Init(Int_t s,Int_t p, Int_t *r)
 void AliL3MemHandler::ResetROI()
 {
   //Resets the Look-up table for Region of Interest mode.
-  
   for(Int_t i=fRowMin; i<=fRowMax; i++)
     {
       fEtaMinTimeBin[i] = 0;
@@ -186,7 +185,6 @@ void AliL3MemHandler::SetROI(Float_t *eta,Int_t */*slice*/)
 Bool_t AliL3MemHandler::SetBinaryInput(char *name)
 {
   //Set the input binary file.
-
   fInBinary = fopen(name,"r");
   if(!fInBinary){
     LOG(AliL3Log::kWarning,"AliL3MemHandler::SetBinaryInput","File Open")
@@ -199,7 +197,6 @@ Bool_t AliL3MemHandler::SetBinaryInput(char *name)
 Bool_t AliL3MemHandler::SetBinaryInput(FILE *file)
 {
   //Set the input binary file.
-
   fInBinary = file;
   if(!fInBinary){
     LOG(AliL3Log::kWarning,"AliL3MemHandler::SetBinaryInput","File Open")
@@ -212,7 +209,6 @@ Bool_t AliL3MemHandler::SetBinaryInput(FILE *file)
 void AliL3MemHandler::CloseBinaryInput()
 {
   //Close the input file.
-
   if(!fInBinary){
     LOG(AliL3Log::kWarning,"AliL3MemHandler::CloseBinaryInput","File Close")
       <<"Nothing to Close"<<ENDLOG;
@@ -237,8 +233,7 @@ Bool_t AliL3MemHandler::SetBinaryOutput(char *name)
 Bool_t AliL3MemHandler::SetBinaryOutput(FILE *file)
 {
   //Set the binary output file.
-  
-  fOutBinary = file;
+    fOutBinary = file;
   if(!fOutBinary){
     LOG(AliL3Log::kWarning,"AliL3MemHandler::SetBinaryOutput","File Open")
       <<"Pointer to File = 0x0 "<<ENDLOG;
@@ -249,6 +244,7 @@ Bool_t AliL3MemHandler::SetBinaryOutput(FILE *file)
 
 void AliL3MemHandler::CloseBinaryOutput()
 {
+  //close binary  
   if(!fOutBinary){
     LOG(AliL3Log::kWarning,"AliL3MemHandler::CloseBinaryOutPut","File Close")
       <<"Nothing to Close"<<ENDLOG;
@@ -261,7 +257,6 @@ void AliL3MemHandler::CloseBinaryOutput()
 UInt_t AliL3MemHandler::GetFileSize()
 {
   //Returns the file size in bytes of the input file.
-  
   if(!fInBinary){
     LOG(AliL3Log::kWarning,"AliL3MemHandler::GetFileSize","File")
       <<"No Input File"<<ENDLOG;
@@ -275,13 +270,13 @@ UInt_t AliL3MemHandler::GetFileSize()
 
 Byte_t *AliL3MemHandler::Allocate()
 {
+  //Allocate
   return Allocate(GetFileSize()); 
 }
 
 Byte_t *AliL3MemHandler::Allocate(AliL3TrackArray *array)
 {
   //Allocate memory for tracks in memory. Used by TrackArray2Binary()
-  
   if(!array){
     LOG(AliL3Log::kWarning,"AliL3MemHandler::Allocate","Memory")
       <<"Pointer to AliL3TrackArray = 0x0 "<<ENDLOG;
@@ -293,7 +288,6 @@ Byte_t *AliL3MemHandler::Allocate(AliL3TrackArray *array)
 Byte_t *AliL3MemHandler::Allocate(UInt_t size)
 {
   //Allocate memory of size in bytes.
-  
   if(fPt){
     LOG(AliL3Log::kWarning,"AliL3MemHandler::Allocate","Memory")
       <<"Delete Memory"<<ENDLOG;
@@ -310,7 +304,6 @@ Byte_t *AliL3MemHandler::Allocate(UInt_t size)
 void AliL3MemHandler::Free()
 {
   //Clear the memory, if allocated.
-  
   if(!fPt){
     LOG(AliL3Log::kInformational,"AliL3MemHandler::Free","Memory")
       <<"No Memory allocated - can't Free"<<ENDLOG;
@@ -333,16 +326,17 @@ void AliL3MemHandler::SetRandomCluster(Int_t maxnumber)
 {
   //If you are adding random data to the original data.
   
-  IsRandom = kTRUE;
+  fIsRandom = kTRUE;
   fNRandom = maxnumber;
   fNDigits = 0;
-  if(fDigits) delete [] fDigits;
-  fDigits = new AliL3RandomDigitData[fNRandom*9];
+  if(fRandomDigits) delete [] fRandomDigits;
+  fRandomDigits = new AliL3RandomDigitData[fNRandom*9];
   if(fDPt) delete [] fDPt;
   fDPt = new AliL3RandomDigitData *[fNRandom*9];
 }
 
-void AliL3MemHandler::QSort(AliL3RandomDigitData **a, Int_t first, Int_t last){
+void AliL3MemHandler::QSort(AliL3RandomDigitData **a, Int_t first, Int_t last)
+{
 
    // Sort array of AliL3RandomDigitData pointers using a quicksort algorithm.
    // Uses CompareDigits() to compare objects.
@@ -385,8 +379,9 @@ void AliL3MemHandler::QSort(AliL3RandomDigitData **a, Int_t first, Int_t last){
    }
 }
 
-UInt_t AliL3MemHandler::GetRandomSize()
+UInt_t AliL3MemHandler::GetRandomSize() const
 {
+  //get random size
   Int_t nrandom = 0;
   for(Int_t r=fRowMin;r<=fRowMax;r++){
     Int_t npad=AliL3Transform::GetNPads(r);
@@ -397,9 +392,10 @@ UInt_t AliL3MemHandler::GetRandomSize()
 
 void AliL3MemHandler::Generate(Int_t row)
 {
-  //Generate random data on row, if you didn't ask for this, nothing happens here.
+  //Generate random data on row, if you didn't 
+  //ask for this, nothing happens here.
   
-  if(!IsRandom) return;
+  if(!fIsRandom) return;
   ResetRandom();
   fNDigits = 0;
   Int_t npad=AliL3Transform::GetNPads(row);
@@ -414,9 +410,6 @@ void AliL3MemHandler::Generate(Int_t row)
     DigitizePoint(row,pad,time,charge);
   }
   QSort(fDPt,0,fNDigits);
-  //  for(Int_t d=0;d<fNDigits;d++)
-  //    fprintf(stderr,"%d %d %d %d\n",fDPt[d]->fRow,fDPt[d]->fPad,
-  //                             fDPt[d]->fTime,fDPt[d]->fCharge);
 }
 
 
@@ -436,11 +429,11 @@ void AliL3MemHandler::DigitizePoint(Int_t row, Int_t pad,
       if(dpad<0||dpad>=AliL3Transform::GetNPads(row))  continue;
       if(dtime<0||dtime>=AliL3Transform::GetNTimeBins()) continue;
       
-      fDigits[fNDigits].fCharge = dcharge;
-      fDigits[fNDigits].fRow = row;
-      fDigits[fNDigits].fPad = dpad;
-      fDigits[fNDigits].fTime = dtime;
-      fDPt[fNDigits] = &fDigits[fNDigits];
+      fRandomDigits[fNDigits].fCharge = dcharge;
+      fRandomDigits[fNDigits].fRow = row;
+      fRandomDigits[fNDigits].fPad = dpad;
+      fRandomDigits[fNDigits].fTime = dtime;
+      fDPt[fNDigits] = &fRandomDigits[fNDigits];
       fNDigits++;
     }
   }
@@ -523,8 +516,9 @@ Bool_t AliL3MemHandler::Binary2Memory(UInt_t & nrow,AliL3DigitRowData *data)
 }
 
 void AliL3MemHandler::AddData(AliL3DigitData *data,UInt_t & ndata,
-                             UInt_t /*row*/,UShort_t pad,UShort_t time,UShort_t charge)
+                             UInt_t /*row*/,UShort_t pad,UShort_t time,UShort_t charge) const
 {
+  //add some data
   data[ndata].fPad = pad;
   data[ndata].fTime = time;
   data[ndata].fCharge = charge;
@@ -533,6 +527,7 @@ void AliL3MemHandler::AddData(AliL3DigitData *data,UInt_t & ndata,
 
 void AliL3MemHandler::AddRandom(AliL3DigitData *data, UInt_t & ndata)
 {
+  //add some random data
   data[ndata].fPad = fDPt[fNUsed]->fPad;
   data[ndata].fTime = fDPt[fNUsed]->fTime;
   data[ndata].fCharge = fDPt[fNUsed]->fCharge;
@@ -543,6 +538,7 @@ void AliL3MemHandler::AddRandom(AliL3DigitData *data, UInt_t & ndata)
 void AliL3MemHandler::MergeDataRandom(AliL3DigitData *data, UInt_t & ndata,
                                      UInt_t row, UShort_t pad, UShort_t time, UShort_t charge)
 {
+  //merge random data
   data[ndata].fPad = pad;
   data[ndata].fTime = time;
   data[ndata].fCharge = charge;
@@ -558,6 +554,7 @@ void AliL3MemHandler::MergeDataRandom(AliL3DigitData *data, UInt_t & ndata,
 void AliL3MemHandler::AddDataRandom(AliL3DigitData *data, UInt_t & ndata,
                    UInt_t row, UShort_t pad, UShort_t time, UShort_t charge)
 {
+  //add data random
   Int_t action;
   while((action=ComparePoints(row,pad,time))==1){
     AddRandom(data,ndata);
@@ -571,8 +568,9 @@ void AliL3MemHandler::AddDataRandom(AliL3DigitData *data, UInt_t & ndata,
 }
 
 void AliL3MemHandler::Write(UInt_t *comp, UInt_t & index, 
-                           UInt_t & subindex, UShort_t value)
+                           UInt_t & subindex, UShort_t value) const
 {
+  //write compressed data
   UInt_t shift[3] = {0,10,20};
   if(subindex==0) comp[index] =0; //clean up memory
   comp[index] |= (value&0x03ff)<<shift[subindex];
@@ -583,8 +581,9 @@ void AliL3MemHandler::Write(UInt_t *comp, UInt_t & index,
   else subindex++;
 }
 
-UShort_t AliL3MemHandler::Read(UInt_t *comp, UInt_t & index, UInt_t & subindex)
-{
+UShort_t AliL3MemHandler::Read(UInt_t *comp, UInt_t & index, UInt_t & subindex) const
+{ 
+  //read compressed data
   UInt_t shift[3] = {0,10,20};
   UShort_t value = (comp[index]>>shift[subindex])&0x03ff;
   if(subindex == 2){
@@ -597,8 +596,9 @@ UShort_t AliL3MemHandler::Read(UInt_t *comp, UInt_t & index, UInt_t & subindex)
 }
 
 UShort_t AliL3MemHandler::Test(UInt_t *comp, 
-                              UInt_t index, UInt_t  subindex)
+                              UInt_t index, UInt_t  subindex) const
 {
+  //supi dupi test
   UInt_t shift[3] = {0,10,20};
   return (comp[index]>>shift[subindex])&0x03ff;
 }
@@ -690,7 +690,7 @@ Int_t AliL3MemHandler::CompMemory2Memory(UInt_t  nrow,
 {
   //Uncompress the run-length encoded data in memory pointed to by comp, and
   //  store it in data.
-   
+
   if(!comp){
     LOG(AliL3Log::kWarning,"AliL3MemHandler::CompMemory2Memory","Memory")
       <<"Pointer to compressed data = 0x0 "<<ENDLOG;
@@ -747,7 +747,7 @@ Int_t AliL3MemHandler::CompMemory2Memory(UInt_t  nrow,
   return outsize;
 }
 
-UInt_t AliL3MemHandler::GetCompMemorySize(UInt_t nrow,AliL3DigitRowData *data)
+UInt_t AliL3MemHandler::GetCompMemorySize(UInt_t nrow,AliL3DigitRowData *data) const
 {
   //Return the size of RLE data, after compressing data.
   
@@ -815,7 +815,9 @@ UInt_t AliL3MemHandler::GetCompMemorySize(UInt_t nrow,AliL3DigitRowData *data)
   return (index/3) * sizeof(UInt_t);
 }
 
-UInt_t AliL3MemHandler::GetMemorySize(UInt_t nrow,UInt_t *comp){
+UInt_t AliL3MemHandler::GetMemorySize(UInt_t nrow,UInt_t *comp) const
+{
+  //get memory size
   if(!comp){
     LOG(AliL3Log::kWarning,"AliL3MemHandler::GetMemorySize","Memory")
     <<"Pointer to compressed data = 0x0 "<<ENDLOG;
@@ -851,6 +853,7 @@ UInt_t AliL3MemHandler::GetMemorySize(UInt_t nrow,UInt_t *comp){
 
 UInt_t AliL3MemHandler::GetNRow(UInt_t *comp,UInt_t size)
 {
+  //get number of rows
   if(!comp){
     LOG(AliL3Log::kWarning,"AliL3MemHandler::GetNRow","Memory")
       <<"Pointer to compressed data = 0x0 "<<ENDLOG;
@@ -940,7 +943,6 @@ Bool_t AliL3MemHandler::CompBinary2CompMemory(UInt_t & nrow,UInt_t *comp)
 AliL3DigitRowData *AliL3MemHandler::CompBinary2Memory(UInt_t & nrow)
 {
   // Read the RLE inputfile, unpack it and return the pointer to it.
-  
   AliL3MemHandler * handler = new AliL3MemHandler();
   handler->SetBinaryInput(fInBinary);
   UInt_t *comp =(UInt_t *)handler->Allocate();
@@ -1078,7 +1080,6 @@ Bool_t AliL3MemHandler::Memory2Binary(UInt_t ntrack,AliL3TrackSegmentData *data)
 Bool_t AliL3MemHandler::Binary2Memory(UInt_t & ntrack,AliL3TrackSegmentData *data)
 {
   //Read the tracks in inputfile, and store it in data.
-  
   if(!fInBinary){
     LOG(AliL3Log::kWarning,"AliL3MemHandler::Binary2Memory","File")
     <<"No Input File"<<ENDLOG;
@@ -1152,7 +1153,7 @@ Bool_t AliL3MemHandler::Binary2TrackArray(AliL3TrackArray *array)
   return kTRUE;
 }
 
-Bool_t AliL3MemHandler::TrackArray2Memory(UInt_t & ntrack,AliL3TrackSegmentData *data,AliL3TrackArray *array)
+Bool_t AliL3MemHandler::TrackArray2Memory(UInt_t & ntrack,AliL3TrackSegmentData *data,AliL3TrackArray *array) const
 {
   //Fill the trackarray into the AliTrackSegmentData structures before writing to outputfile.
   if(!data){
@@ -1170,7 +1171,7 @@ Bool_t AliL3MemHandler::TrackArray2Memory(UInt_t & ntrack,AliL3TrackSegmentData
   return kTRUE;
 }
 
-Bool_t AliL3MemHandler::Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *data,AliL3TrackArray *array)
+Bool_t AliL3MemHandler::Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *data,AliL3TrackArray *array) const
 {
   //Fill the tracks in data into trackarray.
   
@@ -1188,7 +1189,7 @@ Bool_t AliL3MemHandler::Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *d
   return kTRUE;
 }
 
-Bool_t AliL3MemHandler::Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *data,AliL3TrackArray *array,Int_t slice)
+Bool_t AliL3MemHandler::Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *data,AliL3TrackArray *array,Int_t slice) const
 {
   //Fill the tracks in data into trackarray, and rotate the tracks to global coordinates.
     
index 4ba932ec8c5024d3092eb0ca3565de800cc9e7e3..628c40ca1a2a2b01686a09151a8c9be198023253 100644 (file)
@@ -16,30 +16,30 @@ class AliL3RandomPointData;
 class AliRunLoader;
 #endif
 
-class AliL3MemHandler{
+class AliL3MemHandler { 
  private:
   
   Byte_t *fPt;//!
-  UInt_t fSize;
+  UInt_t fSize; //size of allocated data structure
 
   AliL3RandomDigitData **fDPt;//!
-  AliL3RandomDigitData *fDigits;//!
-  Bool_t IsRandom;
-  Int_t fNRandom;
-  Int_t fNGenerate;
-  Int_t fNUsed;
-  Int_t fNDigits;
-
-  void Write(UInt_t *comp, UInt_t & index, UInt_t & subindex, UShort_t value);
-  UShort_t Read(UInt_t *comp, UInt_t & index, UInt_t & subindex);
-  UShort_t Test(UInt_t *comp, UInt_t index, UInt_t subindex); 
+  AliL3RandomDigitData *fRandomDigits;//!
+  Bool_t fIsRandom; //random data generated
+  Int_t fNRandom;   //count random digits 
+  Int_t fNGenerate; //count generated digits
+  Int_t fNUsed;     //count used digits
+  Int_t fNDigits;   //count digits from digitstree
+
+  void Write(UInt_t *comp, UInt_t & index, UInt_t & subindex, UShort_t value) const;
+  UShort_t Read(UInt_t *comp, UInt_t & index, UInt_t & subindex) const;
+  UShort_t Test(UInt_t *comp, UInt_t index, UInt_t subindex) const
   
   void DigitizePoint(Int_t row,Int_t pad, Int_t time,Int_t charge);
   void QSort(AliL3RandomDigitData **a, Int_t first, Int_t last);
-  Int_t ComparePoints(UInt_t row,UShort_t pad,UShort_t time);
-  Int_t CompareDigits(AliL3RandomDigitData *a,AliL3RandomDigitData *b);
+  Int_t ComparePoints(UInt_t row,UShort_t pad,UShort_t time) const ;
+  Int_t CompareDigits(AliL3RandomDigitData *a,AliL3RandomDigitData *b) const;
   void AddData(AliL3DigitData *data,UInt_t & ndata,
-                      UInt_t row,UShort_t pad,UShort_t time,UShort_t charge);
+                      UInt_t row,UShort_t pad,UShort_t time,UShort_t charge) const;
   void AddRandom(AliL3DigitData *data,UInt_t & ndata);
   void MergeDataRandom(AliL3DigitData *data,UInt_t & ndata,
                       UInt_t row,UShort_t pad,UShort_t time,UShort_t charge);
@@ -47,13 +47,13 @@ class AliL3MemHandler{
                       UInt_t row,UShort_t pad,UShort_t time,UShort_t charge);
 
  protected:
-  Int_t fRowMin;
-  Int_t fRowMax;
-  Int_t fSlice;
-  Int_t fPatch;
+  Int_t fRowMin; //min row
+  Int_t fRowMax; //max row
+  Int_t fSlice;  //slice
+  Int_t fPatch;  //patch
 
   Int_t fEtaMinTimeBin[159]; //for ROI in eta only
-  Int_t fEtaMaxTimeBin[159];
+  Int_t fEtaMaxTimeBin[159]; //for ROI in eta only
   
   FILE *fInBinary;//!
   FILE *fOutBinary;//!
@@ -110,16 +110,16 @@ class AliL3MemHandler{
   Bool_t Binary2Memory(UInt_t & ntrack,AliL3TrackSegmentData *data);
   Bool_t TrackArray2Binary(AliL3TrackArray *array);
   Bool_t Binary2TrackArray(AliL3TrackArray *array);
-  Bool_t TrackArray2Memory(UInt_t & ntrack,AliL3TrackSegmentData *data,AliL3TrackArray *array);
-  Bool_t Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *data,AliL3TrackArray *array);
-  Bool_t Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *data,AliL3TrackArray *array,Int_t slice);
+  Bool_t TrackArray2Memory(UInt_t & ntrack,AliL3TrackSegmentData *data,AliL3TrackArray *array) const;
+  Bool_t Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *data,AliL3TrackArray *array) const;
+  Bool_t Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *data,AliL3TrackArray *array,Int_t slice) const;
     
   //Memory Allocation
-  UInt_t GetAllocatedSize(){return fSize;}  
+  UInt_t GetAllocatedSize() const {return fSize;}  
   UInt_t GetFileSize();
-  UInt_t GetMemorySize(UInt_t nrow,UInt_t *comp);
-  UInt_t GetCompMemorySize(UInt_t nrow,AliL3DigitRowData *data);
-  UInt_t GetRandomSize();
+  UInt_t GetMemorySize(UInt_t nrow,UInt_t *comp) const;
+  UInt_t GetCompMemorySize(UInt_t nrow,AliL3DigitRowData *data) const;
+  UInt_t GetRandomSize() const;
 
   Byte_t *Allocate(UInt_t size);
   Byte_t *Allocate();  // allocate size of Binary Input File
@@ -129,10 +129,10 @@ class AliL3MemHandler{
   void   Free();
   
   //Getters:
-  Int_t GetRowMin(){return fRowMin;}
-  Int_t GetRowMax(){return fRowMax;}
-  Int_t GetSlice(){return fSlice;}
-  Int_t GetPatch(){return fPatch;}
+  Int_t GetRowMin() const {return fRowMin;}
+  Int_t GetRowMax() const {return fRowMax;}
+  Int_t GetSlice() const {return fSlice;}
+  Int_t GetPatch() const {return fPatch;}
   
   //virtual functions:
   virtual void FreeDigitsTree() {return;}
@@ -192,7 +192,8 @@ class AliL3MemHandler{
   ClassDef(AliL3MemHandler,1) // Memory handler class
 };
 
-inline Int_t  AliL3MemHandler::ComparePoints(UInt_t /*row*/,UShort_t pad,UShort_t time){
+inline Int_t  AliL3MemHandler::ComparePoints(UInt_t /*row*/,UShort_t pad,UShort_t time) const
+{
   if(fNUsed>=fNDigits) return -2;
 
   if(pad==fDPt[fNUsed]->fPad&&time==fDPt[fNUsed]->fTime) return 0;
@@ -203,7 +204,8 @@ inline Int_t  AliL3MemHandler::ComparePoints(UInt_t /*row*/,UShort_t pad,UShort_
   return 1;
 }
 
-inline Int_t AliL3MemHandler::CompareDigits(AliL3RandomDigitData *a,AliL3RandomDigitData *b){
+inline Int_t AliL3MemHandler::CompareDigits(AliL3RandomDigitData *a,AliL3RandomDigitData *b) const
+{
   if(a->fPad==b->fPad && a->fTime == b->fTime) return 0;
 
   if(a->fPad<b->fPad) return -1;
index 22f6e019f90e60f9eea931d03e3f07eaf106a709..50a7a900693944f0891eaa3071a634ef5021c88e 100644 (file)
@@ -62,6 +62,7 @@ void AliL3Merger::InitMerger(Int_t ntrackarrays,Char_t *tracktype)
 
 void AliL3Merger::DeleteArray()
 {
+  //delete arrays
   for(Int_t i=0; i<fNIn;i++)
     {
       if(!fInTrack[i]) continue;
@@ -77,7 +78,8 @@ void AliL3Merger::DeleteArray()
 }
 
 void AliL3Merger::SetArray(Int_t nin)
-{
+{ 
+  //set arrays
   DeleteArray();//Make sure arrays are cleaned 
   
   fNIn = nin;
@@ -97,7 +99,8 @@ void AliL3Merger::SetArray(Int_t nin)
 }
 
 void AliL3Merger::Reset()
-{
+{ 
+  //reset
   for(Int_t i=0; i<fNIn;i++)
     {
       fInTrack[i]->Reset();
@@ -108,7 +111,6 @@ void AliL3Merger::Reset()
 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);
@@ -117,7 +119,8 @@ void AliL3Merger::FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr)
 }
 
 void AliL3Merger::AddAllTracks()
-{
+{ 
+  //add all tracks
   for(Int_t i=0; i<GetNIn();i++)
     {
       AliL3TrackArray *in = GetInTracks(i);
@@ -127,7 +130,8 @@ void AliL3Merger::AddAllTracks()
 }
 
 void AliL3Merger::SortGlobalTracks(AliL3Track **tracks, Int_t ntrack)
-{
+{ 
+  //sort global tracks
   AliL3Track **tmp = new AliL3Track*[ntrack]; 
   for(Int_t i=0;i<ntrack;i++) tmp[i] = tracks[i];
   Int_t *t = new Int_t[ntrack];
@@ -155,9 +159,9 @@ void AliL3Merger::SortGlobalTracks(AliL3Track **tracks, Int_t ntrack)
   delete[] tmp;
 }
 
-
-void AliL3Merger::SortTracks(AliL3Track **tracks, Int_t ntrack)
-{
+void AliL3Merger::SortTracks(AliL3Track **tracks, Int_t ntrack) const
+{ 
+  //sort tracks
   AliL3Track **tmp = new  AliL3Track*[ntrack];
   for(Int_t i=0;i<ntrack;i++) tmp[i] = tracks[i];
   Int_t *t = new Int_t[ntrack];
@@ -185,14 +189,16 @@ void AliL3Merger::SortTracks(AliL3Track **tracks, Int_t ntrack)
 }
 
 void AliL3Merger::AddTrack(AliL3TrackArray *mergedtrack,AliL3Track *track)
-{
+{ 
+  // add tracks
   AliL3Track *t[1];
   t[0] = track;
   MultiMerge(mergedtrack,t,1);
 }
 
 AliL3Track * AliL3Merger::MergeTracks(AliL3TrackArray *mergedtrack,AliL3Track *t0,AliL3Track *t1)
-{
+{ 
+  //merge tracks
   AliL3Track *t[2];
   t[0] = t0; 
   t[1] = t1;
@@ -202,8 +208,7 @@ AliL3Track * AliL3Merger::MergeTracks(AliL3TrackArray *mergedtrack,AliL3Track *t
 
 AliL3Track * AliL3Merger::MultiMerge(AliL3TrackArray *mergedtracks,AliL3Track **tracks, Int_t ntrack)
 {
-  // merge the tracks!!
-  
+  //multi merge the tracks
   //check npoints
   Int_t nps = 0;
   for(Int_t i=0;i<ntrack;i++)
@@ -247,8 +252,9 @@ AliL3Track * AliL3Merger::MultiMerge(AliL3TrackArray *mergedtracks,AliL3Track **
   return newtrack;
 }
 
-void* AliL3Merger::GetNtuple(char *varlist)
-{
+void* AliL3Merger::GetNtuple(char *varlist) const
+{ 
+  //get ntuple
 #ifdef use_root
   TNtuple* nt = new TNtuple("ntuple","ntuple",varlist);
   return (void*) nt;
@@ -257,8 +263,9 @@ void* AliL3Merger::GetNtuple(char *varlist)
 #endif
 }
 
-void* AliL3Merger::GetNtuple()
-{
+void* AliL3Merger::GetNtuple() const
+{ 
+  //get ntuple
 #ifdef use_root
   TNtuple* nt = new TNtuple("ntuple","ntuple",
                            "dx:dy:dz:dk:dpsi:dtgl:dq:disx:disy:disz:dis:n0:n1:diff:drx:dry:drz");
@@ -268,8 +275,9 @@ void* AliL3Merger::GetNtuple()
 #endif
 }
 
-Bool_t AliL3Merger::WriteNtuple(char *filename, void* nt)
-{
+Bool_t AliL3Merger::WriteNtuple(char *filename, void* nt) const
+{ 
+  //write ntuple
 #ifdef use_root
   TNtuple *ntuple=(TNtuple *) nt;
   TFile *f = new TFile(filename,"RECREATE");
@@ -283,7 +291,8 @@ Bool_t AliL3Merger::WriteNtuple(char *filename, void* nt)
 }
 
 void AliL3Merger::FillNtuple(void *nt,AliL3Track *innertrack,AliL3Track *outertrack)
-{
+{ 
+  //fill ntuple
   Float_t data[17];
   if(outertrack->IsPoint()&&innertrack->IsPoint())
     {
@@ -314,8 +323,9 @@ void AliL3Merger::FillNtuple(void *nt,AliL3Track *innertrack,AliL3Track *outertr
     }
 }
 
-void AliL3Merger::FillNtuple(void *nt,Float_t *data)
-{
+void AliL3Merger::FillNtuple(void *nt,Float_t *data) const
+{ 
+  //fill ntuple
 #ifdef use_root
   TNtuple *ntuple = (TNtuple *) nt;
   ntuple->Fill(data);
@@ -323,7 +333,8 @@ void AliL3Merger::FillNtuple(void *nt,Float_t *data)
 }
 
 Double_t AliL3Merger::GetAngle(Double_t a1,Double_t a2)
-{
+{ 
+  //get angle
   Double_t da = a1 - a2 + 4*AliL3Transform::Pi();
   da = fmod(da,AliL3Transform::TwoPi());
   if(da>AliL3Transform::Pi()) da = AliL3Transform::TwoPi()-da;
@@ -331,7 +342,8 @@ Double_t AliL3Merger::GetAngle(Double_t a1,Double_t a2)
 }
 
 void AliL3Merger::SetParameter(Double_t maxy, Double_t maxz, Double_t maxkappa, Double_t maxpsi, Double_t maxtgl)
-{
+{ 
+  //set parameters for merger
   fMaxY = maxy;
   fMaxZ = maxz;
   fMaxKappa = maxkappa;
@@ -341,7 +353,7 @@ void AliL3Merger::SetParameter(Double_t maxy, Double_t maxz, Double_t maxkappa,
 
 Bool_t AliL3Merger::IsTrack(AliL3Track *innertrack,AliL3Track *outertrack)
 {
-  
+  //is track to be merged
   if(innertrack->GetCharge()!=outertrack->GetCharge()) return kFALSE;
   if( (!innertrack->IsPoint()) || (!outertrack->IsPoint()) )  return kFALSE; 
   if(innertrack->GetNHits()+outertrack->GetNHits()>AliL3Transform::GetNRows()) return kFALSE;
@@ -356,12 +368,14 @@ Bool_t AliL3Merger::IsTrack(AliL3Track *innertrack,AliL3Track *outertrack)
 }
 
 Bool_t AliL3Merger::IsRTrack(AliL3Track *innertrack,AliL3Track *outertrack)
-{
+{ 
+  //same as IsTrack
   return IsTrack(innertrack,outertrack);
 }
 
 Double_t AliL3Merger::TrackDiff(AliL3Track *innertrack,AliL3Track *outertrack)
-{
+{ 
+  //return track difference
   Double_t diff =-1;
   Double_t x[4],y[4],z[4],dy[4],dz[4];
   AliL3Track *tracks[2]; 
@@ -415,7 +429,8 @@ Double_t AliL3Merger::TrackDiff(AliL3Track *innertrack,AliL3Track *outertrack)
 }
 
 void AliL3Merger::PrintDiff(AliL3Track *innertrack,AliL3Track *outertrack)
-{
+{ 
+  // print difference
   if(!innertrack->IsPoint()||!outertrack->IsPoint())
     {
       LOG(AliL3Log::kInformational,"AliL3Merger::PrintDiff","No Points")<<ENDLOG;
@@ -475,7 +490,8 @@ void AliL3Merger::Print()
 }
 
 void AliL3Merger::PrintTrack(AliL3Track *track)
-{
+{ 
+  //print track info
   fprintf(stderr,"npt: %3d pt: %.2f psi: %.2f tgl: %5.2f q: %2d\n",
          track->GetNHits(),track->GetPt(),track->GetPsi(),
          track->GetTgl(),track->GetCharge());
index 6870573af10d31ba7c3ca5c9e5fe45296b8a0930..91ff0484a7f97e7bd0780efad9239c8e912e4eb4 100644 (file)
@@ -12,25 +12,26 @@ class AliL3TrackArray;
 
 class AliL3Merger {
  private:
-  Double_t fMaxY;
-  Double_t fMaxZ;
-  Double_t fMaxKappa;
-  Double_t fMaxPsi;
-  Double_t fMaxTgl;
-  void SetArray(Int_t nin);
-  void DeleteArray();
-  Char_t fTrackType;
+  Double_t fMaxY;    //maxy
+  Double_t fMaxZ;    //maxz
+  Double_t fMaxKappa;//maxkappa
+  Double_t fMaxPsi;  //maxpsi
+  Double_t fMaxTgl;  //maxtgl
+  Char_t fTrackType; //track type to merge
   
   AliL3TrackArray **fInTrack;//!
-  Int_t fNIn;
+  Int_t fNIn; //ntracks
 
   AliL3TrackArray *fOutTrack;//!
 
+  void SetArray(Int_t nin);
+  void DeleteArray();
+
  protected:
-  Int_t fCurrentTracks;
-  Int_t fSlice;
-  AliL3Vertex *fVertex;//!
-  Bool_t f2Global;
+  Int_t fCurrentTracks; //current number
+  Int_t fSlice;         //slice
+  AliL3Vertex *fVertex; //!
+  Bool_t f2Global; //global
   Bool_t Is2Global(Bool_t is){f2Global=is;return f2Global;}
   void InitMerger(Int_t ntrackarrays,Char_t *tracktype="AliL3Track");
   
@@ -38,24 +39,24 @@ class AliL3Merger {
   AliL3Merger();
   virtual ~AliL3Merger();
 
-  Int_t GetNIn(){return fNIn;}
+  Int_t GetNIn() const {return fNIn;}
   AliL3TrackArray *GetInTracks(Int_t in){return fInTrack[in];}
   AliL3TrackArray *GetOutTracks(){return fOutTrack;}
 
-  Bool_t Is2Global(){return f2Global;}
+  Bool_t Is2Global() const {return f2Global;}
   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);
   void FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr); //Fill tracks in fTrackArray[fCurrentTracks] 
   Double_t GetAngle(Double_t a1,Double_t a2);
-  void* GetNtuple();
-  void* GetNtuple(char *varlist);
-  Bool_t WriteNtuple(char *filename,void* nt);
-  void FillNtuple(void* nt,Float_t *data);
+  void* GetNtuple() const;
+  void* GetNtuple(char *varlist) const;
+  Bool_t WriteNtuple(char *filename,void* nt) const;
+  void FillNtuple(void* nt,Float_t *data) const ;
   void FillNtuple(void* nt,AliL3Track *innertrack,AliL3Track *outertrack);
   void AddAllTracks();//Copy all Tracks to Output Array
   void SortGlobalTracks(AliL3Track **tracks, Int_t ntrack);
-  virtual void SortTracks(AliL3Track **tracks, Int_t ntrack);
+  virtual void SortTracks(AliL3Track **tracks, Int_t ntrack) const;
   virtual void AddTrack(AliL3TrackArray *mergedtrack,AliL3Track *track);
   virtual AliL3Track * MultiMerge(AliL3TrackArray *mergedtrack,AliL3Track **tracks, Int_t ntrack);
   AliL3Track * MergeTracks(AliL3TrackArray *mergedtrack,AliL3Track *t0,AliL3Track *t1);
@@ -65,9 +66,6 @@ class AliL3Merger {
   void Print();
   void PrintDiff(AliL3Track *innertrack,AliL3Track *outertrack);
   void PrintTrack(AliL3Track *track);
-//  Int_t WriteTracks(Char_t *file);
-//  Int_t WriteInTracks(Char_t *file);
-//  Int_t WriteAllTracks(Char_t *file);
   
   ClassDef(AliL3Merger,1) //Merging base class
 };
index 76ca82be2479e007090fe070ec2dc36b7c0a406c..093e96f05dcdf38d7e2cfa45ed795573d501a4bf 100644 (file)
@@ -29,6 +29,7 @@ ClassImp(AliL3RawDataFileHandler)
 
 AliL3RawDataFileHandler::AliL3RawDataFileHandler()
 {
+  //constructor
   fConvert=kTRUE;
   fInRaw = 0;
   fInRawPed = 0;
@@ -50,11 +51,13 @@ AliL3RawDataFileHandler::AliL3RawDataFileHandler()
 
 AliL3RawDataFileHandler::~AliL3RawDataFileHandler()
 {
+  //destructor
   FreeAll();
 }
 
 void AliL3RawDataFileHandler::FreeAll()
 {
+  //free all heap
   if(fInRaw) CloseRawInput();
   if(fInRawPed) CloseRawPedestalsInput();
   if(fMapping) CloseMappingFile();
@@ -88,6 +91,7 @@ void AliL3RawDataFileHandler::FreeAll()
 
 Bool_t AliL3RawDataFileHandler::SetRawInput(Char_t *name)
 {
+  //set raw input
   if(fInRaw){
     LOG(AliL3Log::kError,"AliL3RawDataFileHandler::SetRawInput","File Open")
       <<"File ptr is already in use, close file first"<<ENDLOG;
@@ -117,6 +121,7 @@ Bool_t AliL3RawDataFileHandler::SetRawInput(Char_t *name)
 
 Bool_t AliL3RawDataFileHandler::SetRawInput(ifstream *file)
 {
+  //set raw input
   if(fInRaw){
     LOG(AliL3Log::kError,"AliL3RawDataFileHandler::SetRawInput","File Open")
       <<"File ptr is already in use, close file first"<<ENDLOG;
@@ -140,6 +145,7 @@ Bool_t AliL3RawDataFileHandler::SetRawInput(ifstream *file)
 
 void AliL3RawDataFileHandler::CloseRawInput()
 {
+  //close raw input
   if(!fInRaw){
     LOG(AliL3Log::kWarning,"AliL3RawDataFileHandler::CloseRawInput","File Close")
       <<"Nothing to Close"<<ENDLOG;
@@ -156,6 +162,7 @@ void AliL3RawDataFileHandler::CloseRawInput()
 
 Bool_t AliL3RawDataFileHandler::SetRawOutput(Char_t *name)
 {
+  //set raw output
   if(fOutRaw){
     LOG(AliL3Log::kError,"AliL3RawDataFileHandler::SetRawOutput","File Open")
       <<"File ptr is already in use, close file first"<<ENDLOG;
@@ -184,6 +191,7 @@ Bool_t AliL3RawDataFileHandler::SetRawOutput(Char_t *name)
 
 Bool_t AliL3RawDataFileHandler::SetRawOutput(ofstream *file)
 {
+  //set raw output
   if(fOutRaw){
     LOG(AliL3Log::kError,"AliL3RawDataFileHandler::SetRawOutput","File Open")
       <<"File ptr is already in use, close file first"<<ENDLOG;
@@ -208,6 +216,7 @@ Bool_t AliL3RawDataFileHandler::SetRawOutput(ofstream *file)
 
 void AliL3RawDataFileHandler::CloseRawOutput()
 {
+  //close raw output
   if(!fOutRaw){
     LOG(AliL3Log::kWarning,"AliL3RawDataFileHandler::CloseRawOutput","File Close")
       <<"Nothing to Close"<<ENDLOG;
@@ -225,6 +234,7 @@ void AliL3RawDataFileHandler::CloseRawOutput()
 
 Bool_t AliL3RawDataFileHandler::SetRawPedestalsInput(Char_t *name)
 {
+  //set raw pedestals
   if(fInRawPed){
     LOG(AliL3Log::kError,"AliL3RawDataFileHandler::SetRawPedestalsInput","File Open")
       <<"File ptr is already in use, close file first"<<ENDLOG;
@@ -254,6 +264,7 @@ Bool_t AliL3RawDataFileHandler::SetRawPedestalsInput(Char_t *name)
 
 Bool_t AliL3RawDataFileHandler::SetRawPedestalsInput(ifstream *file)
 {
+  //set raw pedestals input
   if(fInRawPed){
     LOG(AliL3Log::kError,"AliL3RawDataFileHandler::SetRawPedestalsInput","File Open")
       <<"File ptr is already in use, close file first"<<ENDLOG;
@@ -277,6 +288,7 @@ Bool_t AliL3RawDataFileHandler::SetRawPedestalsInput(ifstream *file)
 
 void AliL3RawDataFileHandler::CloseRawPedestalsInput()
 {
+  //close raw pedestals input
   if(!fInRawPed){
     LOG(AliL3Log::kWarning,"AliL3RawDataFileHandler::CloseRawPedestalsInput","File Close")
       <<"Nothing to Close"<<ENDLOG;
@@ -293,6 +305,7 @@ void AliL3RawDataFileHandler::CloseRawPedestalsInput()
 
 Bool_t AliL3RawDataFileHandler::SetMappingFile(Char_t *name)
 {
+  //set mapping file
   if(fMapping){
     LOG(AliL3Log::kError,"AliL3RawDataFileHandler::SetMapping","File Open")
       <<"File ptr is already in use, close file first"<<ENDLOG;
@@ -311,6 +324,7 @@ Bool_t AliL3RawDataFileHandler::SetMappingFile(Char_t *name)
 
 Bool_t AliL3RawDataFileHandler::SetMappingFile(FILE *file)
 {
+  //set mapping file
   if(fMapping){
     LOG(AliL3Log::kError,"AliL3RawDataFileHandler::SetMapping","File Open")
       <<"File ptr is already in use, close file first"<<ENDLOG;
@@ -329,6 +343,7 @@ Bool_t AliL3RawDataFileHandler::SetMappingFile(FILE *file)
 
 void AliL3RawDataFileHandler::CloseMappingFile()
 {
+  //close mapping file
   if(!fMapping){
     LOG(AliL3Log::kWarning,"AliL3RawDataFileHandler::CloseMappingFile","File Close")
       <<"Nothing to Close"<<ENDLOG;
@@ -340,6 +355,7 @@ void AliL3RawDataFileHandler::CloseMappingFile()
 
 Int_t AliL3RawDataFileHandler::ReadMappingFile()
 {
+  //read mapping file
   if(!fMapping){
     LOG(AliL3Log::kError,"AliL3RawDataFileHandler::ReadMappingFile","File Open")
       <<"Pointer to file = 0x0"<<ENDLOG;
@@ -387,8 +403,9 @@ Int_t AliL3RawDataFileHandler::ReadMappingFile()
   return fNChannels;
 }
 
-inline Int_t AliL3RawDataFileHandler::Convert4(Int_t i)
-{ //BigEndian i0i1i2i3 -> LittleEndian i3i2i1i0
+inline Int_t AliL3RawDataFileHandler::Convert4(Int_t i) const
+{ 
+  //BigEndian i0i1i2i3 -> LittleEndian i3i2i1i0
   if(!fConvert) return i;
   Char_t *p=(Char_t*)&i;
   Char_t temp[4];
@@ -399,8 +416,9 @@ inline Int_t AliL3RawDataFileHandler::Convert4(Int_t i)
   return (*(Int_t*)temp);
 }
 
-inline Short_t AliL3RawDataFileHandler::Convert2(Short_t s)
-{ //BigEndian i0i1 -> LittleEndian i1i0
+inline Short_t AliL3RawDataFileHandler::Convert2(Short_t s) const
+{ 
+  //BigEndian i0i1 -> LittleEndian i1i0
   if(!fConvert) return s;
   Char_t *p=(Char_t*)&s;
   Char_t temp[2];
@@ -567,6 +585,7 @@ Int_t AliL3RawDataFileHandler::ReadRawInputPointer(const Char_t *ptr)
 
 Short_t** AliL3RawDataFileHandler::GetRawData(Int_t &channels, Int_t &timebins)
 {
+  //get raw data
   Short_t **charges=0;
   channels=0;
   timebins=0;
@@ -602,7 +621,6 @@ Short_t** AliL3RawDataFileHandler::GetRawData(Int_t &channels, Int_t &timebins)
 Int_t AliL3RawDataFileHandler::StoreRawData(Short_t **charges)
 {
   //store charges in the raw data format
-
   if(!fOutRaw){
     LOG(AliL3Log::kError,"AliL3RawDataFileHandler::StoreRawData","File Open")
       <<"No Output avalible: no object ofstream"<<ENDLOG;
@@ -650,6 +668,7 @@ Int_t AliL3RawDataFileHandler::StoreRawData(Short_t **charges)
 
 Int_t AliL3RawDataFileHandler::ReadRawPedestalsInput()
 {
+  //read raw pedestals input
   if(!fInRawPed){
     LOG(AliL3Log::kError,"AliL3RawDataFileHandler::ReadRawPedestalsInput","File Open")
       <<"No Input avalible: no object ifstream"<<ENDLOG;
@@ -715,6 +734,7 @@ Int_t AliL3RawDataFileHandler::ReadRawPedestalsInput()
 
 AliL3DigitRowData * AliL3RawDataFileHandler::RawData2Memory(UInt_t &nrow,Int_t /*event*/)
 {
+  //convert raw data to memory
   AliL3DigitRowData *data = 0;
   nrow=0;
 
@@ -727,7 +747,6 @@ AliL3DigitRowData * AliL3RawDataFileHandler::RawData2Memory(UInt_t &nrow,Int_t /
       return 0;
     }
   }
-  
 
   //get data size
   Int_t nrows=0;
@@ -842,6 +861,7 @@ AliL3DigitRowData * AliL3RawDataFileHandler::RawData2Memory(UInt_t &nrow,Int_t /
 
 Bool_t AliL3RawDataFileHandler::RawData2CompBinary(Int_t event)
 {
+  //raw data to binary
   Bool_t out = kTRUE;
   UInt_t ndigits=0;
   AliL3DigitRowData *digits=0;
index b8e069eba2ebaf80244382cfe1b7c5c0dfb9930a..95e999e9d4d11c00b3fb70da4a22ada7f1e6f1c5 100644 (file)
@@ -5,7 +5,7 @@
 
 #include "AliL3MemHandler.h"
 
-class AliL3RawDataFileHandler:public AliL3MemHandler{
+class AliL3RawDataFileHandler:public AliL3MemHandler {
  private:
   
   FILE *fMapping;//!
@@ -14,7 +14,7 @@ class AliL3RawDataFileHandler:public AliL3MemHandler{
   ofstream *fOutRaw;//!
 
   //found in mapping file
-  UInt_t fNChannels; 
+  UInt_t fNChannels;   //number of channels 
   Byte_t *fRow;//!     //store the channeln to row mapping
   Byte_t *fPad;//!     //store the channel to pad mapping
   Short_t **fRowPad;//! //store the row-and-pad to channel mapping
@@ -27,13 +27,13 @@ class AliL3RawDataFileHandler:public AliL3MemHandler{
   Int_t fNTimeBins;  //stored in data header
 
   Short_t **fPedestals;//! pedestal values, if not used, fPedVal is used
-  Short_t fPedVal;
+  Short_t fPedVal; //ped val if not used per channel
 
   Short_t **fCharges;//! charge values read from pointer or from file
 
-  Bool_t fConvert;
-  Int_t Convert4(Int_t i);     //big2little and vice versa
-  Short_t Convert2(Short_t i); //big2little and vice versa
+  Bool_t fConvert; //convert big/little
+  Int_t Convert4(Int_t i) const;     //big2little and vice versa
+  Short_t Convert2(Short_t i) const; //big2little and vice versa
 
  public:
   AliL3RawDataFileHandler();
@@ -68,12 +68,12 @@ class AliL3RawDataFileHandler:public AliL3MemHandler{
   void SetBig2Little(Bool_t b){fConvert=b;}
   void SetPedVal(Short_t val){fPedVal=val;}
 
-  Int_t GetRowMinUsed(){return fRowMinUsed;} //smallest row number used in the test
-  Int_t GetRowMaxUsed(){return fRowMaxUsed;} //hightest row number used in the test
-  Int_t GetPadMinUsed(){return fPadMinUsed;} 
-  Int_t GetPadMaxUsed(){return fPadMaxUsed;} 
-  Short_t GetPedVal(){return fPedVal;}
-  Int_t GetNChannels(){return fNChannels;}
+  Int_t GetRowMinUsed() const {return fRowMinUsed;} //smallest row number used in the test
+  Int_t GetRowMaxUsed() const {return fRowMaxUsed;} //hightest row number used in the test
+  Int_t GetPadMinUsed() const {return fPadMinUsed;} 
+  Int_t GetPadMaxUsed() const {return fPadMaxUsed;} 
+  Short_t GetPedVal()   const {return fPedVal;}
+  Int_t GetNChannels()  const {return fNChannels;}
 
   AliL3DigitRowData* RawData2Memory(UInt_t &nrow,Int_t event=-1);
   Bool_t RawData2CompBinary(Int_t event=-1);
index ed42649b68c754e57cf4f2fa8f68bdefb9881ea7..0a6aad32c0c0f617d71584f2779f090819bc4bb4 100644 (file)
@@ -59,8 +59,9 @@ AliL3Track::AliL3Track()
   fPID = 0;
 }
 
-void AliL3Track::Set(AliL3Track *tpt){
-  
+void AliL3Track::Set(AliL3Track *tpt)
+{
+  //setter
   SetRowRange(tpt->GetFirstRow(),tpt->GetLastRow());
   SetPhi0(tpt->GetPhi0());
   SetKappa(tpt->GetKappa());
@@ -81,6 +82,7 @@ void AliL3Track::Set(AliL3Track *tpt){
 
 Int_t AliL3Track::Compare(const AliL3Track *track) const
 {
+  // compare tracks
   if(track->GetNHits() < GetNHits()) return 1;
   if(track->GetNHits() > GetNHits()) return -1;
   return 0;
@@ -98,7 +100,7 @@ Double_t AliL3Track::GetP() const
 }
 
 Double_t AliL3Track::GetPseudoRapidity() const
-{
+{ //get pseudo rap
   return 0.5 * log((GetP() + GetPz()) / (GetP() - GetPz()));
 }
 
@@ -110,7 +112,8 @@ Double_t AliL3Track::GetEta() const
 */
 
 Double_t AliL3Track::GetRapidity() const
-{
+{ 
+  //get rap
   const Double_t m_pi = 0.13957;
   return 0.5 * log((m_pi + GetPz()) / (m_pi - GetPz()));
 }
@@ -121,7 +124,6 @@ void AliL3Track::Rotate(Int_t slice,Bool_t tolocal)
   //If flag tolocal is set, the track is rotated
   //to local coordinates.
 
-  
   Float_t psi[1] = {GetPsi()};
   if(!tolocal)
     AliL3Transform::Local2GlobalAngle(psi,slice);
@@ -168,10 +170,9 @@ void AliL3Track::Rotate(Int_t slice,Bool_t tolocal)
     fIsLocal=kTRUE;
 }
 
-void AliL3Track::CalculateHelix(){
+void AliL3Track::CalculateHelix()
+{
   //Calculate Radius, CenterX and CenterY from Psi, X0, Y0
-  //
-  
   fRadius = fPt / (AliL3Transform::GetBFieldValue());
   if(fRadius) fKappa = -fQ*1./fRadius;
   else fRadius = 999999;  //just zero
@@ -262,7 +263,8 @@ Bool_t AliL3Track::GetCrossingPoint(Int_t padrow,Float_t *xyz)
 
 }
 
-Bool_t AliL3Track::CalculateReferencePoint(Double_t angle,Double_t radius){
+Bool_t AliL3Track::CalculateReferencePoint(Double_t angle,Double_t radius)
+{
   // Global coordinate: crossing point with y = ax+ b; 
   // a=tan(angle-AliL3Transform::PiHalf());
   //
@@ -313,7 +315,8 @@ Bool_t AliL3Track::CalculateReferencePoint(Double_t angle,Double_t radius){
   return IsPoint(kTRUE);
 }
 
-Bool_t AliL3Track::CalculateEdgePoint(Double_t angle){
+Bool_t AliL3Track::CalculateEdgePoint(Double_t angle)
+{
   // Global coordinate: crossing point with y = ax; a=tan(angle);
   //
   Double_t rmin=AliL3Transform::Row2X(AliL3Transform::GetFirstRow(-1));  //min Radius of TPC
@@ -376,7 +379,8 @@ Bool_t AliL3Track::CalculateEdgePoint(Double_t angle){
   return IsPoint(kTRUE);
 }
 
-Bool_t AliL3Track::CalculatePoint(Double_t xplane){
+Bool_t AliL3Track::CalculatePoint(Double_t xplane)
+{
   // Local coordinate: crossing point with x plane
   //
   Double_t racine = pow(fRadius,2)-pow(xplane-fCenterX,2);
@@ -506,4 +510,3 @@ void AliL3Track::GetClosestPoint(AliL3Vertex *vertex,Double_t &closest_x,Double_
   
   closest_z = GetFirstPointZ() - s_tot*GetTgl();
 }
-
index af237cbfcf91f53410174e481aaea7bacc2ef4b3..8ca4e91a2f23ff46c009b4f71741092f12cfc363 100644 (file)
@@ -14,8 +14,7 @@ class AliL3Track {
   
  private:
 
-  Int_t fNHits;
-
+  Int_t fNHits; //Number of hits
   Int_t fMCid;  //Assigned id from MC data.
 
   Double_t fKappa;   // Signed curvature (projected to a circle)
@@ -36,29 +35,28 @@ class AliL3Track {
   Double_t fPt;   //transverse momentum
   Double_t fLength; //length of track (s)
   
-  Double_t fPterr;
-  Double_t fPsierr;
-  Double_t fZ0err;
-  Double_t fTanlerr;
+  Double_t fPterr;   //errors for fast hough
+  Double_t fPsierr;  //errors for fast hough
+  Double_t fZ0err;   //errors for fast hough
+  Double_t fTanlerr; //errors for fast hough
 
   Double_t fPhi0; //azimuthal angle of the first point
   Double_t fR0;   //radius of the first point
   Double_t fZ0;   //z coordinate of the first point (fFirstPoint[2])
 
-  Double_t fFirstPoint[3];
-  Double_t fLastPoint[3];
-  Double_t fPoint[3];
+  Double_t fFirstPoint[3]; //first point
+  Double_t fLastPoint[3];  //last point
+  Double_t fPoint[3]; //point
   Double_t fPointPsi; //azimuthal angle of the momentum at Point
 
-
-  Bool_t fIsPoint;    //Helix crosses the X-plane
-  Bool_t IsPoint(Bool_t ispoint) {fIsPoint = ispoint;return fIsPoint;}
-  
+  Bool_t fIsPoint;  //Helix crosses the X-plane
   Bool_t fIsLocal; //Track given in local coordinates.
 
-  UInt_t fHitNumbers[159];  //Array of hit numbers for this track
+  Float_t fPID; //pid 
+  UInt_t fHitNumbers[159]; //Array of hit numbers for this track
+
+  Bool_t IsPoint(Bool_t ispoint) {fIsPoint = ispoint;return fIsPoint;}
 
-  Float_t fPID;
  public:
   
   AliL3Track();
@@ -77,25 +75,25 @@ class AliL3Track {
   Double_t GetDistance(Double_t /*x0*/,Double_t /*x1*/){return 0;}
   void UpdateToFirstPoint();
 
-  Float_t GetPID() {return fPID;}
+  Float_t GetPID() const {return fPID;}
   void    SetPID(Float_t pid) {fPID=pid;}
 
   void GetClosestPoint(AliL3Vertex *vertex,Double_t &closest_x,Double_t &closest_y,Double_t &closest_z);
   void Rotate(Int_t slice,Bool_t tolocal=kFALSE);
-  Bool_t IsLocal() {return fIsLocal;}
+  Bool_t IsLocal() const {return fIsLocal;}
   
   // getter
-  Double_t GetFirstPointX() {return fFirstPoint[0];}
-  Double_t GetFirstPointY() {return fFirstPoint[1];}
-  Double_t GetFirstPointZ() {return fFirstPoint[2];}
-  Double_t GetLastPointX() {return fLastPoint[0];}
-  Double_t GetLastPointY() {return fLastPoint[1];}
-  Double_t GetLastPointZ() {return fLastPoint[2];}
-
-  Double_t GetPointPsi() {return fPointPsi;}
-  Double_t GetPointX() {return fPoint[0];}
-  Double_t GetPointY() {return fPoint[1];}
-  Double_t GetPointZ() {return fPoint[2];}
+  Double_t GetFirstPointX() const {return fFirstPoint[0];}
+  Double_t GetFirstPointY() const {return fFirstPoint[1];}
+  Double_t GetFirstPointZ() const {return fFirstPoint[2];}
+  Double_t GetLastPointX() const {return fLastPoint[0];}
+  Double_t GetLastPointY() const {return fLastPoint[1];}
+  Double_t GetLastPointZ() const {return fLastPoint[2];}
+
+  Double_t GetPointPsi() const {return fPointPsi;}
+  Double_t GetPointX() const {return fPoint[0];}
+  Double_t GetPointY() const {return fPoint[1];}
+  Double_t GetPointZ() const {return fPoint[2];}
 
   Double_t GetPt() const {return fPt;}
   Double_t GetTgl() const {return fTanl;}
@@ -103,7 +101,7 @@ class AliL3Track {
   Double_t GetPhi0() const {return fPhi0;}
   Double_t GetR0() const {return fR0;}
   Double_t GetZ0() const {return fFirstPoint[2];}
-  //Double_t GetZ0() const {return fZ0;}
+  //const Double_t GetZ0() const {return fZ0;}
   
   Double_t GetKappa() const {return fKappa;}
   Double_t GetRadius() const {return fRadius;}
@@ -172,4 +170,3 @@ class AliL3Track {
 };
     
 #endif
-
index f6bc2fdbff1b5cd0655139987be3116cc0d57714..2265a0cd27ebae26ecfd8e442b135df6aff2af71 100644 (file)
@@ -26,7 +26,8 @@
 
 ClassImp(AliL3TrackArray)
 
-AliL3TrackArray::AliL3TrackArray(){
+AliL3TrackArray::AliL3TrackArray()
+{
   //Default constructor
   fSize = 0;
   fNTracks=0;
@@ -36,7 +37,8 @@ AliL3TrackArray::AliL3TrackArray(){
 }
 
 
-AliL3TrackArray::AliL3TrackArray(Int_t ntrack){
+AliL3TrackArray::AliL3TrackArray(Int_t ntrack)
+{
   //Constructor.
   fSize = 0;
   fNTracks=0;
@@ -45,7 +47,8 @@ AliL3TrackArray::AliL3TrackArray(Int_t ntrack){
   SetSize(ntrack);
 }
 
-AliL3TrackArray::AliL3TrackArray(char* tracktype,Int_t ntrack){
+AliL3TrackArray::AliL3TrackArray(char* tracktype,Int_t ntrack)
+{
   //Constructor.
   fSize = 0;
   fNTracks=0;
@@ -57,7 +60,8 @@ AliL3TrackArray::AliL3TrackArray(char* tracktype,Int_t ntrack){
   SetSize(ntrack);
 }
 
-AliL3TrackArray::AliL3TrackArray(char* tracktype){
+AliL3TrackArray::AliL3TrackArray(char* tracktype)
+{
   //Constructor.
   fSize = 0;
   fNTracks=0;
@@ -69,26 +73,33 @@ AliL3TrackArray::AliL3TrackArray(char* tracktype){
   SetSize();
 }
 
-AliL3TrackArray::~AliL3TrackArray(){
+AliL3TrackArray::~AliL3TrackArray()
+{
   //Destructor
   DeleteArray();
 }
 
 
-AliL3Track *AliL3TrackArray::NextTrack(){
+AliL3Track *AliL3TrackArray::NextTrack()
+{
+  //next track in array
   if(fNTracks<fSize) return fTrack[fNTracks++];
   SetSize(fSize+100);
    return fTrack[fNTracks++]; 
 }
 
-void AliL3TrackArray::DeleteArray(){
+void AliL3TrackArray::DeleteArray()
+{
+  //delete array
   for(Int_t i=0; i<fSize;i++)
     delete fTrack[i];
   delete[] fIsPresent;
   delete[] fTrack;
 }
 
-Bool_t AliL3TrackArray::SetSize(Int_t newsize){
+Bool_t AliL3TrackArray::SetSize(Int_t newsize)
+{
+  //set size
   if(newsize<=fSize) return kFALSE; //shrink comes later!! 
   if(!fSize){
     fSize = newsize;
@@ -172,14 +183,18 @@ Bool_t AliL3TrackArray::SetSize(Int_t newsize){
   return kTRUE;
 }
 
-void AliL3TrackArray::Reset(){
+void AliL3TrackArray::Reset()
+{
+  //reset
   fNTracks=0;
   fNAbsent=0;
   for(Int_t i=0; i<fSize;i++)
     fIsPresent[i] = kTRUE; 
 }
 
-void AliL3TrackArray::Remove(Int_t track){
+void AliL3TrackArray::Remove(Int_t track)
+{
+  //remove track
   if(fIsPresent[track]){
     fIsPresent[track]=kFALSE;
     fNAbsent++;
@@ -215,7 +230,8 @@ void AliL3TrackArray::FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr){
   }
 }
 
-void AliL3TrackArray::FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr,Int_t slice){
+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++){
@@ -253,7 +269,9 @@ void AliL3TrackArray::FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr,Int_t
   }
 }
 
-UInt_t AliL3TrackArray::GetOutSize(){
+UInt_t AliL3TrackArray::GetOutSize()
+{
+  //get size for IO
   UInt_t count = GetOutCount();   //use only present tracks
   UInt_t tHits = 0;
   for(Int_t i=0;i<fNTracks;i++){  //loop over all tracks
@@ -266,12 +284,15 @@ UInt_t AliL3TrackArray::GetOutSize(){
   return count*sizeof(AliL3TrackSegmentData)+sizeof(UInt_t)*tHits;
 }
 
-UInt_t AliL3TrackArray::WriteTracks(UInt_t & ntracks,AliL3TrackSegmentData* tr){
+UInt_t AliL3TrackArray::WriteTracks(UInt_t & ntracks,AliL3TrackSegmentData* tr)
+{
+  //write tracks
   ntracks = GetOutCount();
   return WriteTracks(tr);
 }
 
-UInt_t AliL3TrackArray::WriteTracks(AliL3TrackSegmentData* tr){
+UInt_t AliL3TrackArray::WriteTracks(AliL3TrackSegmentData* tr)
+{
   //if(GetTrackType()=='c') return WriteConfMapTracks(tr);
   AliL3TrackSegmentData *tP = tr;
   UInt_t *pP;
@@ -316,7 +337,8 @@ UInt_t AliL3TrackArray::WriteTracks(AliL3TrackSegmentData* tr){
   return size;
 }
 
-UInt_t AliL3TrackArray::WriteConfMapTracks(AliL3TrackSegmentData* tr){
+UInt_t AliL3TrackArray::WriteConfMapTracks(AliL3TrackSegmentData* tr)
+{
   // use first and last point objects
   AliL3TrackSegmentData *tP = tr;
   UInt_t *pP;
@@ -324,8 +346,8 @@ UInt_t AliL3TrackArray::WriteConfMapTracks(AliL3TrackSegmentData* tr){
   for(Int_t i=0; i<fNTracks; i++){  //loop over all tracks
     AliL3ConfMapTrack *track =(AliL3ConfMapTrack *) GetCheckedTrack(i); //use only present tracks
     if(!track) continue;                           //use only present tracks
-    AliL3ConfMapPoint *hit = (AliL3ConfMapPoint*)track->lastHit;
-    AliL3ConfMapPoint *lastHit = (AliL3ConfMapPoint*)track->firstHit;
+    AliL3ConfMapPoint *hit = (AliL3ConfMapPoint*)track->GetLastHit();
+    AliL3ConfMapPoint *lastHit = (AliL3ConfMapPoint*)track->GetFirstHit();
     tP->fX = hit->GetX();
     tP->fY = hit->GetY();
     tP->fZ = hit->GetZ();
@@ -365,6 +387,7 @@ UInt_t AliL3TrackArray::WriteConfMapTracks(AliL3TrackSegmentData* tr){
 
 void AliL3TrackArray::AddLast(AliL3Track *track)
 {
+  //add track to last position
   AliL3Track *tpt = NextTrack();
   tpt->Set(track);
   
@@ -372,6 +395,7 @@ void AliL3TrackArray::AddLast(AliL3Track *track)
 
 void AliL3TrackArray::AddTracks(AliL3TrackArray *newtrack,Bool_t remove_old,Int_t slice)
 {
+  //add tracks
   if(GetTrackType() != newtrack->GetTrackType() && GetTrackType()!='t')
     {
       LOG(AliL3Log::kError,"AliL3TrackArray::AddTracks","Track types")
@@ -400,8 +424,9 @@ void AliL3TrackArray::AddTracks(AliL3TrackArray *newtrack,Bool_t remove_old,Int_
   }
 }
 
-
-void AliL3TrackArray::Compress(){
+void AliL3TrackArray::Compress()
+{
+  //compress array
   if(GetNPresent()==GetNTracks()) return;
   AliL3Track **tmp =  new AliL3Track *[fNTracks];
   Int_t present=0;
@@ -424,14 +449,15 @@ void AliL3TrackArray::Compress(){
   fNAbsent = 0;
 }
 
-void AliL3TrackArray::QSort(){
-  // compress an sort
+void AliL3TrackArray::QSort()
+{
+  // compress and sort
   Compress();
   QSort(fTrack,0,fNTracks);
 }
 
-void AliL3TrackArray::QSort( AliL3Track **a, Int_t first, Int_t last){
-
+void AliL3TrackArray::QSort( AliL3Track **a, Int_t first, Int_t last)
+{
    // Sort array of AliL3Track pointers using a quicksort algorithm.
    // Uses TrackCompare() to compare objects.
    // Thanks to Root! 
@@ -472,7 +498,8 @@ void AliL3TrackArray::QSort( AliL3Track **a, Int_t first, Int_t last){
    }
 }
 
-Int_t AliL3TrackArray::TrackCompare(AliL3Track *a, AliL3Track *b){
+Int_t AliL3TrackArray::TrackCompare(AliL3Track *a, AliL3Track *b) const
+{
    // Compare the two tracks.
   
   return b->Compare(a);
index 0f556b321b5e43637d55ee00531ee9aafa287682..293d74e311ea09c53c44405f422747698e0eb1e8 100644 (file)
@@ -9,19 +9,20 @@ class AliL3ConfMapTrack;
 class AliL3Track;
 class AliL3TrackSegmentData;
 
-class AliL3TrackArray{
+class AliL3TrackArray {
+
  private:
-  void DeleteArray();
 
-  Char_t fTrackType;
-  Int_t fSize;
+  Char_t fTrackType; //track type
+  Int_t fSize; //size of arra
   Bool_t *fIsPresent;//!
-  Int_t fNAbsent;
+  Int_t fNAbsent; //ntracks absent
 
   AliL3Track **fTrack;//!
-  Int_t fNTracks;
+  Int_t fNTracks; //ntracks in
 
   UInt_t WriteConfMapTracks(AliL3TrackSegmentData* tr); 
+  void DeleteArray();
 
  public:
   AliL3TrackArray();
@@ -30,12 +31,11 @@ class AliL3TrackArray{
   AliL3TrackArray(char* tracktype);
   virtual ~AliL3TrackArray();
   Int_t GetTrackType(){return fTrackType;}
-  Int_t GetSize(){return fSize;}
+  Int_t GetSize() const {return fSize;}
   Bool_t SetSize(Int_t newsize=2000);
 
-  Int_t GetNPresent(){return (fNTracks- fNAbsent);}
-
-  Int_t GetNTracks(){return fNTracks;}
+  Int_t GetNPresent() const {return (fNTracks- fNAbsent);}
+  Int_t GetNTracks() const {return fNTracks;}
   AliL3Track *NextTrack();
   AliL3Track *GetCheckedTrack(Int_t t){if(fIsPresent[t]) return fTrack[t]; return 0;}
   AliL3Track *GetTrack(Int_t t){return fTrack[t];}
@@ -46,8 +46,7 @@ class AliL3TrackArray{
   void Reset();
   void QSort();
   void QSort( AliL3Track **a, Int_t first, Int_t last);
-  Int_t TrackCompare(AliL3Track *a, AliL3Track *b);
-
+  Int_t TrackCompare(AliL3Track *a, AliL3Track *b) const;
 
   void FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr,Int_t slice); //Fill tracks and transform
   void FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr); //Fill tracks
index 7fb92d3e32601c03d36009c5fd8060ae5f5cadb5..888096eca4f4c1d925e495801ed1c6b37762c942 100644 (file)
@@ -66,63 +66,63 @@ using namespace std;
 //            compile with USEPACKAGE=ALIROOT set (see level3code/Makefile.conf).
 //
 //            Currently, there are 4 versions of the Transformer:
-//             fVersion==fV_aliroot: ALIROOT-head compatible
-//             fVersion==fV_cosmics: Cosmics data run (2003) compatible
-//             fVersion==fV_default: means no config file has been loaded
-//             fVersion==fV_deprecated: dont use old (before July 2003) style of transformer
+//             fVersion==kValiroot: ALIROOT-head compatible
+//             fVersion==kVcosmics: Cosmics data run (2003) compatible
+//             fVersion==kVdefault: means no config file has been loaded
+//             fVersion==kVdeprecated: dont use old (before July 2003) style of transformer
 //
 </pre>
 */
 
 ClassImp(AliL3Transform)
 
-const Double_t AliL3Transform::fAnodeWireSpacing = 0.25; //Taken from the TDR
-const Double_t AliL3Transform::fBFACT = 0.0029980;       //Conversion Factor
-const Double_t AliL3Transform::fPi  =   3.141592653589793;
-const Double_t AliL3Transform::f2Pi = 2*3.141592653589793;
-const Double_t AliL3Transform::fPi2 = 0.5*3.141592653589793;
-const Double_t AliL3Transform::fToDeg = 180/3.141592653589793;
+const Double_t AliL3Transform::fgkAnodeWireSpacing = 0.25; //Taken from the TDR
+const Double_t AliL3Transform::fgkBFACT = 0.0029980;       //Conversion Factor
+const Double_t AliL3Transform::fgkPi  =   3.141592653589793;
+const Double_t AliL3Transform::fgk2Pi = 2*3.141592653589793;
+const Double_t AliL3Transform::fgkPi2 = 0.5*3.141592653589793;
+const Double_t AliL3Transform::fgkToDeg = 180/3.141592653589793;
 
 //Defined by HLT and GSI
-Int_t AliL3Transform::fNPatches = 6;
-Int_t AliL3Transform::fRows[6][2] = {{0,29},{30,62},{63,90},{91,116},{117,139},{140,158}}; 
-Int_t AliL3Transform::fNRows[6] = {30,33,28,26,23,19};
+Int_t AliL3Transform::fgNPatches = 6;
+Int_t AliL3Transform::fgRows[6][2] = {{0,29},{30,62},{63,90},{91,116},{117,139},{140,158}}; 
+Int_t AliL3Transform::fgNRows[6] = {30,33,28,26,23,19};
 
 // The following definition is generated by MakeInitFile function
-Double_t AliL3Transform::fBField = 0.2;
-Double_t AliL3Transform::fSolenoidBField = 2;
-Double_t AliL3Transform::fBFieldFactor = 1;
-Int_t AliL3Transform::fVersion = fV_default;
-Int_t AliL3Transform::fNTimeBins = 446;
-Int_t AliL3Transform::fNRowLow = 63;
-Int_t AliL3Transform::fNRowUp = 96;
-Int_t AliL3Transform::fNRowUp1 = 64;
-Int_t AliL3Transform::fNRowUp2 = 32;
-Int_t AliL3Transform::fNSectorLow = 36;
-Int_t AliL3Transform::fNSectorUp = 36;
-Int_t AliL3Transform::fNSector = 72;
-Double_t AliL3Transform::fPadPitchWidthLow = 0.4;
-Double_t AliL3Transform::fPadPitchWidthUp = 0.6;
-Double_t AliL3Transform::fZWidth = 0.5660;
-Double_t AliL3Transform::fZSigma = 0.2288;
-Double_t AliL3Transform::fZLength = 250.0000;
-Double_t AliL3Transform::fZOffset = 0.6864;
-Double_t AliL3Transform::fDiffT = 0.0220;
-Double_t AliL3Transform::fDiffL = 0.0220;
-Double_t AliL3Transform::fOmegaTau = 0.1450;
-Double_t AliL3Transform::fInnerPadLength = 0.75;
-Double_t AliL3Transform::fOuter1PadLength = 1.00;
-Double_t AliL3Transform::fOuter2PadLength = 1.50;
-Double_t AliL3Transform::fInnerPRFSigma = 0.203811;
-Double_t AliL3Transform::fOuter1PRFSigma = 0.299325;
-Double_t AliL3Transform::fOuter2PRFSigma = 0.299323;
-Double_t AliL3Transform::fTimeSigma = 0.228809;
-Int_t AliL3Transform::fADCSat = 1024;
-Int_t AliL3Transform::fZeroSup = 0;
-Int_t AliL3Transform::fNSlice = 36;
-Int_t AliL3Transform::fNRow = 159;
-Double_t AliL3Transform::fNRotShift = 0.5;
-Int_t AliL3Transform::fSlice2Sector[36][2] = { { 0, 36}, 
+Double_t AliL3Transform::fgBField = 0.2;
+Double_t AliL3Transform::fgSolenoidBField = 2;
+Double_t AliL3Transform::fgBFieldFactor = 1;
+Int_t AliL3Transform::fgVersion = kVdefault;
+Int_t AliL3Transform::fgNTimeBins = 446;
+Int_t AliL3Transform::fgNRowLow = 63;
+Int_t AliL3Transform::fgNRowUp = 96;
+Int_t AliL3Transform::fgNRowUp1 = 64;
+Int_t AliL3Transform::fgNRowUp2 = 32;
+Int_t AliL3Transform::fgNSectorLow = 36;
+Int_t AliL3Transform::fgNSectorUp = 36;
+Int_t AliL3Transform::fgNSector = 72;
+Double_t AliL3Transform::fgPadPitchWidthLow = 0.4;
+Double_t AliL3Transform::fgPadPitchWidthUp = 0.6;
+Double_t AliL3Transform::fgZWidth = 0.5660;
+Double_t AliL3Transform::fgZSigma = 0.2288;
+Double_t AliL3Transform::fgZLength = 250.0000;
+Double_t AliL3Transform::fgZOffset = 0.6864;
+Double_t AliL3Transform::fgDiffT = 0.0220;
+Double_t AliL3Transform::fgDiffL = 0.0220;
+Double_t AliL3Transform::fgOmegaTau = 0.1450;
+Double_t AliL3Transform::fgInnerPadLength = 0.75;
+Double_t AliL3Transform::fgOuter1PadLength = 1.00;
+Double_t AliL3Transform::fgOuter2PadLength = 1.50;
+Double_t AliL3Transform::fgInnerPRFSigma = 0.203811;
+Double_t AliL3Transform::fgOuter1PRFSigma = 0.299325;
+Double_t AliL3Transform::fgOuter2PRFSigma = 0.299323;
+Double_t AliL3Transform::fgTimeSigma = 0.228809;
+Int_t AliL3Transform::fgADCSat = 1024;
+Int_t AliL3Transform::fgZeroSup = 0;
+Int_t AliL3Transform::fgNSlice = 36;
+Int_t AliL3Transform::fgNRow = 159;
+Double_t AliL3Transform::fgNRotShift = 0.5;
+Int_t AliL3Transform::fgSlice2Sector[36][2] = { { 0, 36}, 
                                               { 1, 37}, 
                                               { 2, 38}, 
                                               { 3, 39}, 
@@ -160,7 +160,7 @@ Int_t AliL3Transform::fSlice2Sector[36][2] = { { 0, 36},
                                               {35, 71}
 };
 
-Int_t AliL3Transform::fSector2Slice[72] = { 0, 
+Int_t AliL3Transform::fgSector2Slice[72] = { 0, 
                                            1, 
                                            2, 
                                            3, 
@@ -234,7 +234,7 @@ Int_t AliL3Transform::fSector2Slice[72] = { 0,
                                            35 
 };
 
-Int_t AliL3Transform::fSectorLow[72] = { 1, 
+Int_t AliL3Transform::fgSectorLow[72] = { 1, 
                                         1, 
                                         1, 
                                         1, 
@@ -308,7 +308,7 @@ Int_t AliL3Transform::fSectorLow[72] = { 1,
                                         0 
 };
 
-Double_t AliL3Transform::fX[159] = { 85.195,
+Double_t AliL3Transform::fgX[159] = { 85.195,
                                     85.945,
                                     86.695,
                                     87.445,
@@ -469,7 +469,7 @@ Double_t AliL3Transform::fX[159] = { 85.195,
                                     245.930
 };
 
-Int_t AliL3Transform::fNPads[159] = {67,
+Int_t AliL3Transform::fgNPads[159] = {67,
                                      67,
                                      69,
                                      69,
@@ -630,7 +630,7 @@ Int_t AliL3Transform::fNPads[159] = {67,
                                      139
 };
 
-Double_t AliL3Transform::fCos[36] = { 0.9848077297,
+Double_t AliL3Transform::fgCos[36] = { 0.9848077297,
                                      0.8660253882,
                                      0.6427876353,
                                      0.3420201540,
@@ -668,7 +668,7 @@ Double_t AliL3Transform::fCos[36] = { 0.9848077297,
                                      0.9848077297
 };
 
-Double_t AliL3Transform::fSin[36] = { 0.1736481786,
+Double_t AliL3Transform::fgSin[36] = { 0.1736481786,
                                      0.5000000000,
                                      0.7660444379,
                                      0.9396926165,
@@ -708,16 +708,17 @@ Double_t AliL3Transform::fSin[36] = { 0.1736481786,
 
 #ifdef use_aliroot
 Bool_t AliL3Transform::Init(AliRunLoader *runLoader)
-{
+{ 
+  //init with runloader
   if(!runLoader) {
     LOG(AliL3Log::kFatal,"AliL3Transform::Init","RunLoader")
       <<" Missing RunLoader! 0x0"<<ENDLOG;
     return kFALSE;
   }
  
-  if(fVersion != fV_default)
+  if(fgVersion != kVdefault)
     LOG(AliL3Log::kWarning,"AliL3Transform::Init","Init values")
-      <<AliL3Log::kDec<<"You are initializing the parameters more than once; check your code please! "<<fVersion<<ENDLOG;
+      <<AliL3Log::kDec<<"You are initializing the parameters more than once; check your code please! "<<fgVersion<<ENDLOG;
 
   TDirectory* savedir1 = gDirectory;
   runLoader->CdGAFile();
@@ -757,24 +758,24 @@ Bool_t AliL3Transform::Init(AliRunLoader *runLoader)
   param->SetOuter2PRF(prfouter2);
   param->SetTimeRF(rf);
   
-  fNTimeBins = param->GetMaxTBin()+1;
-  fNRowLow = param->GetNRowLow();
-  fNRowUp  = param->GetNRowUp();
-  fNRowUp1 = param->GetNRowUp1();
-  fNRowUp2 = param->GetNRowUp2();
-  fNRow= fNRowLow + fNRowUp;
-  if(fNRow!=159){
+  fgNTimeBins = param->GetMaxTBin()+1;
+  fgNRowLow = param->GetNRowLow();
+  fgNRowUp  = param->GetNRowUp();
+  fgNRowUp1 = param->GetNRowUp1();
+  fgNRowUp2 = param->GetNRowUp2();
+  fgNRow= fgNRowLow + fgNRowUp;
+  if(fgNRow!=159){
     LOG(AliL3Log::kError,"AliL3Transform::Init","fNRow")
       <<"Number of rows have changed in ALIROOT"<<ENDLOG;
     return kFALSE;
   }
   
-  fNSectorLow = param->GetNInnerSector();
-  fNSectorUp = param->GetNOuterSector();
-  fNSector = fNSectorLow + fNSectorUp;
+  fgNSectorLow = param->GetNInnerSector();
+  fgNSectorUp = param->GetNOuterSector();
+  fgNSector = fgNSectorLow + fgNSectorUp;
 
   //test whether they were changes to the rotation shift
-  fNRotShift=0;
+  fgNRotShift=0;
   Float_t irotshift = param->GetInnerAngleShift(); //shift angle
   Float_t orotshift = param->GetOuterAngleShift(); //shift angle
   const Float_t kDegtoRad = 0.01745329251994;
@@ -785,56 +786,59 @@ Bool_t AliL3Transform::Init(AliRunLoader *runLoader)
       <<"Rotation shift angle has changed in ALIROOT"<<ENDLOG;
     return kFALSE;
   } else {
-    fNRotShift=0.5; //our version of the shift angle
+    fgNRotShift=0.5; //our version of the shift angle
   }
   
-  fVersion=fV_aliroot;
+  fgVersion=kValiroot;
   SetBFieldFactor((Double_t)runLoader->GetAliRun()->Field()->Factor());
   SetSolenoidBField((Double_t)runLoader->GetAliRun()->Field()->SolenoidField());
-  fPadPitchWidthLow=param->GetInnerPadPitchWidth();
-  fPadPitchWidthUp=param->GetOuterPadPitchWidth();
-  fZWidth=param->GetZWidth();
-  fZSigma=param->GetZSigma();
-  fZLength=param->GetZLength();
-  fZOffset=param->GetZOffset();
-  fDiffT=param->GetDiffT();
-  fDiffL=param->GetDiffL();
-  fOmegaTau=param->GetOmegaTau();
-  fInnerPadLength=param->GetInnerPadLength();
-  fOuter1PadLength=param->GetOuter1PadLength();
-  fOuter2PadLength=param->GetOuter2PadLength();
-  fInnerPRFSigma=param->GetInnerPRF()->GetSigmaX();
-  fOuter1PRFSigma=param->GetOuter1PRF()->GetSigmaX();
-  fOuter2PRFSigma=param->GetOuter2PRF()->GetSigmaX();
-  fTimeSigma=param->GetTimeRF()->GetSigma();
-  fADCSat=param->GetADCSat();
-  fZeroSup=param->GetZeroSup();
-  fNSlice=fNSectorLow;
+  fgPadPitchWidthLow=param->GetInnerPadPitchWidth();
+  fgPadPitchWidthUp=param->GetOuterPadPitchWidth();
+  fgZWidth=param->GetZWidth();
+  fgZSigma=param->GetZSigma();
+  fgZLength=param->GetZLength();
+  fgZOffset=param->GetZOffset();
+  fgDiffT=param->GetDiffT();
+  fgDiffL=param->GetDiffL();
+  fgOmegaTau=param->GetOmegaTau();
+  fgInnerPadLength=param->GetInnerPadLength();
+  fgOuter1PadLength=param->GetOuter1PadLength();
+  fgOuter2PadLength=param->GetOuter2PadLength();
+  fgInnerPRFSigma=param->GetInnerPRF()->GetSigmaX();
+  fgOuter1PRFSigma=param->GetOuter1PRF()->GetSigmaX();
+  fgOuter2PRFSigma=param->GetOuter2PRF()->GetSigmaX();
+  fgTimeSigma=param->GetTimeRF()->GetSigma();
+  fgADCSat=param->GetADCSat();
+  fgZeroSup=param->GetZeroSup();
+  fgNSlice=fgNSectorLow;
     
   //now do the arrays
-  for(Int_t i=0;i<fNRow;i++){
+  for(Int_t i=0;i<fgNRow;i++){
     Int_t sec,row;
-    if( i < fNRowLow){sec =0;row =i;}
-    else{sec = fNSectorLow;row =i-fNRowLow;}
-    fX[i]=param->GetPadRowRadii(sec,row);
+    if( i < fgNRowLow){sec =0;row =i;}
+    else{sec = fgNSectorLow;row =i-fgNRowLow;}
+    fgX[i]=param->GetPadRowRadii(sec,row);
   } 
-  for(Int_t i=0;i<fNRow;i++){
+  for(Int_t i=0;i<fgNRow;i++){
     Int_t sec,row;
-    if( i < fNRowLow){sec =0;row =i;}
-    else{sec = fNSectorLow;row =i-fNRowLow;}
-    fNPads[i]=param->GetNPads(sec,row);
+    if( i < fgNRowLow){sec =0;row =i;}
+    else{sec = fgNSectorLow;row =i-fgNRowLow;}
+    fgNPads[i]=param->GetNPads(sec,row);
   }
-  for(Int_t i=0;i<fNSector;i++){
-    if(i<fNSectorLow) fSectorLow[i]=1;
-    else fSectorLow[i]=0;
+  for(Int_t i=0;i<fgNSector;i++){
+    if(i<fgNSectorLow) fgSectorLow[i]=1;
+    else fgSectorLow[i]=0;
   }
 
+  return kTRUE;
+
+  /* not needed 
   TTimeStamp time;
   Char_t tmpfile[1024];
   sprintf(tmpfile,"./l3transform.config-%d",(Int_t)time.GetSec());
 
   return SaveInitFile(tmpfile);
-
+  */
 }
 #endif
 
@@ -845,9 +849,9 @@ Bool_t AliL3Transform::Init(Char_t* path,Bool_t UseAliTPCParam)
   //If flag UseAliTPCParam is set, the parameters will be read from the the rootfile
   //which then has to be called path/digitfile.root
   
-  if(fVersion != fV_default)
+  if(fgVersion != kVdefault)
     LOG(AliL3Log::kWarning,"AliL3Transform::Init","Init values")
-      <<AliL3Log::kDec<<"You are initializing the parameters more than once; check your code please! "<<fVersion<<ENDLOG;
+      <<AliL3Log::kDec<<"You are initializing the parameters more than once; check your code please! "<<fgVersion<<ENDLOG;
   
   if(UseAliTPCParam) //use rootfile to generate temporary init file
     return ReadInit(path);
@@ -872,7 +876,6 @@ Bool_t AliL3Transform::Init(Char_t* path,Bool_t UseAliTPCParam)
 Bool_t AliL3Transform::ReadInitFile(Char_t* pathname)
 {
   //read transformer settings from pathname
-
   FILE *fptr=fopen(pathname,"r");
   if(!fptr){
     LOG(AliL3Log::kWarning,"AliL3Transform::ReadInitFile","File Open")
@@ -886,107 +889,107 @@ Bool_t AliL3Transform::ReadInitFile(Char_t* pathname)
 
   while(!feof(fptr)) {
     fscanf(fptr,"%s",d1);
-    if(strcmp(d1,"fVersion")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fVersion=dummy;}
-    else if(strcmp(d1,"fBFieldFactor")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fBFieldFactor=(Double_t)ddummy;}
+    if(strcmp(d1,"fVersion")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgVersion=dummy;}
+    else if(strcmp(d1,"fBFieldFactor")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgBFieldFactor=(Double_t)ddummy;}
     else if(strcmp(d1,"fSolenoidBField")==0)
       {
        fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);
-       fSolenoidBField=(Double_t)ddummy;
+       fgSolenoidBField=(Double_t)ddummy;
       }
-    else if(strcmp(d1,"fNTimeBins")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fNTimeBins=(Int_t)dummy;}
+    else if(strcmp(d1,"fNTimeBins")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgNTimeBins=(Int_t)dummy;}
     else if(strcmp(d1,"fNRowLow")==0)
       {
        fscanf(fptr,"%s %d %s",d2,&dummy,d3);
-       fNRowLow=(Int_t)dummy;
-       if(fNRowLow != 63)
+       fgNRowLow=(Int_t)dummy;
+       if(fgNRowLow != 63)
          LOG(AliL3Log::kError,"AliL3Transform::ReadInitFile","Overflow")
            <<"Number of inner PadRows should be 63! Check and fgrep the code for 63 to see the consequences of this major change!"<<ENDLOG;
       }
-    else if(strcmp(d1,"fNRowUp")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fNRowUp=(Int_t)dummy;}
-    else if(strcmp(d1,"fNRowUp1")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fNRowUp1=(Int_t)dummy;}
-    else if(strcmp(d1,"fNRowUp2")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fNRowUp2=(Int_t)dummy;}
-    else if(strcmp(d1,"fNSectorLow")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fNSectorLow=(Int_t)dummy;}
-    else if(strcmp(d1,"fNSectorUp")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fNSectorUp=(Int_t)dummy;}
-    else if(strcmp(d1,"fNSector")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fNSector=(Int_t)dummy;}
-    else if(strcmp(d1,"fPadPitchWidthLow")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fPadPitchWidthLow=(Double_t)ddummy;}
-    else if(strcmp(d1,"fPadPitchWidthUp")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fPadPitchWidthUp=(Double_t)ddummy;}
-    else if(strcmp(d1,"fZWidth")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fZWidth=(Double_t)ddummy;}
-    else if(strcmp(d1,"fZSigma")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fZSigma=(Double_t)ddummy;}
-    else if(strcmp(d1,"fZLength")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fZLength=(Double_t)ddummy;}
-    else if(strcmp(d1,"fZOffset")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fZOffset=(Double_t)ddummy;}
-    else if(strcmp(d1,"fNSlice")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fNSlice=(Int_t)dummy;}
-    else if(strcmp(d1,"fDiffT")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fDiffT=(Double_t)ddummy;}
-    else if(strcmp(d1,"fDiffL")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fDiffL=(Double_t)ddummy;}
-    else if(strcmp(d1,"fOmegaTau")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fOmegaTau=(Double_t)ddummy;}
-    else if(strcmp(d1,"fInnerPadLength")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fInnerPadLength=(Double_t)ddummy;}
-    else if(strcmp(d1,"fOuter1PadLength")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fOuter1PadLength=(Double_t)ddummy;}
-    else if(strcmp(d1,"fOuter2PadLength")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fOuter2PadLength=(Double_t)ddummy;}
-    else if(strcmp(d1,"fInnerPRFSigma")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fInnerPRFSigma=(Double_t)ddummy;}
-    else if(strcmp(d1,"fOuter1PRFSigma")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fOuter1PRFSigma=(Double_t)ddummy;}
-    else if(strcmp(d1,"fOuter2PRFSigma")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fOuter2PRFSigma=(Double_t)ddummy;}
-    else if(strcmp(d1,"fTimeSigma")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fTimeSigma=(Double_t)ddummy;}
-    else if(strcmp(d1,"fADCSat")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fADCSat=(Int_t)dummy;}
-    else if(strcmp(d1,"fZeroSup")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fZeroSup=(Int_t)dummy;}
+    else if(strcmp(d1,"fNRowUp")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgNRowUp=(Int_t)dummy;}
+    else if(strcmp(d1,"fNRowUp1")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgNRowUp1=(Int_t)dummy;}
+    else if(strcmp(d1,"fNRowUp2")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgNRowUp2=(Int_t)dummy;}
+    else if(strcmp(d1,"fNSectorLow")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgNSectorLow=(Int_t)dummy;}
+    else if(strcmp(d1,"fNSectorUp")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgNSectorUp=(Int_t)dummy;}
+    else if(strcmp(d1,"fNSector")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgNSector=(Int_t)dummy;}
+    else if(strcmp(d1,"fPadPitchWidthLow")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgPadPitchWidthLow=(Double_t)ddummy;}
+    else if(strcmp(d1,"fPadPitchWidthUp")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgPadPitchWidthUp=(Double_t)ddummy;}
+    else if(strcmp(d1,"fZWidth")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgZWidth=(Double_t)ddummy;}
+    else if(strcmp(d1,"fZSigma")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgZSigma=(Double_t)ddummy;}
+    else if(strcmp(d1,"fZLength")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgZLength=(Double_t)ddummy;}
+    else if(strcmp(d1,"fZOffset")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgZOffset=(Double_t)ddummy;}
+    else if(strcmp(d1,"fNSlice")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgNSlice=(Int_t)dummy;}
+    else if(strcmp(d1,"fDiffT")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgDiffT=(Double_t)ddummy;}
+    else if(strcmp(d1,"fDiffL")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgDiffL=(Double_t)ddummy;}
+    else if(strcmp(d1,"fOmegaTau")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgOmegaTau=(Double_t)ddummy;}
+    else if(strcmp(d1,"fInnerPadLength")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgInnerPadLength=(Double_t)ddummy;}
+    else if(strcmp(d1,"fOuter1PadLength")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgOuter1PadLength=(Double_t)ddummy;}
+    else if(strcmp(d1,"fOuter2PadLength")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgOuter2PadLength=(Double_t)ddummy;}
+    else if(strcmp(d1,"fInnerPRFSigma")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgInnerPRFSigma=(Double_t)ddummy;}
+    else if(strcmp(d1,"fOuter1PRFSigma")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgOuter1PRFSigma=(Double_t)ddummy;}
+    else if(strcmp(d1,"fOuter2PRFSigma")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgOuter2PRFSigma=(Double_t)ddummy;}
+    else if(strcmp(d1,"fTimeSigma")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgTimeSigma=(Double_t)ddummy;}
+    else if(strcmp(d1,"fADCSat")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgADCSat=(Int_t)dummy;}
+    else if(strcmp(d1,"fZeroSup")==0){fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgZeroSup=(Int_t)dummy;}
     else if(strcmp(d1,"fNRow")==0){
-      fscanf(fptr,"%s %d %s",d2,&dummy,d3);fNRow=(Int_t)dummy;
-      if(fNRow!=159){
+      fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgNRow=(Int_t)dummy;
+      if(fgNRow!=159){
        LOG(AliL3Log::kError,"AliL3Transform::ReadInitFile","Overflow")<<"Number of PadRows should be 159! Check and fgrep the code for 159 to see the consequences of this major change!"<<ENDLOG;
       }
     }
-    else if(strcmp(d1,"fNRotShift")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fNRotShift=(Double_t)ddummy;}
+    else if(strcmp(d1,"fNRotShift")==0){fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgNRotShift=(Double_t)ddummy;}
     else if(strcmp(d1,"fX[0]")==0){
-      fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fX[0]=(Double_t)ddummy;
-      for(Int_t i=1;i<fNRow;i++){fscanf(fptr,"%s %s %lf %s",d1,d2,&ddummy,d3);fX[i]=(Double_t)ddummy;}
+      fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgX[0]=(Double_t)ddummy;
+      for(Int_t i=1;i<fgNRow;i++){fscanf(fptr,"%s %s %lf %s",d1,d2,&ddummy,d3);fgX[i]=(Double_t)ddummy;}
     }
     else if(strcmp(d1,"fNPads[0]")==0){
-      fscanf(fptr,"%s %d %s",d2,&dummy,d3);fNPads[0]=(Int_t)dummy;
-      for(Int_t i=1;i<fNRow;i++){fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fNPads[i]=(Int_t)dummy;}
+      fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgNPads[0]=(Int_t)dummy;
+      for(Int_t i=1;i<fgNRow;i++){fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fgNPads[i]=(Int_t)dummy;}
     }
     else if(strcmp(d1,"fNRows[0]")==0){
-      fscanf(fptr,"%s %d %s",d2,&dummy,d3);fNRows[0]=(Int_t)dummy;
-      for(Int_t i=1;i<fNPatches;i++){fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fNRows[i]=(Int_t)dummy;}
+      fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgNRows[0]=(Int_t)dummy;
+      for(Int_t i=1;i<fgNPatches;i++){fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fgNRows[i]=(Int_t)dummy;}
     }
     else if(strcmp(d1,"fRows[0][0]")==0){
-      fscanf(fptr,"%s %d %s",d2,&dummy,d3);fRows[0][0]=(Int_t)dummy;
-      fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fRows[0][1]=(Int_t)dummy;
-      for(Int_t i=1;i<fNPatches;i++){
-       fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fRows[i][0]=(Int_t)dummy;
-       fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fRows[i][1]=(Int_t)dummy;
+      fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgRows[0][0]=(Int_t)dummy;
+      fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fgRows[0][1]=(Int_t)dummy;
+      for(Int_t i=1;i<fgNPatches;i++){
+       fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fgRows[i][0]=(Int_t)dummy;
+       fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fgRows[i][1]=(Int_t)dummy;
       }
     }
     else if(strcmp(d1,"fSlice2Sector[0][0]")==0){
-      fscanf(fptr,"%s %d %s",d2,&dummy,d3);fSlice2Sector[0][0]=(Int_t)dummy;
-      fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fSlice2Sector[0][1]=(Int_t)dummy;
-      for(Int_t i=1;i<fNSlice;i++){
-       fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fSlice2Sector[i][0]=(Int_t)dummy;
-       fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fSlice2Sector[i][1]=(Int_t)dummy;
+      fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgSlice2Sector[0][0]=(Int_t)dummy;
+      fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fgSlice2Sector[0][1]=(Int_t)dummy;
+      for(Int_t i=1;i<fgNSlice;i++){
+       fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fgSlice2Sector[i][0]=(Int_t)dummy;
+       fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fgSlice2Sector[i][1]=(Int_t)dummy;
       }
     }
     else if(strcmp(d1,"fSector2Slice[0]")==0){
-      fscanf(fptr,"%s %d %s",d2,&dummy,d3);fSector2Slice[0]=(Int_t)dummy;
-      for(Int_t i=1;i<fNSector;i++){fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fSector2Slice[i]=(Int_t)dummy;}
+      fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgSector2Slice[0]=(Int_t)dummy;
+      for(Int_t i=1;i<fgNSector;i++){fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fgSector2Slice[i]=(Int_t)dummy;}
     }
     else if(strcmp(d1,"fSectorLow[0]")==0){
-      fscanf(fptr,"%s %d %s",d2,&dummy,d3);fSectorLow[0]=(Int_t)dummy;
-      for(Int_t i=1;i<fNSector;i++){fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fSectorLow[i]=(Int_t)dummy;}
+      fscanf(fptr,"%s %d %s",d2,&dummy,d3);fgSectorLow[0]=(Int_t)dummy;
+      for(Int_t i=1;i<fgNSector;i++){fscanf(fptr,"%s %s %d %s",d1,d2,&dummy,d3);fgSectorLow[i]=(Int_t)dummy;}
     }
     else if(strcmp(d1,"fCos[0]")==0){
-      fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fCos[0]=(Double_t)ddummy;
-      for(Int_t i=1;i<fNSlice;i++){fscanf(fptr,"%s %s %lf %s",d1,d2,&ddummy,d3);fCos[i]=(Double_t)ddummy;}
+      fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgCos[0]=(Double_t)ddummy;
+      for(Int_t i=1;i<fgNSlice;i++){fscanf(fptr,"%s %s %lf %s",d1,d2,&ddummy,d3);fgCos[i]=(Double_t)ddummy;}
     }
     else if(strcmp(d1,"fSin[0]")==0){
-      fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fSin[0]=(Double_t)ddummy;
-      for(Int_t i=1;i<fNSlice;i++){fscanf(fptr,"%s %s %lf %s",d1,d2,&ddummy,d3);fSin[i]=(Double_t)ddummy;}
+      fscanf(fptr,"%s %lf %s",d2,&ddummy,d3);fgSin[0]=(Double_t)ddummy;
+      for(Int_t i=1;i<fgNSlice;i++){fscanf(fptr,"%s %s %lf %s",d1,d2,&ddummy,d3);fgSin[i]=(Double_t)ddummy;}
     }
   }
   fclose(fptr);
 
   //The first multiplier gives the scale factor used to modify the field map 
   //defined by the second multiplier.
-  fBField=fBFieldFactor*fSolenoidBField*0.1;
+  fgBField=fgBFieldFactor*fgSolenoidBField*0.1;
 
   //Test if new config file has been used.
-  if(fVersion==fV_deprecated){
+  if(fgVersion==kVdeprecated){
     LOG(AliL3Log::kError,"AliL3Transform::ReadInitFile","Version")
       <<"Version is deprecated, you have to create a new config file."<<ENDLOG;
     return kFALSE;
@@ -1037,7 +1040,7 @@ Bool_t AliL3Transform::ReadInit(Char_t *path)
 Bool_t AliL3Transform::MakeInitFile(Char_t *rootfilename,Char_t *filename)
 {
   //Get the parameters from rootfile, and store it on the file "l3transform.config"
-  //which is being read by Init. fVersion will be fV_aliroot!
+  //which is being read by Init. fVersion will be kV_aliroot!
   
 #ifndef use_aliroot
   LOG(AliL3Log::kError,"AliL3Transform::MakeInitFile","Version")
@@ -1095,24 +1098,24 @@ Bool_t AliL3Transform::MakeInitFile(Char_t *rootfilename,Char_t *filename)
   param->SetOuter2PRF(prfouter2);
   param->SetTimeRF(rf);
   
-  fNTimeBins = param->GetMaxTBin()+1;
-  fNRowLow = param->GetNRowLow();
-  fNRowUp  = param->GetNRowUp();
-  fNRowUp1 = param->GetNRowUp1();
-  fNRowUp2 = param->GetNRowUp2();
-  fNRow= fNRowLow + fNRowUp;
-  if(fNRow!=159){
+  fgNTimeBins = param->GetMaxTBin()+1;
+  fgNRowLow = param->GetNRowLow();
+  fgNRowUp  = param->GetNRowUp();
+  fgNRowUp1 = param->GetNRowUp1();
+  fgNRowUp2 = param->GetNRowUp2();
+  fgNRow= fgNRowLow + fgNRowUp;
+  if(fgNRow!=159){
     LOG(AliL3Log::kError,"AliL3Transform::MakeInitFile","fNRow")
       <<"Number of rows have changed in ALIROOT"<<ENDLOG;
     return kFALSE;
   }
   
-  fNSectorLow = param->GetNInnerSector();
-  fNSectorUp = param->GetNOuterSector();
-  fNSector = fNSectorLow + fNSectorUp;
+  fgNSectorLow = param->GetNInnerSector();
+  fgNSectorUp = param->GetNOuterSector();
+  fgNSector = fgNSectorLow + fgNSectorUp;
 
   //test whether they were changes to the rotation shift
-  fNRotShift=0;
+  fgNRotShift=0;
   Float_t irotshift = param->GetInnerAngleShift(); //shift angle
   Float_t orotshift = param->GetOuterAngleShift(); //shift angle
   const Float_t kDegtoRad = 0.01745329251994;
@@ -1123,48 +1126,48 @@ Bool_t AliL3Transform::MakeInitFile(Char_t *rootfilename,Char_t *filename)
       <<"Rotation shift angle has changed in ALIROOT"<<ENDLOG;
     return kFALSE;
   } else {
-    fNRotShift=0.5; //our version of the shift angle
+    fgNRotShift=0.5; //our version of the shift angle
   }
   
-  fVersion=fV_aliroot;
+  fgVersion=kValiroot;
   SetBFieldFactor((Double_t)gAlice->Field()->Factor());
   SetSolenoidBField((Double_t)gAlice->Field()->SolenoidField());
-  fPadPitchWidthLow=param->GetInnerPadPitchWidth();
-  fPadPitchWidthUp=param->GetOuterPadPitchWidth();
-  fZWidth=param->GetZWidth();
-  fZSigma=param->GetZSigma();
-  fZLength=param->GetZLength();
-  fZOffset=param->GetZOffset();
-  fDiffT=param->GetDiffT();
-  fDiffL=param->GetDiffL();
-  fOmegaTau=param->GetOmegaTau();
-  fInnerPadLength=param->GetInnerPadLength();
-  fOuter1PadLength=param->GetOuter1PadLength();
-  fOuter2PadLength=param->GetOuter2PadLength();
-  fInnerPRFSigma=param->GetInnerPRF()->GetSigmaX();
-  fOuter1PRFSigma=param->GetOuter1PRF()->GetSigmaX();
-  fOuter2PRFSigma=param->GetOuter2PRF()->GetSigmaX();
-  fTimeSigma=param->GetTimeRF()->GetSigma();
-  fADCSat=param->GetADCSat();
-  fZeroSup=param->GetZeroSup();
-  fNSlice=fNSectorLow;
+  fgPadPitchWidthLow=param->GetInnerPadPitchWidth();
+  fgPadPitchWidthUp=param->GetOuterPadPitchWidth();
+  fgZWidth=param->GetZWidth();
+  fgZSigma=param->GetZSigma();
+  fgZLength=param->GetZLength();
+  fgZOffset=param->GetZOffset();
+  fgDiffT=param->GetDiffT();
+  fgDiffL=param->GetDiffL();
+  fgOmegaTau=param->GetOmegaTau();
+  fgInnerPadLength=param->GetInnerPadLength();
+  fgOuter1PadLength=param->GetOuter1PadLength();
+  fgOuter2PadLength=param->GetOuter2PadLength();
+  fgInnerPRFSigma=param->GetInnerPRF()->GetSigmaX();
+  fgOuter1PRFSigma=param->GetOuter1PRF()->GetSigmaX();
+  fgOuter2PRFSigma=param->GetOuter2PRF()->GetSigmaX();
+  fgTimeSigma=param->GetTimeRF()->GetSigma();
+  fgADCSat=param->GetADCSat();
+  fgZeroSup=param->GetZeroSup();
+  fgNSlice=fgNSectorLow;
     
   //now do the arrays
-  for(Int_t i=0;i<fNRow;i++){
+  for(Int_t i=0;i<fgNRow;i++){
     Int_t sec,row;
-    if( i < fNRowLow){sec =0;row =i;}
-    else{sec = fNSectorLow;row =i-fNRowLow;}
-    fX[i]=param->GetPadRowRadii(sec,row);
+    if( i < fgNRowLow){sec =0;row =i;}
+    else{sec = fgNSectorLow;row =i-fgNRowLow;}
+    fgX[i]=param->GetPadRowRadii(sec,row);
   } 
-  for(Int_t i=0;i<fNRow;i++){
+  for(Int_t i=0;i<fgNRow;i++){
     Int_t sec,row;
-    if( i < fNRowLow){sec =0;row =i;}
-    else{sec = fNSectorLow;row =i-fNRowLow;}
-    fNPads[i]=param->GetNPads(sec,row);
+    if( i < fgNRowLow){sec =0;row =i;}
+    else{sec = fgNSectorLow;row =i-fgNRowLow;}
+    fgNPads[i]=param->GetNPads(sec,row);
   }
-  for(Int_t i=0;i<fNSector;i++){
-    if(i<fNSectorLow) fSectorLow[i]=1;
-    else fSectorLow[i]=0;
+  for(Int_t i=0;i<fgNSector;i++){
+    if(i<fgNSectorLow) fgSectorLow[i]=1;
+    else fgSectorLow[i]=0;
   }
 
   delete gAlice;
@@ -1187,74 +1190,74 @@ Bool_t AliL3Transform::SaveInitFile(Char_t *filenamepath)
   }
 
   fprintf(f,"void AliL3Transform::Init(){\n");
-  fprintf(f,"  fVersion = %d;\n", fVersion); 
-  fprintf(f,"  fBFieldFactor = %.3f;\n",fBFieldFactor);
-  fprintf(f,"  fSolenoidBField = %.3f;\n",fSolenoidBField);
-  fprintf(f,"  fNTimeBins = %d;\n",fNTimeBins);
-  fprintf(f,"  fNRowLow = %d;\n",fNRowLow);
-  fprintf(f,"  fNRowUp = %d;\n",fNRowUp);
-  fprintf(f,"  fNRowUp1 = %d;\n",fNRowUp1);
-  fprintf(f,"  fNRowUp2 = %d;\n",fNRowUp2);
-  fprintf(f,"  fNSectorLow = %d;\n",fNSectorLow);
-  fprintf(f,"  fNSectorUp = %d;\n",fNSectorUp);
-  fprintf(f,"  fNSector = %d;\n",fNSector);
-  fprintf(f,"  fPadPitchWidthLow = %.3f;\n",fPadPitchWidthLow);
-  fprintf(f,"  fPadPitchWidthUp = %.3f;\n",fPadPitchWidthUp);
-  fprintf(f,"  fZWidth = %.4f;\n",fZWidth);
-  fprintf(f,"  fZSigma = %.4f;\n",fZSigma);
-  fprintf(f,"  fZLength = %.4f;\n",fZLength);
-  fprintf(f,"  fZOffset = %.4f;\n",fZOffset);
-  fprintf(f,"  fDiffT = %.4f;\n",fDiffT);
-  fprintf(f,"  fDiffL = %.4f;\n",fDiffL);
-  fprintf(f,"  fOmegaTau = %.4f;\n",fOmegaTau);
-  fprintf(f,"  fInnerPadLength = %.3f;\n",fInnerPadLength);
-  fprintf(f,"  fOuter1PadLength = %.3f;\n",fOuter1PadLength);
-  fprintf(f,"  fOuter2PadLength = %.3f;\n",fOuter2PadLength);
-  fprintf(f,"  fInnerPRFSigma = %.6f;\n",fInnerPRFSigma);
-  fprintf(f,"  fOuter1PRFSigma = %.6f;\n",fOuter1PRFSigma);
-  fprintf(f,"  fOuter2PRFSigma = %.6f;\n",fOuter2PRFSigma);
-  fprintf(f,"  fTimeSigma = %.6f;\n",fTimeSigma);
-  fprintf(f,"  fADCSat = %d;\n",fADCSat);
-  fprintf(f,"  fZeroSup = %d;\n",fZeroSup);
-  fprintf(f,"  fNSlice = %d;\n",fNSlice);
-  fprintf(f,"  fNRow = %d;\n",fNRow);
-  fprintf(f,"  fNRotShift = %.2f;\n",fNRotShift);
+  fprintf(f,"  fVersion = %d;\n", fgVersion); 
+  fprintf(f,"  fBFieldFactor = %.3f;\n",fgBFieldFactor);
+  fprintf(f,"  fSolenoidBField = %.3f;\n",fgSolenoidBField);
+  fprintf(f,"  fNTimeBins = %d;\n",fgNTimeBins);
+  fprintf(f,"  fNRowLow = %d;\n",fgNRowLow);
+  fprintf(f,"  fNRowUp = %d;\n",fgNRowUp);
+  fprintf(f,"  fNRowUp1 = %d;\n",fgNRowUp1);
+  fprintf(f,"  fNRowUp2 = %d;\n",fgNRowUp2);
+  fprintf(f,"  fNSectorLow = %d;\n",fgNSectorLow);
+  fprintf(f,"  fNSectorUp = %d;\n",fgNSectorUp);
+  fprintf(f,"  fNSector = %d;\n",fgNSector);
+  fprintf(f,"  fPadPitchWidthLow = %.3f;\n",fgPadPitchWidthLow);
+  fprintf(f,"  fPadPitchWidthUp = %.3f;\n",fgPadPitchWidthUp);
+  fprintf(f,"  fZWidth = %.4f;\n",fgZWidth);
+  fprintf(f,"  fZSigma = %.4f;\n",fgZSigma);
+  fprintf(f,"  fZLength = %.4f;\n",fgZLength);
+  fprintf(f,"  fZOffset = %.4f;\n",fgZOffset);
+  fprintf(f,"  fDiffT = %.4f;\n",fgDiffT);
+  fprintf(f,"  fDiffL = %.4f;\n",fgDiffL);
+  fprintf(f,"  fOmegaTau = %.4f;\n",fgOmegaTau);
+  fprintf(f,"  fInnerPadLength = %.3f;\n",fgInnerPadLength);
+  fprintf(f,"  fOuter1PadLength = %.3f;\n",fgOuter1PadLength);
+  fprintf(f,"  fOuter2PadLength = %.3f;\n",fgOuter2PadLength);
+  fprintf(f,"  fInnerPRFSigma = %.6f;\n",fgInnerPRFSigma);
+  fprintf(f,"  fOuter1PRFSigma = %.6f;\n",fgOuter1PRFSigma);
+  fprintf(f,"  fOuter2PRFSigma = %.6f;\n",fgOuter2PRFSigma);
+  fprintf(f,"  fTimeSigma = %.6f;\n",fgTimeSigma);
+  fprintf(f,"  fADCSat = %d;\n",fgADCSat);
+  fprintf(f,"  fZeroSup = %d;\n",fgZeroSup);
+  fprintf(f,"  fNSlice = %d;\n",fgNSlice);
+  fprintf(f,"  fNRow = %d;\n",fgNRow);
+  fprintf(f,"  fNRotShift = %.2f;\n",fgNRotShift);
   //now do the arrays
-  for(Int_t i=0;i<fNRow;i++){
-    fprintf(f,"  fX[%d] = %3.2f;\n",i,fX[i]);
+  for(Int_t i=0;i<fgNRow;i++){
+    fprintf(f,"  fX[%d] = %3.2f;\n",i,fgX[i]);
   } 
-  for(Int_t i=0;i<fNRow;i++){
-    fprintf(f,"  fNPads[%d] = %d;\n",i,fNPads[i]);
+  for(Int_t i=0;i<fgNRow;i++){
+    fprintf(f,"  fNPads[%d] = %d;\n",i,fgNPads[i]);
   }
 
   //Slice/Sector dont belong to aliroot, but we want to be flexible
-  for(Int_t i=0;i<fNSlice;i++){
-    fprintf(f,"  fSlice2Sector[%d][0] = %d;\n",i,fSlice2Sector[i][0]);
-    fprintf(f,"  fSlice2Sector[%d][1] = %d;\n",i,fSlice2Sector[i][1]);
+  for(Int_t i=0;i<fgNSlice;i++){
+    fprintf(f,"  fSlice2Sector[%d][0] = %d;\n",i,fgSlice2Sector[i][0]);
+    fprintf(f,"  fSlice2Sector[%d][1] = %d;\n",i,fgSlice2Sector[i][1]);
   }  
-  for(Int_t i=0;i<fNSector;i++){
-    fprintf(f,"  fSector2Slice[%d] = %d;\n",i,fSector2Slice[i]);
+  for(Int_t i=0;i<fgNSector;i++){
+    fprintf(f,"  fSector2Slice[%d] = %d;\n",i,fgSector2Slice[i]);
   }  
-  for(Int_t i=0;i<fNSector;i++){
-    fprintf(f,"  fSectorLow[%d] = %d;\n",i,fSectorLow[i]);
+  for(Int_t i=0;i<fgNSector;i++){
+    fprintf(f,"  fSectorLow[%d] = %d;\n",i,fgSectorLow[i]);
   }  
 
   //Patches also dont really belong to the aliroot settings (but nevermind)
-  for(Int_t i=0;i<fNPatches;i++){
-    fprintf(f,"  fNRows[%d] = %d;\n",i,fNRows[i]);
+  for(Int_t i=0;i<fgNPatches;i++){
+    fprintf(f,"  fNRows[%d] = %d;\n",i,fgNRows[i]);
   }  
-  for(Int_t i=0;i<fNPatches;i++){
-    fprintf(f,"  fRows[%d][0] = %d;\n",i,fRows[i][0]);
-    fprintf(f,"  fRows[%d][1] = %d;\n",i,fRows[i][1]);
+  for(Int_t i=0;i<fgNPatches;i++){
+    fprintf(f,"  fRows[%d][0] = %d;\n",i,fgRows[i][0]);
+    fprintf(f,"  fRows[%d][1] = %d;\n",i,fgRows[i][1]);
   }  
 
   //Rotation shift is an addon, too
-  for(Int_t i=0;i<fNSlice;i++){
-    Float_t cs = cos( (2*fPi/18) * (i+fNRotShift) );
+  for(Int_t i=0;i<fgNSlice;i++){
+    Float_t cs = cos( (2*fgkPi/18) * (i+fgNRotShift) );
     fprintf(f,"  fCos[%d] = %.10f;\n",i,cs);
   }
-  for(Int_t i=0;i<fNSlice;i++){
-    Float_t sn = sin( (2*fPi/18) * (i+fNRotShift) );
+  for(Int_t i=0;i<fgNSlice;i++){
+    Float_t sn = sin( (2*fgkPi/18) * (i+fgNRotShift) );
     fprintf(f,"  fSin[%d] = %.10f;\n",i,sn);
   }
 
@@ -1269,18 +1272,21 @@ Bool_t AliL3Transform::SaveInitFile(Char_t *filenamepath)
 
 Int_t AliL3Transform::GetNPads(Int_t row)
 {
-  if(row < 0 || row >= fNRow)
+  //get number of pads per row
+  if(row < 0 || row >= fgNRow)
     {
       LOG(AliL3Log::kError,"AliL3Transform::GetNPads","Row")
        <<AliL3Log::kDec<<"Wrong row "<<row<<ENDLOG;
       return 0;
     }
 
-  return fNPads[row];
+  return fgNPads[row];
 }
 
 Int_t AliL3Transform::GetFirstRow(Int_t patch)
 {
+  //get first row per patch
+
   if(patch==-1)
     return 0;
   else if(patch < -1 || patch >= 6)
@@ -1290,13 +1296,14 @@ Int_t AliL3Transform::GetFirstRow(Int_t patch)
       return 0;
     }
   else
-    return fRows[patch][0];
+    return fgRows[patch][0];
 }
 
 Int_t AliL3Transform::GetLastRow(Int_t patch)
 {
+  //get last row per patch
   if(patch==-1)
-    return fRows[5][1];
+    return fgRows[5][1];
   else if(patch < -1 || patch >= 6)
     {
       LOG(AliL3Log::kError,"AliL3Transform::GetLastRow","Patch")
@@ -1304,13 +1311,14 @@ Int_t AliL3Transform::GetLastRow(Int_t patch)
       return 0;
     }
   else
-    return fRows[patch][1];
+    return fgRows[patch][1];
 }
 
 Int_t AliL3Transform::GetNRows(Int_t patch)
 {
+  //get number of rows per patch
   if(patch==-1)
-    return fNRow;
+    return fgNRow;
   else if(patch < -1 || patch >= 6)
     {
       LOG(AliL3Log::kError,"AliL3Transform::GetNRows","Patch")
@@ -1318,13 +1326,12 @@ Int_t AliL3Transform::GetNRows(Int_t patch)
       return 0;
     }
   else
-    return fNRows[patch];
+    return fgNRows[patch];
 }
 
 Int_t AliL3Transform::GetPadRow(Float_t xvalue)
 {
   //Find the padrow number corresponding to cartesian _local_ x value
-
   if(xvalue < 0 || xvalue > 250)
     {
       LOG(AliL3Log::kError,"AliL3Transform::GetPadRow","X-value")
@@ -1334,16 +1341,16 @@ Int_t AliL3Transform::GetPadRow(Float_t xvalue)
     }
   
   Int_t x = (Int_t)rint(xvalue*10);
-  if(x < (Int_t)rint(fX[1]*10))
+  if(x < (Int_t)rint(fgX[1]*10))
     return 0;
-  else if(x > (Int_t)rint(fX[fNRow-2]*10))
-    return fNRow-1;
+  else if(x > (Int_t)rint(fgX[fgNRow-2]*10))
+    return fgNRow-1;
   else
     {
       Int_t padrow=1; //Of course, a more clever algorithm could help here
-      while(padrow < fNRow-2)
+      while(padrow < fgNRow-2)
        {
-         if(x > (Int_t)rint(fX[padrow-1]*10) && x < (Int_t)rint(fX[padrow+1]*10))
+         if(x > (Int_t)rint(fgX[padrow-1]*10) && x < (Int_t)rint(fgX[padrow+1]*10))
            break;
          padrow++;
        }
@@ -1353,16 +1360,17 @@ Int_t AliL3Transform::GetPadRow(Float_t xvalue)
 
 Int_t AliL3Transform::GetPatch(Int_t padrow)
 {
-  if(padrow < 0 || padrow >= fNRow)
+  //get patch for padrow
+  if(padrow < 0 || padrow >= fgNRow)
     {
       LOG(AliL3Log::kError,"AliL3Transform::GetPatch","Padrow")
        <<AliL3Log::kDec<<"Wrong padrow "<<padrow<<ENDLOG;
       return -2;
     }
   Int_t patch=0;
-  while(patch < fNPatches)
+  while(patch < fgNPatches)
     {
-      if(padrow >= fRows[patch][0] && padrow <= fRows[patch][1])
+      if(padrow >= fgRows[patch][0] && padrow <= fgRows[patch][1])
        break;
       patch++;
     }
@@ -1371,18 +1379,19 @@ Int_t AliL3Transform::GetPatch(Int_t padrow)
 
 Double_t AliL3Transform::GetPadLength(Int_t padrow)
 {
-  if(padrow >= fNRow){
+  //get pad length for padrow
+  if(padrow >= fgNRow){
       LOG(AliL3Log::kError,"AliL3Transform::GetPadLength","Padrow")
        <<AliL3Log::kDec<<"Wrong padrow "<<padrow<<ENDLOG;
       return 0;
     }
 
-  if(padrow < fNRowLow)
-    return fInnerPadLength;
-  if(padrow >= fNRowLow && padrow < fNRowLow + fNRowUp1 - 1)
-    return fOuter1PadLength;
-  if(padrow >= fNRowLow + fNRowUp1 - 1)
-    return fOuter2PadLength;
+  if(padrow < fgNRowLow)
+    return fgInnerPadLength;
+  if(padrow >= fgNRowLow && padrow < fgNRowLow + fgNRowUp1 - 1)
+    return fgOuter1PadLength;
+  if(padrow >= fgNRowLow + fgNRowUp1 - 1)
+    return fgOuter2PadLength;
 
   //should never happen
   LOG(AliL3Log::kError,"AliL3Transform::GetPadLength","Padrow")
@@ -1392,13 +1401,14 @@ Double_t AliL3Transform::GetPadLength(Int_t padrow)
 
 Double_t AliL3Transform::GetPadPitchWidth(Int_t patch)
 {
-  if(patch < 0 || patch > fNPatches)
+  //get pad patch width for patch
+  if(patch < 0 || patch > fgNPatches)
     {
       LOG(AliL3Log::kError,"AliL3Transform::GetPadPitchWidth","patct")
        <<AliL3Log::kDec<<"Wrong patch "<<patch<<ENDLOG;
       return -1;
     }
-  return patch < 2 ? fPadPitchWidthLow : fPadPitchWidthUp;  
+  return patch < 2 ? fgPadPitchWidthLow : fgPadPitchWidthUp;  
 }
 
 Double_t AliL3Transform::GetParSigmaY2(Int_t padrow,Float_t z,Float_t angle)
@@ -1411,14 +1421,14 @@ Double_t AliL3Transform::GetParSigmaY2(Int_t padrow,Float_t z,Float_t angle)
 
   Double_t drift;
   if(z > 0)
-    drift = fZLength - z;
+    drift = fgZLength - z;
   else
-    drift = fZLength + z;
+    drift = fgZLength + z;
   
   Double_t t1 = GetPRFSigma(padrow)*GetPRFSigma(padrow);
-  Double_t t2 = fDiffT*fDiffT*drift;
+  Double_t t2 = fgDiffT*fgDiffT*drift;
   Double_t t3 = GetPadLength(padrow)*GetPadLength(padrow)*tan(angle)*tan(angle)/12;
-  Double_t t4 = fAnodeWireSpacing*fAnodeWireSpacing*(tan(angle) - fOmegaTau)*(tan(angle) - fOmegaTau)/12;
+  Double_t t4 = fgkAnodeWireSpacing*fgkAnodeWireSpacing*(tan(angle) - fgOmegaTau)*(tan(angle) - fgOmegaTau)/12;
 
   return (t1 + t2 + t3 + t4);
 }
@@ -1437,8 +1447,8 @@ Double_t AliL3Transform::GetParSigmaZ2(Int_t padrow,Float_t z,Float_t tgl)
   else
     drift = AliL3Transform::GetZLength() + z;
   
-  Double_t t1 = fZSigma*fZSigma;
-  Double_t t2 = fDiffL*fDiffL*drift;
+  Double_t t1 = fgZSigma*fgZSigma;
+  Double_t t2 = fgDiffL*fgDiffL*drift;
   Double_t t3 = GetPadLength(padrow)*GetPadLength(padrow)*tgl*tgl/12;
   
   return (t1 + t2 + t3);
@@ -1446,17 +1456,19 @@ Double_t AliL3Transform::GetParSigmaZ2(Int_t padrow,Float_t z,Float_t tgl)
 
 Double_t AliL3Transform::GetPRFSigma(Int_t padrow)
 {
-  if(padrow >= fNRow){
+  //get sigma of pad response function for padrow
+
+  if(padrow >= fgNRow){
     LOG(AliL3Log::kError,"AliL3Transform::GetPRFSigma","Padrow")
       <<AliL3Log::kDec<<"Wrong padrow "<<padrow<<ENDLOG;
     return 0;
   }
-  if(padrow < fNRowLow)
-    return fInnerPRFSigma;
-  if(padrow >= fNRowLow && padrow < fNRowLow + fNRowUp1 - 1)
-    return fOuter1PRFSigma;
-  if(padrow >= fNRowLow + fNRowUp1 - 1)
-    return fOuter2PRFSigma;
+  if(padrow < fgNRowLow)
+    return fgInnerPRFSigma;
+  if(padrow >= fgNRowLow && padrow < fgNRowLow + fgNRowUp1 - 1)
+    return fgOuter1PRFSigma;
+  if(padrow >= fgNRowLow + fgNRowUp1 - 1)
+    return fgOuter2PRFSigma;
 
   //should never happen
   LOG(AliL3Log::kError,"AliL3Transform::GetPRFSigma","Padrow")
@@ -1466,6 +1478,7 @@ Double_t AliL3Transform::GetPRFSigma(Int_t padrow)
 
 Double_t AliL3Transform::GetEta(Float_t *xyz)
 {
+  //get eta
   Double_t r3 = sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]+xyz[2]*xyz[2]);
   Double_t eta = 0.5 * log((r3+xyz[2])/(r3-xyz[2]));
   return eta;
@@ -1473,6 +1486,7 @@ Double_t AliL3Transform::GetEta(Float_t *xyz)
 
 void AliL3Transform::XYZtoRPhiEta(Float_t *rpe, Float_t *xyz)
 {
+  //transform xyz into rpe
   rpe[0] = sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]+xyz[2]*xyz[2]);
   rpe[1] = atan2(xyz[1],xyz[0]);
   rpe[2] = 0.5 * log((rpe[0]+xyz[2])/(rpe[0]-xyz[2]));
@@ -1480,6 +1494,7 @@ void AliL3Transform::XYZtoRPhiEta(Float_t *rpe, Float_t *xyz)
 
 Double_t AliL3Transform::GetEta(Int_t slice,Int_t padrow,Int_t pad,Int_t time)
 {
+  //get eta
   Float_t xyz[3];
   Int_t sector,row;
   Slice2Sector(slice,padrow,sector,row);
@@ -1490,30 +1505,32 @@ Double_t AliL3Transform::GetEta(Int_t slice,Int_t padrow,Int_t pad,Int_t time)
 
 Double_t AliL3Transform::GetPhi(Float_t *xyz)
 {
+  //get phi
   Double_t phi = atan2(xyz[1],xyz[0]);
   return phi;
 }
 
 Bool_t AliL3Transform::Slice2Sector(Int_t slice, Int_t slicerow, Int_t & sector, Int_t &row)
 {
-  if(slicerow<0&&slicerow>=fNRow){
+  //slice to sector number
+  if(slicerow<0&&slicerow>=fgNRow){
     LOG(AliL3Log::kError,"AliL3Transform::Slice2Sector","Slicerow")
       <<AliL3Log::kDec<<"Wrong slicerow "<<slicerow<<ENDLOG;
     return kFALSE;
   }
-  if(slice<0||slice>=fNSlice){
+  if(slice<0||slice>=fgNSlice){
     LOG(AliL3Log::kError,"AliL3Transform::Slice2Sector","Slice")
       <<AliL3Log::kDec<<"Wrong slice "<<slice<<ENDLOG;
     return kFALSE;
   }
 
-  if(slicerow<fNRowLow){
-    sector = fSlice2Sector[slice][0];
+  if(slicerow<fgNRowLow){
+    sector = fgSlice2Sector[slice][0];
     row    = slicerow;
   }
   else {
-    sector = fSlice2Sector[slice][1];
-    row    = slicerow-fNRowLow;
+    sector = fgSlice2Sector[slice][1];
+    row    = slicerow-fgNRowLow;
   }
 
   return kTRUE;
@@ -1521,20 +1538,22 @@ Bool_t AliL3Transform::Slice2Sector(Int_t slice, Int_t slicerow, Int_t & sector,
 
 Bool_t AliL3Transform::Sector2Slice(Int_t & slice, Int_t  sector)
 {
-  if(sector<0||sector>=fNSector){
+  //sector to slice
+  if(sector<0||sector>=fgNSector){
     LOG(AliL3Log::kError,"AliL3Transform::Sector2Slice","Sector")
       <<AliL3Log::kDec<<"Wrong sector "<<sector<<ENDLOG;
     return kFALSE;
   }
 
-  slice=fSector2Slice[sector];
+  slice=fgSector2Slice[sector];
 
   return kTRUE;
 }
 
 Bool_t AliL3Transform::Sector2Slice(Int_t & slice, Int_t & slicerow, Int_t sector, Int_t row)
 {
-  if(sector<0 || sector>=fNSector){
+  //sector to slice
+  if(sector<0 || sector>=fgNSector){
     LOG(AliL3Log::kError,"AliL3Transform::Sector2Slice","Sector")
       <<AliL3Log::kDec<<"Wrong sector "<<sector<<ENDLOG;
     return kFALSE;
@@ -1545,23 +1564,23 @@ Bool_t AliL3Transform::Sector2Slice(Int_t & slice, Int_t & slicerow, Int_t secto
     return kFALSE;
   }
 
-  if(fSectorLow[sector]){
-    if(row>=fNRowLow){
+  if(fgSectorLow[sector]){
+    if(row>=fgNRowLow){
       LOG(AliL3Log::kError,"AliL3Transform::Sector2Slice","Row")
        <<AliL3Log::kDec<<"Wrong row "<<row<<ENDLOG;
       return kFALSE;
     }
-    slice = fSector2Slice[sector];
+    slice = fgSector2Slice[sector];
     slicerow = row;
   }
   else{
-    if(row>=fNRowUp){
+    if(row>=fgNRowUp){
       LOG(AliL3Log::kError,"AliL3Transform::Sector2Slice","Row")
        <<AliL3Log::kDec<<"Wrong row "<<row<<ENDLOG;
       return kFALSE;
     }
-    slice = fSector2Slice[sector];
-    slicerow = row + fNRowLow;
+    slice = fgSector2Slice[sector];
+    slicerow = row + fgNRowLow;
   }
 
   return kTRUE;
@@ -1569,30 +1588,34 @@ Bool_t AliL3Transform::Sector2Slice(Int_t & slice, Int_t & slicerow, Int_t secto
 
 Double_t AliL3Transform::GetMaxY(Int_t slicerow)
 {
- if(slicerow < fNRowLow)
-     return fPadPitchWidthLow*fNPads[slicerow]/2; 
+  //get maximum y value (for slice 0)
+ if(slicerow < fgNRowLow)
+     return fgPadPitchWidthLow*fgNPads[slicerow]/2; 
  
  else
-     return fPadPitchWidthUp*fNPads[slicerow]/2;
+     return fgPadPitchWidthUp*fgNPads[slicerow]/2;
 
 }
 
-Double_t AliL3Transform::Row2X(Int_t slicerow){
-  if(slicerow<0||slicerow>=fNRow){
+Double_t AliL3Transform::Row2X(Int_t slicerow)
+{
+  //slicerow to X value (slice 0)
+  if(slicerow<0||slicerow>=fgNRow){
     LOG(AliL3Log::kError,"AliL3Transform::Row2X","Slicerow")
       <<AliL3Log::kDec<<"Wrong slicerow "<<slicerow<<ENDLOG;
     return 0;
   }
-  return fX[slicerow];
+  return fgX[slicerow];
 }
 
 Double_t AliL3Transform::GetZFast(Int_t slice, Int_t time, Float_t vertex)
 {
-  Double_t z=fZWidth*time-fZOffset;
+  //get z value
+  Double_t z=fgZWidth*time-fgZOffset;
   if(slice < 18)
-    z=fZLength-z-vertex;
+    z=fgZLength-z-vertex;
   else
-    z=z-fZLength-vertex;
+    z=z-fgZLength-vertex;
   return z;
 }
 
@@ -1602,18 +1625,22 @@ void AliL3Transform::Local2Global(Float_t *xyz,Int_t slice)
   Float_t x0 = xyz[0];
   Float_t y0 = xyz[1];
 
-  xyz[0]=x0*fCos[slice]-y0*fSin[slice];
-  xyz[1]=x0*fSin[slice]+y0*fCos[slice];
+  xyz[0]=x0*fgCos[slice]-y0*fgSin[slice];
+  xyz[1]=x0*fgSin[slice]+y0*fgCos[slice];
   xyz[2]=xyz[2];//global z=local z
 }
 
-void AliL3Transform::Local2GlobalAngle(Float_t *angle,Int_t slice){
-  angle[0] = fmod(angle[0]+(slice+fNRotShift)*(2*fPi/18),2*fPi);
+void AliL3Transform::Local2GlobalAngle(Float_t *angle,Int_t slice)
+{
+  //get angle global
+  angle[0] = fmod(angle[0]+(slice+fgNRotShift)*(2*fgkPi/18),2*fgkPi);
 }
 
-void AliL3Transform::Global2LocalAngle(Float_t *angle,Int_t slice){
-  angle[0] = angle[0]-(slice+fNRotShift)*(2*fPi/18);
-  if(angle[0]<0) angle[0]+=2*fPi;
+void AliL3Transform::Global2LocalAngle(Float_t *angle,Int_t slice)
+{
+  //get angle local
+  angle[0] = angle[0]-(slice+fgNRotShift)*(2*fgkPi/18);
+  if(angle[0]<0) angle[0]+=2*fgkPi;
 }
 
 void AliL3Transform::Raw2Local(Float_t *xyz,Int_t sector,Int_t row,Float_t pad,Float_t time)
@@ -1627,18 +1654,18 @@ void AliL3Transform::Raw2Local(Float_t *xyz,Int_t sector,Int_t row,Float_t pad,F
   xyz[0]=Row2X(slicerow); 
 
   //Y-Value
-  Int_t npads= fNPads[slicerow];
+  Int_t npads= fgNPads[slicerow];
 
-  if(fSectorLow[sector])
-    xyz[1]=(pad-0.5*(npads-1))*fPadPitchWidthLow;
+  if(fgSectorLow[sector])
+    xyz[1]=(pad-0.5*(npads-1))*fgPadPitchWidthLow;
   else
-    xyz[1]=(pad-0.5*(npads-1))*fPadPitchWidthUp;
+    xyz[1]=(pad-0.5*(npads-1))*fgPadPitchWidthUp;
 
   //Z-Value (remember PULSA Delay)
   if(slice < 18)
-    xyz[2]=fZLength-fZWidth*time+fZOffset;
+    xyz[2]=fgZLength-fgZWidth*time+fgZOffset;
   else
-    xyz[2]=fZWidth*time-fZOffset-fZLength;
+    xyz[2]=fgZWidth*time-fgZOffset-fgZLength;
 }
 
 void AliL3Transform::Raw2Local(Float_t *xyz,Int_t sector,Int_t row,Int_t pad,Int_t time)
@@ -1652,18 +1679,18 @@ void AliL3Transform::Raw2Local(Float_t *xyz,Int_t sector,Int_t row,Int_t pad,Int
   xyz[0]=Row2X(slicerow); 
 
   //Y-Value
-  Int_t npads= fNPads[slicerow];
+  Int_t npads= fgNPads[slicerow];
 
-  if(fSectorLow[sector])
-    xyz[1]=(pad-0.5*(npads-1))*fPadPitchWidthLow;
+  if(fgSectorLow[sector])
+    xyz[1]=(pad-0.5*(npads-1))*fgPadPitchWidthLow;
   else
-    xyz[1]=(pad-0.5*(npads-1))*fPadPitchWidthUp;
+    xyz[1]=(pad-0.5*(npads-1))*fgPadPitchWidthUp;
 
   //Z-Value (remember PULSA Delay)
   if(slice < 18)
-    xyz[2]=fZLength-fZWidth*time+fZOffset;
+    xyz[2]=fgZLength-fgZWidth*time+fgZOffset;
   else
-    xyz[2]=fZWidth*time-fZOffset-fZLength;
+    xyz[2]=fgZWidth*time-fgZOffset-fgZLength;
 }
 
 void AliL3Transform::RawHLT2Local(Float_t *xyz,Int_t slice,
@@ -1675,17 +1702,17 @@ void AliL3Transform::RawHLT2Local(Float_t *xyz,Int_t slice,
   xyz[0]=Row2X(slicerow); 
 
   //Y-Value
-  Int_t npads= fNPads[slicerow];
-  if(slicerow<fNRowLow)
-    xyz[1]=(pad-0.5*(npads-1))*fPadPitchWidthLow;
+  Int_t npads= fgNPads[slicerow];
+  if(slicerow<fgNRowLow)
+    xyz[1]=(pad-0.5*(npads-1))*fgPadPitchWidthLow;
   else
-    xyz[1]=(pad-0.5*(npads-1))*fPadPitchWidthUp;
+    xyz[1]=(pad-0.5*(npads-1))*fgPadPitchWidthUp;
 
   //Z-Value
   if(slice < 18)
-    xyz[2]=fZLength-fZWidth*time+fZOffset;
+    xyz[2]=fgZLength-fgZWidth*time+fgZOffset;
   else
-    xyz[2]=fZWidth*time-fZOffset-fZLength;
+    xyz[2]=fgZWidth*time-fgZOffset-fgZLength;
 }
 
 void AliL3Transform::RawHLT2Local(Float_t *xyz,Int_t slice,
@@ -1697,17 +1724,17 @@ void AliL3Transform::RawHLT2Local(Float_t *xyz,Int_t slice,
   xyz[0]=Row2X(slicerow); 
 
   //Y-Value
-  Int_t npads= fNPads[slicerow];
-  if(slicerow<fNRowLow)
-    xyz[1]=(pad-0.5*(npads-1))*fPadPitchWidthLow;
+  Int_t npads= fgNPads[slicerow];
+  if(slicerow<fgNRowLow)
+    xyz[1]=(pad-0.5*(npads-1))*fgPadPitchWidthLow;
   else
-    xyz[1]=(pad-0.5*(npads-1))*fPadPitchWidthUp;
+    xyz[1]=(pad-0.5*(npads-1))*fgPadPitchWidthUp;
 
   //Z-Value
   if(slice < 18)
-    xyz[2]=fZLength-fZWidth*time+fZOffset;
+    xyz[2]=fgZLength-fgZWidth*time+fgZOffset;
   else
-    xyz[2]=fZWidth*time-fZOffset-fZLength;
+    xyz[2]=fgZWidth*time-fgZOffset-fgZLength;
 }
 
 void AliL3Transform::Local2Global(Float_t *xyz,Int_t sector,Int_t row)
@@ -1717,8 +1744,8 @@ void AliL3Transform::Local2Global(Float_t *xyz,Int_t sector,Int_t row)
   Sector2Slice(slice, slicerow, sector, row);  
   Float_t r=Row2X(slicerow); //have to get x value first
                              
-  xyz[0]=r*fCos[slice]-xyz[1]*fSin[slice];
-  xyz[1]=r*fSin[slice]+xyz[1]*fCos[slice];
+  xyz[0]=r*fgCos[slice]-xyz[1]*fgSin[slice];
+  xyz[1]=r*fgSin[slice]+xyz[1]*fgCos[slice];
   xyz[2]=xyz[2];//global z=local z
 }
 
@@ -1727,29 +1754,26 @@ void AliL3Transform::LocHLT2Global(Float_t *xyz,Int_t slice,Int_t slicerow)
   //Transformation from HLT to global coordinate system
   Float_t r=Row2X(slicerow); //have to get x value first
                              
-  xyz[0]=r*fCos[slice]-xyz[1]*fSin[slice];
-  xyz[1]=r*fSin[slice]+xyz[1]*fCos[slice];
+  xyz[0]=r*fgCos[slice]-xyz[1]*fgSin[slice];
+  xyz[1]=r*fgSin[slice]+xyz[1]*fgCos[slice];
   xyz[2]=xyz[2];//global z=local z
 }
 
 void AliL3Transform::Global2Local(Float_t *xyz,Int_t sector)
 { //check code
   Int_t slice;
-  //if(!isSlice)
-    Sector2Slice(slice, sector);  
-    //else
-    //slice = sector;
+  Sector2Slice(slice, sector);  
 
-  Float_t x1 =  xyz[0]*fCos[slice] + xyz[1]*fSin[slice];
-  Float_t y1 = -xyz[0]*fSin[slice] + xyz[1]*fCos[slice];
+  Float_t x1 =  xyz[0]*fgCos[slice] + xyz[1]*fgSin[slice];
+  Float_t y1 = -xyz[0]*fgSin[slice] + xyz[1]*fgCos[slice];
   xyz[0] = x1;
   xyz[1] = y1;
 }
 
 void AliL3Transform::Global2LocHLT(Float_t *xyz,Int_t slice)
 {
-  Float_t x1 =  xyz[0]*fCos[slice] + xyz[1]*fSin[slice];
-  Float_t y1 = -xyz[0]*fSin[slice] + xyz[1]*fCos[slice];
+  Float_t x1 =  xyz[0]*fgCos[slice] + xyz[1]*fgSin[slice];
+  Float_t y1 = -xyz[0]*fgSin[slice] + xyz[1]*fgCos[slice];
   xyz[0] = x1;
   xyz[1] = y1;
 }
@@ -1797,15 +1821,15 @@ void AliL3Transform::Local2Raw(Float_t *xyz,Int_t sector,Int_t row)
    
   xyz[0]=slicerow;
 
-  if(fSectorLow[sector])
-    xyz[1]=xyz[1]/fPadPitchWidthLow+0.5*(fNPads[slicerow]-1);
+  if(fgSectorLow[sector])
+    xyz[1]=xyz[1]/fgPadPitchWidthLow+0.5*(fgNPads[slicerow]-1);
   else
-    xyz[1]=xyz[1]/fPadPitchWidthUp+0.5*(fNPads[slicerow]-1);
+    xyz[1]=xyz[1]/fgPadPitchWidthUp+0.5*(fgNPads[slicerow]-1);
 
   if(slice < 18)
-    xyz[2]=(fZLength-xyz[2]+fZOffset)/fZWidth;
+    xyz[2]=(fgZLength-xyz[2]+fgZOffset)/fgZWidth;
   else
-    xyz[2]=(fZLength+xyz[2]+fZOffset)/fZWidth;
+    xyz[2]=(fgZLength+xyz[2]+fgZOffset)/fgZWidth;
 }
 
 void AliL3Transform::LocHLT2Raw(Float_t *xyz,Int_t slice,Int_t slicerow)
@@ -1814,15 +1838,15 @@ void AliL3Transform::LocHLT2Raw(Float_t *xyz,Int_t slice,Int_t slicerow)
 
   xyz[0]=slicerow;
 
-  if(slicerow<fNRowLow)
-    xyz[1]=xyz[1]/fPadPitchWidthLow+0.5*(fNPads[slicerow]-1);
+  if(slicerow<fgNRowLow)
+    xyz[1]=xyz[1]/fgPadPitchWidthLow+0.5*(fgNPads[slicerow]-1);
   else
-    xyz[1]=xyz[1]/fPadPitchWidthUp+0.5*(fNPads[slicerow]-1);
+    xyz[1]=xyz[1]/fgPadPitchWidthUp+0.5*(fgNPads[slicerow]-1);
 
   if(slice < 18)
-    xyz[2]=(fZLength-xyz[2]+fZOffset)/fZWidth;
+    xyz[2]=(fgZLength-xyz[2]+fgZOffset)/fgZWidth;
   else
-    xyz[2]=(fZLength+xyz[2]+fZOffset)/fZWidth;
+    xyz[2]=(fgZLength+xyz[2]+fgZOffset)/fgZWidth;
 }
 
 void AliL3Transform::Global2Raw(Float_t *xyz,Int_t sector,Int_t row)
@@ -1843,6 +1867,7 @@ void AliL3Transform::Global2HLT(Float_t *xyz,Int_t slice,Int_t slicerow)
 
 void AliL3Transform::PrintCompileOptions()
 {
+  //print compile options
 #if defined(__GNUC__)
   cout << "Compiler (g++) version used: " << __GNUC__ << endl;
 #endif
index 732c1d8f3e89608ac008bebd0dde2eaf6cc0c34c..8dbf5625f397727a6367dda81475ccec04f3f52e 100644 (file)
 class AliL3Transform {
 
  public:
-  enum VersionType { fV_default=0, fV_deprecated=1, fV_aliroot=10, fV_cosmics=100};
+  enum VersionType { kVdefault=0, kVdeprecated=1, kValiroot=10, kVcosmics=100};
 
  private:
-  static const Double_t fBFACT;
-  static const Double_t fPi;
-  static const Double_t fPi2;
-  static const Double_t f2Pi;
-  static const Double_t fAnodeWireSpacing; 
-  static const Double_t fToDeg;
-
-  static Int_t fNPatches; //6 (dont change this) 
-  static Int_t fRows[6][2];
-  static Int_t fNRows[6];
-
-  static Double_t fBField;
-  static Double_t fBFieldFactor;
-  static Double_t fSolenoidBField;
-  static Int_t fNTimeBins;
-  static Int_t fNRowLow;
-  static Int_t fNRowUp;
-  static Int_t fNRowUp1;
-  static Int_t fNRowUp2;
-  static Int_t fNSectorLow;
-  static Int_t fNSectorUp;
-  static Int_t fSlice2Sector[36][2];
-  static Int_t fSector2Slice[72];
-  static Int_t fSectorLow[72];
-  static Double_t fPadPitchWidthLow;
-  static Double_t fPadPitchWidthUp;
-  static Double_t fZWidth;
-  static Double_t fZSigma;
-  static Double_t fZLength;
-  static Double_t fZOffset;
-  static Int_t fNSector; //72  (dont change this)
-  static Int_t fNSlice;  //36  (dont change this)
-  static Int_t fNRow;    //159 (dont change this)
-  static Double_t fNRotShift; //Rotation shift (eg. 0.5 for 10 degrees)
-  static Int_t fNPads[159]; //fill this following Init and fVersion
-  static Double_t fX[159];  //X position in local coordinates
-  static Int_t fVersion;  //flags the version
-  static Double_t fDiffT; //Transversal diffusion constant
-  static Double_t fDiffL; //Longitudinal diffusion constant
-  static Double_t fOmegaTau; //ExB effects
-  static Double_t fInnerPadLength;
-  static Double_t fOuter1PadLength;
-  static Double_t fOuter2PadLength;
-  static Double_t fInnerPRFSigma;
-  static Double_t fOuter1PRFSigma;
-  static Double_t fOuter2PRFSigma;
-  static Double_t fTimeSigma; //Minimal longitudinal width
-  static Int_t fADCSat; //ADC Saturation (1024 = 10 bit)
-  static Int_t fZeroSup; //Zero suppression threshold
-  static Double_t fCos[36]; //stores the cos value for local to global rotations  
-  static Double_t fSin[36]; //stores the sin value for local to global rotations  
+  static const Double_t fgkBFACT; //bfield
+  static const Double_t fgkPi;    //pi
+  static const Double_t fgkPi2;   //2pi
+  static const Double_t fgk2Pi;   //pi/2
+  static const Double_t fgkAnodeWireSpacing; //anode wire spacing 
+  static const Double_t fgkToDeg; //rad to deg
+
+  static Int_t fgNPatches;   //6 (dont change this) 
+  static Int_t fgRows[6][2]; //rows per patch
+  static Int_t fgNRows[6];   //rows per patch
+
+  static Double_t fgBField;         //field
+  static Double_t fgBFieldFactor;   //field 
+  static Double_t fgSolenoidBField; //field
+  static Int_t fgNTimeBins;  //ntimebins
+  static Int_t fgNRowLow;    //nrows
+  static Int_t fgNRowUp;     //nrows
+  static Int_t fgNRowUp1;    //nrows
+  static Int_t fgNRowUp2;    //nrows
+  static Int_t fgNSectorLow; //nsector
+  static Int_t fgNSectorUp;  //nsector
+  static Int_t fgSlice2Sector[36][2]; //nslice
+  static Int_t fgSector2Slice[72];    //nslice
+  static Int_t fgSectorLow[72];       //nsector
+  static Double_t fgPadPitchWidthLow; //pad pitch
+  static Double_t fgPadPitchWidthUp;  //pad pitch
+  static Double_t fgZWidth;  //width
+  static Double_t fgZSigma;  //sigma
+  static Double_t fgZLength; //length
+  static Double_t fgZOffset; //offset
+  static Int_t fgNSector; //72  (dont change this)
+  static Int_t fgNSlice;  //36  (dont change this)
+  static Int_t fgNRow;    //159 (dont change this)
+  static Double_t fgNRotShift; //Rotation shift (eg. 0.5 for 10 degrees)
+  static Int_t fgNPads[159]; //fill this following Init and fVersion
+  static Double_t fgX[159];  //X position in local coordinates
+  static Int_t fgVersion;  //flags the version
+  static Double_t fgDiffT; //Transversal diffusion constant
+  static Double_t fgDiffL; //Longitudinal diffusion constant
+  static Double_t fgOmegaTau; //ExB effects
+  static Double_t fgInnerPadLength;  //innner pad length
+  static Double_t fgOuter1PadLength; //outer pad length
+  static Double_t fgOuter2PadLength; //outer pad length
+  static Double_t fgInnerPRFSigma;   //inner pad response function
+  static Double_t fgOuter1PRFSigma;  //outer pad response function
+  static Double_t fgOuter2PRFSigma;  //outer pad response function
+  static Double_t fgTimeSigma; //Minimal longitudinal width
+  static Int_t fgADCSat; //ADC Saturation (1024 = 10 bit)
+  static Int_t fgZeroSup; //Zero suppression threshold
+  static Double_t fgCos[36]; //stores the cos value for local to global rotations  
+  static Double_t fgSin[36]; //stores the sin value for local to global rotations  
 
  public:
 #ifdef use_aliroot
@@ -78,108 +78,118 @@ class AliL3Transform {
   static Bool_t SaveInitFile(Char_t *filename); //save parameters in init file
 
   //setters
-  static void SetNPatches(Int_t i){fNPatches = i;}
-  static void SetNRows(Int_t s[6]){for(Int_t i=0;i<fNPatches;i++) fNRows[i] = s[i];}
+  static void SetNPatches(Int_t i){fgNPatches = i;}
+  static void SetNRows(Int_t s[6]){for(Int_t i=0;i<fgNPatches;i++) fgNRows[i] = s[i];}
   static void SetRows(Int_t s[6][2]){
-    for(Int_t i=0;i<fNPatches;i++){
-      fRows[i][0] = s[i][0];
-      fRows[i][1] = s[i][1];
+    for(Int_t i=0;i<fgNPatches;i++){
+      fgRows[i][0] = s[i][0];
+      fgRows[i][1] = s[i][1];
     }
   }
-  static void SetBField(Double_t f) {fBField = f;} //careful, these 3 are not independent!
-  static void SetBFieldFactor(Double_t f) {fBFieldFactor = f;fBField=fBFieldFactor*fSolenoidBField*0.1;}
-  static void SetSolenoidBField(Double_t f){fSolenoidBField = f;fBField=fBFieldFactor*fSolenoidBField*0.1;}
-  static void SetNTimeBins(Int_t i){fNTimeBins = i;}
-  static void SetNRowLow(Int_t i){fNRowLow = i;}
-  static void SetNRowUp(Int_t i){fNRowUp = i;}
-  static void SetNRowUp1(Int_t i){fNRowUp1 = i;}
-  static void SetNRowUp2(Int_t i){fNRowUp2 = i;}
+  static void SetBField(Double_t f) {fgBField = f;} //careful, these 3 are not independent!
+  static void SetBFieldFactor(Double_t f) {
+    fgBFieldFactor = f;
+    fgBField=fgBFieldFactor*fgSolenoidBField*0.1;
+  }
+  static void SetSolenoidBField(Double_t f){
+    fgSolenoidBField = f;
+    fgBField=fgBFieldFactor*fgSolenoidBField*0.1;
+  }
+  static void SetNTimeBins(Int_t i){fgNTimeBins = i;}
+  static void SetNRowLow(Int_t i){fgNRowLow = i;}
+  static void SetNRowUp(Int_t i){fgNRowUp = i;}
+  static void SetNRowUp1(Int_t i){fgNRowUp1 = i;}
+  static void SetNRowUp2(Int_t i){fgNRowUp2 = i;}
   static void SetSlice2Sector(Int_t s[36][2]){
-    for(Int_t i=0;i<fNSlice;i++){
-      fSlice2Sector[i][0] = s[i][0];
-      fSlice2Sector[i][1] = s[i][1];
+    for(Int_t i=0;i<fgNSlice;i++){
+      fgSlice2Sector[i][0] = s[i][0];
+      fgSlice2Sector[i][1] = s[i][1];
     }
   }
-  static void SetSector2Slice(Int_t s[72]){for(Int_t i=0;i<fNSector;i++) fSector2Slice[i] = s[i];}
-  static void SetSectorLow(Int_t s[72]){for(Int_t i=0;i<fNSector;i++) fSectorLow[i] = s[i];}
-  static void SetNSectorLow(Int_t i){fNSectorLow = i;}
-  static void SetNSectorUp(Int_t i){fNSectorUp = i;}
-  static void SetPadPitchWidthLow(Double_t f){fPadPitchWidthLow = f;}
-  static void SetPadPitchWidthUp(Double_t f){fPadPitchWidthUp = f;}
-  static void SetZWidth(Double_t f){fZWidth = f;}
-  static void SetZSigma(Double_t f){fZSigma = f;}
-  static void SetZLength(Double_t f){fZLength = f;}
-  static void SetZOffset(Double_t f){fZOffset = f;}
-  static void SetNSector(Int_t i){fNSector = i;}
-  static void SetNSlice(Int_t i){fNSlice = i;}
-  static void SetNRow(Int_t i){fNRow = i;}
-  static void SetNRotShift(Double_t f){fNRotShift = f;}
-  static void SetNPads(Int_t pads[159]){for(Int_t i=0;i<fNRow;i++) fNPads[i] = pads[i];}
-  static void SetX(Double_t xs[159]){for(Int_t i=0;i<fNRow;i++) fX[i] = xs[i];}
-  static void SetVersion(Int_t i){fVersion = i;}
-  static void SetDiffT(Double_t f){fDiffT = f;}
-  static void SetDiffL(Double_t f){fDiffL = f;}
-  static void SetOmegaTau(Double_t f){fOmegaTau = f;}
-  static void SetInnerPadLength(Double_t f){fInnerPadLength = f;}
-  static void SetOuter1PadLength(Double_t f){fOuter1PadLength = f;}
-  static void SetOuter2PadLength(Double_t f){fOuter2PadLength = f;}
-  static void SetInnerPRFSigma(Double_t f){fInnerPRFSigma = f;}
-  static void SetOuter1PRFSigma(Double_t f){fOuter1PRFSigma = f;}
-  static void SetOuter2PRFSigma(Double_t f){fOuter2PRFSigma = f;}
-  static void SetTimeSigma(Double_t f){fTimeSigma = f;}
-  static void SetADCSat(Int_t i) {fADCSat = i;}
-  static void SetZeroSup(Int_t i) {fZeroSup = i;}
+  static void SetSector2Slice(Int_t s[72]){
+    for(Int_t i=0;i<fgNSector;i++) fgSector2Slice[i] = s[i];}
+  static void SetSectorLow(Int_t s[72]){
+    for(Int_t i=0;i<fgNSector;i++) fgSectorLow[i] = s[i];}
+  static void SetNSectorLow(Int_t i){fgNSectorLow = i;}
+  static void SetNSectorUp(Int_t i){fgNSectorUp = i;}
+  static void SetPadPitchWidthLow(Double_t f){fgPadPitchWidthLow = f;}
+  static void SetPadPitchWidthUp(Double_t f){fgPadPitchWidthUp = f;}
+  static void SetZWidth(Double_t f){fgZWidth = f;}
+  static void SetZSigma(Double_t f){fgZSigma = f;}
+  static void SetZLength(Double_t f){fgZLength = f;}
+  static void SetZOffset(Double_t f){fgZOffset = f;}
+  static void SetNSector(Int_t i){fgNSector = i;}
+  static void SetNSlice(Int_t i){fgNSlice = i;}
+  static void SetNRow(Int_t i){fgNRow = i;}
+  static void SetNRotShift(Double_t f){fgNRotShift = f;}
+  static void SetNPads(Int_t pads[159]){
+    for(Int_t i=0;i<fgNRow;i++) fgNPads[i] = pads[i];}
+  static void SetX(Double_t xs[159]){
+    for(Int_t i=0;i<fgNRow;i++) fgX[i] = xs[i];}
+  static void SetVersion(Int_t i){fgVersion = i;}
+  static void SetDiffT(Double_t f){fgDiffT = f;}
+  static void SetDiffL(Double_t f){fgDiffL = f;}
+  static void SetOmegaTau(Double_t f){fgOmegaTau = f;}
+  static void SetInnerPadLength(Double_t f){fgInnerPadLength = f;}
+  static void SetOuter1PadLength(Double_t f){fgOuter1PadLength = f;}
+  static void SetOuter2PadLength(Double_t f){fgOuter2PadLength = f;}
+  static void SetInnerPRFSigma(Double_t f){fgInnerPRFSigma = f;}
+  static void SetOuter1PRFSigma(Double_t f){fgOuter1PRFSigma = f;}
+  static void SetOuter2PRFSigma(Double_t f){fgOuter2PRFSigma = f;}
+  static void SetTimeSigma(Double_t f){fgTimeSigma = f;}
+  static void SetADCSat(Int_t i) {fgADCSat = i;}
+  static void SetZeroSup(Int_t i) {fgZeroSup = i;}
 
   //getters
   static const Char_t* GetParamName() {return "75x40_100x60_150x60";}
-  static const Double_t Pi()     {return fPi;}
-  static const Double_t PiHalf() {return fPi2;}
-  static const Double_t TwoPi()  {return f2Pi;}
-  static const Double_t GetAnodeWireSpacing() {return fAnodeWireSpacing;}
-  static const Double_t GetBFact() {return fBFACT;}
-  static const Double_t ToRad() {return 1./fToDeg;}
-  static const Double_t ToDeg() {return fToDeg;}
+  static const Double_t Pi()     {return fgkPi;}
+  static const Double_t PiHalf() {return fgkPi2;}
+  static const Double_t TwoPi()  {return fgk2Pi;}
+  static const Double_t GetAnodeWireSpacing() {return fgkAnodeWireSpacing;}
+  static const Double_t GetBFact() {return fgkBFACT;}
+  static const Double_t ToRad() {return 1./fgkToDeg;}
+  static const Double_t ToDeg() {return fgkToDeg;}
 
   static Int_t GetFirstRow(Int_t patch);
   static Int_t GetLastRow(Int_t patch);
   static Int_t GetNRows(Int_t patch);
   static Int_t GetPatch(Int_t padrow);
-  static Int_t GetNRows() {return fNRow;}
-  static Int_t GetNRowLow() {return fNRowLow;}
-  static Int_t GetNRowUp1() {return fNRowUp1;}
-  static Int_t GetNRowUp2() {return fNRowUp2;}
+  static Int_t GetNRows() {return fgNRow;}
+  static Int_t GetNRowLow() {return fgNRowLow;}
+  static Int_t GetNRowUp1() {return fgNRowUp1;}
+  static Int_t GetNRowUp2() {return fgNRowUp2;}
   static Int_t GetPadRow(Float_t x);
-  static Int_t GetNPatches() {return fNPatches;}
+  static Int_t GetNPatches() {return fgNPatches;}
   static Int_t GetNPads(Int_t row);
-  static Int_t GetNTimeBins(){return fNTimeBins;}
-  static Double_t GetBField() {return fBField;}
-  static Double_t GetSolenoidField() {return fSolenoidBField;}
-  static Double_t GetBFactFactor() {return fBFieldFactor;}
-  static Double_t GetBFieldValue() {return (fBField*fBFACT);}
-  static Float_t Deg2Rad(Float_t angle) {return angle/fToDeg;}
-  static Float_t Rad2Deg(Float_t angle) {return angle*fToDeg;}
-  static Int_t GetVersion(){return fVersion;}
-  static Double_t GetPadPitchWidthLow() {return fPadPitchWidthLow;}
-  static Double_t GetPadPitchWidthUp() {return fPadPitchWidthUp;}
+  static Int_t GetNTimeBins(){return fgNTimeBins;}
+  static Double_t GetBField() {return fgBField;}
+  static Double_t GetSolenoidField() {return fgSolenoidBField;}
+  static Double_t GetBFactFactor() {return fgBFieldFactor;}
+  static Double_t GetBFieldValue() {return (fgBField*fgkBFACT);}
+  static Float_t Deg2Rad(Float_t angle) {return angle/fgkToDeg;}
+  static Float_t Rad2Deg(Float_t angle) {return angle*fgkToDeg;}
+  static Int_t GetVersion(){return fgVersion;}
+  static Double_t GetPadPitchWidthLow() {return fgPadPitchWidthLow;}
+  static Double_t GetPadPitchWidthUp() {return fgPadPitchWidthUp;}
   static Double_t GetPadPitchWidth(Int_t patch);
-  static Double_t GetZWidth() {return fZWidth;}
-  static Double_t GetZLength() {return fZLength;}
-  static Double_t GetZOffset() {return fZOffset;}
-  static Double_t GetDiffT() {return fDiffT;}
-  static Double_t GetDiffL() {return fDiffL;}
+  static Double_t GetZWidth() {return fgZWidth;}
+  static Double_t GetZLength() {return fgZLength;}
+  static Double_t GetZOffset() {return fgZOffset;}
+  static Double_t GetDiffT() {return fgDiffT;}
+  static Double_t GetDiffL() {return fgDiffL;}
   static Double_t GetParSigmaY2(Int_t padrow,Float_t z,Float_t angle);
   static Double_t GetParSigmaZ2(Int_t padrow,Float_t z,Float_t tgl);
-  static Double_t GetOmegaTau() {return fOmegaTau;}
+  static Double_t GetOmegaTau() {return fgOmegaTau;}
   static Double_t GetPadLength(Int_t padrow);
   static Double_t GetPRFSigma(Int_t padrow);
-  static Double_t GetTimeSigma() {return fTimeSigma;}
-  static Double_t GetZSigma() {return fZSigma;}
-  static Int_t GetADCSat() {return fADCSat;}
-  static Int_t GetZeroSup() {return fZeroSup;}
-  static Int_t GetNSlice() {return fNSlice;}
-  static Int_t GetNSector() {return fNSector;}
-  static Int_t GetNSectorLow() {return fNSectorLow;}
-  static Int_t GetNSectorUp() {return fNSectorUp;}
+  static Double_t GetTimeSigma() {return fgTimeSigma;}
+  static Double_t GetZSigma() {return fgZSigma;}
+  static Int_t GetADCSat() {return fgADCSat;}
+  static Int_t GetZeroSup() {return fgZeroSup;}
+  static Int_t GetNSlice() {return fgNSlice;}
+  static Int_t GetNSector() {return fgNSector;}
+  static Int_t GetNSectorLow() {return fgNSectorLow;}
+  static Int_t GetNSectorUp() {return fgNSectorUp;}
   
   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);
index dd5b5b46fa17f59d336a682d3ac6de905adee490..1d66aa20dc0d95c9dd391ea91979d7edf8d629c2 100644 (file)
@@ -31,8 +31,9 @@
 */
 
 ClassImp(AliL3VertexArray)
-void AliL3VertexArray::AnalyzeSector(Float_t *vertex, Int_t *array, Int_t len){
-//loop over all seeds and all vertex position
+void AliL3VertexArray::AnalyzeSector(Float_t *vertex, Int_t *array, Int_t len)
+{
+  //loop over all seeds and all vertex position
   LOG(AliL3Log::kInformational,"AliL3VertexArray::AnalyzeSector","Analyze")
   <<AliL3Log::kDec<<"Number of Seeds: "<<fNSeed<<ENDLOG;
   for(Int_t i =0;i<fNSeed;i++)
@@ -40,34 +41,36 @@ void AliL3VertexArray::AnalyzeSector(Float_t *vertex, Int_t *array, Int_t len){
       array[bin] += Trace(fZSeed[i],fRSeed[i],fSecSeed[i],vertex[bin]);
 }
 
-void AliL3VertexArray::FindSectorVertex(Double_t pos, Double_t range, Int_t nbin){
-//define position and range for search and
-//loop over all seeds
-//and find position of vertex and error 
-  const Int_t len = nbin;
-  const Double_t width = range; 
-  const Double_t  xmin = pos - width/2;
-  const Double_t step = width/len;
-  const Double_t start = xmin + step/2.;
-  Int_t * array = new Int_t[len];
-  Float_t * ver   = new Float_t[len];
-  for(Int_t i=0;i<len;i++){
-    ver[i] =  start + step * i;
+void AliL3VertexArray::FindSectorVertex(Double_t pos, Double_t range, Int_t nbin)
+{
+  //define position and range for search and
+  //loop over all seeds
+  //and find position of vertex and error 
+  const Int_t klen = nbin;
+  const Double_t kwidth = range; 
+  const Double_t kxmin = pos - kwidth/2;
+  const Double_t kstep = kwidth/klen;
+  const Double_t kstart = kxmin + kstep/2.;
+  Int_t * array = new Int_t[klen];
+  Float_t * ver   = new Float_t[klen];
+  for(Int_t i=0;i<klen;i++){
+    ver[i] =  kstart + kstep * i;
     array[i] = 0;
   }
-  AnalyzeSector(ver,array,len);
-  FindMean(ver,array,len);
+  AnalyzeSector(ver,array,klen);
+  FindMean(ver,array,klen);
   delete[] array;
   delete[] ver;
 }
 
-void AliL3VertexArray::FindMean(Float_t *vertex,Int_t *array, Int_t len){
-//find mean and error of array and store it in
-//fZSector and fZSectorErr
-  const Int_t nbin = len;
+void AliL3VertexArray::FindMean(Float_t *vertex,Int_t *array, Int_t len)
+{
+  //find mean and error of array and store it in
+  //fZSector and fZSectorErr
+  const Int_t knbin = len;
   Int_t xbin =0;
   Int_t max=0;
-  for(Int_t i = 0;i<nbin;i++){
+  for(Int_t i = 0;i<knbin;i++){
     if(array[i]>max){
       max = array[i];
       xbin =i;
@@ -85,13 +88,13 @@ void AliL3VertexArray::FindMean(Float_t *vertex,Int_t *array, Int_t len){
   }
   xmax = xbin;
   while(xmax++){
-    if(xmax>=nbin) {ops++;break;}
+    if(xmax>=knbin) {ops++;break;}
     if(array[xmax]<hmax){
       break;
     }
   }
   if(ops){
-    if(xbin >= nbin/2){xmin = 2 * xbin - nbin +1;xmax = nbin-1;}
+    if(xbin >= knbin/2){xmin = 2 * xbin - knbin +1;xmax = knbin-1;}
     else{xmin = 0;xmax = 2 * xbin;}
   }
   Double_t sumw=0;
@@ -112,7 +115,7 @@ void AliL3VertexArray::FindMean(Float_t *vertex,Int_t *array, Int_t len){
   }
   else{fZSectorErr = fZSector = 0;}
   sumw=sumw2=sumwx=sumwx2=0;
-  for(Int_t bin = 0;bin<nbin;bin++){
+  for(Int_t bin = 0;bin<knbin;bin++){
     sumw   += array[bin];
     sumw2  += array[bin] * array[bin];
     sumwx  += array[bin] * vertex[bin];
index 501b6695c20c29a9c454ba18b7fd8d5915d24e24..8b0006aaf66b7d5fa87b7fe825fc30f8900d7b53 100644 (file)
@@ -6,17 +6,17 @@
 #include <math.h>
 #include "AliL3RootTypes.h"
  
-class AliL3VertexArray{
+class AliL3VertexArray {
   private:
 
-  Char_t fArray[8320][8][8];
-  Double_t fZSector;
-  Double_t fZSectorErr;
-  Int_t fMaxSeed;
-  Int_t fNSeed;
-  Float_t fZSeed[400];
-  Float_t fRSeed[400];
-  Int_t fSecSeed[400];
+  Char_t fArray[8320][8][8]; //array
+  Double_t fZSector;    //sector
+  Double_t fZSectorErr; //sector error
+  Int_t fMaxSeed;  //max seed
+  Int_t fNSeed;    //number of seeds
+  Float_t fZSeed[400]; //seed in Z
+  Float_t fRSeed[400]; //seed in XY
+  Int_t fSecSeed[400]; //seed for sectors
 
   void FindMean(Float_t *vertex,Int_t *array, Int_t len);
   void AnalyzeSector(Float_t *vertex, Int_t *array, Int_t len);
@@ -49,40 +49,46 @@ class AliL3VertexArray{
 
 };
 
-inline void AliL3VertexArray::FillSector3D(Float_t x, Float_t y, Float_t z){
+inline void AliL3VertexArray::FillSector3D(Float_t x, Float_t y, Float_t z)
+{
   // Filling routine in coordinates
   Int_t sec = Int_t( (y+.168*x)/(.336*x)*8); // 8 subsec!!
   Float_t r = sqrt(pow(y,2)+pow(x,2));
   FillSector2D(z,r,sec); 
 }
 
-inline void AliL3VertexArray:: FillSectorSeed3D(Float_t x,Float_t y, Float_t z){
+inline void AliL3VertexArray:: FillSectorSeed3D(Float_t x,Float_t y, Float_t z)
+{
   // Filling routine for seeds in coordinates
   Int_t sec = Int_t( (y+.168*x)/(.336*x)*8); // 8 subsec!!
   Float_t r = sqrt(pow(y,2)+pow(x,2));
   FillSectorSeed2D(z,r,sec);    
 }
 
-inline void AliL3VertexArray::FillSectorSeed2D(Float_t z,Float_t r,Int_t sec){
+inline void AliL3VertexArray::FillSectorSeed2D(Float_t z,Float_t r,Int_t sec)
+{
   // Filling routine in r,z coordinates 
   if(fNSeed>=400) return;
   fZSeed[fNSeed] = z; fRSeed[fNSeed] = r; fSecSeed[fNSeed] = sec;
   fNSeed++; 
 }
 
-inline void AliL3VertexArray::FillSector2D(Float_t z,Float_t r,Int_t sec){
+inline void AliL3VertexArray::FillSector2D(Float_t z,Float_t r,Int_t sec)
+{
   // Filling routine for seeds in r,z coordinates
   if(z>r||z<=0||r<220||r>=252) return;
   fArray[Int_t(z/r*32*260)][(Int_t(r-220))/4][sec] += 1;
 }
 
-inline Int_t AliL3VertexArray::GetContent(Float_t z,Float_t r,Int_t sec){
+inline Int_t AliL3VertexArray::GetContent(Float_t z,Float_t r,Int_t sec)
+{
   // Return content of array in r,z coordinates
   if(z>r||z<=0||r<220||r>=252) return 0;
   return  fArray[Int_t(z/r*32*260)][(Int_t(r-220))/4][sec];
 }
 
-inline void AliL3VertexArray::ResetSector(){
+inline void AliL3VertexArray::ResetSector()
+{
   // do it!
   fZSector=0;
   fZSectorErr=0;
@@ -95,7 +101,8 @@ inline void AliL3VertexArray::ResetSector(){
         fArray[z][r][sec] = 0;
 }
 
-inline Int_t AliL3VertexArray::Trace(Float_t z,Float_t r,Int_t sec,Float_t vertex){
+inline Int_t AliL3VertexArray::Trace(Float_t z,Float_t r,Int_t sec,Float_t vertex)
+{
 // count the number of entries along starting from z,r to vertex,0
   Int_t cont=0;
   for(Int_t i = 0;i<8;i++){
index 5cc20833d1cc4711804a17a5d75d10d7278177f6..17d0c91278eb2a9ac5bef66e78b64b7f87cab646 100644 (file)
@@ -59,7 +59,7 @@
 
 ClassImp(AliLevel3)
 
-Bool_t AliLevel3::fDoVertexFit = kTRUE;//Include the vertex in the final track fit
+Bool_t AliLevel3::fgDoVertexFit = kTRUE;//Include the vertex in the final track fit
 
 AliLevel3::AliLevel3()
 {
@@ -116,6 +116,7 @@ AliLevel3::AliLevel3(AliRunLoader *rl)
 
 void AliLevel3::Init(Char_t *path,EFileType filetype,Int_t npatches)
 {
+  //Init the whole standard tracker chain
 #ifndef use_newio
   if (filetype==kRunLoader){
     LOG(AliL3Log::kError,"AliLevel3::Init","Files")
@@ -231,20 +232,25 @@ void AliLevel3::Init(Char_t *path,EFileType filetype,Int_t npatches)
   fBenchmark = new AliL3Benchmark();
 }
 
-void AliLevel3::DoBench(char* name){
+void AliLevel3::DoBench(char* name)
+{ 
+  //dobench
   fBenchmark->Analyze(name);
   delete fBenchmark;
   fBenchmark = new AliL3Benchmark();
 }
 
-void AliLevel3::DoMc(char* file){
+void AliLevel3::DoMc(char* file)
+{ 
+  //domc
 #ifdef use_aliroot
   if(!fFileHandler->IsDigit(fEvent))
     fFileHandler->SetMCOutput(file);
 #endif
 }
 
-AliLevel3::~AliLevel3(){
+AliLevel3::~AliLevel3()
+{
   //Destructor
   if(fVertexFinder) delete fVertexFinder;
   if(fVertex) delete fVertex;
@@ -256,7 +262,8 @@ AliLevel3::~AliLevel3(){
 }
 
 void AliLevel3::SetClusterFinderParam(Float_t fXYError, Float_t fZError, Bool_t deconv)
-{
+{ 
+  //set cluster finder parameter
   fXYClusterError=fXYError;
   fZClusterError=fZError;
   fClusterDeconv=deconv;
@@ -287,10 +294,12 @@ void AliLevel3::SetTrackerParam(Int_t phi_segments, Int_t eta_segments,
 
 void AliLevel3::SetMergerParameters(Double_t maxy,Double_t maxz,Double_t maxkappa,Double_t maxpsi,Double_t maxtgl)
 {
+  //set global merger parameter
   fGlobalMerger->SetParameter(maxy,maxz,maxkappa,maxpsi,maxtgl);
 }
 
-void AliLevel3::ProcessEvent(Int_t first,Int_t last,Int_t event){
+void AliLevel3::ProcessEvent(Int_t first,Int_t last,Int_t event)
+{
   //Do tracking on all slices in region [first,last]
   //Slices numbering in TPC goes from 0-35, which means that one slice
   //corresponds to inner+outer sector.E.g. slice 2 corresponds to
@@ -322,7 +331,9 @@ void AliLevel3::ProcessEvent(Int_t first,Int_t last,Int_t event){
   fFileHandler->FreeDigitsTree();
 }
 
-void AliLevel3::ProcessSlice(Int_t slice){
+void AliLevel3::ProcessSlice(Int_t slice)
+{
+  //process slice
   char name[256];
   Bool_t UseCF = kFALSE;
 #ifdef use_aliroot
@@ -333,8 +344,8 @@ void AliLevel3::ProcessSlice(Int_t slice){
   if(fNoCF == kTRUE) //In case you don't want to run with cluster finder
     UseCF = kFALSE;
 
-  const Int_t maxpoints=120000;
-  const Int_t pointsize = maxpoints * sizeof(AliL3SpacePointData);
+  const Int_t kmaxpoints=120000;
+  const Int_t kpointsize = kmaxpoints * sizeof(AliL3SpacePointData);
   AliL3MemHandler *memory = new AliL3MemHandler();
 
   fTrackMerger->Reset();
@@ -457,9 +468,9 @@ void AliLevel3::ProcessSlice(Int_t slice){
 #endif
       }//end else UseBinary
 
-      points = (AliL3SpacePointData *) memory->Allocate(pointsize);
+      points = (AliL3SpacePointData *) memory->Allocate(kpointsize);
       fClusterFinder = new AliL3ClustFinderNew();
-      fClusterFinder->InitSlice(slice,patch,fRow[patch][0],fRow[patch][1],maxpoints);
+      fClusterFinder->InitSlice(slice,patch,fRow[patch][0],fRow[patch][1],kmaxpoints);
       fClusterFinder->SetDeconv(fClusterDeconv);
       fClusterFinder->SetXYError(fXYClusterError);
       fClusterFinder->SetZError(fZClusterError);
@@ -616,7 +627,8 @@ void AliLevel3::ProcessSlice(Int_t slice){
 }
 
 void AliLevel3::FitGlobalTracks()
-{
+{ 
+  //fit global tracks
   AliL3Fitter *fitter = new AliL3Fitter(fVertex,AliLevel3::DoVertexFit());
   if(fNPatch==1)
     fitter->LoadClusters(fWriteOutPath,fEvent,kTRUE);
@@ -637,8 +649,9 @@ void AliLevel3::FitGlobalTracks()
 }
 
 void AliLevel3::WriteSpacePoints(UInt_t npoints,AliL3SpacePointData *points,
-                                Int_t slice,Int_t patch)
-{
+                                Int_t slice,Int_t patch) const
+{ 
+  //write space points
   char name[256];
   if(fNPatch==1)
     sprintf(name,"%s/points_%d_%d_%d.raw",fWriteOutPath,fEvent,slice,-1);
@@ -652,8 +665,9 @@ void AliLevel3::WriteSpacePoints(UInt_t npoints,AliL3SpacePointData *points,
   delete  memory;
 }
 
-Int_t AliLevel3::WriteTracks(char *filename,AliL3Merger *merger,char opt)
-{
+Int_t AliLevel3::WriteTracks(char *filename,AliL3Merger *merger,char opt) const
+{ 
+  //write tracks
   AliL3MemHandler *memory = new AliL3MemHandler();
   memory->SetBinaryOutput(filename);
   if(opt=='a'||opt=='i'){  //add intracks
@@ -669,7 +683,7 @@ Int_t AliLevel3::WriteTracks(char *filename,AliL3Merger *merger,char opt)
   }
 
   memory->CloseBinaryOutput();
+  delete memory;
   return 1;
 }
 
index 8a2d79799db80e6686c36224dd33137567851663..8873f17d546aefb47105ff52f0efb2d233bc1594 100644 (file)
@@ -41,7 +41,7 @@ class AliLevel3 : public TObject {
 #endif
 
  private:
-  UInt_t fNTrackData;
+  UInt_t fNTrackData; //count data
   AliL3TrackSegmentData* fTrackData; //!
   AliL3ConfMapper *fTracker; //!
   AliL3Vertex *fVertex; //! 
@@ -53,37 +53,36 @@ class AliLevel3 : public TObject {
   AliL3MemHandler *fFileHandler; //!
   AliL3Benchmark *fBenchmark;//!
 
-  Int_t fEvent;
-  Int_t fNPatch;
-  Int_t fRow[6][2];
-  Float_t fEta[2];
+  Int_t fEvent;    //event number
+  Int_t fNPatch;   //number of patches
+  Int_t fRow[6][2];//rows
+  Float_t fEta[2]; //eta
   
   Char_t *fInputFile;//!
 #ifdef use_newio
-  AliRunLoader *fRunLoader;
+  AliRunLoader *fRunLoader; //runloader
 #endif
-  Char_t fPath[256];
-  Char_t fWriteOutPath[256];
+  Char_t fPath[256]; //path to aliroot
+  Char_t fWriteOutPath[256]; //path to store
   
-  Bool_t fDoRoi;
-  Bool_t fFindVertex;
-  Bool_t fDoNonVertex;
-  Bool_t fPileUp;
-  Bool_t fNoCF;
+  Bool_t fDoRoi; //do region of interest
+  Bool_t fFindVertex; //find vertex
+  Bool_t fDoNonVertex;//do non vertex pass
+  Bool_t fPileUp; //do pileup
+  Bool_t fNoCF; //dont do cluster finder
   
-  Bool_t fUseBinary;
-  Bool_t fWriteOut;
+  Bool_t fUseBinary; //use binary input
+  Bool_t fWriteOut; //write tracks
   
-  static Bool_t fDoVertexFit;
-
-  Bool_t fClusterDeconv;
-  Float_t fXYClusterError;
-  Float_t fZClusterError;
+  static Bool_t fgDoVertexFit; //do vertex fix
 
+  Bool_t fClusterDeconv; //do cluster deconv
+  Float_t fXYClusterError; //Cluster error
+  Float_t fZClusterError; //Cluster error
 
   void WriteSpacePoints(UInt_t npoints,AliL3SpacePointData *points,
-                                          Int_t slice,Int_t patch);
-  Int_t WriteTracks(char *filename,AliL3Merger *merger,char opt='o');  
+                        Int_t slice,Int_t patch) const;
+  Int_t WriteTracks(char *filename,AliL3Merger *merger,char opt='o') const;  
   void WriteResults();
   void FitGlobalTracks();
   void SetPath(char *p){sprintf(fPath,"%s",p);}
@@ -121,8 +120,8 @@ class AliLevel3 : public TObject {
   void DoRoi(Float_t e0=0.4,Float_t e1=0.5){fEta[0]=e0;fEta[1]=e1;fDoRoi=kTRUE;}
   void WriteFiles(Char_t *path="./"){fWriteOut = kTRUE; sprintf(fWriteOutPath,"%s",path);}
   
-  static void SetVertexFit(Bool_t f)   {fDoVertexFit=f;}
-  static Bool_t DoVertexFit()          {return fDoVertexFit;}
+  static void SetVertexFit(Bool_t f)   {fgDoVertexFit=f;}
+  static Bool_t DoVertexFit()          {return fgDoVertexFit;}
 
   ClassDef(AliLevel3,1) //Interface class for Level3-tracking
 };