/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ #include #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; } } //---------------------------------------------------------- AliITSresponseSSD::~AliITSresponseSSD() { // destructor delete [] fDetPar; delete fDetPar; } //__________________________________________________________________________ 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; } //---------------------------------------------------------- void AliITSresponseSSD::SetDetParam(Float_t *par) { // set det param Int_t i; for(i=0; i> 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); } }