AliRoot Core  v5-06-15 (45dab64)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONGeometryConstituent.cxx
Go to the documentation of this file.
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 //-----------------------------------------------------------------------------
19 // Class AliMUONGeometryConstituent
20 // -----------------------------
21 // Helper class for definititon of an assembly of volumes.
22 // Author: Ivana Hrivnacova, IPN Orsay
23 // 23/01/2004
24 //-----------------------------------------------------------------------------
25 
26 #include <TGeoMatrix.h>
27 
29 #include "AliLog.h"
30 
34 
35 //______________________________________________________________________________
37  Int_t copyNo, Int_t npar, Double_t* param)
38  : TNamed(name, name),
39  fCopyNo(copyNo),
40  fNpar(npar),
41  fParam(0),
42  fTransformation(0)
43 {
45 
46  // fTransformation = new TGeoCombiTrans(name);
47  // would be nice to be so simple
48 
49  // Create the constituent transformation
50  fTransformation = new TGeoCombiTrans("");
51 
52  // Volume parameters
53  if (npar > 0) {
54  fParam = new Double_t[npar];
55  for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
56  }
57 }
58 
59 //______________________________________________________________________________
61  Int_t copyNo, const TGeoTranslation& translation,
62  Int_t npar, Double_t* param)
63  : TNamed(name, name),
64  fCopyNo(copyNo),
65  fNpar(npar),
66  fParam(0),
67  fTransformation(0)
68 {
70 
71  // Create the constituent transformation
72  fTransformation = new TGeoCombiTrans(translation, TGeoRotation());
73 
74  // Volume parameters
75  if (npar > 0) {
76  fParam = new Double_t[npar];
77  for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
78  }
79 }
80 
81 
82 //______________________________________________________________________________
84  Int_t copyNo, const TGeoTranslation& translation,
85  const TGeoRotation& rotation,
86  Int_t npar, Double_t* param)
87 
88  : TNamed(name, name),
89  fCopyNo(copyNo),
90  fNpar(npar),
91  fParam(0),
92  fTransformation(0)
93 {
95 
96  // Create the constituent transformation
97  fTransformation = new TGeoCombiTrans(translation, rotation);
98 
99  // Volume parameters
100  if (npar > 0) {
101  fParam = new Double_t[npar];
102  for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
103  }
104 }
105 
106 //______________________________________________________________________________
108  Int_t copyNo,
109  const TGeoCombiTrans& transform,
110  Int_t npar, Double_t* param)
111 
112  : TNamed(name, name),
113  fCopyNo(copyNo),
114  fNpar(npar),
115  fParam(0),
116  fTransformation(0)
117 {
120 
121  // Create the constituent transformation
122  fTransformation = new TGeoCombiTrans(transform);
123 
124  // Volume parameters
125  if (npar > 0) {
126  fParam = new Double_t[npar];
127  for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
128  }
129 }
130 
131 //______________________________________________________________________________
133  : TNamed(),
134  fCopyNo(0),
135  fNpar(0),
136  fParam(0),
137  fTransformation(0)
138 {
140 }
141 
142 //______________________________________________________________________________
144 {
146 
147  delete fTransformation;
148  delete [] fParam;
149 }
Double_t * fParam
shape parameters
ClassImp(TPCGenInfo)
Definition: AliTPCCmpNG.C:254
TGeoCombiTrans * fTransformation
the constituent transformation wrt to the envelope
Helper class for definititon of an assembly of volumes.