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 // Class AliMUONGeometryConstituent
19 // -----------------------------
20 // Helper class for definititon of an assembly of volumes.
21 // Author: Ivana Hrivnacova, IPN Orsay
24 #include <TGeoMatrix.h>
26 #include "AliMUONGeometryConstituent.h"
29 ClassImp(AliMUONGeometryConstituent)
31 //______________________________________________________________________________
32 AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
33 Int_t copyNo, Int_t npar, Double_t* param)
39 /// Standard constructor for a constituent without translation & rotation
41 // fTransformation = new TGeoCombiTrans(name);
42 // would be nice to be so simple
44 // Create the constituent transformation
45 fTransformation = new TGeoCombiTrans("");
49 fParam = new Double_t[npar];
50 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
54 //______________________________________________________________________________
55 AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
56 Int_t copyNo, const TGeoTranslation& translation,
57 Int_t npar, Double_t* param)
64 /// Standard constructor for a constituent with translation
66 // Create the constituent transformation
67 fTransformation = new TGeoCombiTrans(translation, TGeoRotation());
71 fParam = new Double_t[npar];
72 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
77 //______________________________________________________________________________
78 AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
79 Int_t copyNo, const TGeoTranslation& translation,
80 const TGeoRotation& rotation,
81 Int_t npar, Double_t* param)
89 /// Standard constructor for a constituent with translation and rotation
91 // Create the constituent transformation
92 fTransformation = new TGeoCombiTrans(translation, rotation);
96 fParam = new Double_t[npar];
97 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
101 //______________________________________________________________________________
102 AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
104 const TGeoCombiTrans& transform,
105 Int_t npar, Double_t* param)
107 : TNamed(name, name),
113 /// Standard constructor for a constituent with translation and rotation
114 /// defined via TGeoCombiTrans
116 // Create the constituent transformation
117 fTransformation = new TGeoCombiTrans(transform);
121 fParam = new Double_t[npar];
122 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
126 //______________________________________________________________________________
127 AliMUONGeometryConstituent::AliMUONGeometryConstituent()
134 /// Default constructor
138 //______________________________________________________________________________
139 AliMUONGeometryConstituent::AliMUONGeometryConstituent(
140 const AliMUONGeometryConstituent& rhs)
143 /// Protected copy constructor
145 AliFatal("Copy constructor is not implemented.");
148 //______________________________________________________________________________
149 AliMUONGeometryConstituent::~AliMUONGeometryConstituent()
153 delete fTransformation;
157 //______________________________________________________________________________
158 AliMUONGeometryConstituent&
159 AliMUONGeometryConstituent::operator = (const AliMUONGeometryConstituent& rhs)
161 /// Protected assignment operator
163 // check assignement to self
164 if (this == &rhs) return *this;
166 AliFatal("Assignment operator is not implemented.");