]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - T0/AliT0CalibData.h
all time measurements perfomed as difference with case vertex=0
[u/mrichter/AliRoot.git] / T0 / AliT0CalibData.h
index 29a4e3ac491798a77031217c405b8cb592d70455..964dd301ca242ea41bbed68850a0d14237c6ad86 100644 (file)
@@ -16,6 +16,7 @@
 #include "TString.h"
 #include "TObjArray.h"
 #include "AliT0.h"
+#include "AliT0LookUpValue.h"
 
 class AliT0CalibData: public TNamed {
 
@@ -30,16 +31,13 @@ class AliT0CalibData: public TNamed {
   virtual void  Print(Option_t* option= "") const; 
   Float_t  GetTimeDelayCFD(Int_t channel) const {return fTimeDelayCFD[channel];}
   Float_t* GetTimeDelayCFD()  const  {return(float*) fTimeDelayCFD;}
-  Float_t  GetTimeDelayLED(Int_t channel) const {return fTimeDelayLED[channel];}
-  Float_t* GetTimeDelayLED()  const  {return(float*) fTimeDelayLED;}
+  Float_t  GetTimeDelayDA(Int_t channel) const {return fTimeDelayDA[channel];}
+  Float_t* GetTimeDelayDA()  const  {return(float*) fTimeDelayDA;}
 
-  Float_t   GetGain(Int_t channel) const {return fGain[channel];}
-  Float_t*  GetGain()  const {return (float*)fGain;}
-  void     SetGain(Float_t val, Int_t channel)  {fGain[channel]=val;}
-  void     SetGain(Float_t* Gain);
   
-  Float_t  GetWalk(Int_t ipmt, Float_t mv )  const {return ((TF1*)fWalk.At(ipmt))->Eval(mv);}
-  void SetWalk(Int_t ipmt, const Char_t *filename="calibr/re.root") ;
+  TGraph *GetWalk(Int_t ipmt )  const {return ((TGraph*)fWalk.At(ipmt));}
+  Float_t  GetWalkVal(Int_t ipmt, Float_t mv )  const {return ((TGraph*)fWalk.At(ipmt))->Eval(mv);}
+  void SetWalk(Int_t ipmt) ;
 
    TGraph *  GetSlew(Int_t ipmt) const   {return (TGraph*)fSlewingLED.At(ipmt);}
   Float_t  GetSlewingLED(Int_t ipmt, Float_t mv)  const 
@@ -48,28 +46,40 @@ class AliT0CalibData: public TNamed {
   Float_t  GetSlewingRec(Int_t ipmt, Float_t mv)  const 
       {return((TGraph*)fSlewingRec.At(ipmt))->Eval(mv);}
 
-  void SetSlewingLED(Int_t ipmt, const Char_t *filename) ;
-  void SetSlewingRec(Int_t ipmt, const Char_t *filename) ;
+  void SetSlewingLED(Int_t ipmt) ;
+  void SetSlewingRec(Int_t ipmt) ;
 
   void     SetTimeDelayCFD(Float_t val, Int_t channel) {fTimeDelayCFD[channel]=val;}
   void     SetTimeDelayCFD(Float_t* TimeDelay);
-  void     SetTimeDelayLED(Float_t val, Int_t channel) {fTimeDelayLED[channel]=val;}
-  void     SetTimeDelayLED(Float_t* TimeDelay);
+  void     SetTimeDelayDA(Float_t val, Int_t channel) {fTimeDelayDA[channel]=val;}
+  void     SetTimeDelayDA(Float_t* TimeDelay);
 
   void SetTimeDelayTVD(Int_t r=150)   { fTimeDelayTVD = r; };
   Float_t GetTimeDelayTVD()   { return fTimeDelayTVD; }
 
+  void ReadAsciiLookup(const Char_t *filename);
+  Int_t GetChannel(Int_t trm,  Int_t tdc, Int_t chain, Int_t channel);
+  void PrintLookup(Option_t* option= "", Int_t iTRM=0, Int_t iTDC=0, Int_t iChannel=0) const;
+  TMap *GetMapLookup(void) {return &fLookup;}
+  Int_t GetNumberOfTRMs() const {return fNumberOfTRMs;}
+  void SetNumberOfTRMs(Int_t ntrms=2) {fNumberOfTRMs = ntrms;}
+  void SetMeanT0(Int_t mean=500) { fMeanT0 = mean; };
+  Int_t GetMeanT0 () {return fMeanT0;};
+
  protected:
 
   Float_t  fTimeDelayCFD[24]; // Coeff. for time delay (24 different cables & CFD )
-  Float_t  fTimeDelayLED[24]; // Coeff. for time delay (24 different cables & CFD )
-  Float_t  fGain[24]; // Coeff. for gain (24 different cables & CFD )
+  Float_t  fTimeDelayDA[24]; // number of channel with mean time+delay if vertex=0 )
   Float_t fTimeDelayTVD; //time delay for TVD (vertex trigger channel)
+  Int_t fMeanT0; //mean of T0distribution with vertex=0;
   TObjArray fWalk;  //time - amp. walk
   TObjArray fSlewingLED;  //time - amp.LED slew
   TObjArray fSlewingRec;  //time - amp. LED slew for reconstruction
+  TMap fLookup;           //lookup table
+  Int_t fNumberOfTRMs;    // number of TRMs in setup
+
   //
-  ClassDef(AliT0CalibData,1)    // T0 Sensor Calibration data
+  ClassDef(AliT0CalibData,4)    // T0 Sensor Calibration data
 };
 
 typedef AliT0CalibData AliSTARTCalibData; // for backward compatibility