]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSCalibrationSSD.h
Removing extra line, adding EINCLUDE
[u/mrichter/AliRoot.git] / ITS / AliITSCalibrationSSD.h
index cc37ced55b0ca5c127d3893e13e4a9573c88f6fa..ab610763db0e2fbcde5bca648fdd6b1a5c66bd11 100644 (file)
@@ -1,11 +1,17 @@
 #ifndef ALIITSCALIBRATIONSSD_H
 #define ALIITSCALIBRATIONSSD_H
+/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */ 
 #include "AliITSCalibration.h"
+#include "AliITSNoiseSSD.h"
+#include "AliITSPedestalSSD.h"
+#include "AliITSGainSSD.h"
+#include "AliITSBadChannelsSSD.h"
 #include "AliITSresponseSSD.h"
 #include "TArrayF.h"
 #include "TArrayI.h"
 
+/* $Id$ */
 //////////////////////////////////////////////
 // Response class for SSD                   //
 //                                          //
@@ -27,24 +33,47 @@ class AliITSCalibrationSSD : public AliITSCalibration {
        np=fNoiseP; nn=fNoiseN;
     }
 
-    // EF
-    void SetNNoiseP(Int_t n) { fNoisP.Set(n); }
-    void AddNoiseP(Int_t c, Float_t n) { fNoisP.AddAt(n,c);}       
-    TArrayF GetNoiseP() const {return fNoisP; }
-    Float_t GetNoiseP(Int_t n) {return fNoisP.At(n); }
-    void SetNNoiseN(Int_t n) { fNoisN.Set(n); }
-    void AddNoiseN(Int_t c, Float_t n) { fNoisN.AddAt(n,c);}
-    TArrayF GetNoiseN() const {return fNoisN; }
-    Float_t GetNoiseN(Int_t n) {return fNoisN.At(n); }
-
-    void SetNGainP(Int_t n) { fGainP.Set(n); }
-    void AddGainP(Int_t c, Float_t n) { fGainP.AddAt(n,c);}       
-    TArrayF GetGainP() const {return fGainP; }
-    Float_t GetGainP(Int_t n) {return fGainP.At(n); }
-    void SetNGainN(Int_t n) { fGainN.Set(n); }
-    void AddGainN(Int_t c, Float_t n) { fGainN.AddAt(n,c);}
-    TArrayF GetGainN() const {return fGainN; }
-    Float_t GetGainN(Int_t n) {return fGainN.At(n); }
+    void AddNoiseP(Int_t c, Float_t n) { fNoise->AddNoiseP(c,n);}       
+    TArrayF GetNoiseP() {return fNoise->GetNoiseP(); }
+    Float_t GetNoiseP(Int_t n) {return fNoise->GetNoiseP(n); }
+    void AddNoiseN(Int_t c, Float_t n) { fNoise->AddNoiseN(c,n);}
+    TArrayF GetNoiseN() {return fNoise->GetNoiseN(); }
+    Float_t GetNoiseN(Int_t n) {return fNoise->GetNoiseN(n); }
+    void SetNoise( AliITSNoiseSSD* noise) {fNoise=noise;}
+
+    void AddPedestalP(Int_t c, Float_t n) { fPedestal->AddPedestalP(c,n);}       
+    TArrayF GetPedestalP() {return fPedestal->GetPedestalP(); }
+    Float_t GetPedestalP(Int_t n) {return fPedestal->GetPedestalP(n); }
+    void AddPedestalN(Int_t c, Float_t n) { fPedestal->AddPedestalN(c,n);}
+    TArrayF GetPedestalN() {return fPedestal->GetPedestalN(); }
+    Float_t GetPedestalN(Int_t n) {return fPedestal->GetPedestalN(n); }
+    void SetPedestal( AliITSPedestalSSD* pedestal) {fPedestal=pedestal;}
+
+    void AddGainP(Int_t c, Float_t n) { fGain->AddGainP(c,n);}       
+    TArrayF GetGainP() {return fGain->GetGainP(); }
+    Float_t GetGainP(Int_t n) {return fGain->GetGainP(n); }
+    void AddGainN(Int_t c, Float_t n) { fGain->AddGainN(c,n);}
+    TArrayF GetGainN() {return fGain->GetGainN(); }
+    Float_t GetGainN(Int_t n) {return fGain->GetGainN(n); }
+    void SetGain( AliITSGainSSD* gain) {fGain=gain;}
+
+    void   SetBad() {
+      fIsBad = kTRUE;
+      for(Int_t i=0;i<fgkChipsPerModule;i++) fIsChipBad[i]=kTRUE;
+    }
+    virtual Bool_t IsBad() const { return fIsBad; }
+    void   SetChipBad(Int_t nChip) {
+      fIsChipBad[nChip] = kTRUE;
+    }
+    virtual Bool_t IsChipBad(Int_t nChip) const {
+      return fIsChipBad[nChip];
+    }
+    Int_t ChipsPerModule() const{return fgkChipsPerModule;} // Number of chips/module
+    Int_t ChannelsPerChip() const{ return fgkChannelsPerChip;}//Number of channels/chip
+
+    TArrayI GetBadPChannelsList() { return fBadChannels->GetBadPChannelsList(); } const
+    TArrayI GetBadNChannelsList() { return fBadChannels->GetBadNChannelsList(); } const
+    void SetBadChannels( AliITSBadChannelsSSD* badchannels) {fBadChannels=badchannels;}
 
     void SetNoisePThreshold(Int_t threshold) { fNoisePThreshold = threshold;}
     void AddNoisyPChannel(Int_t c, Int_t n) { fNoisyPChannelsList.AddAt(n,c);}
