]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Avoid duplication of data memeber names in the base and derived classes since it...
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Feb 2008 09:43:18 +0000 (09:43 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Feb 2008 09:43:18 +0000 (09:43 +0000)
HMPID/AliHMPIDCluster.cxx
HMPID/AliHMPIDCluster.h

index 27650468f1044194fd817febbad1d6a975547a65..ab7292039d93e25b238fe01be35080e4e9123c50 100644 (file)
@@ -88,7 +88,7 @@ void AliHMPIDCluster::CoG()
 //   Returns: none
   Int_t minPadX=999,minPadY=999,maxPadX=-1,maxPadY=-1;      //for box finding  
   if(fDigs==0) return;                                      //no digits in this cluster
-  fX=fY=fQRaw=0;                                            //init summable parameters
+  fXX=fYY=fQRaw=0;                                            //init summable parameters
   Int_t maxQpad=-1,maxQ=-1;                                 //to calculate the pad with the highest charge
   AliHMPIDDigit *pDig=0x0;
   for(Int_t iDig=0;iDig<fDigs->GetEntriesFast();iDig++){    //digits loop
@@ -100,14 +100,14 @@ void AliHMPIDCluster::CoG()
     if(pDig->PadPcY() < minPadY) minPadY = pDig->PadPcY();  //                                                MinY   
     
     Float_t q=pDig->Q();                                    //get QDC 
-    fX += pDig->LorsX()*q;fY +=pDig->LorsY()*q;             //add digit center weighted by QDC
+    fXX += pDig->LorsX()*q;fYY +=pDig->LorsY()*q;             //add digit center weighted by QDC
     fQRaw+=q;                                               //increment total charge 
     if(q>maxQ) {maxQpad = pDig->Pad();maxQ=(Int_t)q;}       // to find pad with highest charge
   }//digits loop
   
   fBox=(maxPadX-minPadX+1)*100+maxPadY-minPadY+1;           // dimension of the box: format Xdim*100+Ydim
   
-  if ( fQRaw != 0 )   fX/=fQRaw;fY/=fQRaw;                  //final center of gravity
+  if ( fQRaw != 0 )   fXX/=fQRaw;fYY/=fQRaw;                  //final center of gravity
    
   if(fDigs->GetEntriesFast()>1&&fgDoCorrSin)CorrSin();       //correct it by sinoid   
   
@@ -118,7 +118,7 @@ void AliHMPIDCluster::CoG()
   fNlocMax=0;                                               // proper status from this method
   fSt=kCoG;
   
-  if(AliHMPIDParam::fgInstanceType) SetClusterParams(fX,fY,fCh);                              //need to fill the AliCluster3D part
+  if(AliHMPIDParam::fgInstanceType) SetClusterParams(fXX,fYY,fCh);                              //need to fill the AliCluster3D part
  
 }//CoG()
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -128,9 +128,9 @@ void AliHMPIDCluster::CorrSin()
 // Arguments: none
 //   Returns: none
   Int_t pc,px,py;
