]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONGeometryConstituent.cxx
Updates for pile-up vertex (F. Prino)
[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$
3d1463c8 17
18//-----------------------------------------------------------------------------
d1cd2474 19// Class AliMUONGeometryConstituent
20// -----------------------------
21// Helper class for definititon of an assembly of volumes.
d1cd2474 22// Author: Ivana Hrivnacova, IPN Orsay
5f1df83a 23// 23/01/2004
3d1463c8 24//-----------------------------------------------------------------------------
d1cd2474 25
26#include <TGeoMatrix.h>
27
28#include "AliMUONGeometryConstituent.h"
8c343c7c 29#include "AliLog.h"
d1cd2474 30
a9aad96e 31/// \cond CLASSIMP
d1cd2474 32ClassImp(AliMUONGeometryConstituent)
a9aad96e 33/// \endcond
d1cd2474 34
35//______________________________________________________________________________
36AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
37 Int_t copyNo, Int_t npar, Double_t* param)
38 : TNamed(name, name),
39 fCopyNo(copyNo),
40 fNpar(npar),
a9aad96e 41 fParam(0),
42 fTransformation(0)
d1cd2474 43{
692de412 44/// Standard constructor for a constituent without translation & rotation
45
d1cd2474 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//______________________________________________________________________________
60AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
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{
692de412 69/// Standard constructor for a constituent with translation
70
d1cd2474 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//______________________________________________________________________________
83AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
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{
692de412 94/// Standard constructor for a constituent with translation and rotation
95
d1cd2474 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
c5354052 106//______________________________________________________________________________
107AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
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{
692de412 118/// Standard constructor for a constituent with translation and rotation
119/// defined via TGeoCombiTrans
120
c5354052 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
d1cd2474 131//______________________________________________________________________________
132AliMUONGeometryConstituent::AliMUONGeometryConstituent()
133 : TNamed(),
134 fCopyNo(0),
135 fNpar(0),
136 fParam(0),
137 fTransformation(0)
138{
692de412 139/// Default constructor
d1cd2474 140}
141
d1cd2474 142//______________________________________________________________________________
143AliMUONGeometryConstituent::~AliMUONGeometryConstituent()
144{
692de412 145/// Destructor
146
d1cd2474 147 delete fTransformation;
c6df4ef2 148 delete [] fParam;
d1cd2474 149}