]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSresponseSSD.cxx
LUTs mapping symnames and original global matrices removed from AliGeomManager, which...
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSSD.cxx
index 962a82c7c2132ec061133c1164969813608cae3a..d6b585a244bf2bb81cdc0e61800817c25fec140b 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-#include <TMath.h>
-#include <TString.h>
 
 #include "AliITSresponseSSD.h"
-#include "AliITSgeom.h"
+//////////////////////////////////////////////////
+//  Base response class for ITS                 //
+//  It is used to set static data members       //
+//  connected to parameters equal for all       //
+//  the SSD modules                             //
+//////////////////////////////////////////////////
 
-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;
-  }
-  
-  
-}
 
-//----------------------------------------------------------
-AliITSresponseSSD::~AliITSresponseSSD()
-{
-  // destructor
-  delete [] fDetPar;
-  delete fDetPar;
-  
+const Float_t AliITSresponseSSD::fgkDiffCoeffDefault = 0.;
+const TString AliITSresponseSSD::fgkOption1Default = "";
+const TString AliITSresponseSSD::fgkOption2Default = "";
+const Double_t AliITSresponseSSD::fgkfCouplingPR = 0.01;
+const Double_t AliITSresponseSSD::fgkfCouplingPL = 0.01;
+const Double_t AliITSresponseSSD::fgkfCouplingNR = 0.01;
+const Double_t AliITSresponseSSD::fgkfCouplingNL = 0.01;
+const Int_t AliITSresponseSSD::fgkZSThreshold = 3;
+
+
+ClassImp(AliITSresponseSSD)
+
+//______________________________________________________________________
+AliITSresponseSSD::AliITSresponseSSD():AliITSresponse(),
+fADCpereV(0),
+fKeVperADC(0),
+fCouplingPR(0),
+fCouplingPL(0),
+fCouplingNR(0),
+fCouplingNL(9),
+fZSThreshold(0),
+fOption1(),
+fOption2(){
+    // Default Constructor
+
+  SetDiffCoeff(fgkDiffCoeffDefault,0.);
+  SetParamOptions(fgkOption1Default.Data(),fgkOption2Default.Data());
+  SetADCpereV();
+  SetKeVperADC();
+  SetCouplings(fgkfCouplingPR,fgkfCouplingPL,fgkfCouplingNR,fgkfCouplingNL);
+  SetZSThreshold(fgkZSThreshold);
 }
 
-//__________________________________________________________________________
-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;
+//______________________________________________________________________
+AliITSresponseSSD::AliITSresponseSSD(const AliITSresponseSSD &ob) : AliITSresponse(ob),
+fADCpereV(ob.fADCpereV),
+fKeVperADC(ob.fKeVperADC),
+fCouplingPR(ob.fCouplingPR),
+fCouplingPL(ob.fCouplingPL),
+fCouplingNR(ob.fCouplingNR),
+fCouplingNL(ob.fCouplingNL),
+fZSThreshold(ob.fZSThreshold),
+fOption1(ob.fOption1),
+fOption2(ob.fOption2) {
+  // Copy constructor
+
 }
 
-//_________________________________________________________________________
-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;
+//______________________________________________________________________
+AliITSresponseSSD& AliITSresponseSSD::operator=(const AliITSresponseSSD& ob){
+  // Assignment operator
+  this->~AliITSresponseSSD();
+  new(this) AliITSresponseSSD(ob);
   return *this;
 }
 
-//----------------------------------------------------------
-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]);
-    
-  } 
-}
-void AliITSresponseSSD::GetDetParam(Float_t  *par)
-{
-  // get det param  
-  Int_t i;  
-  for (i=0; i<fNPar; i++) {
-    par[i]=fDetPar[i];
-  }
-}