-  AliHMPIDParam::Lors2Pad(fX,fY,pc,px,py);             //tmp digit to get it center
-  Float_t x=fX-AliHMPIDParam::LorsX(pc,px);                    //diff between cluster x and center of the pad contaning this cluster   
-  fX+=3.31267e-2*TMath::Sin(2*TMath::Pi()/0.8*x)-2.66575e-3*TMath::Sin(4*TMath::Pi()/0.8*x)+2.80553e-3*TMath::Sin(6*TMath::Pi()/0.8*x)+0.0070;
+  AliHMPIDParam::Lors2Pad(fXX,fYY,pc,px,py);             //tmp digit to get it center
+  Float_t x=fXX-AliHMPIDParam::LorsX(pc,px);                    //diff between cluster x and center of the pad contaning this cluster   
+  fXX+=3.31267e-2*TMath::Sin(2*TMath::Pi()/0.8*x)-2.66575e-3*TMath::Sin(4*TMath::Pi()/0.8*x)+2.80553e-3*TMath::Sin(6*TMath::Pi()/0.8*x)+0.0070;
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 void AliHMPIDCluster::Draw(Option_t*)
@@ -256,7 +256,7 @@ Int_t AliHMPIDCluster::Solve(TClonesArray *pCluLst,Bool_t isTryUnfold)
   Int_t iCluCnt=pCluLst->GetEntriesFast();                                               //get current number of clusters already stored in the list by previous operations
   if(isTryUnfold==kFALSE || Size()==1) {                                                 //if cluster contains single pad there is no way to improve the knowledge 
     fSt = (isTryUnfold)? kSi1: kNot;
-    if(AliHMPIDParam::fgInstanceType) SetClusterParams(fX,fY,fCh);  
+    if(AliHMPIDParam::fgInstanceType) SetClusterParams(fXX,fYY,fCh);  
     new ((*pCluLst)[iCluCnt++]) AliHMPIDCluster(*this);  //add this raw cluster 
     return 1;
   } 
