]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSresponseSSD.cxx
Added functions SetADCpereV, DEvToADC, and IEvToADC, Plus cleanded up things
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSSD.cxx
index fee377ab6f2e6fe2b0c5a933ab0e76eac915b600..a35d01a9643b1f80ab7336d7a079c06131da452f 100644 (file)
 #include "AliITSresponseSSD.h"
 #include "AliITSgeom.h"
 
-ClassImp(AliITSresponseSSD)    
-//----------------------------------------------------------
-AliITSresponseSSD::AliITSresponseSSD()
-{
-  // constructor
-  SetDiffCoeff();
-  SetNoiseParam();
-  SetDataType();
-  SetSigmaSpread();
-  SetParamOptions();
-  SetNDetParam();
-  fDetPar = new Float_t[fNPar];
-  if (fNPar==6) {
-    fDetPar[0]=10.;
-    fDetPar[1]=5.;
-    fDetPar[2]=0.02;
-    fDetPar[3]=0.02;
-    fDetPar[4]=0.02;
-    fDetPar[5]=0.03;
-  }
-  
-  
-}
+ClassImp(AliITSresponseSSD)
+
+//______________________________________________________________________
+AliITSresponseSSD::AliITSresponseSSD(){
+    // constructor
 
-//----------------------------------------------------------
-AliITSresponseSSD::~AliITSresponseSSD()
-{
-  // destructor
-  delete [] fDetPar;
-  
+    SetDiffCoeff();
+    SetNoiseParam();
+    SetDataType();
+    SetSigmaSpread();
+    SetParamOptions();
+    SetNDetParam();
+    SetADCpereV();
+    fDetPar = new Float_t[fNPar];
+    if (fNPar==6) {
+       fDetPar[0]=10.;
+       fDetPar[1]=5.;
+       fDetPar[2]=0.02;
+       fDetPar[3]=0.02;
+       fDetPar[4]=0.02;
+       fDetPar[5]=0.03;
+    } // end if
 }
+//______________________________________________________________________
+AliITSresponseSSD::~AliITSresponseSSD(){
+    // destructor
 
-//__________________________________________________________________________
-AliITSresponseSSD::AliITSresponseSSD(const AliITSresponseSSD &source){
-  //     Copy Constructor 
-  if(&source == this) return;
-  this->fNPar = source.fNPar;
-  this->fDetPar = source.fDetPar;
-  this->fNoiseP = source.fNoiseP;
-  this->fNoiseN = source.fNoiseN;
-  this->fSigmaP = source.fSigmaP;
-  this->fSigmaN = source.fSigmaN;
-  this->fDiffCoeff = source.fDiffCoeff;
-  this->fOption1 = source.fOption1;
-  this->fOption2 = source.fOption2;
-  this->fDataType = source.fDataType;
-  return;
+    delete [] fDetPar;
 }
+//______________________________________________________________________
+AliITSresponseSSD& AliITSresponseSSD::operator=(const AliITSresponseSSD &src) {
+    // = operator.
+
+    if(&src == this) return *this;
+
+    this->fNPar      = src.fNPar;
+    for(Int_t i=0;i<this->fNPar;i++) this->fDetPar[i] = src.fDetPar[i];
+    this->fNoiseP    = src.fNoiseP;
+    this->fNoiseN    = src.fNoiseN;
+    this->fSigmaP    = src.fSigmaP;
+    this->fSigmaN    = src.fSigmaN;
+    this->fDiffCoeff = src.fDiffCoeff;
+    this->fADCpereV  = src.fADCpereV;
+    this->fOption1   = src.fOption1;
+    this->fOption2   = src.fOption2;
+    this->fDataType  = src.fDataType;
 
+    return *this;
+}
 //_________________________________________________________________________
-AliITSresponseSSD& 
-  AliITSresponseSSD::operator=(const AliITSresponseSSD &source) {
-  //    Assignment operator
-  if(&source == this) return *this;
-  this->fNPar = source.fNPar;
-  this->fDetPar = source.fDetPar;
-  this->fNoiseP = source.fNoiseP;
-  this->fNoiseN = source.fNoiseN;
-  this->fSigmaP = source.fSigmaP;
-  this->fSigmaN = source.fSigmaN;
-  this->fDiffCoeff = source.fDiffCoeff;
-  this->fOption1 = source.fOption1;
-  this->fOption2 = source.fOption2;
-  this->fDataType = source.fDataType;
-  return *this;
+AliITSresponseSSD::AliITSresponseSSD(const AliITSresponseSSD &src) {
+    // copy constructor
+
+    *this = src;
 }
+//______________________________________________________________________
+void AliITSresponseSSD::SetDetParam(Float_t  *par){
+    // set det param
+    Int_t i;
 
-//----------------------------------------------------------
-void AliITSresponseSSD::SetDetParam(Float_t  *par)
-{
-  // set det param
-  Int_t i;
-  for (i=0; i<fNPar; i++) {
-    fDetPar[i]=par[i];
-    //printf("\n CompressPar %d %d \n",i,fCPar[i]);
-    
-  } 
+    for (i=0; i<fNPar; i++) {
+       fDetPar[i]=par[i];
+       //printf("\n CompressPar %d %d \n",i,fCPar[i]);    
+    } // end for i
 }
-void AliITSresponseSSD::GetDetParam(Float_t  *par)
-{
-  // get det param  
-  Int_t i;  
-  for (i=0; i<fNPar; i++) {
-    par[i]=fDetPar[i];
-  }
+//______________________________________________________________________
+void AliITSresponseSSD::GetDetParam(Float_t  *par){
+    // get det param
+    Int_t i;
+
+    for (i=0; i<fNPar; i++) {
+       par[i]=fDetPar[i];
+    } // end for i
 }