* provided "as is" without express or implied warranty. *
**************************************************************************/
-#include <TMath.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;
-//__________________________________________________________________________
-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::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;
-}
+ClassImp(AliITSresponseSSD)
-//----------------------------------------------------------
-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];
- }
+//______________________________________________________________________
+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);
}
-//______________________________________________________________________________
-void AliITSresponseSSD::Streamer(TBuffer &R__b)
-{
- // Stream an object of class AliITSresponseSSD.
+//______________________________________________________________________
+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
- if (R__b.IsReading()) {
- Version_t R__v = R__b.ReadVersion(); if (R__v) { }
- AliITSresponse::Streamer(R__b);
- R__b >> fNPar;
- //R__b.ReadArray(fDetPar); // Not to be printed out?
- R__b >> fNoiseP;
- R__b >> fNoiseN;
- R__b >> fSigmaP;
- R__b >> fSigmaN;
- R__b >> fDiffCoeff;
- //R__b.ReadArray(fOption1); // Not to be printed out?
- //R__b.ReadArray(fOption2); // Not to be printed out?
- fDataType.Streamer(R__b);
- } else {
- R__b.WriteVersion(AliITSresponseSSD::IsA());
- AliITSresponse::Streamer(R__b);
- R__b << fNPar;
- //R__b.WriteArray(fDetPar, __COUNTER__); // Not to be printed out?
- R__b << fNoiseP;
- R__b << fNoiseN;
- R__b << fSigmaP;
- R__b << fSigmaN;
- R__b << fDiffCoeff;
- //R__b.WriteArray(fOption1, __COUNTER__); // Not to be printed out?
- //R__b.WriteArray(fOption2, __COUNTER__); // Not to be printed out?
- fDataType.Streamer(R__b);
- }
}
+
+//______________________________________________________________________
+AliITSresponseSSD& AliITSresponseSSD::operator=(const AliITSresponseSSD& ob){
+ // Assignment operator
+ this->~AliITSresponseSSD();
+ new(this) AliITSresponseSSD(ob);
+ return *this;
+}
+