]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Make some constants parameters
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 Aug 2007 11:51:25 +0000 (11:51 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 Aug 2007 11:51:25 +0000 (11:51 +0000)
TRD/AliTRDfeeParam.cxx
TRD/AliTRDfeeParam.h

index c6d50b595b01e516aae3f131fa25b1039c1edb39..99e0211e0a8dd8872d508020fc9b2d36347842ea 100644 (file)
@@ -80,12 +80,15 @@ void AliTRDfeeParam::Terminate()
 //_____________________________________________________________________________
 AliTRDfeeParam::AliTRDfeeParam()
   :TObject()
-  //  ,fGeo(0)
   ,fCP(0)
   ,fTFr1(0)
   ,fTFr2(0)
   ,fTFc1(0)
   ,fTFc2(0)
+  ,fEBsglIndThr(5)
+  ,fEBsumIndThr(5)
+  ,fEBindLUT(0xF0)
+  ,fEBignoreNeighbour(0)
   ,fRAWversion(3)
   ,fRAWstoreRaw(kTRUE)
 {
@@ -121,6 +124,10 @@ AliTRDfeeParam::AliTRDfeeParam(const AliTRDfeeParam &p)
   ,fTFr2(p.fTFr2)
   ,fTFc1(p.fTFc1)
   ,fTFc2(p.fTFc2)
+  ,fEBsglIndThr(p.fEBsglIndThr)
+  ,fEBsumIndThr(p.fEBsumIndThr)
+  ,fEBindLUT(p.fEBindLUT)
+  ,fEBignoreNeighbour (p.fEBignoreNeighbour)
   ,fRAWversion(p.fRAWversion)
   ,fRAWstoreRaw(p.fRAWstoreRaw)
 {
@@ -163,6 +170,10 @@ void AliTRDfeeParam::Copy(TObject &p) const
   ((AliTRDfeeParam &) p).fTFr2        = fTFr2;
   ((AliTRDfeeParam &) p).fTFc1        = fTFc1;
   ((AliTRDfeeParam &) p).fTFc2        = fTFc2;
+  ((AliTRDfeeParam &) p).fEBsglIndThr = fEBsglIndThr;
+  ((AliTRDfeeParam &) p).fEBsumIndThr = fEBsumIndThr;
+  ((AliTRDfeeParam &) p).fEBindLUT    = fEBindLUT;
+  ((AliTRDfeeParam &) p).fEBignoreNeighbour = fEBignoreNeighbour;
   ((AliTRDfeeParam &) p).fRAWversion  = fRAWversion;
   ((AliTRDfeeParam &) p).fRAWstoreRaw = fRAWstoreRaw;
   
@@ -260,6 +271,62 @@ Int_t AliTRDfeeParam::GetColSide(Int_t icol) const
   //ped           = fPedestal;
 //};
 
+//_____________________________________________________________________________
+void AliTRDfeeParam::SetEBsglIndThr(Int_t val)
+{
+  // Set Event Buffer Sngle Indicator Threshold (EBIS in TRAP conf).
+  // Timebin is indicated if ADC value >= val.
+
+  if( val >= 0 && val <= 1023 ) { 
+    fEBsglIndThr = val;
+  } else {
+    AliError(Form("EBsglIndThr value %d is out of range, keep previously set value (%d).",
+                 val, fEBsglIndThr));
+  }
+}
+
+//_____________________________________________________________________________
+void AliTRDfeeParam::SetEBsumIndThr(Int_t val)
+{
+  // Set Event Buffer Sum Indicator Threshold (EBIT in TRAP conf).
+  // Timebin is indicated if ADC sum value >= val.
+
+  if( val >= 0 && val <= 4095 ) { 
+    fEBsumIndThr = val;
+  } else {
+    AliError(Form("EBsumIndThr value %d is out of range, keep previously set value (%d).",
+                 val, fEBsumIndThr));
+  }
+}
+
+
+//_____________________________________________________________________________
+void AliTRDfeeParam::SetEBindLUT(Int_t val)
+{
+  // Set Event Buffer Indicator Look-Up Table (EBIL in TRAP conf).
+  // 8 bits value forms lookup table for combination of three criterions.
+
+  if( val >= 0 && val <= 255 ) {
+    fEBindLUT = val;
+  } else {
+    AliError(Form("EBindLUT value %d is out of range, keep previously set value (%d).",
+                 val, fEBindLUT));
+  }
+}
+
+//_____________________________________________________________________________
+void AliTRDfeeParam::SetEBignoreNeighbour(Int_t val)
+{
+  // Set Event Buffer Indicator Neighbor Sensitivity. (EBIN in TRAP conf).
+  // If 0, take account of neigbor's values.
+
+  if( val >= 0 && val <= 1 ) {
+    fEBignoreNeighbour = val;
+  } else {
+    AliError(Form("EBignoreNeighbour value %d is out of range, keep previously set value (%d).",
+                 val, fEBignoreNeighbour));
+  }
+}
 
 //_____________________________________________________________________________
 Int_t    AliTRDfeeParam::GetRAWversion()
index c43c249f052ae6250cb1f3377355350d36069e36..4d8e07d727d0874bc301faa67e4f598ad67ad5aa 100644 (file)
@@ -74,18 +74,25 @@ class AliTRDfeeParam : public TObject
 
   static  Int_t    GetTFtype()            { return fgkTFtype; }
   static  Int_t    GetTFnExp()            { return fgkTFnExp; }
-          Float_t  GetTFr1()              { return fTFr1; }
-          Float_t  GetTFr2()              { return fTFr2; }
-          Float_t  GetTFc1()              { return fTFc1; }
-          Float_t  GetTFc2()              { return fTFc2; }
+          Float_t  GetTFr1()        const { return fTFr1; }
+          Float_t  GetTFr2()        const { return fTFr2; }
+          Float_t  GetTFc1()        const { return fTFc1; }
+          Float_t  GetTFc2()        const { return fTFc2; }
 
   static  Float_t  GetTFattPar()          { return ((Float_t)fgkTFattPar1) / ((Float_t)fgkTFattPar2) ; }
-  static  Float_t  GetTFf0()              { return 1 + fgkTFon*(-1+GetTFattPar()); }   // 1 if TC off
-  
-  static  Int_t    GetEBsglIndThr()       { return fgkEBsglIndThr; }
-  static  Int_t    GetEBsumIndThr()       { return fgkEBsumIndThr; }
-  static  Int_t    GetEBindLUT()          { return fgkEBindLUT; }
-  static  Int_t    GetEBignoreNeighbour() { return fgkEBignoreNeighbour; }
+          Float_t  GetTFf0()        const { return 1 + fgkTFon*(-1+GetTFattPar()); }   // 1 if TC off
+
+          void     SetEBsglIndThr(Int_t val);  
+          Int_t    GetEBsglIndThr() const { return fEBsglIndThr; }
+
+          void     SetEBsumIndThr(Int_t val);
+          Int_t    GetEBsumIndThr() const { return fEBsumIndThr; }
+
+          void     SetEBindLUT(Int_t val);
+          Int_t    GetEBindLUT()    const { return fEBindLUT; }
+
+          void     SetEBignoreNeighbour(Int_t val);
+          Int_t    GetEBignoreNeighbour() const { return fEBignoreNeighbour; }
 
   // Concerning raw data format
           Int_t    GetRAWversion();
@@ -154,32 +161,32 @@ class AliTRDfeeParam : public TObject
   static const Int_t    fgkTFattPar2          = 14;   //                      = -alphaL/ln(lambdaL)-(1-alphaL)/ln(lambdaS)
 
   // ZS parameters
-  static const Int_t    fgkEBsglIndThr        = 5;    // EBIS in ADC units
-  static const Int_t    fgkEBsumIndThr        = 5;    // EBIT in ADC units
-  static const Int_t    fgkEBindLUT           = 0xF0; // EBIL lookup table
-  static const Int_t    fgkEBignoreNeighbour  = 0;    // EBIN 0:include neighbor
+               Int_t    fEBsglIndThr;                 // EBIS in ADC units
+               Int_t    fEBsumIndThr;                 // EBIT in ADC units
+               Int_t    fEBindLUT;                    // EBIL lookup table
+               Int_t    fEBignoreNeighbour;           // EBIN 0:include neighbor
 
   // Charge accumulators
-  static const Int_t    fgkPREPqAcc0Start      =  0;   // Preprocessor Charge Accumulator 0 Start
-  static const Int_t    fgkPREPqAcc0End        = 10;   // Preprocessor Charge Accumulator 0 End
-  static const Int_t    fgkPREPqAcc1Start      = 11;   // Preprocessor Charge Accumulator 1 Start
-  static const Int_t    fgkPREPqAcc1End        = 20;   // Preprocessor Charge Accumulator 1 End
-  static const Int_t    fgkMinClusterCharge    = 20;   // Hit detection [in ADC units]
+  static const Int_t    fgkPREPqAcc0Start     =  0;   // Preprocessor Charge Accumulator 0 Start
+  static const Int_t    fgkPREPqAcc0End       = 10;   // Preprocessor Charge Accumulator 0 End
+  static const Int_t    fgkPREPqAcc1Start     = 11;   // Preprocessor Charge Accumulator 1 Start
+  static const Int_t    fgkPREPqAcc1End       = 20;   // Preprocessor Charge Accumulator 1 End
+  static const Int_t    fgkMinClusterCharge   = 20;   // Hit detection [in ADC units]
 
   // OLD TRAP processing parameters calculated from above
-  //static const Float_t  fClusThr;                     // Cluster threshold
-  //static const Float_t  fPadThr;                      // Pad threshold
+  //static const Float_t  fClusThr;                   // Cluster threshold
+  //static const Float_t  fPadThr;                    // Pad threshold
 
   // For raw production
-               Int_t    fRAWversion;                    // Raw data production version
-  static const Int_t    fgkMaxRAWversion       = 3;     // Maximum raw version number supported
-               Bool_t   fRAWstoreRaw;                   // Store unfiltered data for raw data stream
+               Int_t    fRAWversion;                  // Raw data production version
+  static const Int_t    fgkMaxRAWversion      = 3;    // Maximum raw version number supported
+               Bool_t   fRAWstoreRaw;                 // Store unfiltered data for raw data stream
 
  private:
 
   AliTRDfeeParam();
 
-  ClassDef(AliTRDfeeParam,1)  //
+  ClassDef(AliTRDfeeParam,2)  //
 };
 
 #endif