Compatibility with ROOT trunk
[u/mrichter/AliRoot.git] / T0 / AliT0RecoParam.cxx
index c23fe0b5d62e971eccba381b908129a0a7e43a3e..ce1c1ccd68feaf2ed95a6f00fcc43294cd50132e 100644 (file)
@@ -33,6 +33,8 @@
 #include "AliT0RecoParam.h"
 #include "Riostream.h"
 
+using std::cout;
+using std::endl;
 ClassImp(AliT0RecoParam)
 
 
@@ -44,14 +46,25 @@ AliT0RecoParam::AliT0RecoParam():
    fRefAmp(7),
    fRefPoint(0),
    fLatencyL1(0),  
+   fLatencyL1A(0),  
+   fLatencyL1C(0),  
    fLatencyHPTDC(0),      
-   fVertexShift(0)   
+  fVertexShift(0),
+  fEqualised(0)
 {
   //
   // constructor
-  //
   SetName("T0");
   SetTitle("T0");
+
+  fSatelliteThresholds[0] =  -15;
+  fSatelliteThresholds[1] =  -1.5;
+  for (Int_t i=0; i<500; i++)  {
+    fLow[i] = 0.;
+    fHigh[i] = 10000.;
+    if( i<24) fBadChannels[i]=-1;
+  }
 }
 
 //_____________________________________________________________________________
@@ -69,11 +82,21 @@ AliT0RecoParam::AliT0RecoParam(const AliT0RecoParam &p):
   fRefAmp(p.fRefAmp),
   fRefPoint(p.fRefPoint),
   fLatencyL1(p.fLatencyL1),  
+  fLatencyL1A(p.fLatencyL1A),  
+  fLatencyL1C(p.fLatencyL1C),  
   fLatencyHPTDC(p.fLatencyHPTDC),      
-  fVertexShift(p.fVertexShift)   
-{
+  fVertexShift(p.fVertexShift), 
+  fEqualised( p.fEqualised)
+{ 
  //copy constructor
+  fSatelliteThresholds[0] = (p.fSatelliteThresholds[0]);
+  fSatelliteThresholds[1] = (p.fSatelliteThresholds[1]);
+  for (Int_t i=0; i<500; i++)  {
+    fLow[i] = p.fLow[i];
+    fHigh[i] = p.fHigh[i];
+    if( i<24) fBadChannels[i] = p.fBadChannels[i];
+  }
 
 }
 //_____________________________________________________________________________
@@ -91,9 +114,22 @@ AliT0RecoParam& AliT0RecoParam:: operator=(const AliT0RecoParam &p)
   fRefAmp = p.fRefAmp;
   fRefPoint = p.fRefPoint;
   fLatencyL1 = p.fLatencyL1;
+  fLatencyL1A = p.fLatencyL1A;
+  fLatencyL1C = p.fLatencyL1C;
+
   fLatencyHPTDC = p.fLatencyHPTDC;
   fVertexShift = p.fVertexShift;
-  return *this;
+
+  fSatelliteThresholds[0] = (p.fSatelliteThresholds[0]);
+  fSatelliteThresholds[1] = (p.fSatelliteThresholds[1]);
+  fEqualised = p.fEqualised;
+  for (Int_t i=0; i<500; i++)  {
+    fLow[i] = p.fLow[i];
+    fHigh[i] = p.fHigh[i];
+    if( i<24) fBadChannels[i] = p.fBadChannels[i];
+  }
+ return *this;
 
 }
 //_____________________________________________________________________________
@@ -106,9 +142,11 @@ AliT0RecoParam *AliT0RecoParam::GetLowFluxParam()
   AliT0RecoParam *param = new AliT0RecoParam();
   param->fRefAmp = 1;
   param->fRefPoint = 0;
-  param->fLatencyL1 = 7782.01;
+  param->fLatencyL1 = 7782.05;
+  param->fLatencyL1A = 7781.90;
+  param->fLatencyL1C =  7782.19;
   param->fLatencyHPTDC = 22000;
-  param->fVertexShift = 4.6;
+  param->fVertexShift = 0;
   for (Int_t i=0; i<500; i++)
     {
      param-> fLow[i]=0.;
@@ -116,6 +154,8 @@ AliT0RecoParam *AliT0RecoParam::GetLowFluxParam()
     }
   param->SetName("Low Flux");
   param->SetTitle("Low Flux");
+  param->SetSatelliteThresholds(-15, -1.5);
+  param->SetEq(0);
   return param;
 }
 
@@ -128,18 +168,23 @@ AliT0RecoParam *AliT0RecoParam::GetHighFluxParam()
   //
 
   AliT0RecoParam *param = new AliT0RecoParam();
-  param->fRefAmp = 5;
+  param->fRefAmp = 10;
   param->fRefPoint = 0;
-  param->fLatencyL1 = 7782.01;
+  param->fLatencyL1 = 7782.05;
+  param->fLatencyL1A = 7781.90;
+  param->fLatencyL1C =  7782.19;
+  param->fVertexShift = 0;
   param->fLatencyHPTDC = 22000;
-  param->fVertexShift = 4.6;
   for (Int_t i=0; i<500; i++)
     {
       param-> fLow[i]=0.;
       param-> fHigh[i]=20000.;
     }
   //
-  param->SetName("High Flux");
+  param->SetSatelliteThresholds(-15, -1.5);
+  param->SetEq(0);
+
+   param->SetName("High Flux");
   param->SetTitle("High Flux");
   return param;
 }
@@ -155,9 +200,14 @@ AliT0RecoParam *AliT0RecoParam::GetLaserTestParam()
   AliT0RecoParam *param = new AliT0RecoParam();
   param->fRefAmp = 1;
   param->fRefPoint = 1;
-  param->fLatencyL1 = 7782.01;
+  param->fLatencyL1 = 7782.05;
+  param->fLatencyL1A = 7781.90;
+  param->fLatencyL1C =  7782.19;
   param->fLatencyHPTDC = 22000;
   param->fVertexShift = 0;
+  param->SetSatelliteThresholds(-15, -1.5);
+  param->SetEq(0);
+  
   for (Int_t i=0; i<500; i++)
     {
      param-> fLow[i]=0.;
@@ -176,9 +226,7 @@ void AliT0RecoParam::PrintParameters() const
   // Printing of the used T0 reconstruction parameters
   //
   AliInfo(Form(" Reference amplitude for walk corerection : %f", fRefAmp));
-  AliInfo(Form(" Reference point in channel  : %i", fRefPoint));
-  AliInfo(Form(" Current latency  : %i ns", fLatencyL1));
-  AliInfo(Form(" HPTDC latency  : %i ns", fLatencyHPTDC));
+  AliInfo(Form(" Bad channel in channel  : %i", fRefPoint));
   cout<<" AliT0RecoParam::PrintParameters() "<<endl;
-  for (Int_t i=0; i<500; i++) cout<<i<<" "<<fLow[i]<<" "<<fHigh[i]<<endl; 
+  for (Int_t i=0; i<105; i++) cout<<i<<" "<<fLow[i]<<" "<<fHigh[i]<<endl; 
 }