]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - MUON/AliMUONGeometryConstituent.cxx
Updated list of MUON libraries
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryConstituent.cxx
... / ...
CommitLineData
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// $Id$
17//
18// Class AliMUONGeometryConstituent
19// -----------------------------
20// Helper class for definititon of an assembly of volumes.
21// Author: Ivana Hrivnacova, IPN Orsay
22// 23/01/2004
23
24#include <TGeoMatrix.h>
25
26#include "AliMUONGeometryConstituent.h"
27#include "AliLog.h"
28
29/// \cond CLASSIMP
30ClassImp(AliMUONGeometryConstituent)
31/// \endcond
32
33//______________________________________________________________________________
34AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
35 Int_t copyNo, Int_t npar, Double_t* param)
36 : TNamed(name, name),
37 fCopyNo(copyNo),
38 fNpar(npar),
39 fParam(0),
40 fTransformation(0)
41{
42/// Standard constructor for a constituent without translation & rotation
43
44 // fTransformation = new TGeoCombiTrans(name);
45 // would be nice to be so simple
46
47 // Create the constituent transformation
48 fTransformation = new TGeoCombiTrans("");
49
50 // Volume parameters
51 if (npar > 0) {
52 fParam = new Double_t[npar];
53 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
54 }
55}
56
57//______________________________________________________________________________
58AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
59 Int_t copyNo, const TGeoTranslation& translation,
60 Int_t npar, Double_t* param)
61 : TNamed(name, name),
62 fCopyNo(copyNo),
63 fNpar(npar),
64 fParam(0),
65 fTransformation(0)
66{
67/// Standard constructor for a constituent with translation
68
69 // Create the constituent transformation
70 fTransformation = new TGeoCombiTrans(translation, TGeoRotation());
71
72 // Volume parameters
73 if (npar > 0) {
74 fParam = new Double_t[npar];
75 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
76 }
77}
78
79
80//______________________________________________________________________________
81AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
82 Int_t copyNo, const TGeoTranslation& translation,
83 const TGeoRotation& rotation,
84 Int_t npar, Double_t* param)
85
86 : TNamed(name, name),
87 fCopyNo(copyNo),
88 fNpar(npar),
89 fParam(0),
90 fTransformation(0)
91{
92/// Standard constructor for a constituent with translation and rotation
93
94 // Create the constituent transformation
95 fTransformation = new TGeoCombiTrans(translation, rotation);
96
97 // Volume parameters
98 if (npar > 0) {
99 fParam = new Double_t[npar];
100 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
101 }
102}
103
104//______________________________________________________________________________
105AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
106 Int_t copyNo,
107 const TGeoCombiTrans& transform,
108 Int_t npar, Double_t* param)
109
110 : TNamed(name, name),
111 fCopyNo(copyNo),
112 fNpar(npar),
113 fParam(0),
114 fTransformation(0)
115{
116/// Standard constructor for a constituent with translation and rotation
117/// defined via TGeoCombiTrans
118
119 // Create the constituent transformation
120 fTransformation = new TGeoCombiTrans(transform);
121
122 // Volume parameters
123 if (npar > 0) {
124 fParam = new Double_t[npar];
125 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
126 }
127}
128
129//______________________________________________________________________________
130AliMUONGeometryConstituent::AliMUONGeometryConstituent()
131 : TNamed(),
132 fCopyNo(0),
133 fNpar(0),
134 fParam(0),
135 fTransformation(0)
136{
137/// Default constructor
138}
139
140//______________________________________________________________________________
141AliMUONGeometryConstituent::~AliMUONGeometryConstituent()
142{
143/// Destructor
144
145 delete fTransformation;
146 delete [] fParam;
147}