coding violations
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Nov 2007 18:13:40 +0000 (18:13 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Nov 2007 18:13:40 +0000 (18:13 +0000)
TRD/AliTRDpropagationLayer.h
TRD/AliTRDseed.cxx
TRD/AliTRDseedV1.cxx
TRD/AliTRDseedV1.h
TRD/AliTRDstackLayer.cxx
TRD/AliTRDstackLayer.h
TRD/AliTRDtrackerFitter.h
TRD/AliTRDtrackerV1.cxx
TRD/AliTRDtrackerV1.h

index 36bfe94..e2c0bf8 100644 (file)
@@ -29,8 +29,8 @@ class AliTRDpropagationLayer : public TObject
   AliTRDpropagationLayer();
   AliTRDpropagationLayer(Double_t x, Double_t dx, Double_t rho
                       , Double_t x0, Int_t tbIndex, Int_t plane);
-  AliTRDpropagationLayer(const AliTRDpropagationLayer &/*p*/);
-  ~AliTRDpropagationLayer();
+  AliTRDpropagationLayer(const AliTRDpropagationLayer &p);
+  virtual ~AliTRDpropagationLayer();
   AliTRDpropagationLayer &operator=(const AliTRDpropagationLayer &/*p*/) { return *this; }
 
   operator Int_t() const                                        { return fN;                    }
index f7c5357..7d1129f 100644 (file)
@@ -126,9 +126,14 @@ AliTRDseed::AliTRDseed(const AliTRDseed &s)
 }
 
 //_____________________________________________________________________________
