reco i trigger parameters for T0
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 21 Jun 2009 11:07:50 +0000 (11:07 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 21 Jun 2009 11:07:50 +0000 (11:07 +0000)
T0/AliT0RecoParam.cxx [new file with mode: 0644]
T0/AliT0RecoParam.h [new file with mode: 0644]
T0/AliT0TriggerParameters.cxx [new file with mode: 0644]
T0/AliT0TriggerParameters.h [new file with mode: 0644]

diff --git a/T0/AliT0RecoParam.cxx b/T0/AliT0RecoParam.cxx
new file mode 100644 (file)
index 0000000..aa12f29
--- /dev/null
@@ -0,0 +1,145 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// Class with T0 reconstruction parameters                                  //
+//    fMeanAmplitude -
+//           for low flux time-amplitude correction equalize time to amplitude 1 MIP; 
+//           for high flux - to 15MIP   
+//    To have nice time spectra after reconstruction we need to know 
+//    reference point to write t(i) - RefPoint. 
+//    It can be apparatus RefPoint or one of PMT                       //  
+//    fRefPoint - number of channel with RF
+//
+//       Alla.Maevskaya@cern.ch
+/////////////////////////////////////////////////////////////////////////
+
+#include "AliLog.h"
+#include "AliT0RecoParam.h"
+#include "Riostream.h"
+
+ClassImp(AliT0RecoParam)
+
+
+
+
+//_____________________________________________________________________________
+AliT0RecoParam::AliT0RecoParam():
+  AliDetectorRecoParam(),
+   fRefAmp(7),
+    fRefPoint(0)
+{
+  //
+  // constructor
+  //
+  SetName("T0");
+  SetTitle("T0");
+}
+
+//_____________________________________________________________________________
+AliT0RecoParam::~AliT0RecoParam() 
+{
+  //
+  // destructor
+  //  
+}
+
+//_____________________________________________________________________________
+
+AliT0RecoParam::AliT0RecoParam(const AliT0RecoParam &p):
+  AliDetectorRecoParam(p),       
+   fRefAmp(p.fRefAmp),
+   fRefPoint(p.fRefPoint)
+{
+ //copy constructor
+
+}
+//_____________________________________________________________________________
+
+AliT0RecoParam& AliT0RecoParam:: operator=(const AliT0RecoParam &p)
+{
+  //
+  // assign. operator
+  //
+
+  if (this == &p)
+    return *this;
+  
+  AliDetectorRecoParam::operator=(p);
+  fRefAmp = p.fRefAmp;
+  fRefPoint = p.fRefPoint;
+}
+//_____________________________________________________________________________
+AliT0RecoParam *AliT0RecoParam::GetLowFluxParam()
+{
+  //
+  // make default reconstruction  parameters for low  flux env.
+  //
+  AliT0RecoParam *param = new AliT0RecoParam();
+  param->fRefAmp = 1;
+  param->fRefPoint = 0;
+  param->SetName("Low Flux");
+  param->SetTitle("Low Flux");
+  return param;
+}
+
+//_____________________________________________________________________________
+
+AliT0RecoParam *AliT0RecoParam::GetHighFluxParam()
+{
+  //
+  // make reco parameters for high flux env.
+  //
+
+  AliT0RecoParam *param = new AliT0RecoParam();
+  param->fRefAmp = 5;
+  param->fRefPoint = 0;
+  //
+  param->SetName("High Flux");
+  param->SetTitle("High Flux");
+  return param;
+}
+
+
+//_____________________________________________________________________________
+
+AliT0RecoParam *AliT0RecoParam::GetLaserTestParam()
+{
+  //
+  // special setting for laser
+  //
+  AliT0RecoParam *param = new AliT0RecoParam();
+  param->fRefAmp = 1;
+  param->fRefPoint = 1;
+  //
+  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));
+}
diff --git a/T0/AliT0RecoParam.h b/T0/AliT0RecoParam.h
new file mode 100644 (file)
index 0000000..0bb8d97
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef ALIT0RECOPARAM_H
+#define ALIT0RECOPARAM_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// Class with T0 reconstruction parameters                                  //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+
+#include "AliDetectorRecoParam.h"
+
+class AliT0RecoParam : public AliDetectorRecoParam
+{
+ public: 
+  AliT0RecoParam();
+  AliT0RecoParam(const AliT0RecoParam &p); //copy constructor
+  AliT0RecoParam& operator=(const AliT0RecoParam &p);
+  virtual ~AliT0RecoParam();
+  
+ static   AliT0RecoParam *GetLowFluxParam();        // make reco parameters for low  flux env
+  static   AliT0RecoParam *GetHighFluxParam();       // make reco parameters for high flux env 
+  static   AliT0RecoParam *GetLaserTestParam();  // special setting for laser SetLaserTestParam 
+
+  Float_t GetRefAmp()  const  {return fRefAmp;}
+  void    SetRefAmp(Float_t amp)   { fRefAmp = amp;}
+  Int_t   GetRefPoint() const {return fRefPoint;}
+  void    SetRefPoint(Int_t ref) {fRefPoint = ref;}
+  void PrintParameters() const;
+
+ protected:
+  Float_t fRefAmp;
+  Int_t   fRefPoint;   
+
+
+  ClassDef(AliT0RecoParam, 1);
+
+};
+#endif
diff --git a/T0/AliT0TriggerParameters.cxx b/T0/AliT0TriggerParameters.cxx
new file mode 100644 (file)
index 0000000..681d8fc
--- /dev/null
@@ -0,0 +1,120 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id: AliT0TriggerParameters.cxx 28275 2008-08-28 06:09:21Z alla $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// class for T0 calibration                       TM-AC-AM_6-02-2006  
+// equalize time shift for each time CFD channel
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliT0TriggerParameters.h"
+#include "AliLog.h"
+
+#include "Riostream.h"
+
+ClassImp(AliT0TriggerParameters)
+
+//________________________________________________________________
+  AliT0TriggerParameters::AliT0TriggerParameters():TObject(),
+  fSwtPmt(0),        
+  fAmpCentr(5), 
+  fAmpSemiCentr(1), 
+  fTimeWindowLow(0),
+  fTimeWindowHigh(1)
+
+{
+  //
+
+}
+//_____________________________________________________________________________
+
+AliT0TriggerParameters::AliT0TriggerParameters(const AliT0TriggerParameters &r):
+  TObject(),       
+  fSwtPmt(0),        
+  fAmpCentr(5), 
+  fAmpSemiCentr(1), 
+  fTimeWindowLow(0),
+  fTimeWindowHigh(1)
+{
+ //copy constructor
+  ((AliT0TriggerParameters &) r).Copy(*this);
+}
+
+//_____________________________________________________________________________
+
+AliT0TriggerParameters& AliT0TriggerParameters:: operator=(const AliT0TriggerParameters &p)
+{
+  //
+  // assign. operator
+  //
+
+  if (this == &p)
+    return *this;
+}
+
+//________________________________________________________________
+AliT0TriggerParameters::~AliT0TriggerParameters()
+{
+  //
+  // destrictor
+}
+//________________________________________________________________
+void AliT0TriggerParameters::Reset()
+{
+  //reset values
+
+  memset(fThreshold,0,24*sizeof(Int_t));
+}
+
+
+//________________________________________________________________
+void  AliT0TriggerParameters::Print(Option_t*) const
+{
+  // print time values
+
+  printf("\n   ----    Threshold       ----\n\n");
+  printf(" Switched on/off\n");
+  for (Int_t i=0; i<24; i++) {
+    printf(" Threshold  %i status %i ", fThreshold[i], GetPMTstatus(i));
+  }
+  AliInfo(Form(" Time window around vertex : %f %f",fTimeWindowLow, fTimeWindowHigh ));
+  AliInfo(Form(" Amplitude threshold: central  %i semi-central %i", fAmpCentr,fAmpSemiCentr));
+
+} 
+
+
+//________________________________________________________________
+void AliT0TriggerParameters::SetPMTstatus(Int_t i, Int_t val)
+{
+  if(val)fSwtPmt |= 1<<i;
+  else fSwtPmt &= ~(1<<i);
+
+}
+//________________________________________________________________
+Int_t AliT0TriggerParameters::GetPMTstatus(Int_t i) const
+{
+
+  return (1<<i)&fSwtPmt;
+
+}
+
+
diff --git a/T0/AliT0TriggerParameters.h b/T0/AliT0TriggerParameters.h
new file mode 100644 (file)
index 0000000..d7147ba
--- /dev/null
@@ -0,0 +1,60 @@
+#ifndef AliT0TriggerParameters_H
+#define AliT0TriggerParameters_H
+
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+////////////////////////////////////////////////
+//  class for T0 calibration                 //
+////////////////////////////////////////////////
+
+#include "TObject.h"
+
+class AliT0TriggerParameters: public TObject {
+
+ public:
+  AliT0TriggerParameters();
+  AliT0TriggerParameters& operator= (const AliT0TriggerParameters &);
+  AliT0TriggerParameters(const AliT0TriggerParameters &calibda);
+  virtual ~AliT0TriggerParameters();
+  
+  //Switched on/off
+  void     SetPMTstatus(Int_t i, Int_t val);
+  Int_t    GetPMTstatus(Int_t i) const;
+ //Thresholds
+  void     SetThreshold(Int_t i, Int_t val) {fThreshold[i]=val;}
+  Int_t    GetThreshold(Int_t i) {return fThreshold[i];}
+  Int_t*   GetThreshold()  {return  fThreshold;}
+  //mult threshold
+  Float_t GetTimeWindowLow()  const  {return fTimeWindowLow;}
+  void    SetTimeWindowLow(Float_t low)   { fTimeWindowLow = low;}
+  Float_t GetTimeWindowHigh()  const  {return fTimeWindowHigh;}
+  void    SetTimeWindowHigh(Float_t high)   { fTimeWindowHigh = high;}
+  Int_t   GetAmpCentr() const {return fAmpCentr;}
+  void    SetAmpCentr(Int_t ref) {fAmpCentr = ref;}
+  Int_t   GetAmpSemiCentr() const {return fAmpSemiCentr;}
+  void    SetAmpSemiCentr(Int_t ref) {fAmpSemiCentr = ref;}
+  
+
+  void Reset();
+  virtual void  Print(Option_t* option= "") const; 
+
+ protected:
+
+  Int_t fSwtPmt;    // PMT on/off
+  Int_t fThreshold[24]; // thresholds
+  Int_t fAmpCentr;         // threshold for central event
+  Int_t fAmpSemiCentr;        // threshold for semi-central event
+  Float_t fTimeWindowLow;      //low border for TVDC
+  Float_t fTimeWindowHigh;     //low border for TVDC
+
+
+  // AliT0TriggerParameters& operator= (const AliT0TriggerParameters &);
+  // AliT0TriggerParameters(const AliT0TriggerParameters &calibda);
+ //
+  ClassDef(AliT0TriggerParameters,1)    // T0 Sensor Calibration data
+};
+
+
+#endif
+