]>
Commit | Line | Data |
---|---|---|
16bf9884 | 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 | ||
88cb7938 | 16 | /* $Id$ */ |
16bf9884 | 17 | |
18 | /////////////////////////////////////////////////////////////////////////////// | |
19 | // // | |
20 | // Transition Radiation Detector version 2 -- slow simulator with // | |
21 | // detailed geometry // | |
22 | // // | |
23 | /////////////////////////////////////////////////////////////////////////////// | |
24 | ||
25 | #include <stdlib.h> | |
26 | ||
27 | #include <TMath.h> | |
88cb7938 | 28 | #include <TVirtualMC.h> |
16bf9884 | 29 | |
16bf9884 | 30 | #include "AliConst.h" |
88cb7938 | 31 | #include "AliRun.h" |
bd0f8685 | 32 | #include "AliTRDgeometry.h" |
88cb7938 | 33 | #include "AliTRDv2.h" |
16bf9884 | 34 | |
35 | ClassImp(AliTRDv2) | |
36 | ||
37 | //_____________________________________________________________________________ | |
38 | AliTRDv2::AliTRDv2():AliTRDv1() | |
39 | { | |
40 | // | |
41 | // Default constructor | |
42 | // | |
43 | ||
44 | } | |
45 | ||
46 | //_____________________________________________________________________________ | |
47 | AliTRDv2::AliTRDv2(const char *name, const char *title) | |
48 | :AliTRDv1(name, title) | |
49 | { | |
50 | // | |
51 | // Standard constructor for Transition Radiation Detector version 2 | |
52 | // | |
53 | ||
54 | // Check that FRAME is there otherwise we have no place where to | |
55 | // put TRD | |
56 | AliModule* frame = gAlice->GetModule("FRAME"); | |
57 | if (!frame) { | |
58 | Error("Ctor","TRD needs FRAME to be present\n"); | |
59 | exit(1); | |
60 | } | |
61 | ||
62 | if (frame->IsVersion() == 1) { | |
63 | // Detailed geometry without hole | |
64 | if (fGeometry) delete fGeometry; | |
bd0f8685 | 65 | fGeometry = new AliTRDgeometry(); |
16bf9884 | 66 | } |
67 | else { | |
68 | Error("Ctor","Could not find valid FRAME version 1\n"); | |
69 | exit(1); | |
70 | } | |
71 | ||
72 | } | |
73 | ||
74 | //_____________________________________________________________________________ | |
73ae7b59 | 75 | AliTRDv2::AliTRDv2(const AliTRDv2 &trd):AliTRDv1(trd) |
16bf9884 | 76 | { |
77 | // | |
78 | // Copy constructor | |
79 | // | |
80 | ||
81 | ((AliTRDv2 &) trd).Copy(*this); | |
82 | ||
83 | } | |
84 | ||
85 | //_____________________________________________________________________________ | |
86 | AliTRDv2::~AliTRDv2() | |
87 | { | |
88 | // | |
89 | // AliTRDv2 destructor | |
90 | // | |
91 | ||
92 | } | |
93 | ||
94 | //_____________________________________________________________________________ | |
95 | AliTRDv2 &AliTRDv2::operator=(const AliTRDv2 &trd) | |
96 | { | |
97 | // | |
98 | // Assignment operator | |
99 | // | |
100 | ||
101 | if (this != &trd) ((AliTRDv2 &) trd).Copy(*this); | |
102 | return *this; | |
103 | ||
104 | } | |
105 | ||
106 | //_____________________________________________________________________________ | |
e0d47c25 | 107 | void AliTRDv2::Copy(TObject &trd) const |
16bf9884 | 108 | { |
109 | // | |
110 | // Copy function | |
111 | // | |
112 | ||
73ae7b59 | 113 | AliTRDv1::Copy(trd); |
114 | ||
16bf9884 | 115 | } |
116 | ||
117 | //_____________________________________________________________________________ | |
118 | void AliTRDv2::CreateGeometry() | |
119 | { | |
120 | // | |
121 | // Create the geometry for the Transition Radiation Detector version 2 | |
122 | // | |
123 | ||
124 | // Check that FRAME is there otherwise we have no place where to put the TRD | |
125 | AliModule* frame = gAlice->GetModule("FRAME"); | |
126 | if (!frame) return; | |
127 | ||
128 | // Define the chambers | |
129 | AliTRD::CreateGeometry(); | |
130 | ||
131 | } | |
132 | ||
133 | //_____________________________________________________________________________ | |
134 | void AliTRDv2::CreateMaterials() | |
135 | { | |
136 | // | |
137 | // Create materials for the Transition Radiation Detector version 2 | |
138 | // | |
139 | ||
140 | AliTRD::CreateMaterials(); | |
141 | ||
142 | } | |
143 |