@@ -112,6 +141,10 @@ class AliITSCalibrationSSD : public AliITSCalibration {
     { ((AliITSresponseSSD*)fResponse)->SetZSThreshold(zsth);}
 
 protected:
+
+    static const Int_t fgkChipsPerModule  = 12;    // Number of chips/module
+    static const Int_t fgkChannelsPerChip = 128;   // Number of channels/chip
+
     static const Double_t fgkNoiseNDefault; // default for fNoiseN
     static const Double_t fgkNoisePDefault; // default for fNoiseP
     static const Int_t fgkNParDefault; // default for fNPar
@@ -126,12 +159,23 @@ protected:
     Double_t fSigmaP;          // Sigma charge spread on Pside
     Double_t fSigmaN;          // Sigma charge spread on Nside
     
+    AliITSNoiseSSD *fNoise;
+    AliITSPedestalSSD *fPedestal;
+    AliITSGainSSD *fGain;
+    AliITSBadChannelsSSD *fBadChannels;
+
+    Bool_t   fIsBad;                         // module is dead or alive ?
+    Bool_t   fIsChipBad[fgkChipsPerModule];  // chip is dead or alive ?
+
     TArrayF fGainP;           // Gain for P side channels
     TArrayF fGainN;           // Gain for N side channels
 
     TArrayF fNoisP;           // Noise for P side channels
     TArrayF fNoisN;           // Noise for N side channels
 
+    TArrayF fPedP;
+    TArrayF fPedN;
+
     Float_t fNoisePThreshold;     // need to decide if channel is noisy  
     TArrayI  fNoisyPChannelsList; // list of P side noisy channels
     Float_t fNoiseNThreshold;     // need to decide if channel is noisy  
@@ -144,6 +188,6 @@ protected:
     AliITSCalibrationSSD(const AliITSCalibrationSSD &source); // copy constructor
     AliITSCalibrationSSD& operator=(const AliITSCalibrationSSD &source); // ass. op.
 
-    ClassDef(AliITSCalibrationSSD,1) //Response class for SSD
+    ClassDef(AliITSCalibrationSSD,3) //Response class for SSD
 };
 #endif