]> git.uio.no Git - u/mrichter/AliRoot.git/blob - START/AliSTARTdigit.cxx
Default value of fgChargeCorrelSt12 set to 1 to avoid division by zero
[u/mrichter/AliRoot.git] / START / AliSTARTdigit.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Id$ */
17 /////////////////////////////////////////////////////////////////////////
18 //  Class AliSTARTdigit for START digits
19 //  fTimeRight  - right side TOF signal
20 //  fTimeLeft  - left side TOF signal
21 //  fTimeBestRight - TOF first particle on the right side
22 //  TimeBestLeft - TOF first particle on the left side
23 //  fTimeAverage = (fTimeBestRight + TimeBestLeft ) /2. START signal
24 //  fTimeDiff = fTimeBestRight - TimeBestLeft  
25 //
26 ///////////////////////////////////////////////////////////////////////
27
28
29
30  
31 #include <TArrayI.h>
32 #include "AliSTARTdigit.h"
33 #include <Riostream.h>
34
35 ClassImp(AliSTARTdigit)
36
37 //------------------------------------
38  AliSTARTdigit::AliSTARTdigit() : TObject()
39 {
40   //ctor
41   fTimeAverage=9999;
42   fTimeBestRight=9999;
43   fTimeBestLeft=9999;
44   fSumADCRight=0;
45
46   fTime = new TArrayI(36);  
47   fADC  = new TArrayI(36);  
48 }
49 //-----------------------------------
50 AliSTARTdigit::~AliSTARTdigit() {
51   // destructor
52   delete fTime;
53   delete fADC;
54 }
55 //-----------------------------------
56 void AliSTARTdigit::SetTime (TArrayI &o)
57 {
58   ////////////////////////////////////////
59   fTime = new TArrayI(36);  
60
61   Int_t i;
62   for (i=0; i<36; i++)
63     {
64       Int_t buf=o.At(i);
65       fTime->AddAt(buf,i);
66     }
67 }
68 //--------------------------------------------
69 void AliSTARTdigit::GetTime (TArrayI &o)
70 {
71   //
72   Int_t i;
73   for (i=0; i<36; i++)
74     {
75       o[i]=fTime->At(i);
76     }
77 }
78 //--------------------------------------------
79 void AliSTARTdigit::GetADC (TArrayI &o)
80 {
81   //
82   Int_t i;
83   for (i=0; i<36; i++)
84     {
85       o[i]=fADC->At(i);
86     }
87 }
88 //--------------------------------------------
89 void AliSTARTdigit::SetADC (TArrayI &o)
90 {
91   //
92   fADC  = new TArrayI(36);  
93   Int_t i;
94   //  Float_t fProcessKoef=1; // for pb 0.001
95   for (i=0; i<36; i++)
96     {
97       Int_t buf=(o.At(i));
98       fADC->AddAt(buf,i);
99     }
100 }