]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDtrigParam.cxx
Replace AliTRDCalibra
[u/mrichter/AliRoot.git] / TRD / AliTRDtrigParam.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 ///////////////////////////////////////////////////////////////////////////////
17 //                                                                           //
18 //                                                                           //
19 //  TRD trigger parameters class                                             //
20 //                                                                           //
21 //  Author:                                                                  //
22 //     Bogdan Vulpescu                                                       //
23 //                                                                           //
24 ///////////////////////////////////////////////////////////////////////////////
25
26 #include "AliTRDgeometry.h"
27
28 #include "AliTRDtrigParam.h"
29
30 ClassImp(AliTRDtrigParam)
31
32 //_____________________________________________________________________________
33 AliTRDtrigParam::AliTRDtrigParam()
34   :TNamed()
35   ,fDebug(0)
36   ,fTime1(0)
37   ,fTime2(0)
38   ,fClusThr(0)
39   ,fPadThr(0)
40   ,fSum10(0)
41   ,fSum12(0)
42   ,fTCOn(0)
43   ,fTCnexp(0)
44   ,fFilterType(0)
45   ,fR1(0)
46   ,fR2(0)
47   ,fC1(0)
48   ,fC2(0)
49   ,fPedestal(0)
50   ,fADCnoise(0)
51   ,fDeltaY(0)
52   ,fDeltaS(0)
53   ,fXprojPlane(0)
54   ,fLtuPtCut(0)
55   ,fGtuPtCut(0)
56   ,fField(0)
57   ,fHighPt(0)
58   ,fNPartJetLow(0)
59   ,fNPartJetHigh(0)
60   ,fJetLowPt(0)
61   ,fJetHighPt(0)
62 {
63   //
64   // AliTRDtrigParam default constructor
65   //
66
67 }
68
69 //_____________________________________________________________________________
70 AliTRDtrigParam::AliTRDtrigParam(const Text_t *name, const Text_t *title)
71   :TNamed(name,title)
72   ,fDebug(0)
73   ,fTime1(2)
74   ,fTime2(22)
75   ,fClusThr(10.0)
76   ,fPadThr(1)
77   ,fSum10(2)
78   ,fSum12(10)
79   ,fTCOn(1)
80   ,fTCnexp(1)
81   ,fFilterType(0)
82   ,fR1(0)
83   ,fR2(0)
84   ,fC1(0)
85   ,fC2(0)
86   ,fPedestal(0)
87   ,fADCnoise(0)
88   ,fDeltaY(2.0)
89   ,fDeltaS(2.5)
90   ,fXprojPlane(0)
91   ,fLtuPtCut(2.3)
92   ,fGtuPtCut(3.0)
93   ,fField(0)
94   ,fHighPt(10.0)
95   ,fNPartJetLow(5)
96   ,fNPartJetHigh(3)
97   ,fJetLowPt(3.0)
98   ,fJetHighPt(5.0)
99 {
100   //
101   // AliTRDtrigParam constructor
102   //
103
104   // PASA.v.4
105   if      (fTCnexp == 1) {
106     fR1 = 1.1563;
107     fR2 = 0.1299;
108     fC1 = 0.0657;
109     fC2 = 0.0000;
110   }
111   else if (fTCnexp == 2) {
112     fR1 = 1.1563;
113     fR2 = 0.1299;
114     fC1 = 0.1141;
115     fC2 = 0.6241;
116   }
117
118 }
119
120 //_____________________________________________________________________________
121 AliTRDtrigParam::AliTRDtrigParam(const AliTRDtrigParam &p)
122   :TNamed(p)
123   ,fDebug(p.fDebug)
124   ,fTime1(p.fTime1)
125   ,fTime2(p.fTime2)
126   ,fClusThr(p.fClusThr)
127   ,fPadThr(p.fPadThr)
128   ,fSum10(p.fSum10)
129   ,fSum12(p.fSum12)
130   ,fTCOn(p.fTCOn)
131   ,fTCnexp(p.fTCnexp)
132   ,fFilterType(p.fFilterType)
133   ,fR1(p.fR1)
134   ,fR2(p.fR2)
135   ,fC1(p.fC1)
136   ,fC2(p.fC2)
137   ,fPedestal(p.fPedestal)
138   ,fADCnoise(p.fADCnoise)
139   ,fDeltaY(p.fDeltaY)
140   ,fDeltaS(p.fDeltaS)
141   ,fXprojPlane(p.fXprojPlane)
142   ,fLtuPtCut(p.fLtuPtCut)
143   ,fGtuPtCut(p.fGtuPtCut)
144   ,fField(p.fField)
145   ,fHighPt(p.fHighPt)
146   ,fNPartJetLow(p.fNPartJetLow)
147   ,fNPartJetHigh(p.fNPartJetHigh)
148   ,fJetLowPt(p.fJetLowPt)
149   ,fJetHighPt(p.fJetHighPt)
150 {
151   //
152   // AliTRDtrigParam copy constructor
153   //
154
155 }
156
157 //_____________________________________________________________________________
158 AliTRDtrigParam::~AliTRDtrigParam()
159 {
160   //
161   // AliTRDtrigParam destructor
162   //
163
164 }
165
166 //_____________________________________________________________________________
167 AliTRDtrigParam &AliTRDtrigParam::operator=(const AliTRDtrigParam &p)
168 {
169   //
170   // Assignment operator
171   //
172
173   if (this != &p) ((AliTRDtrigParam &) p).Copy(*this);
174   return *this;
175
176 }
177
178 //_____________________________________________________________________________
179 void AliTRDtrigParam::Copy(TObject &p) const
180 {
181   //
182   // Copy function
183   //
184
185   ((AliTRDtrigParam &) p).fDebug        = fDebug;
186   ((AliTRDtrigParam &) p).fTime1        = fTime1;
187   ((AliTRDtrigParam &) p).fTime2        = fTime2;
188   ((AliTRDtrigParam &) p).fClusThr      = fClusThr;
189   ((AliTRDtrigParam &) p).fPadThr       = fPadThr;
190   ((AliTRDtrigParam &) p).fSum10        = fSum10;
191   ((AliTRDtrigParam &) p).fSum12        = fSum12;
192   ((AliTRDtrigParam &) p).fTCOn         = fTCOn;
193   ((AliTRDtrigParam &) p).fTCnexp       = fTCnexp;
194   ((AliTRDtrigParam &) p).fFilterType   = fFilterType;
195   ((AliTRDtrigParam &) p).fR1           = fR1;
196   ((AliTRDtrigParam &) p).fR2           = fR2;
197   ((AliTRDtrigParam &) p).fC1           = fC1;
198   ((AliTRDtrigParam &) p).fC2           = fC2;
199   ((AliTRDtrigParam &) p).fPedestal     = fPedestal;
200   ((AliTRDtrigParam &) p).fADCnoise     = fADCnoise;
201   ((AliTRDtrigParam &) p).fDeltaY       = fDeltaY;
202   ((AliTRDtrigParam &) p).fDeltaS       = fDeltaS;
203   ((AliTRDtrigParam &) p).fXprojPlane   = fXprojPlane;
204   ((AliTRDtrigParam &) p).fField        = fField;
205   ((AliTRDtrigParam &) p).fLtuPtCut     = fLtuPtCut;
206   ((AliTRDtrigParam &) p).fGtuPtCut     = fGtuPtCut;
207   ((AliTRDtrigParam &) p).fHighPt       = fHighPt;
208   ((AliTRDtrigParam &) p).fNPartJetLow  = fNPartJetLow;
209   ((AliTRDtrigParam &) p).fNPartJetHigh = fNPartJetHigh;
210   ((AliTRDtrigParam &) p).fJetLowPt     = fJetLowPt;
211   ((AliTRDtrigParam &) p).fJetHighPt    = fJetHighPt;
212
213 }
214
215 //_____________________________________________________________________________
216 void AliTRDtrigParam::Init()
217 {
218   //
219   // Initialize the other parameters
220   //
221
222   Float_t xPlane0;
223   Float_t xPlane5;
224  
225   xPlane0     = AliTRDgeometry::GetTime0(0) 
226               - AliTRDgeometry::CdrHght() 
227               - 0.5*AliTRDgeometry::CamHght(); 
228   xPlane5     = AliTRDgeometry::GetTime0(5) 
229               - AliTRDgeometry::CdrHght()
230               - 0.5*AliTRDgeometry::CamHght();
231   fXprojPlane = 0.5 * (xPlane0 + xPlane5);
232
233 }
234