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 **************************************************************************/
16 ///////////////////////////////////////////////////////////////////////////////
18 // TRD trigger parameters class //
20 // Request an instance with AliTRDCommonParam::Instance() //
21 // Then request the needed values //
26 ///////////////////////////////////////////////////////////////////////////////
28 #include "AliTRDgeometry.h"
30 #include "AliTRDtrigParam.h"
32 ClassImp(AliTRDtrigParam)
34 AliTRDtrigParam *AliTRDtrigParam::fgInstance = 0;
35 Bool_t AliTRDtrigParam::fgTerminated = kFALSE;
37 //_ singleton implementation __________________________________________________
38 AliTRDtrigParam *AliTRDtrigParam::Instance()
41 // Singleton implementation
42 // Returns an instance of this class, it is created if neccessary
45 if (fgTerminated != kFALSE) {
49 if (fgInstance == 0) {
50 fgInstance = new AliTRDtrigParam();
57 //_____________________________________________________________________________
58 void AliTRDtrigParam::Terminate()
61 // Singleton implementation
62 // Deletes the instance of this class and sets the terminated flag,
63 // instances cannot be requested anymore
64 // This function can be called several times.
69 if (fgInstance != 0) {
76 //_____________________________________________________________________________
77 AliTRDtrigParam::AliTRDtrigParam()
106 // AliTRDtrigParam default constructor
116 else if (fTCnexp == 2) {
127 //_____________________________________________________________________________
128 AliTRDtrigParam::AliTRDtrigParam(const AliTRDtrigParam &p)
132 ,fClusThr(p.fClusThr)
138 ,fFilterType(p.fFilterType)
143 ,fPedestal(p.fPedestal)
144 ,fADCnoise(p.fADCnoise)
147 ,fXprojPlane(p.fXprojPlane)
148 ,fLtuPtCut(p.fLtuPtCut)
149 ,fGtuPtCut(p.fGtuPtCut)
151 ,fNPartJetLow(p.fNPartJetLow)
152 ,fNPartJetHigh(p.fNPartJetHigh)
153 ,fJetLowPt(p.fJetLowPt)
154 ,fJetHighPt(p.fJetHighPt)
157 // AliTRDtrigParam copy constructor
162 //_____________________________________________________________________________
163 AliTRDtrigParam::~AliTRDtrigParam()
166 // AliTRDtrigParam destructor
171 //_____________________________________________________________________________
172 AliTRDtrigParam &AliTRDtrigParam::operator=(const AliTRDtrigParam &p)
175 // Assignment operator
178 if (this != &p) ((AliTRDtrigParam &) p).Copy(*this);
183 //_____________________________________________________________________________
184 void AliTRDtrigParam::Copy(TObject &p) const
190 ((AliTRDtrigParam &) p).fTime1 = fTime1;
191 ((AliTRDtrigParam &) p).fTime2 = fTime2;
192 ((AliTRDtrigParam &) p).fClusThr = fClusThr;
193 ((AliTRDtrigParam &) p).fPadThr = fPadThr;
194 ((AliTRDtrigParam &) p).fSum10 = fSum10;
195 ((AliTRDtrigParam &) p).fSum12 = fSum12;
196 ((AliTRDtrigParam &) p).fTCOn = fTCOn;
197 ((AliTRDtrigParam &) p).fTCnexp = fTCnexp;
198 ((AliTRDtrigParam &) p).fFilterType = fFilterType;
199 ((AliTRDtrigParam &) p).fR1 = fR1;
200 ((AliTRDtrigParam &) p).fR2 = fR2;
201 ((AliTRDtrigParam &) p).fC1 = fC1;
202 ((AliTRDtrigParam &) p).fC2 = fC2;
203 ((AliTRDtrigParam &) p).fPedestal = fPedestal;
204 ((AliTRDtrigParam &) p).fADCnoise = fADCnoise;
205 ((AliTRDtrigParam &) p).fDeltaY = fDeltaY;
206 ((AliTRDtrigParam &) p).fDeltaS = fDeltaS;
207 ((AliTRDtrigParam &) p).fXprojPlane = fXprojPlane;
208 ((AliTRDtrigParam &) p).fLtuPtCut = fLtuPtCut;
209 ((AliTRDtrigParam &) p).fGtuPtCut = fGtuPtCut;
210 ((AliTRDtrigParam &) p).fHighPt = fHighPt;
211 ((AliTRDtrigParam &) p).fNPartJetLow = fNPartJetLow;
212 ((AliTRDtrigParam &) p).fNPartJetHigh = fNPartJetHigh;
213 ((AliTRDtrigParam &) p).fJetLowPt = fJetLowPt;
214 ((AliTRDtrigParam &) p).fJetHighPt = fJetHighPt;
218 //_____________________________________________________________________________
219 void AliTRDtrigParam::Init()
222 // Initialize the other parameters
228 xPlane0 = AliTRDgeometry::GetTime0(0)
229 - AliTRDgeometry::CdrHght()
230 - 0.5*AliTRDgeometry::CamHght();
231 xPlane5 = AliTRDgeometry::GetTime0(5)
232 - AliTRDgeometry::CdrHght()
233 - 0.5*AliTRDgeometry::CamHght();
234 fXprojPlane = 0.5 * (xPlane0 + xPlane5);