-void AliTRDseed::Copy(TObject &o) const {
-       AliTRDseed &seed = (AliTRDseed &)o;
-       seed.fTilt = fTilt;
+void AliTRDseed::Copy(TObject &o) const 
+{
+  //
+  // Copy function
+  //
+
+  AliTRDseed &seed = (AliTRDseed &)o;
+  seed.fTilt = fTilt;
   seed.fPadLength = fPadLength;
   seed.fX0 = fX0;
   seed.fSigmaY = fSigmaY;
@@ -145,7 +150,8 @@ void AliTRDseed::Copy(TObject &o) const {
   seed.fCC = fCC;
   seed.fChi2 = fChi2;
   seed.fChi2Z = fChi2Z;
-       for (Int_t i = 0; i < knTimebins; i++) {
+
+  for (Int_t i = 0; i < knTimebins; i++) {
     seed.fX[i]        = fX[i];
     seed.fY[i]        = fY[i]; 
     seed.fZ[i]        = fZ[i]; 
index 039826e..061db20 100644 (file)
@@ -200,8 +200,8 @@ Bool_t      AliTRDseedV1::AttachClustersIter(AliTRDstackLayer *layer
                        
                        //printf("Cluster %i(0x%x): x = %3.3f, y = %3.3f, z = %3.3f\n", index, cl, cl->GetX(), cl->GetY(), cl->GetZ());
 
-                       Int_t GlobalIndex = layer[iTime].GetGlobalIndex(index);
-                       fIndexes[iTime]  = GlobalIndex;
+                       Int_t globalIndex = layer[iTime].GetGlobalIndex(index);
+                       fIndexes[iTime]  = globalIndex;
                        fClusters[iTime] = cl;
                        fX[iTime]        = dxlayer;
                        fY[iTime]        = cl->GetY();
@@ -356,8 +356,8 @@ Bool_t      AliTRDseedV1::AttachClustersProj(AliTRDstackLayer *layer
                        }
                        c = clusters[iptr];
                }
-               //Int_t GlobalIndex = layer[iTime].GetGlobalIndex(index);
-               //fIndexes[iTime]  = GlobalIndex;
+               //Int_t globalIndex = layer[iTime].GetGlobalIndex(index);
+               //fIndexes[iTime]  = globalIndex;
                fClusters[iTime] = c;
                fY[iTime]        = c->GetY();
                fZ[iTime]        = c->GetZ();
index 9b6b6e2..8a3b195 100644 (file)
@@ -35,7 +35,7 @@ class AliTRDseedV1 : public AliTRDseed
        AliTRDseedV1(Int_t layer = -1, AliTRDrecoParam *p=0x0);
        ~AliTRDseedV1();
        AliTRDseedV1(const AliTRDseedV1 &ref, Bool_t owner=kFALSE);
-       AliTRDseedV1& operator=(const AliTRDseedV1 &);
+       AliTRDseedV1& operator=(const AliTRDseedV1 &ref);
 
        Bool_t  AttachClustersIter(AliTRDstackLayer *layer, Float_t quality, Bool_t kZcorr = kFALSE, AliTRDcluster *c=0x0);
        Bool_t  AttachClustersProj(AliTRDstackLayer *layer, Float_t quality, Bool_t kZcorr = kFALSE, AliTRDcluster *c=0x0);
index cb27a85..22f8c53 100644 (file)
@@ -233,18 +233,18 @@ void AliTRDstackLayer::BuildIndices(Int_t iter)
                // boundarie check
                AliTRDcluster *cl = helpCL[i];
                Double_t zval = cl->GetZ();
-               UChar_t TreeIndex = (UChar_t)(TMath::Abs(fZ0 - zval)/fZLength * fNRows);
-               if(TreeIndex > fNRows - 1) TreeIndex = fNRows - 1;
+               UChar_t treeIndex = (UChar_t)(TMath::Abs(fZ0 - zval)/fZLength * fNRows);
+               if(treeIndex > fNRows - 1) treeIndex = fNRows - 1;
                // Insert Leaf
-               Int_t pos = FindYPosition(cl->GetY(), TreeIndex, i);
+               Int_t pos = FindYPosition(cl->GetY(), treeIndex, i);
                if(pos == -1){          // zbin is empty;
-                       Int_t upper = (TreeIndex == fNRows - 1) ? nClStack : fPositions[TreeIndex + 1];
+                       Int_t upper = (treeIndex == fNRows - 1) ? nClStack : fPositions[treeIndex + 1];
                        memmove(fClusters + upper + 1, fClusters + upper, (sizeof(AliTRDcluster *))*(nClStack-upper));
                        memmove(fIndex + upper + 1, fIndex + upper, (sizeof(UInt_t))*(nClStack-upper));
                        fClusters[upper] = cl;
                        fIndex[upper] = helpInd[i]; 
                        // Move All pointer one position back
-                       for(UChar_t j = TreeIndex + 1; j < fNRows; j++) fPositions[j]++;
+                       for(UChar_t j = treeIndex + 1; j < fNRows; j++) fPositions[j]++;
                        nClStack++;
                } else {                // zbin not empty
                        memmove(fClusters + pos + 2, fClusters + pos+1, (sizeof(AliTRDcluster *))*(nClStack-(pos+1)));
@@ -252,7 +252,7 @@ void AliTRDstackLayer::BuildIndices(Int_t iter)
                        fClusters[pos + 1] = cl;        //fIndex[i];
                        fIndex[pos + 1] = helpInd[i];
                        // Move All pointer one position back
-                       for(UChar_t j = TreeIndex + 1; j < fNRows; j++) fPositions[j]++;        
+                       for(UChar_t j = treeIndex + 1; j < fNRows; j++) fPositions[j]++;        
                        nClStack++;
                }
 
@@ -266,7 +266,7 @@ void AliTRDstackLayer::BuildIndices(Int_t iter)
                        << "SectorNr=" << fSec
                        << "Iter="     << iter
                        << "C.="       << cl
-                       << "TreeIdx="  << TreeIndex
+                       << "TreeIdx="  << treeIndex
                        << "\n";
                }
 #endif 
index 1717d9f..180c920 100644 (file)
@@ -39,7 +39,7 @@ class AliTRDstackLayer : public AliTRDpropagationLayer
        ~AliTRDstackLayer();
        AliTRDstackLayer   &operator=(const AliTRDpropagationLayer &myLayer);
        AliTRDstackLayer   &operator=(const AliTRDstackLayer &myLayer);
-       AliTRDcluster      *operator[](const Int_t i) {
+       AliTRDcluster      *operator[](const Int_t i) const {
                return ((i < fN) && (i >= 0)) ? fClusters[i] : 0x0;
        }
 
index a423655..d8e8805 100644 (file)
@@ -36,8 +36,8 @@ class AliTRDtrackerFitter : public TObject {
  public:
 
        AliTRDtrackerFitter();
-       AliTRDtrackerFitter(const AliTRDtrackerFitter &);
-       AliTRDtrackerFitter& operator=(const AliTRDtrackerFitter &);
+       AliTRDtrackerFitter(const AliTRDtrackerFitter &f);
+       AliTRDtrackerFitter& operator=(const AliTRDtrackerFitter &f);
        virtual ~AliTRDtrackerFitter();
 
        void            Copy(TObject &f) const;
index 82bb77a..37441a9 100644 (file)
@@ -68,7 +68,7 @@
 #define DEBUG
 
 ClassImp(AliTRDtrackerV1)
-Double_t AliTRDtrackerV1::fTopologicQA[kNConfigs] = {
+Double_t AliTRDtrackerV1::fgTopologicQA[kNConfigs] = {
                0.1112, 0.1112, 0.1112, 0.0786, 0.0786,
                0.0786, 0.0786, 0.0579, 0.0579, 0.0474,
                0.0474, 0.0408, 0.0335, 0.0335, 0.0335
@@ -80,7 +80,7 @@ AliTRDtrackerV1::AliTRDtrackerV1(AliTRDrecoParam *p)
   ,fSieveSeeding(0)
   ,fRecoParam(p)
   ,fFitter(0x0)
-  ,fDebugStreamer(0x0)
+  ,fDebugStreamerV1(0x0)
 {
   //
   // Default constructor. Nothing is initialized.
@@ -94,7 +94,7 @@ AliTRDtrackerV1::AliTRDtrackerV1(const TFile *in, AliTRDrecoParam *p)
   ,fSieveSeeding(0)
   ,fRecoParam(p)
   ,fFitter(0x0)
-  ,fDebugStreamer(0x0)
+  ,fDebugStreamerV1(0x0)
 {
   //
   // Standard constructor.
@@ -105,8 +105,8 @@ AliTRDtrackerV1::AliTRDtrackerV1(const TFile *in, AliTRDrecoParam *p)
        fFitter = new AliTRDtrackerFitter();
 
 #ifdef DEBUG
-       fDebugStreamer    = new TTreeSRedirector("TRDdebug.root");
-       fFitter->SetDebugStream(fDebugStreamer);
+       fDebugStreamerV1 = new TTreeSRedirector("TRDdebug.root");
+       fFitter->SetDebugStream(fDebugStreamerV1);
 #endif
 
 }
@@ -118,7 +118,7 @@ AliTRDtrackerV1::~AliTRDtrackerV1()
   // Destructor
   //
 
-       if(fDebugStreamer) delete fDebugStreamer;
+       if(fDebugStreamerV1) delete fDebugStreamerV1;
        if(fFitter) delete fFitter;
        if(fRecoParam) delete fRecoParam;
 
@@ -203,10 +203,10 @@ Int_t AliTRDtrackerV1::Clusters2TracksSM(AliTRDtracker::AliTRDtrackingSector *se
                                              + 2 * pp->GetLengthOPad() + 2 * pp->GetLengthRim();
                        //Debug
                        Double_t z0  = fGeom->GetRow0((Int_t)(ilayer/nTimeBins),istack,0);
-                       const AliTRDpropagationLayer smLayer(*(sector->GetLayer(ilayer)));
-                       stackLayer[ilayer] = smLayer;
+                       const AliTRDpropagationLayer kSMlayer(*(sector->GetLayer(ilayer)));
+                       stackLayer[ilayer] = kSMlayer;
 #ifdef DEBUG
-                       stackLayer[ilayer].SetDebugStream(fDebugStreamer);
+                       stackLayer[ilayer].SetDebugStream(fDebugStreamerV1);
 #endif                 
                        stackLayer[ilayer].SetRange(z0 - stacklength, stacklength);
                        stackLayer[ilayer].SetSector(sector->GetSector());
@@ -469,7 +469,7 @@ Int_t AliTRDtrackerV1::Clusters2TracksStack(AliTRDstackLayer *layer
                                        }
                                        //Int_t eventNrInFile = esd->GetEventNumberInFile();
                                        //AliInfo(Form("Number of clusters %d.", nclusters));
-                                       TTreeSRedirector &cstreamer = *fDebugStreamer;
+                                       TTreeSRedirector &cstreamer = *fDebugStreamerV1;
                                        cstreamer << "Clusters2TracksStack"
                                                << "Iter="      << fSieveSeeding
                                                << "Like="      << fTrackQuality[trackIndex]
@@ -581,7 +581,7 @@ Double_t AliTRDtrackerV1::BuildSeedingConfigs(AliTRDstackLayer *layers
        Int_t planes[4];
        for(int iconf=0; iconf<kNConfigs; iconf++){
                GetSeedingConfig(iconf, planes);
-               tconfig[iconf] = fTopologicQA[iconf];
+               tconfig[iconf] = fgTopologicQA[iconf];
                for(int iplane=0; iplane<4; iplane++) tconfig[iconf] *= chamberQA[planes[iplane]]; 
        }
        
@@ -744,7 +744,7 @@ Int_t AliTRDtrackerV1::MakeSeeds(AliTRDstackLayer *layers
                                        }
                                        Float_t threshold = .5;//1./(3. - sLayer);
                                        Int_t ll = c[3]->GetLabel(0);
-                                       TTreeSRedirector &cs0 = *fDebugStreamer;
+                                       TTreeSRedirector &cs0 = *fDebugStreamerV1;
                                                        cs0 << "MakeSeeds0"
                                                        <<"isFake=" << isFake
                                                        <<"label=" << ll
@@ -783,7 +783,7 @@ Int_t AliTRDtrackerV1::MakeSeeds(AliTRDstackLayer *layers
                                        }
                                        Double_t xpos[4];
                                        for(Int_t l = 0; l < kNSeedPlanes; l++) xpos[l] = layer[l]->GetX();
-                                       TTreeSRedirector &cstreamer = *fDebugStreamer;
+                                       TTreeSRedirector &cstreamer = *fDebugStreamerV1;
                                                        cstreamer << "MakeSeeds1"
                                                << "isFake=" << isFake
                                                << "config="   << config
@@ -913,7 +913,7 @@ Int_t AliTRDtrackerV1::MakeSeeds(AliTRDstackLayer *layers
                                // do the final track fitting
                                fFitter->SetLayers(nlayers);
 #ifdef DEBUG
-                               fFitter->SetDebugStream(fDebugStreamer);
+                               fFitter->SetDebugStream(fDebugStreamerV1);
 #endif
                                fTrackQuality[ntracks] = fFitter->FitHyperplane(&cseed[0], chi2ZF, GetZ());
                                Double_t param[3];
@@ -953,7 +953,7 @@ Int_t AliTRDtrackerV1::MakeSeeds(AliTRDstackLayer *layers
 #ifdef DEBUG
                                if(AliTRDReconstructor::StreamLevel() >= 2){
                                        Double_t curv = (fFitter->GetRiemanFitter())->GetC();
-                                       TTreeSRedirector &cstreamer = *fDebugStreamer;
+                                       TTreeSRedirector &cstreamer = *fDebugStreamerV1;
                                        cstreamer << "MakeSeeds2"
                                                << "C="       << curv
                                                << "Chi2R="   << chi2r
@@ -1170,18 +1170,18 @@ Double_t  AliTRDtrackerV1::CookPlaneQA(AliTRDstackLayer *layers)
        
        // calculate the deviation of the mean number of clusters from the
        // closest integer values
-       Float_t ncl_med = float(ncl-nused)/nTimeBins;
-       Int_t ncli = Int_t(ncl_med);
-       Float_t ncl_dev = TMath::Abs(ncl_med - TMath::Max(ncli, 1));
-       ncl_dev -= (ncl_dev>.5) && ncli ? .5 : 0.; 
-       /*Double_t quality = */ return TMath::Exp(-2.*ncl_dev);
+       Float_t nclMed = float(ncl-nused)/nTimeBins;
+       Int_t ncli = Int_t(nclMed);
+       Float_t nclDev = TMath::Abs(nclMed - TMath::Max(ncli, 1));
+       nclDev -= (nclDev>.5) && ncli ? .5 : 0.; 
+       /*Double_t quality = */ return TMath::Exp(-2.*nclDev);
        
 //     // get slope of the derivative
 //     if(!fitter.Eval()) return quality;
 //     fitter.PrintResults(3);
 //     Double_t a = fitter.GetParameter(1);
 // 
-//     printf("ncl_dev(%f)  a(%f)\n", ncl_dev, a);
+//     printf("nclDev(%f)  a(%f)\n", nclDev, a);
 //     return quality*TMath::Exp(-a);
 }
 
@@ -1239,7 +1239,7 @@ Double_t AliTRDtrackerV1::CookLikelihood(AliTRDseedV1 *cseed
 #ifdef DEBUG
        //AliInfo(Form("sumda(%f) chi2[0](%f) chi2[1](%f) likea(%f) likechi2y(%f) likechi2z(%f) nclusters(%d) likeN(%f)", sumda, chi2[0], chi2[1], likea, likechi2y, likechi2z, nclusters, likeN));
        if(AliTRDReconstructor::StreamLevel() >= 2){
-               TTreeSRedirector &cstreamer = *fDebugStreamer;
+               TTreeSRedirector &cstreamer = *fDebugStreamerV1;
                cstreamer << "CookLikelihood"
                        << "sumda="     << sumda
                        << "chi0="      << chi2[0]
@@ -1435,7 +1435,7 @@ AliTRDcluster *AliTRDtrackerV1::FindSeedingCluster(AliTRDstackLayer *layers
        
        // distances as squared distances
        Int_t index = 0;
-       Float_t ypos = 0.0, zpos = 0.0, distance = 0.0, nearest_distance =100000.0; 
+       Float_t ypos = 0.0, zpos = 0.0, distance = 0.0, nearestDistance =100000.0; 
        ypos = reference->GetYref(0);
        zpos = reference->GetZref(0);
        AliTRDcluster *currentBest = 0x0, *temp = 0x0;
@@ -1448,8 +1448,8 @@ AliTRDcluster *AliTRDtrackerV1::FindSeedingCluster(AliTRDstackLayer *layers
                temp = layers[ils].GetCluster(index);
                if(!temp) continue;
                distance = (temp->GetY() - ypos) * (temp->GetY() - ypos) + (temp->GetZ() - zpos) * (temp->GetZ() - zpos);
-               if(distance < nearest_distance){
-                       nearest_distance = distance;
+               if(distance < nearestDistance){
+                       nearestDistance = distance;
                        currentBest = temp;
                }
        }
@@ -1627,7 +1627,7 @@ AliTRDstackLayer *AliTRDtrackerV1::MakeSeedingLayer(AliTRDstackLayer *layers
                for(Int_t i = 0; i < nRows; i++)
                        for(Int_t j = 0; j < nCols; j++)
                                hist(i,j) = histogram[i][j];
-               TTreeSRedirector &cstreamer = *fDebugStreamer;
+               TTreeSRedirector &cstreamer = *fDebugStreamerV1;
                cstreamer << "MakeSeedingLayer"
                        << "Iteration="  << fSieveSeeding
                        << "plane="      << plane
@@ -1644,7 +1644,8 @@ AliTRDstackLayer *AliTRDtrackerV1::MakeSeedingLayer(AliTRDstackLayer *layers
 }
 
 //____________________________________________________________________
-void AliTRDtrackerV1::GetSeedingConfig(Int_t iconfig, Int_t planes[4])
+void AliTRDtrackerV1::GetSeedingConfig(Int_t iconfig
+                                     , Int_t planes[4]) const
 {
   //
   // Map seeding configurations to detector planes.
@@ -1785,7 +1786,8 @@ void AliTRDtrackerV1::GetSeedingConfig(Int_t iconfig, Int_t planes[4])
 }
 
 //____________________________________________________________________
-void AliTRDtrackerV1::GetExtrapolationConfig(Int_t iconfig, Int_t planes[2])
+void AliTRDtrackerV1::GetExtrapolationConfig(Int_t iconfig
+                                           , Int_t planes[2]) const
 {
   //
   // Returns the extrapolation planes for a seeding configuration.
index 6852d74..9c69df9 100644 (file)
@@ -53,8 +53,8 @@ class AliTRDtrackerV1 : public AliTRDtracker
        ~AliTRDtrackerV1();
   
        Int_t          Clusters2Tracks(AliESDEvent *esd);
-       void           GetSeedingConfig(Int_t iconfig, Int_t planes[4]);
-       void           GetExtrapolationConfig(Int_t iconfig, Int_t planes[2]);
+       void           GetSeedingConfig(Int_t iconfig, Int_t planes[4]) const;
+       void           GetExtrapolationConfig(Int_t iconfig, Int_t planes[2]) const;
        void           SetRecoParam(AliTRDrecoParam *p){fRecoParam = p;}
        
  protected:
@@ -79,13 +79,13 @@ class AliTRDtrackerV1 : public AliTRDtracker
 
  private:
 
-       static Double_t      fTopologicQA[kNConfigs];         //  Topologic quality
+       static Double_t      fgTopologicQA[kNConfigs];        //  Topologic quality
        Double_t             fTrackQuality[kMaxTracksStack];  //  Track quality 
        Int_t                fSeedLayer[kMaxTracksStack];     //  Seed layer
        Int_t                fSieveSeeding;                   //! Seeding iterator
        AliTRDrecoParam     *fRecoParam;                      //  Reconstruction parameters
        AliTRDtrackerFitter *fFitter;                         //! Fitter class of the tracker
-       TTreeSRedirector    *fDebugStreamer;                  //! Debug stream of the tracker
+       TTreeSRedirector    *fDebugStreamerV1;                //! Debug stream of the tracker
 
        ClassDef(AliTRDtrackerV1, 1)                          //  Stand alone tracker development class