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 //-----------------------------------------------------------------------------
19 // Class AliMUONGeometryConstituent
20 // -----------------------------
21 // Helper class for definititon of an assembly of volumes.
22 // Author: Ivana Hrivnacova, IPN Orsay
24 //-----------------------------------------------------------------------------
26 #include <TGeoMatrix.h>
28 #include "AliMUONGeometryConstituent.h"
32 ClassImp(AliMUONGeometryConstituent)
35 //______________________________________________________________________________
36 AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
37 Int_t copyNo, Int_t npar, Double_t* param)
44 /// Standard constructor for a constituent without translation & rotation
46 // fTransformation = new TGeoCombiTrans(name);
47 // would be nice to be so simple
49 // Create the constituent transformation
50 fTransformation = new TGeoCombiTrans("");
54 fParam = new Double_t[npar];
55 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
59 //______________________________________________________________________________
60 AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
61 Int_t copyNo, const TGeoTranslation& translation,
62 Int_t npar, Double_t* param)
69 /// Standard constructor for a constituent with translation
71 // Create the constituent transformation
72 fTransformation = new TGeoCombiTrans(translation, TGeoRotation());
76 fParam = new Double_t[npar];
77 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
82 //______________________________________________________________________________
83 AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
84 Int_t copyNo, const TGeoTranslation& translation,
85 const TGeoRotation& rotation,
86 Int_t npar, Double_t* param)
94 /// Standard constructor for a constituent with translation and rotation
96 // Create the constituent transformation
97 fTransformation = new TGeoCombiTrans(translation, rotation);
101 fParam = new Double_t[npar];
102 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
106 //______________________________________________________________________________
107 AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
109 const TGeoCombiTrans& transform,
110 Int_t npar, Double_t* param)
112 : TNamed(name, name),
118 /// Standard constructor for a constituent with translation and rotation
119 /// defined via TGeoCombiTrans
121 // Create the constituent transformation
122 fTransformation = new TGeoCombiTrans(transform);
126 fParam = new Double_t[npar];
127 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
131 //______________________________________________________________________________
132 AliMUONGeometryConstituent::AliMUONGeometryConstituent()
139 /// Default constructor
142 //______________________________________________________________________________
143 AliMUONGeometryConstituent::~AliMUONGeometryConstituent()
147 delete fTransformation;