@@ -318,8 +318,8 @@ Int_t AliHMPIDCluster::Solve(TClonesArray *pCluLst,Bool_t isTryUnfold)
 // case 1 -> no loc max found
  if ( fNlocMax == 0) {                                                                       // case of no local maxima found: pads with same charge...
    
-   ierflg = fitter->SetParameter(3*fNlocMax  ,Form("x%i",fNlocMax),fX,0.1,0,0);              // Init values taken from CoG() -> fX,fY,fQRaw
-   ierflg = fitter->SetParameter(3*fNlocMax+1,Form("y%i",fNlocMax),fY,0.1,0,0);              //
+   ierflg = fitter->SetParameter(3*fNlocMax  ,Form("x%i",fNlocMax),fXX,0.1,0,0);              // Init values taken from CoG() -> fXX,fYY,fQRaw
+   ierflg = fitter->SetParameter(3*fNlocMax+1,Form("y%i",fNlocMax),fYY,0.1,0,0);              //
    ierflg = fitter->SetParameter(3*fNlocMax+2,Form("q%i",fNlocMax),fQRaw,0.1,0,10000);       //
    
    fNlocMax = 1;
@@ -328,7 +328,7 @@ Int_t AliHMPIDCluster::Solve(TClonesArray *pCluLst,Bool_t isTryUnfold)
 
 // case 2 -> loc max found. Check # of loc maxima 
  if ( fNlocMax >= kMaxLocMax)  { 
- if(AliHMPIDParam::fgInstanceType) SetClusterParams(fX,fY,fCh);                                                           // if # of local maxima exceeds kMaxLocMax...
+ if(AliHMPIDParam::fgInstanceType) SetClusterParams(fXX,fYY,fCh);                                                           // if # of local maxima exceeds kMaxLocMax...
    fSt = kMax;   new ((*pCluLst)[iCluCnt++]) AliHMPIDCluster(*this);                      //...add this raw cluster  
    } else {                                                                               //or resonable number of local maxima to fit and user requested it
   // Now ready for minimization step
@@ -353,8 +353,8 @@ Int_t AliHMPIDCluster::Solve(TClonesArray *pCluLst,Bool_t isTryUnfold)
    Int_t nvpar, nparx;
   
    for(Int_t i=0;i<fNlocMax;i++){                                                        //store the local maxima parameters
-     fitter->GetParameter(3*i   ,sName,  fX, fErrX , dummy, dummy);                      // X
-     fitter->GetParameter(3*i+1 ,sName,  fY, fErrY , dummy, dummy);                      // Y
+     fitter->GetParameter(3*i   ,sName,  fXX, fErrX , dummy, dummy);                      // X
+     fitter->GetParameter(3*i+1 ,sName,  fYY, fErrY , dummy, dummy);                      // Y
      fitter->GetParameter(3*i+2 ,sName,  fQ, fErrQ , dummy, dummy);                      // Q
      fitter->GetStats(fChi2, edm, errdef, nvpar, nparx);                                 //get fit infos
       if(fSt!=kAbn) {         
@@ -363,7 +363,7 @@ Int_t AliHMPIDCluster::Solve(TClonesArray *pCluLst,Bool_t isTryUnfold)
         if ( !IsInPc()) fSt = kEdg;                                                      // if Out of Pc
         if(fSt==kNoLoc) fNlocMax=0;                                                      // if with no loc max (pads with same charge..)
       }
-      if(AliHMPIDParam::fgInstanceType) SetClusterParams(fX,fY,fCh);                                                      //need to fill the AliCluster3D part
+      if(AliHMPIDParam::fgInstanceType) SetClusterParams(fXX,fYY,fCh);                                                      //need to fill the AliCluster3D part
       new ((*pCluLst)[iCluCnt++]) AliHMPIDCluster(*this);                               //add new unfolded cluster
       
    }
index 011dbf6e5ee122bd6701c839e3cf3466e8f0bce4..a836eacb7ed8b58edcf0111d07126d836e35e1cb 100644 (file)
@@ -21,14 +21,14 @@ class AliHMPIDCluster :public AliCluster3D
 public:
   enum EClusterStatus {kFrm,kCoG,kLo1,kUnf,kMax,kNot,kEdg,kSi1,kNoLoc,kAbn,kEmp=-1};      //status flags    
       AliHMPIDCluster():AliCluster3D(),
-                          fCh(-1),fSi(-1),fSt(kEmp),fBox(-1),fNlocMax(-1),fMaxQpad(-1),fMaxQ(-1),fQRaw(0),fQ(0),fErrQ(-1),fX(0),fErrX(-1),fY(0),fErrY(-1),fChi2(-1),fDigs(0) {} //empty ctor
+                          fCh(-1),fSi(-1),fSt(kEmp),fBox(-1),fNlocMax(-1),fMaxQpad(-1),fMaxQ(-1),fQRaw(0),fQ(0),fErrQ(-1),fXX(0),fErrX(-1),fYY(0),fErrY(-1),fChi2(-1),fDigs(0) {} //empty ctor
   
 
       AliHMPIDCluster(const AliHMPIDCluster &c):AliCluster3D(c),
                         fCh(c.fCh),fSi(c.fSi),fSt(c.fSt),fBox(c.fBox),fNlocMax(c.fNlocMax),fMaxQpad(c.fMaxQpad),fMaxQ(c.fMaxQ),fQRaw(c.fQRaw),
                         fQ (c.fQ ),fErrQ(c.fErrQ),
-                        fX (c.fX ),fErrX(c.fErrX),
-                        fY (c.fY ),fErrY(c.fErrY),fChi2(c.fChi2),fDigs(0)                  {}//copy ctor
+                        fXX (c.fXX ),fErrX(c.fErrX),
+                        fYY (c.fYY ),fErrY(c.fErrY),fChi2(c.fChi2),fDigs(0)                  {}//copy ctor
    virtual ~AliHMPIDCluster();//dtor   {if(fDigs) delete fDigs; fDigs=0;}
 //framework part                   
          void           Draw   (Option_t *opt=""                                  );                       //overloaded TObject::Print() to draw cluster in current canvas
@@ -50,22 +50,22 @@ public:
          Double_t       QRaw     (                                         )const{return fQRaw;                                  } //raw cluster charge in QDC channels 
          Double_t       Q        (                                         )const{return fQ;                                     } //given cluster charge in QDC channels 
          Double_t       Qe       (                                         )const{return fErrQ;                                  } //Error in cluster charge in QDC channels 
-         Double_t       X        (                                         )const{return fX;                                     } //cluster x position in LRS
+         Double_t       X        (                                         )const{return fXX;                                     } //cluster x position in LRS
          Double_t       Xe       (                                         )const{return fErrX;                                  } //cluster charge in QDC channels 
-         Double_t       Y        (                                         )const{return fY;                                     } //cluster y position in LRS 
+         Double_t       Y        (                                         )const{return fYY;                                     } //cluster y position in LRS 
          Double_t       Ye       (                                         )const{return fErrY;                                  } //cluster charge in QDC channels 
          Double_t       Chi2     (                                         )const{return fChi2;                                  } //chi2 of the fit
          void           DoCorrSin(Bool_t doCorrSin                         ){fgDoCorrSin=doCorrSin;}                                // Set sinoidal correction
-         void           SetX     (Double_t x                               ){fX=x;}                                                // Setter
-         void           SetY     (Double_t y                               ){fY=y;}                                                // Setter
+         void           SetX     (Double_t x                               ){fXX=x;}                                                // Setter
+         void           SetY     (Double_t y                               ){fYY=y;}                                                // Setter
          
 private:
 /*
   AliHMPIDCluster &operator=(const AliHMPIDCluster &c) {if(this == &c)return *this;AliCluster3D::operator=(c);          
                                                        fSi=c.fSi;  fSt=c.fSt; fCh=c.fCh; fBox=c.fBox;fNlocMax=c.fNlocMax;fMaxQpad=c.fMaxQpad; fMaxQ=c.fMaxQ;fQRaw=c.fQRaw;
                                                         fQ=c.fQ; fErrQ=c.fErrQ; 
-                                                        fX=c.fX; fErrX=c.fErrX;
-                                                        fY=c.fY; fErrY=c.fErrY; fChi2=c.fChi2;fDigs=c.fDigs ? new TObjArray(*c.fDigs):0; return *this;}
+                                                        fXX=c.fXX; fErrX=c.fErrX;
+                                                        fYY=c.fYY; fErrY=c.fErrY; fChi2=c.fChi2;fDigs=c.fDigs ? new TObjArray(*c.fDigs):0; return *this;}
 */
 protected:
   Int_t         fCh;          //chamber number
@@ -78,14 +78,14 @@ protected:
   Double_t      fQRaw;        //QDC value of the raw cluster
   Double_t      fQ;           //QDC value of the actual cluster
   Double_t      fErrQ;        //error on Q
-  Double_t      fX;           //local x postion, [cm]
+  Double_t      fXX;           //local x postion, [cm]
   Double_t      fErrX;        //error on x postion, [cm]
-  Double_t      fY;           //local y postion, [cm]
+  Double_t      fYY;           //local y postion, [cm]
   Double_t      fErrY;        //error on y postion, [cm]
   Double_t      fChi2;        //some estimator of the fit quality
   TObjArray    *fDigs;        //! list of digits forming this cluster
   static  Bool_t fgDoCorrSin; //flag to switch on/off correction for Sinusoidal to cluster reco
-  ClassDef(AliHMPIDCluster,7) //HMPID cluster class
+  ClassDef(AliHMPIDCluster,8) //HMPID cluster class
 };
 
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -109,7 +109,7 @@ void AliHMPIDCluster::Reset()
   fDigs=0; 
   fSt=kEmp;
   fQRaw=fQ=0;
-  fX=fY=0;
+  fXX=fYY=0;
   fCh=fSi=fBox=fNlocMax=fMaxQpad=-1;
   fMaxQ=fErrQ=fErrX=fErrY=fChi2=-1; //empty ctor
 }
@@ -122,8 +122,8 @@ Bool_t AliHMPIDCluster::IsInPc()
   Int_t pc = ((AliHMPIDDigit*)fDigs->At(0))->Pc();
  
   
-  if ( fX < AliHMPIDParam::MinPcX(pc) || fX > AliHMPIDParam::MaxPcX(pc) || 
-       fY < AliHMPIDParam::MinPcY(pc) || fY > AliHMPIDParam::MaxPcY(pc) ) return kFALSE;
+  if ( fXX < AliHMPIDParam::MinPcX(pc) || fXX > AliHMPIDParam::MaxPcX(pc) || 
+       fYY < AliHMPIDParam::MinPcY(pc) || fYY > AliHMPIDParam::MaxPcY(pc) ) return kFALSE;
   
   return kTRUE;