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