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"
30 ClassImp(AliMUONGeometryConstituent)
33 //______________________________________________________________________________
34 AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
35 Int_t copyNo, Int_t npar, Double_t* param)
42 /// Standard constructor for a constituent without translation & rotation
44 // fTransformation = new TGeoCombiTrans(name);
45 // would be nice to be so simple
47 // Create the constituent transformation
48 fTransformation = new TGeoCombiTrans("");
52 fParam = new Double_t[npar];
53 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
57 //______________________________________________________________________________
58 AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
59 Int_t copyNo, const TGeoTranslation& translation,
60 Int_t npar, Double_t* param)
67 /// Standard constructor for a constituent with translation
69 // Create the constituent transformation
70 fTransformation = new TGeoCombiTrans(translation, TGeoRotation());
74 fParam = new Double_t[npar];
75 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
80 //______________________________________________________________________________
81 AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
82 Int_t copyNo, const TGeoTranslation& translation,
83 const TGeoRotation& rotation,
84 Int_t npar, Double_t* param)
92 /// Standard constructor for a constituent with translation and rotation
94 // Create the constituent transformation
95 fTransformation = new TGeoCombiTrans(translation, rotation);
99 fParam = new Double_t[npar];
100 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
104 //______________________________________________________________________________
105 AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
107 const TGeoCombiTrans& transform,
108 Int_t npar, Double_t* param)
110 : TNamed(name, name),
116 /// Standard constructor for a constituent with translation and rotation
117 /// defined via TGeoCombiTrans
119 // Create the constituent transformation
120 fTransformation = new TGeoCombiTrans(transform);
124 fParam = new Double_t[npar];
125 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
129 //______________________________________________________________________________
130 AliMUONGeometryConstituent::AliMUONGeometryConstituent()
137 /// Default constructor
140 //______________________________________________________________________________
141 AliMUONGeometryConstituent::~AliMUONGeometryConstituent()
145 delete fTransformation;