Line data Source code
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 AliT0digit for T0 digits
19 : // fTimeA - right side TOF signal
20 : // fTimeC - left side TOF signal
21 : // fTimeBestA - TOF first particle on the right side
22 : // TimeBestC - TOF first particle on the left side
23 : // fTimeAverage = (fTimeBestA + TimeBestC ) /2. T0 signal
24 : // fTimeDiff = fTimeBestA - TimeBestC
25 : //
26 : ///////////////////////////////////////////////////////////////////////
27 :
28 : #include "AliT0digit.h"
29 : #include "TArrayI.h"
30 :
31 20 : ClassImp(AliT0digit)
32 :
33 : //-----------------------------------------------
34 33 : AliT0digit::AliT0digit() :TObject(),
35 99 : fTimeCFD(new TArrayI(24)),
36 99 : fQT0( new TArrayI(24)),
37 99 : fTimeLED( new TArrayI(24)),
38 99 : fQT1( new TArrayI(24)),
39 33 : fTimeAverage(99999),
40 33 : fTimeDiff(99999),
41 33 : fBestTimeA(99999),
42 33 : fBestTimeC (99999),
43 33 : fSumMult(0),
44 33 : fRefPoint(0)
45 :
46 165 : {
47 : //
48 66 : }
49 :
50 : //_____________________________________________________________________________
51 :
52 48 : AliT0digit::~AliT0digit() {
53 : // destructor
54 16 : delete fTimeCFD;
55 16 : delete fQT0;
56 16 : delete fTimeLED;
57 16 : delete fQT1;
58 24 : }
59 : //-----------------------------------
60 : void AliT0digit::SetTimeCFD (TArrayI &o)
61 : {
62 : ////////////////////////////////////////
63 16 : if(fTimeCFD)delete fTimeCFD;
64 8 : fTimeCFD = new TArrayI(24);
65 :
66 : Int_t i;
67 200 : for (i=0; i<24; i++)
68 : {
69 96 : Int_t buf=o.At(i);
70 96 : fTimeCFD->AddAt(buf,i);
71 : }
72 4 : }
73 : //--------------------------------------------
74 : void AliT0digit::GetTimeCFD (TArrayI &o)
75 : {
76 : //
77 : Int_t i;
78 612 : for (i=0; i<24; i++)
79 : {
80 288 : o[i]=fTimeCFD->At(i);
81 : }
82 12 : }
83 : //--------------------------------------------
84 : void AliT0digit::GetQT0 (TArrayI &o)
85 : {
86 : //
87 : Int_t i;
88 1020 : for (i=0; i<24; i++)
89 : {
90 480 : o[i]=fQT0->At(i);
91 : }
92 20 : }
93 : //--------------------------------------------
94 : void AliT0digit::SetQT0 (TArrayI &o)
95 : {
96 : //
97 16 : if(fQT0)delete fQT0;
98 8 : fQT0 = new TArrayI(24);
99 : Int_t i;
100 200 : for (i=0; i<24; i++)
101 : {
102 96 : Int_t buf=(o.At(i));
103 96 : fQT0->AddAt(buf,i);
104 : }
105 4 : }
106 : //-----------------------------------
107 : void AliT0digit::SetTimeLED (TArrayI &o)
108 : {
109 : ////////////////////////////////////////
110 16 : if(fTimeLED)delete fTimeLED;
111 8 : fTimeLED = new TArrayI(24);
112 :
113 : Int_t i;
114 200 : for (i=0; i<24; i++)
115 : {
116 96 : Int_t buf=o.At(i);
117 96 : fTimeLED->AddAt(buf,i);
118 : }
119 4 : }
120 : //--------------------------------------------
121 : void AliT0digit::GetTimeLED (TArrayI &o)
122 : {
123 : //
124 : Int_t i;
125 612 : for (i=0; i<24; i++)
126 : {
127 288 : o[i]=fTimeLED->At(i);
128 : }
129 12 : }
130 : //--------------------------------------------
131 : void AliT0digit::GetQT1 (TArrayI &o)
132 : {
133 : //
134 : Int_t i;
135 1020 : for (i=0; i<24; i++)
136 : {
137 480 : o[i]=fQT1->At(i);
138 : }
139 20 : }
140 : //--------------------------------------------
141 : void AliT0digit::SetQT1 (TArrayI &o)
142 : {
143 : //
144 16 : if(fQT1)delete fQT1;
145 8 : fQT1 = new TArrayI(24);
146 : Int_t i;
147 200 : for (i=0; i<24; i++)
148 : {
149 96 : Int_t buf=(o.At(i));
150 96 : fQT1->AddAt(buf,i);
151 : }
152 4 : }
|