Delete only existent objects.
[u/mrichter/AliRoot.git] / TRD / AliTRD.cxx
CommitLineData
4c039060 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$Log$
6f1e466d 18Revision 1.17.2.1 2000/05/08 14:28:59 cblume
19Introduced SetPHOShole() and SetRICHhole(). AliTRDrecPoint container is now a TObjArray
20
21Revision 1.17 2000/02/28 19:10:26 cblume
22Include the new TRD classes
23
851d3db9 24Revision 1.16.2.2 2000/02/28 17:53:24 cblume
25Introduce TRD geometry classes
26
27Revision 1.16.2.1 2000/02/28 17:04:19 cblume
28Include functions and data members for AliTRDrecPoint
29
30Revision 1.16 2000/01/19 17:17:35 fca
31Introducing a list of lists of hits -- more hits allowed for detector now
32
1cedd08a 33Revision 1.15 1999/11/02 17:04:25 fca
34Small syntax change for HP compiler
35
94c641ff 36Revision 1.14 1999/11/02 16:57:02 fca
37Avoid non ansi warnings on HP compilers
38
8459a454 39Revision 1.13 1999/11/02 16:35:56 fca
40New version of TRD introduced
41
5c7f4665 42Revision 1.12 1999/11/01 20:41:51 fca
43Added protections against using the wrong version of FRAME
44
ab76897d 45Revision 1.11 1999/09/29 09:24:34 fca
46Introduction of the Copyright and cvs Log
47
4c039060 48*/
49
fe4da5cc 50///////////////////////////////////////////////////////////////////////////////
51// //
52// Transition Radiation Detector //
53// This class contains the basic functions for the Transition Radiation //
6f1e466d 54// Detector. //
fe4da5cc 55// //
56///////////////////////////////////////////////////////////////////////////////
57
5c7f4665 58#include <stdlib.h>
59
fe4da5cc 60#include <TMath.h>
fe4da5cc 61#include <TNode.h>
fe4da5cc 62#include <TPGON.h>
63
fe4da5cc 64#include "AliTRD.h"
65#include "AliRun.h"
d3f347ff 66#include "AliConst.h"
851d3db9 67#include "AliTRDdigitizer.h"
68#include "AliTRDclusterizer.h"
69#include "AliTRDgeometryHole.h"
70#include "AliTRDgeometryFull.h"
71#include "AliTRDrecPoint.h"
fe4da5cc 72
73ClassImp(AliTRD)
74
75//_____________________________________________________________________________
76AliTRD::AliTRD()
77{
78 //
79 // Default constructor
80 //
82bbf98a 81
d3f347ff 82 fIshunt = 0;
83 fGasMix = 0;
99d5402e 84 fHits = 0;
85 fDigits = 0;
5c7f4665 86
851d3db9 87 fRecPoints = 0;
88 fNRecPoints = 0;
5c7f4665 89
851d3db9 90 fGeometry = 0;
82bbf98a 91
fe4da5cc 92}
93
94//_____________________________________________________________________________
95AliTRD::AliTRD(const char *name, const char *title)
96 : AliDetector(name,title)
97{
98 //
99 // Standard constructor for the TRD
100 //
101
5c7f4665 102 // Check that FRAME is there otherwise we have no place where to
103 // put TRD
104 AliModule* FRAME=gAlice->GetModule("FRAME");
105 if (!FRAME) {
106 Error("Ctor","TRD needs FRAME to be present\n");
107 exit(1);
108 }
109
110 // Define the TRD geometry according to the FRAME geometry
851d3db9 111 if (FRAME->IsVersion() == 0) {
112 // Geometry with hole
113 fGeometry = new AliTRDgeometryHole();
114 }
115 else if (FRAME->IsVersion() == 1) {
116 // Geometry without hole
117 fGeometry = new AliTRDgeometryFull();
118 }
119 else {
120 Error("Ctor","Could not find valid FRAME version\n");
121 exit(1);
122 }
5c7f4665 123
fe4da5cc 124 // Allocate the hit array
6f1e466d 125 fHits = new TClonesArray("AliTRDhit" ,405);
1cedd08a 126 gAlice->AddHitList(fHits);
99d5402e 127
128 // Allocate the digits array
851d3db9 129 fDigits = 0;
5c7f4665 130
851d3db9 131 // Allocate the rec point array
6f1e466d 132 fRecPoints = new TObjArray(400);
851d3db9 133 fNRecPoints = 0;
99d5402e 134
82bbf98a 135 fIshunt = 0;
136 fGasMix = 0;
137
fe4da5cc 138 SetMarkerColor(kWhite);
82bbf98a 139
fe4da5cc 140}
99d5402e 141
142//_____________________________________________________________________________
143AliTRD::~AliTRD()
144{
145 //
146 // TRD destructor
147 //
148
149 fIshunt = 0;
150
851d3db9 151 delete fGeometry;
99d5402e 152 delete fHits;
851d3db9 153 delete fRecPoints;
5c7f4665 154
155}
156
157//_____________________________________________________________________________
851d3db9 158void AliTRD::AddRecPoint(Float_t *pos, Int_t *digits, Int_t det, Float_t amp)
5c7f4665 159{
160 //
851d3db9 161 // Add a reconstructed point for the TRD
162 //
6f1e466d 163
164 AliTRDrecPoint *RecPoint = new AliTRDrecPoint();
851d3db9 165 TVector3 posVec(pos[0],pos[1],pos[2]);
166 RecPoint->SetLocalPosition(posVec);
167 RecPoint->SetDetector(det);
6f1e466d 168 RecPoint->SetEnergy(amp);
851d3db9 169 for (Int_t iDigit = 0; iDigit < 3; iDigit++) {
170 RecPoint->AddDigit(digits[iDigit]);
171 }
99d5402e 172
6f1e466d 173 fRecPoints->Add(RecPoint);
174
99d5402e 175}
176
177//_____________________________________________________________________________
851d3db9 178void AliTRD::AddDigit(Int_t *digits)
99d5402e 179{
180 //
181 // Add a digit for the TRD
182 //
183
184 TClonesArray &ldigits = *fDigits;
6f1e466d 185 new(ldigits[fNdigits++]) AliTRDdigit(kFALSE,digits);
99d5402e 186
187}
188
fe4da5cc 189//_____________________________________________________________________________
851d3db9 190void AliTRD::AddHit(Int_t track, Int_t det, Float_t *hits)
fe4da5cc 191{
192 //
193 // Add a hit for the TRD
194 //
82bbf98a 195
fe4da5cc 196 TClonesArray &lhits = *fHits;
851d3db9 197 new(lhits[fNhits++]) AliTRDhit(fIshunt,track,det,hits);
82bbf98a 198
fe4da5cc 199}
200
201//_____________________________________________________________________________
202void AliTRD::BuildGeometry()
203{
204 //
205 // Create the ROOT TNode geometry for the TRD
206 //
82bbf98a 207
fe4da5cc 208 TNode *Node, *Top;
209 TPGON *pgon;
210 const Int_t kColorTRD = 46;
d3f347ff 211
fe4da5cc 212 // Find the top node alice
82bbf98a 213 Top = gAlice->GetGeometry()->GetNode("alice");
d3f347ff 214
82bbf98a 215 pgon = new TPGON("S_TRD","TRD","void",0,360,kNsect,4);
216 Float_t ff = TMath::Cos(kDegrad * 180 / kNsect);
217 Float_t rrmin = kRmin / ff;
218 Float_t rrmax = kRmax / ff;
219 pgon->DefineSection(0,-kZmax1,rrmax,rrmax);
220 pgon->DefineSection(1,-kZmax2,rrmin,rrmax);
221 pgon->DefineSection(2, kZmax2,rrmin,rrmax);
222 pgon->DefineSection(3, kZmax1,rrmax,rrmax);
fe4da5cc 223 Top->cd();
224 Node = new TNode("TRD","TRD","S_TRD",0,0,0,"");
225 Node->SetLineColor(kColorTRD);
226 fNodes->Add(Node);
d3f347ff 227
fe4da5cc 228}
229
230//_____________________________________________________________________________
82bbf98a 231void AliTRD::CreateGeometry()
fe4da5cc 232{
82bbf98a 233 //
234 // Creates the volumes for the TRD chambers
235 //
82bbf98a 236
237 // Check that FRAME is there otherwise we have no place where to put the TRD
238 AliModule* FRAME = gAlice->GetModule("FRAME");
851d3db9 239 if (!FRAME) {
240 printf(" The TRD needs the FRAME to be defined first\n");
241 return;
82bbf98a 242 }
d3f347ff 243
851d3db9 244 fGeometry->CreateGeometry(fIdtmed->GetArray() - 1299);
5c7f4665 245
82bbf98a 246}
247
248//_____________________________________________________________________________
249void AliTRD::CreateMaterials()
250{
fe4da5cc 251 //
252 // Create the materials for the TRD
253 // Origin Y.Foka
254 //
255
fe4da5cc 256 Int_t ISXFLD = gAlice->Field()->Integ();
257 Float_t SXMGMX = gAlice->Field()->Max();
258
d3f347ff 259 // For polyethilene (CH2)
260 Float_t ape[2] = { 12., 1. };
261 Float_t zpe[2] = { 6., 1. };
262 Float_t wpe[2] = { 1., 2. };
263 Float_t dpe = 0.95;
264
265 // For mylar (C5H4O2)
266 Float_t amy[3] = { 12., 1., 16. };
267 Float_t zmy[3] = { 6., 1., 8. };
268 Float_t wmy[3] = { 5., 4., 2. };
fe4da5cc 269 Float_t dmy = 1.39;
d3f347ff 270
271 // For CO2
272 Float_t aco[2] = { 12., 16. };
273 Float_t zco[2] = { 6., 8. };
274 Float_t wco[2] = { 1., 2. };
275 Float_t dco = 0.001977;
276
277 // For water
278 Float_t awa[2] = { 1., 16. };
279 Float_t zwa[2] = { 1., 8. };
280 Float_t wwa[2] = { 2., 1. };
281 Float_t dwa = 1.0;
282
283 // For isobutane (C4H10)
284 Float_t ais[2] = { 12., 1. };
285 Float_t zis[2] = { 6., 1. };
286 Float_t wis[2] = { 4., 10. };
287 Float_t dis = 0.00267;
288
289 // For Xe/CO2-gas-mixture
290 // Xe-content of the Xe/CO2-mixture (90% / 10%)
291 Float_t fxc = .90;
292 // Xe-content of the Xe/Isobutane-mixture (97% / 3%)
293 Float_t fxi = .97;
fe4da5cc 294 Float_t dxe = .005858;
295
d3f347ff 296 // General tracking parameter
fe4da5cc 297 Float_t tmaxfd = -10.;
298 Float_t stemax = -1e10;
d3f347ff 299 Float_t deemax = -0.1;
300 Float_t epsil = 1e-4;
301 Float_t stmin = -0.001;
fe4da5cc 302
303 Float_t absl, radl, d, buf[1];
304 Float_t agm[2], dgm, zgm[2], wgm[2];
d3f347ff 305 Int_t nbuf;
fe4da5cc 306
d3f347ff 307 //////////////////////////////////////////////////////////////////////////
fe4da5cc 308 // Define Materials
d3f347ff 309 //////////////////////////////////////////////////////////////////////////
310
311 AliMaterial( 1, "Al $", 26.98, 13.0, 2.7 , 8.9 , 37.2);
312 AliMaterial( 2, "Air$", 14.61, 7.3, 0.001205, 30420.0 , 67500.0);
313 AliMaterial( 4, "Xe $", 131.29, 54.0, dxe , 1447.59, 0.0);
314 AliMaterial( 5, "Cu $", 63.54, 29.0, 8.96 , 1.43, 14.8);
315 AliMaterial( 6, "C $", 12.01, 6.0, 2.265 , 18.8 , 74.4);
316 AliMaterial(12, "G10$", 20.00, 10.0, 1.7 , 19.4 , 999.0);
317
318 // Mixtures
319 AliMixture(3, "Polyethilene$", ape, zpe, dpe, -2, wpe);
320 AliMixture(7, "Mylar$", amy, zmy, dmy, -3, wmy);
321 AliMixture(8, "CO2$", aco, zco, dco, -2, wco);
322 AliMixture(9, "Isobutane$", ais, zis, dis, -2, wis);
82bbf98a 323 AliMixture(13,"Water$", awa, zwa, dwa, -2, wwa);
d3f347ff 324
325 // Gas mixtures
82bbf98a 326 Char_t namate[21];
d3f347ff 327 // Xe/CO2-mixture
328 // Get properties of Xe
cfce8870 329 gMC->Gfmate((*fIdmate)[4], namate, agm[0], zgm[0], d, radl, absl, buf, nbuf);
d3f347ff 330 // Get properties of CO2
cfce8870 331 gMC->Gfmate((*fIdmate)[8], namate, agm[1], zgm[1], d, radl, absl, buf, nbuf);
d3f347ff 332 // Create gas mixture
333 wgm[0] = fxc;
334 wgm[1] = 1. - fxc;
fe4da5cc 335 dgm = wgm[0] * dxe + wgm[1] * dco;
d3f347ff 336 AliMixture(10, "Gas mixture 1$", agm, zgm, dgm, 2, wgm);
337 // Xe/Isobutane-mixture
338 // Get properties of Xe
cfce8870 339 gMC->Gfmate((*fIdmate)[4], namate, agm[0], zgm[0], d, radl, absl, buf, nbuf);
d3f347ff 340 // Get properties of Isobutane
cfce8870 341 gMC->Gfmate((*fIdmate)[9], namate, agm[1], zgm[1], d, radl, absl, buf, nbuf);
d3f347ff 342 // Create gas mixture
343 wgm[0] = fxi;
344 wgm[1] = 1. - fxi;
345 dgm = wgm[0] * dxe + wgm[1] * dis;
346 AliMixture(11, "Gas mixture 2$", agm, zgm, dgm, 2, wgm);
347
348 //////////////////////////////////////////////////////////////////////////
fe4da5cc 349 // Tracking Media Parameters
d3f347ff 350 //////////////////////////////////////////////////////////////////////////
351
352 // Al Frame
ad51aeb0 353 AliMedium(1, "Al Frame$", 1, 0, ISXFLD, SXMGMX
d3f347ff 354 , tmaxfd, stemax, deemax, epsil, stmin);
355 // Air
ad51aeb0 356 AliMedium(2, "Air$", 2, 0, ISXFLD, SXMGMX
d3f347ff 357 , tmaxfd, stemax, deemax, epsil, stmin);
358 // Polyethilene
ad51aeb0 359 AliMedium(3, "Radiator$", 3, 0, ISXFLD, SXMGMX
d3f347ff 360 , tmaxfd, stemax, deemax, epsil, stmin);
361 // Xe
ad51aeb0 362 AliMedium(4, "Xe$", 4, 1, ISXFLD, SXMGMX
d3f347ff 363 , tmaxfd, stemax, deemax, epsil, stmin);
364 // Cu pads
ad51aeb0 365 AliMedium(5, "Padplane$", 5, 1, ISXFLD, SXMGMX
d3f347ff 366 , tmaxfd, stemax, deemax, epsil, stmin);
367 // Fee + cables
ad51aeb0 368 AliMedium(6, "Readout$", 1, 0, ISXFLD, SXMGMX
d3f347ff 369 , tmaxfd, stemax, deemax, epsil, stmin);
370 // C frame
ad51aeb0 371 AliMedium(7, "C Frame$", 6, 0, ISXFLD, SXMGMX
d3f347ff 372 , tmaxfd, stemax, deemax, epsil, stmin);
373 // Mylar foils
ad51aeb0 374 AliMedium(8, "Mylar$", 7, 0, ISXFLD, SXMGMX
d3f347ff 375 , tmaxfd, stemax, deemax, epsil, stmin);
376 if (fGasMix == 1) {
377 // Gas-mixture (Xe/CO2)
ad51aeb0 378 AliMedium(9, "Gas-mix$", 10, 1, ISXFLD, SXMGMX
d3f347ff 379 , tmaxfd, stemax, deemax, epsil, stmin);
380 }
381 else {
382 // Gas-mixture (Xe/Isobutane)
ad51aeb0 383 AliMedium(9, "Gas-mix$", 11, 1, ISXFLD, SXMGMX
d3f347ff 384 , tmaxfd, stemax, deemax, epsil, stmin);
385 }
386 // Nomex-honeycomb (use carbon for the time being)
ad51aeb0 387 AliMedium(10, "Nomex$", 6, 0, ISXFLD, SXMGMX
d3f347ff 388 , tmaxfd, stemax, deemax, epsil, stmin);
389 // Kapton foils (use Mylar for the time being)
ad51aeb0 390 AliMedium(11, "Kapton$", 7, 0, ISXFLD, SXMGMX
d3f347ff 391 , tmaxfd, stemax, deemax, epsil, stmin);
392 // Gas-filling of the radiator
ad51aeb0 393 AliMedium(12, "CO2$", 8, 0, ISXFLD, SXMGMX
d3f347ff 394 , tmaxfd, stemax, deemax, epsil, stmin);
395 // G10-plates
ad51aeb0 396 AliMedium(13, "G10-plates$",12, 0, ISXFLD, SXMGMX
d3f347ff 397 , tmaxfd, stemax, deemax, epsil, stmin);
398 // Cooling water
ad51aeb0 399 AliMedium(14, "Water$", 13, 0, ISXFLD, SXMGMX
d3f347ff 400 , tmaxfd, stemax, deemax, epsil, stmin);
401
fe4da5cc 402}
403
404//_____________________________________________________________________________
82bbf98a 405void AliTRD::DrawModule()
406{
407 //
408 // Draw a shaded view of the Transition Radiation Detector version 0
409 //
410
411 // Set everything unseen
412 gMC->Gsatt("*" ,"SEEN",-1);
413
414 // Set ALIC mother transparent
415 gMC->Gsatt("ALIC","SEEN", 0);
416
417 // Set the volumes visible
851d3db9 418 if (fGeometry->IsVersion() == 0) {
5c7f4665 419 gMC->Gsatt("B071","SEEN", 0);
420 gMC->Gsatt("B074","SEEN", 0);
421 gMC->Gsatt("B075","SEEN", 0);
422 gMC->Gsatt("B077","SEEN", 0);
423 gMC->Gsatt("BTR1","SEEN", 0);
424 gMC->Gsatt("BTR2","SEEN", 0);
425 gMC->Gsatt("BTR3","SEEN", 0);
426 gMC->Gsatt("TRD1","SEEN", 0);
427 gMC->Gsatt("TRD2","SEEN", 0);
428 gMC->Gsatt("TRD3","SEEN", 0);
429 }
430 else {
431 gMC->Gsatt("B071","SEEN", 0);
432 gMC->Gsatt("B074","SEEN", 0);
433 gMC->Gsatt("B075","SEEN", 0);
434 gMC->Gsatt("B077","SEEN", 0);
435 gMC->Gsatt("BTR1","SEEN", 0);
436 gMC->Gsatt("BTR2","SEEN", 0);
437 gMC->Gsatt("BTR3","SEEN", 0);
438 gMC->Gsatt("TRD1","SEEN", 0);
6f1e466d 439 if (fGeometry->GetPHOShole())
440 gMC->Gsatt("TRD2","SEEN", 0);
441 if (fGeometry->GetRICHhole())
442 gMC->Gsatt("TRD3","SEEN", 0);
5c7f4665 443 }
82bbf98a 444 gMC->Gsatt("UCII","SEEN", 0);
445 gMC->Gsatt("UCIM","SEEN", 0);
446 gMC->Gsatt("UCIO","SEEN", 0);
447 gMC->Gsatt("UL02","SEEN", 1);
448 gMC->Gsatt("UL05","SEEN", 1);
449 gMC->Gsatt("UL06","SEEN", 1);
450
451 gMC->Gdopt("hide", "on");
452 gMC->Gdopt("shad", "on");
453 gMC->Gsatt("*", "fill", 7);
454 gMC->SetClipBox(".");
455 gMC->SetClipBox("*", 0, 2000, -2000, 2000, -2000, 2000);
456 gMC->DefaultRange();
457 gMC->Gdraw("alic", 40, 30, 0, 12, 9.4, .021, .021);
458 gMC->Gdhead(1111, "Transition Radiation Detector");
459 gMC->Gdman(18, 4, "MAN");
460
461}
462
463//_____________________________________________________________________________
fe4da5cc 464Int_t AliTRD::DistancetoPrimitive(Int_t , Int_t )
465{
466 //
467 // Distance between the mouse and the TRD detector on the screen
468 // Dummy routine
82bbf98a 469
470 return 9999;
471
fe4da5cc 472}
473
474//_____________________________________________________________________________
475void AliTRD::Init()
476{
477 //
851d3db9 478 // Initialize the TRD detector after the geometry has been created
fe4da5cc 479 //
82bbf98a 480
5c7f4665 481 Int_t i;
851d3db9 482
5c7f4665 483 printf("\n");
851d3db9 484 for (i = 0; i < 35; i++) printf("*");
5c7f4665 485 printf(" TRD_INIT ");
851d3db9 486 for (i = 0; i < 35; i++) printf("*");
487 printf("\n");
5c7f4665 488 printf("\n");
5c7f4665 489
851d3db9 490 if (fGeometry->IsVersion() == 0) {
6f1e466d 491 printf(" Geometry for spaceframe with holes initialized.\n\n");
851d3db9 492 }
493 else if (fGeometry->IsVersion() == 1) {
6f1e466d 494 printf(" Geometry for spaceframe without holes initialized.\n");
495 if (fGeometry->GetPHOShole())
496 printf(" Leave space in front of PHOS free.\n");
497 if (fGeometry->GetRICHhole())
498 printf(" Leave space in front of RICH free.\n");
499 printf("\n");
5c7f4665 500 }
501
851d3db9 502 if (fGasMix == 1)
503 printf(" Gas Mixture: 90%% Xe + 10%% CO2\n\n");
504 else
505 printf(" Gas Mixture: 97%% Xe + 3%% Isobutane\n\n");
5c7f4665 506
507}
508
509//_____________________________________________________________________________
510void AliTRD::MakeBranch(Option_t* option)
511{
512 //
513 // Create Tree branches for the TRD digits and cluster.
514 //
515
516 Int_t buffersize = 4000;
517 Char_t branchname[15];
518
519 AliDetector::MakeBranch(option);
520
851d3db9 521 Char_t *R = strstr(option,"R");
522 sprintf(branchname,"%srecPoints",GetName());
523 if (fRecPoints && gAlice->TreeR() && R) {
6f1e466d 524 gAlice->TreeR()->Branch(branchname,fRecPoints->IsA()->GetName()
525 ,&fRecPoints,buffersize,0);
851d3db9 526 printf("* AliTRD::MakeBranch * Making Branch %s for points in TreeR\n",branchname);
5c7f4665 527 }
528
851d3db9 529}
530
531//_____________________________________________________________________________
532void AliTRD::ResetRecPoints()
533{
534 //
535 // Reset number of reconstructed points and the point array
536 //
537
538 fNRecPoints = 0;
6f1e466d 539 if (fRecPoints) fRecPoints->Delete();
5c7f4665 540
541}
542
543//_____________________________________________________________________________
544void AliTRD::SetTreeAddress()
545{
546 //
547 // Set the branch addresses for the trees.
548 //
549
550 Char_t branchname[15];
551
552 AliDetector::SetTreeAddress();
553
554 TBranch *branch;
851d3db9 555 TTree *treeR = gAlice->TreeR();
556
557 if (treeR) {
558 sprintf(branchname,"%srecPoints",GetName());
559 if (fRecPoints) {
560 branch = treeR->GetBranch(branchname);
561 if (branch) {
562 branch->SetAddress(&fRecPoints);
563 }
5c7f4665 564 }
565 }
566
fe4da5cc 567}
568
d3f347ff 569//_____________________________________________________________________________
b060c36f 570void AliTRD::SetGasMix(Int_t imix)
d3f347ff 571{
82bbf98a 572 //
573 // Defines the gas mixture (imix=0: Xe/Isobutane imix=1: Xe/CO2)
574 //
575
d3f347ff 576 if ((imix < 0) || (imix > 1)) {
577 printf("Wrong input value: %d\n",imix);
578 printf("Use standard setting\n");
579 fGasMix = 0;
580 return;
581 }
582
583 fGasMix = imix;
584
585}
586