]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDparameter.cxx
Particle history saved
[u/mrichter/AliRoot.git] / TRD / AliTRDparameter.cxx
index f2d2e46cbd755835f7cab0ceed317a8fe32208eb..2c572649c52f8a4617bb13ce98e50d3de97e2839 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.4  2002/04/12 12:13:23  cblume
-Add Jiris changes
-
-Revision 1.3  2002/03/28 14:59:07  cblume
-Coding conventions
-
-Revision 1.2  2002/03/28 10:00:36  hristov
-Some additional initialisation
-
-Revision 1.1  2002/03/25 20:01:18  cblume
-Introduce parameter class
-
-*/
+/* $Id$ */
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
@@ -35,10 +21,11 @@ Introduce parameter class
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include <TRandom.h>
+
 #include "AliRun.h"
 #include "AliMagF.h"
 
-#include "AliTRD.h"
 #include "AliTRDparameter.h"
 #include "AliTRDgeometryFull.h"
 
@@ -61,6 +48,7 @@ AliTRDparameter::AliTRDparameter():TNamed()
   fADCoutRange        = 0.0;
   fADCinRange         = 0.0;
   fADCthreshold       = 0;
+  fADCbaseline        = 0;        
   fDiffusionOn        = 0;
   fDiffusionT         = 0.0;
   fDiffusionL         = 0.0;
@@ -114,6 +102,7 @@ AliTRDparameter::AliTRDparameter(const Text_t *name, const Text_t *title)
   fADCoutRange        = 0.0;
   fADCinRange         = 0.0;
   fADCthreshold       = 0;
+  fADCbaseline        = 0;        
   fDiffusionOn        = 0;
   fDiffusionT         = 0.0;
   fDiffusionL         = 0.0;
@@ -153,7 +142,7 @@ AliTRDparameter::AliTRDparameter(const Text_t *name, const Text_t *title)
 
 
 //_____________________________________________________________________________
-AliTRDparameter::AliTRDparameter(const AliTRDparameter &p)
+AliTRDparameter::AliTRDparameter(const AliTRDparameter &p):TNamed(p)
 {
   //
   // AliTRDparameter copy constructor
@@ -224,6 +213,7 @@ void AliTRDparameter::Copy(TObject &p)
   ((AliTRDparameter &) p).fADCoutRange        = fADCoutRange;
   ((AliTRDparameter &) p).fADCinRange         = fADCinRange;
   ((AliTRDparameter &) p).fADCthreshold       = fADCthreshold;
+  ((AliTRDparameter &) p).fADCbaseline        = fADCbaseline; 
   ((AliTRDparameter &) p).fDiffusionOn        = fDiffusionOn; 
   ((AliTRDparameter &) p).fDiffusionT         = fDiffusionT;
   ((AliTRDparameter &) p).fDiffusionL         = fDiffusionL;
@@ -323,6 +313,14 @@ void AliTRDparameter::Init()
   SetColPadSize(4,0.77);
   SetColPadSize(5,0.80);
 
+  // New pad size? Needs to be checked!
+  //SetColPadSize(0,0.664);
+  //SetColPadSize(1,0.695);
+  //SetColPadSize(2,0.726);
+  //SetColPadSize(3,0.756);
+  //SetColPadSize(4,0.788);
+  //SetColPadSize(5,0.818);
+
   // The pad row (z-direction)
   SetNRowPad();
 
@@ -344,8 +342,9 @@ void AliTRDparameter::Init()
   fChipGain       = 12.4;
   fNoise          = 1000.;
   fADCoutRange    = 1023.;          // 10-bit ADC
-  fADCinRange     = 1000.;          // 1V input range
+  fADCinRange     = 2000.;          // 2V input range
   fADCthreshold   = 1;
+  fADCbaseline    = 0;
 
   // The drift velocity (cm / mus)
   fDriftVelocity  = 1.5;
@@ -354,7 +353,7 @@ void AliTRDparameter::Init()
   fDiffusionOn    = 1;
 
   // E x B effects
-  fExBOn          = 0;
+  fExBOn          = 1;
 
   // Propability for electron attachment
   fElAttachOn     = 0;
@@ -367,7 +366,7 @@ void AliTRDparameter::Init()
   fTRFOn          = 1;
 
   // The cross talk
-  fCTOn           = 0;
+  fCTOn           = 1;
 
   // The tail cancelation
   fTCOn           = 1;
@@ -382,10 +381,9 @@ void AliTRDparameter::Init()
   fTimeCoupling   = 0.4;
 
   // The tilting angle for the readout pads
-  SetTiltingAngle(5.0);
+  SetTiltingAngle(2.0);
 
   // The magnetic field strength in Tesla
-  //fField           = 0.2 * gAlice->Field()->Factor();
   fField           = 0.4;
 
   //
@@ -451,7 +449,7 @@ void AliTRDparameter::ReInit()
 }
 
 //_____________________________________________________________________________
