]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Removing MUON from the Coding Convention Violation top ten
authormartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 12 Apr 2004 17:21:06 +0000 (17:21 +0000)
committermartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 12 Apr 2004 17:21:06 +0000 (17:21 +0000)
MUON/AliMUONClusterFinderAZ.cxx
MUON/AliMUONClusterFinderVS.cxx
MUON/AliMUONRawCluster.cxx
MUON/AliMUONRawCluster.h

index 0a5f35efe428705762908fb9bc81525a0f7245d0..47834dbb2e8374ce59fc9e36e2ee84d319c4a92e 100644 (file)
@@ -2305,8 +2305,8 @@ void AliMUONClusterFinderAZ::AddRawCluster(Double_t x, Double_t y, Double_t fmin
     cnew.SetCharge(cath, 100);
     cnew.SetPeakSignal(cath,20);
     cnew.SetMultiplicity(cath, 5);
-    cnew.fNcluster[cath] = 1;
-    cnew.fChi2[cath] = fmin; //0.1;
+    cnew.SetNcluster(cath, 1);
+    cnew.SetChi2(cath, fmin); //0.1;
     /*
     cnew.fMultiplicity[cath]=c->fMultiplicity[cath];
     for (i=0; i<fMul[cath]; i++) {
index 9416f5ff0064e2bffd760b3e28e1a7b8db2e5a14..f7899f8cec79ce975b0e5e3dd34c4f0a7de49b17 100644 (file)
@@ -173,8 +173,8 @@ void AliMUONClusterFinderVS::SplitByLocalMaxima(AliMUONRawCluster *c)
 
        c->SetX(1,fXFit[0]);
        c->SetY(1,fYFit[0]);
-       c->fChi2[0]=chi2;
-       c->fChi2[1]=chi2;
+       c->SetChi2(0,chi2);
+       c->SetChi2(1,chi2);
         // Force on anod
        c->SetX(0, fSeg[0]->GetAnod(c->GetX(0)));
        c->SetX(1, fSeg[1]->GetAnod(c->GetX(1)));
@@ -595,10 +595,10 @@ void AliMUONClusterFinderVS::SplitByLocalMaxima(AliMUONRawCluster *c)
            // fChi2[1]=sChi2[0]=chi2s;
 
            if (chi2f<=fGhostChi2Cut && chi2s<=fGhostChi2Cut)
-               c->fGhost=1;
+               c->SetGhost(1);
            if   (chi2f>fGhostChi2Cut && chi2s>fGhostChi2Cut) {
                // we keep the ghost
-               c->fGhost=2;
+               c->SetGhost(2);
                chi2s=-1;
                chi2f=-1;
            }
@@ -614,7 +614,7 @@ void AliMUONClusterFinderVS::SplitByLocalMaxima(AliMUONRawCluster *c)
                }
                Split(c);
            }
-           c->fGhost=0;
+           c->SetGhost(0);
        }
 
     } else if (fNLocal[0]==2 &&  fNLocal[1]==1) {
@@ -1495,7 +1495,7 @@ void AliMUONClusterFinderVS::FindRawClusters()
            c.SetTrack(1, dig->Track(0));
            c.SetTrack(2, dig->Track(1));
            // tag the beginning of cluster list in a raw cluster
-           c.fNcluster[0]=-1;
+           c.SetNcluster(0,-1);
            Float_t xcu, ycu;
            fSeg[cath]->GetPadC(i,j,xcu, ycu, fZPlane);
            fSector= fSeg[cath]->Sector(i,j)/100;
@@ -1529,7 +1529,7 @@ void AliMUONClusterFinderVS::FindRawClusters()
 //      Analyse cluster and decluster if necessary
 //     
        ncls++;
-       c.fNcluster[1]=fNRawClusters;
+       c.SetNcluster(1,fNRawClusters);
        c.SetClusterType(c.PhysicsContribution());
 
        fNPeaks=0;
@@ -1949,17 +1949,17 @@ void AliMUONClusterFinderVS::Split(AliMUONRawCluster* c)
     AliMUONClusterInput& clusterInput = *(AliMUONClusterInput::Instance());
     for (j=0; j<2; j++) {
        AliMUONRawCluster cnew;
-       cnew.fGhost=c->fGhost;
+       cnew.SetGhost(c->GetGhost());
        for (cath=0; cath<2; cath++) {
-           cnew.fChi2[cath]=fChi2[0];
+           cnew.SetChi2(cath,fChi2[0]);
            // ?? why not cnew.fChi2[cath]=fChi2[cath];
            
            if (fNPeaks == 0) {
-               cnew.fNcluster[0]=-1;
-               cnew.fNcluster[1]=fNRawClusters;
+               cnew.SetNcluster(0,-1);
+               cnew.SetNcluster(1,fNRawClusters);
            } else {
-               cnew.fNcluster[0]=fNPeaks;
-               cnew.fNcluster[1]=0;
+               cnew.SetNcluster(0,fNPeaks);
+               cnew.SetNcluster(1,0);
            }
            cnew.SetMultiplicity(cath,0);
            cnew.SetX(cath, Float_t(fXFit[j]));
index d11a3d11a27a4af47fd89f0d52df8bff031809e0..558c9c347c171a66d00d1eb026964197a8bb44fe 100644 (file)
 /* $Id$ */
 
 // Class for the MUON RecPoint
-// It contains the propeorties of the physics cluters found in the tracking chambers
+// It contains the properties of the physics cluters found in the tracking chambers
 // RawCluster contains also the information from the both cathode of the chambers.
-
+//
+//
 
 #include "AliMUONRawCluster.h"
 #include <TArrayF.h>
@@ -161,12 +162,10 @@ Int_t AliMUONRawCluster::PhysicsContribution() const
     return 0;
   }
 }
