1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
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
26 ///////////////////////////////////////////////////////////////////////
32 #include "AliSTARTdigit.h"
33 #include <Riostream.h>
35 ClassImp(AliSTARTdigit)
37 //------------------------------------
38 AliSTARTdigit::AliSTARTdigit() : TObject()
46 fTimeRight = new TArrayI(12);
47 fTimeLeft = new TArrayI(12);
48 fADCRight = new TArrayI(12);
49 fADCLeft = new TArrayI(12);
51 //-----------------------------------
52 void AliSTARTdigit::SetTimeRight (TArrayI &o)
54 ////////////////////////////////////////
55 fTimeRight = new TArrayI(12);
61 fTimeRight->AddAt(buf,i);
64 //--------------------------------------------
65 void AliSTARTdigit::SetTimeLeft (TArrayI &o)
68 fTimeLeft = new TArrayI(12);
73 fTimeLeft->AddAt(buf,i);
76 //--------------------------------------------
77 void AliSTARTdigit::GetTimeLeft (TArrayI &o)
83 o[i]=fTimeLeft->At(i);
86 //--------------------------------------------
87 void AliSTARTdigit::GetTimeRight (TArrayI &o)
93 o[i]=fTimeRight->At(i);
96 //--------------------------------------------
97 void AliSTARTdigit::GetADCLeft (TArrayI &o)
103 o[i]=fADCLeft->At(i);
106 //--------------------------------------------
107 void AliSTARTdigit::GetADCRight (TArrayI &o)
113 o[i]=fADCRight->At(i);
116 //--------------------------------------------
117 void AliSTARTdigit::SetADCLeft (TArrayI &o)
120 fADCLeft = new TArrayI(12);
122 // Float_t fProcessKoef=1; // for pb 0.001
126 fADCLeft->AddAt(buf,i);
129 //--------------------------------------------
130 void AliSTARTdigit::SetADCRight (TArrayI &o)
133 // Float_t fProcessKoef=1; // for pb 0.001
134 fADCRight = new TArrayI(12);
139 fADCRight->AddAt(buf,i);
142 //------------------------------------------------------
143 void AliSTARTdigit::Print()
146 printf("AliSTARTdigit: fTimeAverage=%d, fTimeDiff=%d\n",
147 fTimeAverage, fTimeDiff);
148 cout<<" BestTimeRigh "<<fTimeBestRight<<
149 " TimeBestLeft "<<fTimeBestLeft<<endl;