]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSresponseSSD.cxx
Added macro for visualization of the TOF ROOT geometry
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSSD.cxx
index 9a8b47dbd8ce593256aa272b6b0c6eeda5098614..627d51dfea331091e0e2d0cc2a9777ed65e2a5d1 100644 (file)
  **************************************************************************/
 
 #include <TMath.h>
+#include <TString.h>
 
 #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(){
+    // Default Constructor
+
+    fDetPar = 0;
+    fNPar   = 0;
+    fNoiseP = 0;
+    fNoiseN = 0;
+    fSigmaP = 0;
+    fSigmaN = 0;
+    fDiffCoeff = 0;
+    fADCpereV  = 0;
 }
+//______________________________________________________________________
+AliITSresponseSSD::AliITSresponseSSD(const char *dataType){
+    // constructor
 
-//----------------------------------------------------------
-AliITSresponseSSD::~AliITSresponseSSD()
-{
-  // destructor
-  delete [] fDetPar;
-  delete fDetPar;
-  
+    SetDiffCoeff();
+    SetNoiseParam();
+    SetDataType(dataType);
+    SetSigmaSpread();
+    SetParamOptions();
+    SetNDetParam();   // Sets fNPar=6 by default.
+    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
 }