-
-
-
 //____________________________________________________
 void AliMUONRawCluster::DumpIndex(void)
 {
+  // Dumping IdexMap of the cluster
     printf ("-----\n");
     for (Int_t icat=0;icat<2;icat++) {
        printf ("Mult %d\n",fMultiplicity[icat]);
@@ -176,10 +175,10 @@ void AliMUONRawCluster::DumpIndex(void)
        printf("\n");
     }
 }
-
 //____________________________________________________
 Int_t AliMUONRawCluster::AddCharge(Int_t i, Int_t Q)
 {
+  // Adding Q to the fQ value
   if (i==0 || i==1) {
     fQ[i]+=Q;
     return 1;
@@ -189,6 +188,7 @@ Int_t AliMUONRawCluster::AddCharge(Int_t i, Int_t Q)
 //____________________________________________________
 Int_t AliMUONRawCluster::AddX(Int_t i, Float_t X)
 {
+  // Adding X to the fX value
   if (i==0 || i==1) {
     fX[i]+=X;
     return 1;
@@ -198,6 +198,7 @@ Int_t AliMUONRawCluster::AddX(Int_t i, Float_t X)
 //____________________________________________________
 Int_t AliMUONRawCluster::AddY(Int_t i, Float_t Y)
 {
+  // Adding Y to the fY value 
   if (i==0 || i==1) {
     fY[i]+=Y;
     return 1;
@@ -207,6 +208,7 @@ Int_t AliMUONRawCluster::AddY(Int_t i, Float_t Y)
 //____________________________________________________
 Int_t AliMUONRawCluster::AddZ(Int_t i, Float_t Z)
 {
+  // Adding Z to the fZ value
   if (i==0 || i==1) {
     fZ[i]+=Z;
     return 1;
@@ -216,54 +218,82 @@ Int_t AliMUONRawCluster::AddZ(Int_t i, Float_t Z)
 //____________________________________________________
 Int_t AliMUONRawCluster::GetCharge(Int_t i) const
 {
+  // Getting the charge of the cluster
   if (i==0 || i==1) return fQ[i];
   else  return 99999;
 }
 //____________________________________________________
 Float_t AliMUONRawCluster::GetX(Int_t i)  const
 {
+  // Getting X value of the cluster
   if (i==0 || i==1) return fX[i];
   else  return 99999.;
 }
 //____________________________________________________
 Float_t AliMUONRawCluster::GetY(Int_t i) const 
 {
+  // Getting Y value of the cluster
   if (i==0 || i==1) return fY[i];
   else  return 99999.;
 }
 //____________________________________________________
 Float_t AliMUONRawCluster::GetZ(Int_t i) const 
 {
+  // Getting Z value of the cluster
   if (i==0 || i==1) return fZ[i];
   else  return 99999.;
 }
 //____________________________________________________
 Int_t AliMUONRawCluster::GetTrack(Int_t i) const 
 {
+  // Getting track i contributing to the cluster
   if (i==0 || i==1 || i==2) return fTracks[i];
   else  return 99999;
 }
 //____________________________________________________
 Int_t AliMUONRawCluster::GetPeakSignal(Int_t i) const 
 {
+  // Getting cluster peaksignal
   if (i==0 || i==1 ) return fPeakSignal[i];
   else  return 99999;
 }
 //____________________________________________________
 Int_t AliMUONRawCluster::GetMultiplicity(Int_t i) const 
 {
+  // Getting cluster multiplicity
   if (i==0 || i==1 ) return fMultiplicity[i];
   else  return 99999;
 }
 //____________________________________________________
 Int_t AliMUONRawCluster::GetClusterType() const 
 {
+  // Getting Cluster Type
   return fClusterType;
 }
-
+//____________________________________________________
+Int_t AliMUONRawCluster::GetGhost() const 
+{
+  // Getting Ghost
+  return fGhost;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::GetNcluster(Int_t i) const 
+{
+  // Getting number of clusters
+  if (i==0 || i==1 ) return fNcluster[i];
+  else  return 99999;
+}
+//____________________________________________________
+Float_t AliMUONRawCluster::GetChi2(Int_t i) const 
+{
+  // Getting chi2 value of the cluster
+  if (i==0 || i==1) return fChi2[i];
+  else  return 99999.;
+}
 //____________________________________________________
 Int_t AliMUONRawCluster::SetCharge(Int_t i, Int_t Q)
 {
+  // Setting Charge of the cluster
   if (i==0 || i==1) {
     fQ[i]=Q;
     return 1;
@@ -273,6 +303,7 @@ Int_t AliMUONRawCluster::SetCharge(Int_t i, Int_t Q)
 //____________________________________________________
 Int_t AliMUONRawCluster::SetX(Int_t i, Float_t X)
 {
+  // Setting X value of the cluster
   if (i==0 || i==1) {
     fX[i]=X;
     return 1;
@@ -282,6 +313,7 @@ Int_t AliMUONRawCluster::SetX(Int_t i, Float_t X)
 //____________________________________________________
 Int_t AliMUONRawCluster::SetY(Int_t i, Float_t Y)
 {
+  // Setting Y value of the cluster
   if (i==0 || i==1) {
     fY[i]=Y;
     return 1;
@@ -291,6 +323,7 @@ Int_t AliMUONRawCluster::SetY(Int_t i, Float_t Y)
 //____________________________________________________
 Int_t AliMUONRawCluster::SetZ(Int_t i, Float_t Z)
 {
+  // Setting Z value of the cluste
   if (i==0 || i==1) {
     fZ[i]=Z;
     return 1;
@@ -300,6 +333,7 @@ Int_t AliMUONRawCluster::SetZ(Int_t i, Float_t Z)
 //____________________________________________________
 Int_t AliMUONRawCluster::SetTrack(Int_t i, Int_t track)
 {
+  // Setting tracks contributing to the cluster
   if (i==0 || i==1 || i==2) {
     fTracks[i]=track;
     return 1;
@@ -309,6 +343,7 @@ Int_t AliMUONRawCluster::SetTrack(Int_t i, Int_t track)
 //____________________________________________________
 Int_t AliMUONRawCluster::SetPeakSignal(Int_t i, Int_t peaksignal)
 {
+  // Setting PeakSignal of the cluster
   if (i==0 || i==1 ) {
     fPeakSignal[i]=peaksignal;
     return 1;
@@ -318,6 +353,7 @@ Int_t AliMUONRawCluster::SetPeakSignal(Int_t i, Int_t peaksignal)
 //____________________________________________________
 Int_t AliMUONRawCluster::SetMultiplicity(Int_t i, Int_t mul)
 {
+  // Setting multiplicity of the cluster
   if (i==0 || i==1 ) {
     fMultiplicity[i]=mul;
     return 1;
@@ -327,6 +363,34 @@ Int_t AliMUONRawCluster::SetMultiplicity(Int_t i, Int_t mul)
 //____________________________________________________
 Int_t AliMUONRawCluster::SetClusterType(Int_t type)
 {
+  // Setting the cluster type
   fClusterType=type;
   return 1;
 }
+//____________________________________________________
+Int_t AliMUONRawCluster::SetGhost(Int_t ghost)
+{
+  // Setting the ghost
+  fGhost=ghost;
+  return 1;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::SetNcluster(Int_t i, Int_t ncluster)
+{
+  // Setting number the cluster
+  if (i==0 || i==1 ) {
+    fNcluster[i]=ncluster;
+    return 1;
+  }
+  else return 0;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::SetChi2(Int_t i, Float_t chi2)
+{
+  // Setting chi2 of the cluster
+  if (i==0 || i==1) {
+    fChi2[i]=chi2;
+    return 1;
+  }
+  else return 0;
+}
index d10d91696cfa7cd9d919d4fdbef6cf3c5f53fe55..a0efc6c02979546c6f03a69a66ed5ec66e03e80d 100644 (file)
@@ -42,6 +42,9 @@ public:
    Int_t        GetPeakSignal(Int_t i) const;
    Int_t        GetMultiplicity(Int_t i) const;
    Int_t        GetClusterType() const;
+   Int_t        GetGhost() const;
+   Int_t        GetNcluster(Int_t i) const;
+   Float_t      GetChi2(Int_t i) const;
 
    Int_t        SetCharge(Int_t i,Int_t Q);
    Int_t        SetX(Int_t i, Float_t X);
@@ -51,19 +54,15 @@ public:
    Int_t        SetPeakSignal(Int_t i, Int_t peaksignal);
    Int_t        SetMultiplicity(Int_t i, Int_t mul);
    Int_t        SetClusterType(Int_t type);
+   Int_t        SetGhost(Int_t ghost);
+   Int_t        SetNcluster(Int_t i, Int_t ncluster);
+   Int_t        SetChi2(Int_t i, Float_t chi2);
 
    Int_t       fIndexMap[50][2];  // indeces of digits
    Int_t       fOffsetMap[50][2]; // Emmanuel special
    Float_t     fContMap[50][2];   // Contribution from digit
    Int_t       fPhysicsMap[50];   // Distinguish signal and background contr.
-   Int_t       fNcluster[2];      // Number of clusters
-   Float_t     fChi2[2];          // Chi**2 of fit
-   Int_t       fGhost;            // 0 if not a ghost or ghost problem solved
-                                  // >0 if ghost problem remains because
-                                  // 1 both (true and ghost) satify 
-                                  //   charge chi2 compatibility
-                                  // 2 none give satisfactory chi2
+  
 private:
    Int_t       fQ[2]  ;           // Q of cluster (in ADC counts)     
    Float_t     fX[2]  ;           // X of cluster
@@ -73,6 +72,13 @@ private:
    Int_t       fPeakSignal[2];    // Peak signal 
    Int_t       fMultiplicity[2];  // Cluster multiplicity
    Int_t       fClusterType;      // Cluster type
+   Int_t       fGhost;            // 0 if not a ghost or ghost problem solved
+                                  // >0 if ghost problem remains because
+                                  // 1 both (true and ghost) satify 
+                                  //   charge chi2 compatibility
+                                  // 2 none give satisfactory chi2
+   Int_t       fNcluster[2];      // Number of clusters
+   Float_t     fChi2[2];          // Chi**2 of fit
 
    ClassDef(AliMUONRawCluster,1)  //Cluster class for MUON
 };