Compatibility with ROOT trunk
[u/mrichter/AliRoot.git] / T0 / AliT0RecoParam.cxx
index aa12f29bab1dd166a9655bc0aa07002f3d5774ad..ce1c1ccd68feaf2ed95a6f00fcc43294cd50132e 100644 (file)
@@ -33,6 +33,8 @@
 #include "AliT0RecoParam.h"
 #include "Riostream.h"
 
+using std::cout;
+using std::endl;
 ClassImp(AliT0RecoParam)
 
 
@@ -42,13 +44,27 @@ ClassImp(AliT0RecoParam)
 AliT0RecoParam::AliT0RecoParam():
   AliDetectorRecoParam(),
    fRefAmp(7),
-    fRefPoint(0)
+   fRefPoint(0),
+   fLatencyL1(0),  
+   fLatencyL1A(0),  
+   fLatencyL1C(0),  
+   fLatencyHPTDC(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;
+  }
 }
 
 //_____________________________________________________________________________
@@ -63,11 +79,24 @@ AliT0RecoParam::~AliT0RecoParam()
 
 AliT0RecoParam::AliT0RecoParam(const AliT0RecoParam &p):
   AliDetectorRecoParam(p),       
-   fRefAmp(p.fRefAmp),
-   fRefPoint(p.fRefPoint)
-{
+  fRefAmp(p.fRefAmp),
+  fRefPoint(p.fRefPoint),
+  fLatencyL1(p.fLatencyL1),  
+  fLatencyL1A(p.fLatencyL1A),  
+  fLatencyL1C(p.fLatencyL1C),  
+  fLatencyHPTDC(p.fLatencyHPTDC),      
+  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];
+  }
 
 }
 //_____________________________________________________________________________
@@ -84,6 +113,24 @@ AliT0RecoParam& AliT0RecoParam:: operator=(const AliT0RecoParam &p)
   AliDetectorRecoParam::operator=(p);
   fRefAmp = p.fRefAmp;
   fRefPoint = p.fRefPoint;
+  fLatencyL1 = p.fLatencyL1;
+  fLatencyL1A = p.fLatencyL1A;
+  fLatencyL1C = p.fLatencyL1C;
+
+  fLatencyHPTDC = p.fLatencyHPTDC;
+  fVertexShift = p.fVertexShift;
+
+  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;
+
 }
 //_____________________________________________________________________________
  
@@ -95,8 +142,20 @@ AliT0RecoParam *AliT0RecoParam::GetLowFluxParam()
   AliT0RecoParam *param = new AliT0RecoParam();
   param->fRefAmp = 1;
   param->fRefPoint = 0;
+  param->fLatencyL1 = 7782.05;
+  param->fLatencyL1A = 7781.90;
+  param->fLatencyL1C =  7782.19;
+  param->fLatencyHPTDC = 22000;
+  param->fVertexShift = 0;
+  for (Int_t i=0; i<500; i++)
+    {
+     param-> fLow[i]=0.;
+     param-> fHigh[i]=10000.;
+    }
   param->SetName("Low Flux");
   param->SetTitle("Low Flux");
+  param->SetSatelliteThresholds(-15, -1.5);
+  param->SetEq(0);
   return param;
 }
 
@@ -109,10 +168,23 @@ AliT0RecoParam *AliT0RecoParam::GetHighFluxParam()
   //
 
   AliT0RecoParam *param = new AliT0RecoParam();
-  param->fRefAmp = 5;
+  param->fRefAmp = 10;
   param->fRefPoint = 0;
+  param->fLatencyL1 = 7782.05;
+  param->fLatencyL1A = 7781.90;
+  param->fLatencyL1C =  7782.19;
+  param->fVertexShift = 0;
+  param->fLatencyHPTDC = 22000;
+  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;
 }
@@ -128,18 +200,33 @@ AliT0RecoParam *AliT0RecoParam::GetLaserTestParam()
   AliT0RecoParam *param = new AliT0RecoParam();
   param->fRefAmp = 1;
   param->fRefPoint = 1;
+  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.;
+     param-> fHigh[i]=12000.;
+    }
   //
   param->SetName("Laser Flux");
   param->SetTitle("Laser Flux");
   return param;
 }
 //_____________________________________________________________________________
+
 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(" Bad channel in channel  : %i", fRefPoint));
+  cout<<" AliT0RecoParam::PrintParameters() "<<endl;
+  for (Int_t i=0; i<105; i++) cout<<i<<" "<<fLow[i]<<" "<<fHigh[i]<<endl; 
 }