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