]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSCalibrationSPD.cxx
Coding conventions and fixes (M.Masera,D.Elia)
[u/mrichter/AliRoot.git] / ITS / AliITSCalibrationSPD.cxx
index eb0afb8979f3b0d4cb399df1ce614621ccb81350..94be4a4b356a5dbc530f75b756dda31e1d4e07f1 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-///////////////////////////////////////////////////////////////////////////
-//  Calibration class for set:ITS                   
-//  Specific subdetector implementation for         
-//  Silicon pixels                                  
-//
-//  Modified by D. Elia, G.E. Bruno, H. Tydesjo
-//  March-April 2006
-//
-///////////////////////////////////////////////////////////////////////////
+
 
 #include "AliITSCalibrationSPD.h"
 
@@ -32,6 +24,16 @@ const Double_t AliITSCalibrationSPD::fgkCouplRowDefault = 0.047;
 const Double_t AliITSCalibrationSPD::fgkBiasVoltageDefault = 18.182;
 
 ClassImp(AliITSCalibrationSPD) 
+///////////////////////////////////////////////////////////////////////////
+//  Calibration class for set:ITS                   
+//  Specific subdetector implementation for         
+//  Silicon pixels                                  
+//
+//  Modified by D. Elia, G.E. Bruno, H. Tydesjo
+//  March-April 2006
+//
+///////////////////////////////////////////////////////////////////////////
+
 //______________________________________________________________________
 AliITSCalibrationSPD::AliITSCalibrationSPD():
 AliITSCalibration(),
@@ -42,8 +44,8 @@ fSigma(fgkSigmaDefault),
 fCouplCol(fgkCouplColDefault),
 fCouplRow(fgkCouplRowDefault),
 fBiasVoltage(fgkBiasVoltageDefault),
-nrDead(0),
-nrNoisy(0){
+fNrDead(0),
+fNrNoisy(0){
   // constructor
 
    SetThresholds(fgkThreshDefault,fgkSigmaDefault);
@@ -54,27 +56,41 @@ nrNoisy(0){
 }
 //_________________________________________________________________________
 
-
 void AliITSCalibrationSPD::AddDead(UInt_t col, UInt_t row) {
-  fDeadChannels.Set(nrDead*2+2);
-  fDeadChannels.AddAt(col,nrDead*2);
-  fDeadChannels.AddAt(row,nrDead*2+1);
-  nrDead++;
+  //
+  // Add a dead channel to fDeadChannel array
+  //
+  fDeadChannels.Set(fNrDead*2+2);
+  fDeadChannels.AddAt(col,fNrDead*2);
+  fDeadChannels.AddAt(row,fNrDead*2+1);
+  fNrDead++;
 }
+//_________________________________________________________________________
 Int_t AliITSCalibrationSPD::GetDeadColAt(UInt_t index) {
-  if (index<nrDead) {
+  // 
+  // Returns column of index-th dead channel
+  //
+  if (index<fNrDead) {
     return fDeadChannels.At(index*2);
   }
   return -1;
 }
+//_________________________________________________________________________
 Int_t AliITSCalibrationSPD::GetDeadRowAt(UInt_t index) {
-  if (index<nrDead) {
+  // 
+  // Returns row of index-th dead channel
+  //
+  if (index<fNrDead) {
     return fDeadChannels.At(index*2+1);
   }
   return -1;
 }
+//_________________________________________________________________________
 Bool_t AliITSCalibrationSPD::IsPixelDead(Int_t col, Int_t row) const {
-  for (UInt_t i=0; i<nrDead; i++) { 
+  //
+  // Check if pixel (col,row) is dead
+  //
+  for (UInt_t i=0; i<fNrDead; i++) { 
     if (fDeadChannels.At(i*2)==col && fDeadChannels.At(i*2+1)==row) {
       return true;
     }
@@ -112,27 +128,41 @@ Bool_t AliITSCalibrationSPD::IsPixelDead(Int_t mod,Int_t ix,Int_t iz) const {
   return dead;
 }
 //____________________________________________________________________________
-
 void AliITSCalibrationSPD::AddNoisy(UInt_t col, UInt_t row) {
-  fDeadChannels.Set(nrNoisy*2+2);
-  fNoisyChannels.AddAt(col,nrNoisy*2);
-  fNoisyChannels.AddAt(row,nrNoisy*2+1);
-  nrNoisy++;
+  //
+  // add noisy pixel 
+  //
+  fDeadChannels.Set(fNrNoisy*2+2);
+  fNoisyChannels.AddAt(col,fNrNoisy*2);
+  fNoisyChannels.AddAt(row,fNrNoisy*2+1);
+  fNrNoisy++;
 }
+//____________________________________________________________________________
 Int_t AliITSCalibrationSPD::GetNoisyColAt(UInt_t index) {
-  if (index<nrNoisy) {
+  //
+  // Get column of index-th noisy pixel
+  //
+  if (index<fNrNoisy) {
     return fNoisyChannels.At(index*2);
   }
   return -1;
 }
+//____________________________________________________________________________
 Int_t AliITSCalibrationSPD::GetNoisyRowAt(UInt_t index) {
-  if (index<nrNoisy) {
+  //
+  // Get row of index-th noisy pixel
+  //
+  if (index<fNrNoisy) {
     return fNoisyChannels.At(index*2+1);
   }
   return -1;
 }
+//____________________________________________________________________________
 Bool_t AliITSCalibrationSPD::IsPixelNoisy(Int_t col, Int_t row) const {
-  for (UInt_t i=0; i<nrNoisy; i++) { 
+  //
+  // Check if pixel (col,row) is noisy
+  //
+  for (UInt_t i=0; i<fNrNoisy; i++) { 
     if (fNoisyChannels.At(i*2)==col && fNoisyChannels.At(i*2+1)==row) {
       return true;
     }