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