From d6d98afcb564adb1107df7bd324d78f1ed60fcd8 Mon Sep 17 00:00:00 2001 From: hristov Date: Fri, 5 Sep 2008 12:55:49 +0000 Subject: [PATCH] Old classes needed for OCDB backward compatibility --- ITS/AliITSresponse.cxx | 38 ++++++++++++++++++++++++++++++++ ITS/AliITSresponse.h | 45 ++++++++++++++++++++++++++++++++++++++ ITS/AliITSresponseSPD.cxx | 46 +++++++++++++++++++++++++++++++++++++++ ITS/AliITSresponseSPD.h | 40 ++++++++++++++++++++++++++++++++++ ITS/ITSbaseLinkDef.h | 2 ++ ITS/libITSbase.pkg | 2 ++ 6 files changed, 173 insertions(+) create mode 100644 ITS/AliITSresponse.cxx create mode 100644 ITS/AliITSresponse.h create mode 100644 ITS/AliITSresponseSPD.cxx create mode 100644 ITS/AliITSresponseSPD.h diff --git a/ITS/AliITSresponse.cxx b/ITS/AliITSresponse.cxx new file mode 100644 index 00000000000..428816155a8 --- /dev/null +++ b/ITS/AliITSresponse.cxx @@ -0,0 +1,38 @@ +/************************************************************************** + * 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. * + **************************************************************************/ + + +////////////////////////////////////////////////////// +// Base Response class for ITS // +// Specific subdetector implementation is done in // +// AliITSresponseSPD // +// AliITSresponseSDD // +// AliITSresponseSSD // +////////////////////////////////////////////////////// + +#include "AliITSresponse.h" + +ClassImp(AliITSresponse) + +//______________________________________________________________________ +AliITSresponse::AliITSresponse(): +TObject(), +fDiffCoeff(0.), +fDiffCoeff1(0.){ + + // Default Constructor + +} + diff --git a/ITS/AliITSresponse.h b/ITS/AliITSresponse.h new file mode 100644 index 00000000000..448bd3edfe4 --- /dev/null +++ b/ITS/AliITSresponse.h @@ -0,0 +1,45 @@ +#ifndef ALIITSRESPONSE_H +#define ALIITSRESPONSE_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ + +#include +#include + +class AliITSsegmentation; +class TF1; +class AliITSgeom; + +//////////////////////////////////////////////////// +// // +// ITS base response virtual base class // +// // +//////////////////////////////////////////////////// +class AliITSresponse : public TObject { + public: + + AliITSresponse(); + virtual ~AliITSresponse() {;} + + virtual void SetDiffCoeff(Float_t p1, Float_t p2) { + fDiffCoeff=p1; fDiffCoeff1=p2;} + virtual void DiffCoeff(Float_t &diff,Float_t &diff1) const { + diff=fDiffCoeff; diff1=fDiffCoeff1;} + + + protected: + + void NotImplemented(const char *method) const {if(gDebug>0) + Warning(method,"This method is not implemented for this sub-class");} + + private: + Float_t fDiffCoeff; // Diffusion Coefficient (scaling the time) + Float_t fDiffCoeff1; // Diffusion Coefficient (constant term) + + + ClassDef(AliITSresponse,5) // Detector type response virtual base class +}; + +#endif diff --git a/ITS/AliITSresponseSPD.cxx b/ITS/AliITSresponseSPD.cxx new file mode 100644 index 00000000000..2dcebe7c2a9 --- /dev/null +++ b/ITS/AliITSresponseSPD.cxx @@ -0,0 +1,46 @@ +/************************************************************************** + * 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. * + **************************************************************************/ +/////////////////////////////////////////////////////////////////////////// +// Base Response class forITS +// It is used to set static data members +// connected to parameters equal for all +// the SPD modules +// +// Modified by D. Elia, G.E. Bruno +// March-April 2006 +// September 2007: Coupling params taken out +// left in AliITSCalibrationSPD only +// +/////////////////////////////////////////////////////////////////////////// + +#include "AliITSresponseSPD.h" + +const Float_t AliITSresponseSPD::fgkDiffCoeffDefault = 0.; //change this +const TString AliITSresponseSPD::fgkCouplingOptDefault = "old"; +const Float_t AliITSresponseSPD::fgkEccentricityDiffDefault = 0.85; + +ClassImp(AliITSresponseSPD) +//______________________________________________________________________ +AliITSresponseSPD::AliITSresponseSPD(): + AliITSresponse(), +fCouplOpt(0), +fEccDiff(0){ + + // constructor + SetCouplingOption(fgkCouplingOptDefault); + SetDiffCoeff(fgkDiffCoeffDefault,0.); + SetSigmaDiffusionAsymmetry(fgkEccentricityDiffDefault); + +} diff --git a/ITS/AliITSresponseSPD.h b/ITS/AliITSresponseSPD.h new file mode 100644 index 00000000000..b28e1e2a721 --- /dev/null +++ b/ITS/AliITSresponseSPD.h @@ -0,0 +1,40 @@ +#ifndef ALIITSRESPONSESPD_H +#define ALIITSRESPONSESPD_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + + +#include "AliITSresponse.h" +/////////////////////////////////////////// +// // +// ITS response class for SPD // +/////////////////////////////////////////// + +class AliITSresponseSPD : public AliITSresponse { + public: + AliITSresponseSPD(); // default constructor + virtual ~AliITSresponseSPD() {;} // destructror + + virtual void SetCouplingOption(const char *opt) { // Options: "old" or "new" + fCouplOpt=opt;} + virtual void CouplingOption(char *opt) const { + strcpy(opt,fCouplOpt.Data());} + virtual void SetSigmaDiffusionAsymmetry(Double_t ecc) + {fEccDiff=ecc;} + virtual void GetSigmaDiffusionAsymmetry(Double_t &ecc) const + {ecc=fEccDiff;} + + protected: + + static const Float_t fgkDiffCoeffDefault; //default for fDiffCoeff + static const TString fgkCouplingOptDefault; // type of pixel Coupling (old or new) + static const Float_t fgkEccentricityDiffDefault;//default for fCouplRow + + TString fCouplOpt; // Coupling Option + Float_t fEccDiff; // Eccentricity (i.e. asymmetry parameter) in the Gaussian Diffusion + + + ClassDef(AliITSresponseSPD,6) // SPD base response class +}; + +#endif diff --git a/ITS/ITSbaseLinkDef.h b/ITS/ITSbaseLinkDef.h index f0003ad5009..e62656ce519 100644 --- a/ITS/ITSbaseLinkDef.h +++ b/ITS/ITSbaseLinkDef.h @@ -46,6 +46,8 @@ #pragma link C++ class AliITSsegmentationSDD+; #pragma link C++ class AliITSsegmentationSSD+; #pragma link C++ class AliITSCalibration+; +#pragma link C++ class AliITSresponse+; +#pragma link C++ class AliITSresponseSPD+; #pragma link C++ class AliITSresponseSDD+; #pragma link C++ class AliITSCalibrationSPD-; #pragma link C++ class AliITSCalibrationSDD+; diff --git a/ITS/libITSbase.pkg b/ITS/libITSbase.pkg index 10042646a54..3575710b205 100644 --- a/ITS/libITSbase.pkg +++ b/ITS/libITSbase.pkg @@ -25,6 +25,8 @@ SRCS = AliITSgeom.cxx \ AliITSsegmentationSDD.cxx \ AliITSsegmentationSSD.cxx \ AliITSCalibration.cxx \ + AliITSresponse.cxx \ + AliITSresponseSPD.cxx \ AliITSresponseSDD.cxx \ AliITSCalibrationSPD.cxx \ AliITSCalibrationSDD.cxx \ -- 2.39.3