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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 // Transition Radiation Detector version 2 -- slow simulator with //
21 // detailed geometry //
23 ///////////////////////////////////////////////////////////////////////////////
28 #include <TVirtualMC.h>
32 #include "AliTRDgeometryDetail.h"
37 //_____________________________________________________________________________
38 AliTRDv2::AliTRDv2():AliTRDv1()
41 // Default constructor
46 //_____________________________________________________________________________
47 AliTRDv2::AliTRDv2(const char *name, const char *title)
48 :AliTRDv1(name, title)
51 // Standard constructor for Transition Radiation Detector version 2
54 // Check that FRAME is there otherwise we have no place where to
56 AliModule* frame = gAlice->GetModule("FRAME");
58 Error("Ctor","TRD needs FRAME to be present\n");
62 if (frame->IsVersion() == 1) {
63 // Detailed geometry without hole
64 if (fGeometry) delete fGeometry;
65 fGeometry = new AliTRDgeometryDetail();
68 Error("Ctor","Could not find valid FRAME version 1\n");
74 //_____________________________________________________________________________
75 AliTRDv2::AliTRDv2(const AliTRDv2 &trd):AliTRDv1(trd)
81 ((AliTRDv2 &) trd).Copy(*this);
85 //_____________________________________________________________________________
89 // AliTRDv2 destructor
94 //_____________________________________________________________________________
95 AliTRDv2 &AliTRDv2::operator=(const AliTRDv2 &trd)
98 // Assignment operator
101 if (this != &trd) ((AliTRDv2 &) trd).Copy(*this);
106 //_____________________________________________________________________________
107 void AliTRDv2::Copy(TObject &trd)
117 //_____________________________________________________________________________
118 void AliTRDv2::CreateGeometry()
121 // Create the geometry for the Transition Radiation Detector version 2
124 // Check that FRAME is there otherwise we have no place where to put the TRD
125 AliModule* frame = gAlice->GetModule("FRAME");
128 // Define the chambers
129 AliTRD::CreateGeometry();
133 //_____________________________________________________________________________
134 void AliTRDv2::CreateMaterials()
137 // Create materials for the Transition Radiation Detector version 2
140 AliTRD::CreateMaterials();