]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSresponseSPDdubna.h
Fixed bug in parent assignment and implemented Birk's law in the Step Manager
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSPDdubna.h
index 24d08c22f35655294372dd0d9e0c4ab17105d8ef..5d99e0cbd626b28533792bef219c76a495992f91 100644 (file)
 #ifndef ALIITSRESPONSESPDDUBNA_H
 #define ALIITSRESPONSESPDDUBNA_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#include <TRandom.h>
+class TString;
+
 
 #include "AliITSresponse.h"
-#include <TString.h>
 
 //----------------------------------------------
-//
 // ITS response class for SPD
-//
-class AliITSresponseSPDdubna :  public AliITSresponse {
+class AliITSresponseSPDdubna : public AliITSresponse {
  public:
-    AliITSresponseSPDdubna();
-    virtual ~AliITSresponseSPDdubna() { 
-       // destructror
-    }
-    //
-    // Configuration methods
-    //
-    virtual void SetDiffCoeff(Float_t p1=7.877e-3/*0.00433*/,Float_t dummy=0.){
-       // Diffusion coefficient
-       fDiffCoeff = p1;dummy = 0.;}
-    virtual Double_t DiffusionSigma(Double_t dy);
-    virtual void DiffCoeff(Float_t &diffc,Float_t &dummy) {
-       // Get diffusion coefficient
-       diffc= fDiffCoeff;dummy = 0.0;
-    }
-    virtual  void   SetNoiseParam(Float_t n=200., Float_t b=0.) {
-       // set noise and baseline
-       fNoise=n; fBaseline=b;
-    }   
-    virtual  void   GetNoiseParam(Float_t &n, Float_t &b) {
-       // get noise and baseline
-       n=fNoise; b=fBaseline;
-    }   
-    virtual void     SetMinVal(Int_t p1=2000) {
-       // Zero-suppression option threshold 
-       fThreshold=p1;
-    }
-    virtual Int_t MinVal() {
-       // Get zero-suppression threshold
-       return fThreshold;
-    }
-    virtual void    SetDataType(const char *data="simulated") {
-       // Type of data - real or simulated
-       fDataType=data;
-    }
-    virtual const char  *DataType() const {
-       // Get data typer
-       return fDataType.Data();
-    } 
-    virtual void SetGeVToCharge(Float_t e = 2.778E+08) {
-       // sets the conversion factor to go from Energy GeV to charge
-       // (electrons).
-       fGeVtoElec = e;
-    }
-    virtual Float_t GetGeVToCharge() {
-       // Returns the conversion factor to go from Energy GeV to charge
-       // (electrons).
-       return fGeVtoElec;
-    }
-    virtual const Float_t GeVToCharge(Float_t e) const {
-       // Converts deposited energy into electrons in Si.
-       return e*fGeVtoElec;
-    }
+  AliITSresponseSPDdubna();
+  virtual ~AliITSresponseSPDdubna(){}// destructror
+//abstract methods in AliITSresponse not implemented in this class
+    virtual void    GiveCompressParam(Int_t *) const
+      {NotImplemented("GiveCompressParam");}
+    virtual void    SetDriftSpeed(Float_t /* p1 */)
+      {NotImplemented("SetDriftSpeed");}
+    virtual Float_t DriftSpeed() const 
+      {NotImplemented("DrifSpeed"); return 0.;}
+    virtual void   SetElectronics(Int_t /* i */) 
+                    {NotImplemented("SetElectronics");}
+    virtual Int_t Electronics() const {NotImplemented("Electronics"); return 0;}
+    virtual void SetMaxAdc(Float_t /* adc */) {NotImplemented("SetMaxAdc");}
+    virtual Float_t MaxAdc() const {NotImplemented("MaxAdc"); return 0.;}
+    virtual void    SetDynamicRange(Float_t /*dr */) 
+      {NotImplemented("SetDynamicRange");}
+    virtual Float_t DynamicRange() const 
+      {NotImplemented("DynamicRange"); return 0.;}
+    virtual void    SetChargeLoss(Float_t /* cl */)
+      {NotImplemented("SetChargeLoss"); }
+    virtual Float_t ChargeLoss() const 
+      {NotImplemented("ChargeLoss"); return 0.;}
+    virtual void    SetDiffCoeff(Float_t /* a */, Float_t /* b */)
+      {NotImplemented("SetDiffCoeff");}
+    virtual void    DiffCoeff(Float_t & /* a */,Float_t & /* b */) const
+      {NotImplemented("DiffCoeff");}
+    virtual  void   SetDetParam(Float_t *)
+      {NotImplemented("SetDetParam");}
+    virtual void   GetDetParam(Float_t *) const 
+      {NotImplemented("GetDetParam");}
+    virtual  void   SetNDetParam(Int_t /* n */)
+      {NotImplemented("SetNDetParam");}
+    virtual Int_t  NDetParam() const
+      {NotImplemented("NDetParam"); return 0;}
+    virtual void   SetParamOptions(const char* /* a */,const char* /* b */)
+      {NotImplemented("SetParamOptions");}
+    virtual void   ParamOptions(char *,char*) const
+      {NotImplemented("ParamOptions");
+    virtual void   SetZeroSupp(const char*)
+      {NotImplemented("SetZeroSupp");}
+    virtual const char *ZeroSuppOption() const 
+      {NotImplemented("ZeroSuppression"); return "";}
+    virtual void    SetNSigmaIntegration(Float_t)
+      {NotImplemented("SetNSigmaIntegration");}
+    virtual Float_t NSigmaIntegration() const
+      {NotImplemented("NSigmaIntegration"); return 0.;}
+    virtual void    SetNLookUp(Int_t) 
+      {NotImplemented("SetNLookUp");}
+    virtual void    SetSigmaSpread(Float_t, Float_t) 
+      {NotImplemented("SetSigmaSpread");}
+    virtual void    SigmaSpread(Float_t & /* p1 */,Float_t & /* p2 */) const 
+      {NotImplemented("SigmaSpread");}
 
- protected:
-    Float_t fDiffCoeff;       // Diffusion Coefficient
-    Float_t fNoise;           // Noise value
-    Float_t fBaseline;        // Baseline value
-    Int_t   fThreshold;       // Zero-Suppression threshold
-    Float_t fGeVtoElec;       // Conversion factor from GeV to electons
-    TString fDataType;        // Type of data - real or simulated
+// Implementation of virtual member functions declared in AliITSresponse 
+  // set noise and baseline
+  virtual void SetNoiseParam(Float_t n, Float_t b) {
+    fNoise=n; fBaseline=b;}
+  virtual void GetNoiseParam(Float_t &n, Float_t &b) const {
+    n=fNoise; b=fBaseline;} // get noise and baseline
+  // Zero-suppression option threshold
+  virtual void SetThresholds(Float_t th, Float_t /* dum */) {fThreshold=th;}
+  virtual void Thresholds(Float_t & thr, Float_t & /*dum */) const
+    {thr = fThreshold;}
+
+  // Prints out the content of this class in ASCII format.
+  virtual void Print(ostream *os) const;
 
-    ClassDef(AliITSresponseSPDdubna,2) // SPD response
+  // Reads in the content of this class in the format of Print
+  virtual void Read(istream *is);
+
+//Declaration of member functions peculiar to this class
+  // Applies a random noise and addes the baseline
+  Float_t ApplyBaselineAndNoise() const {return fBaseline+
+                                                 fNoise*gRandom->Gaus();}
+  //Returns just baseline value
+  Float_t GetBaseline() const {return fBaseline;}
+  // Returns just noise value
+  Float_t GetNoise() const {return fNoise;} 
+  // Get zero-suppression threshold
+  Float_t GetThreshold() const {return fThreshold;}
+  // Sets the coupling probabilities for columns and rows
+  void SetCouplings(Float_t ccol=0.,Float_t crow=0.){fCouplCol=ccol;
+                                                       fCouplRow=crow;}
+  // Gets the coupling probabilities for columns and rows
+  void GetCouplings(Float_t &ccol,Float_t &crow) const 
+              {ccol=fCouplCol; crow=fCouplRow;}
+  // Returns the fraction of dead pixels
+  Float_t GetFractionDeadPixels() const {return fDeadPixels;}
+  // Sets the fraction of dead pixels
+  void SetFractionDeadPixels(Float_t f=0.01){fDeadPixels = f;}
+  // Returns a logical if a pixels is dead or not
+  Bool_t IsPixelDead(Int_t mod,Int_t ix,Int_t iz) const ;
+
+  ClassDef(AliITSresponseSPDdubna,3) // SPD response
+    
+ protected:
+  static const Float_t fgkNoiseDefault; // default for fNoise
+  static const Float_t fgkThresholdDefault; //default for fThreshold
+  Float_t fNoise;           // Noise value
+  Float_t fBaseline;        // Baseline value
+  Float_t fCouplCol;        // Coupling Probability along columns
+  Float_t fCouplRow;        // Coupling Probability along rows
+  Float_t fThreshold;       // Zero-Suppression threshold
+  Float_t fDeadPixels;      // Fraction of dead pixels.
 };
+// Input and output function for standard C++ input/output.
+ostream& operator<<(ostream &os,AliITSresponseSPDdubna &source);
+istream& operator>>(istream &os,AliITSresponseSPDdubna &source);
+
 #endif