#ifndef ALIITSGAINSSD_H
#define ALIITSGAINSSD_H
-#include "TObjArray.h"
-#include "TArrayF.h"
-
//////////////////////////////////////////////
// Author: Enrico Fragiacomo
// Date: 23/08/2007
+// Modified: 08/07/2008
// //
//////////////////////////////////////////////
+#include "TObject.h"
+
class AliITSGainSSD : public TObject {
public:
AliITSGainSSD();
virtual ~AliITSGainSSD();
-
- 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 SetMod(UShort_t mod) {fMod = mod;}
- UShort_t GetMod() { return fMod;}
-
-protected:
-
- UShort_t fMod; // module number (from 0 to 1535). Needed by the preprocessor to
- // extract the information from the Detector Algorithm
-
- TArrayF fGainP; // Gain for P side channels
- TArrayF fGainN; // Gain for N side channels
-
- private:
AliITSGainSSD(const AliITSGainSSD &source); // copy constructor
AliITSGainSSD& operator=(const AliITSGainSSD &source); // ass. op.
- ClassDef(AliITSGainSSD,1) //Response class for SSD
-};
+ void AddGainP(Int_t module, Int_t strip, Float_t value) {
+ fGain[module*2*fgkDefaultNStripsSSD+strip] = (UShort_t) (1000.*value);
+ }
+ Float_t GetGainP(Int_t module, Int_t strip) {
+ return ((Float_t) ( (Float_t) fGain[module*2*fgkDefaultNStripsSSD+strip] ) /1000.);
+ }
+
+ void AddGainN(Int_t module, Int_t strip, Float_t value) {
+ fGain[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip] =
+ (UShort_t) (1000.*value);
+ }
+ Float_t GetGainN(Int_t module, Int_t strip) {
+ return ( (Float_t) ((Float_t) fGain[module*2*fgkDefaultNStripsSSD+fgkDefaultNStripsSSD+strip])/1000.);
+ }
+
+ protected:
+
+ static const Int_t fgkDefaultNModulesSSD = 1698;
+ static const Int_t fgkDefaultNStripsSSD = 768;
+
+ //static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules
+ //static const Int_t fgkDefaultNStripsSSD; // Total numbers of SSD modules
+
+ UShort_t fGain[2*fgkDefaultNModulesSSD*fgkDefaultNStripsSSD];
+ // UShort_t *fGain;
+
+ private:
+
+ ClassDef(AliITSGainSSD,1) // Gain class for SSD
+ };
#endif