-void AliTRDparameter::SetNRowPad(const Int_t p, const Int_t c, const Int_t npad)
+void AliTRDparameter::SetNRowPad(Int_t p, Int_t c, Int_t npad)
 {
   //
   // Redefines the number of pads in raw direction for
@@ -485,8 +483,8 @@ void AliTRDparameter::SetNRowPad()
                                  , { 16, 16, 12, 16, 16 }
                                  , { 16, 16, 12, 16, 16 }
                                  , { 16, 16, 12, 16, 16 }
-                                 , { 14, 16, 12, 16, 14 }
-                                 , { 13, 16, 12, 16, 13 } };
+                                 , { 16, 16, 12, 16, 16 }
+                                 , { 16, 16, 12, 16, 16 } };
 
   Float_t rpadW = AliTRDgeometry::RpadW();
 
@@ -504,7 +502,7 @@ void AliTRDparameter::SetNRowPad()
                             - fGeo->GetChamberLength(iplan,1)
                              - fGeo->GetChamberLength(iplan,2) / 2.;
         for (Int_t ic = 0; ic < icham; ic++) {
-          row0 += fGeo->GetChamberLength(iplan,icham);
+          row0 += fGeo->GetChamberLength(iplan,ic);
         }
         fRow0[iplan][icham][isect]       = row0;
 
@@ -515,7 +513,7 @@ void AliTRDparameter::SetNRowPad()
 }
 
 //_____________________________________________________________________________
-void AliTRDparameter::SetColPadSize(const Int_t p, const Float_t s)
+void AliTRDparameter::SetColPadSize(Int_t p, Float_t s)
 {
   //
   // Redefines the pad size in column direction
@@ -530,7 +528,7 @@ void AliTRDparameter::SetColPadSize(const Int_t p, const Float_t s)
 }
 
 //_____________________________________________________________________________
-void AliTRDparameter::SetNTimeBin(const Int_t nbin)
+void AliTRDparameter::SetNTimeBin(Int_t nbin)
 {
   //
   // Redefines the number of time bins in the drift region.
@@ -1205,7 +1203,7 @@ void AliTRDparameter::FillLUT()
 
   for (Int_t iplan = 0; iplan < kNplan; iplan++) {
     for (Int_t ilut  = 0; ilut  < kNlut; ilut++) {
-      fLUT[iplan*kNplan+ilut] = lut[iplan][ilut];
+      fLUT[iplan*kNlut+ilut] = lut[iplan][ilut];
     }
   }
 
@@ -1229,7 +1227,7 @@ Float_t AliTRDparameter::GetTiltingAngle() const
   // Get the tilting angle for the readout pads
   //
 
-  return TMath::ATan(180.0/TMath::Pi() * fTiltingAngle);
+  return 180.0 / TMath::Pi() * TMath::ATan(fTiltingAngle);
 
 }
 
@@ -1328,6 +1326,7 @@ Double_t AliTRDparameter::LUTposition(Int_t iplane, Double_t ampL
   //
 
   const Int_t kNplan = AliTRDgeometry::kNplan;
+  const Int_t kNlut  = 128;
 
   Double_t pos;
   Double_t x = 0.0;
@@ -1364,7 +1363,7 @@ Double_t AliTRDparameter::LUTposition(Int_t iplane, Double_t ampL
     } 
     else {
       ix  = (Int_t) ((x - xmin) / xwid);
-      pos = side * fLUT[iplane*kNplan+ix];
+      pos = side * fLUT[iplane*kNlut+ix];
     }
        
   }