]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONGeometryConstituent.cxx
Addes script to compare Naiive, Poisson to Hits, Primaries
[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{
692de412 39/// Standard constructor for a constituent without translation & rotation
40
d1cd2474 41 // fTransformation = new TGeoCombiTrans(name);
42 // would be nice to be so simple
43
44 // Create the constituent transformation
45 fTransformation = new TGeoCombiTrans("");
46
47 // Volume parameters
48 if (npar > 0) {
49 fParam = new Double_t[npar];
50 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
51 }
52}
53
54//______________________________________________________________________________
55AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
56 Int_t copyNo, const TGeoTranslation& translation,
57 Int_t npar, Double_t* param)
58 : TNamed(name, name),
59 fCopyNo(copyNo),
60 fNpar(npar),
61 fParam(0),
62 fTransformation(0)
63{
692de412 64/// Standard constructor for a constituent with translation
65
d1cd2474 66 // Create the constituent transformation
67 fTransformation = new TGeoCombiTrans(translation, TGeoRotation());
68
69 // Volume parameters
70 if (npar > 0) {
71 fParam = new Double_t[npar];
72 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
73 }
74}
75
76
77//______________________________________________________________________________
78AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
79 Int_t copyNo, const TGeoTranslation& translation,
80 const TGeoRotation& rotation,
81 Int_t npar, Double_t* param)
82
83 : TNamed(name, name),
84 fCopyNo(copyNo),
85 fNpar(npar),
86 fParam(0),
87 fTransformation(0)
88{
692de412 89/// Standard constructor for a constituent with translation and rotation
90
d1cd2474 91 // Create the constituent transformation
92 fTransformation = new TGeoCombiTrans(translation, rotation);
93
94 // Volume parameters
95 if (npar > 0) {
96 fParam = new Double_t[npar];
97 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
98 }
99}
100
c5354052 101//______________________________________________________________________________
102AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name,
103 Int_t copyNo,
104 const TGeoCombiTrans& transform,
105 Int_t npar, Double_t* param)
106
107 : TNamed(name, name),
108 fCopyNo(copyNo),
109 fNpar(npar),
110 fParam(0),
111 fTransformation(0)
112{
692de412 113/// Standard constructor for a constituent with translation and rotation
114/// defined via TGeoCombiTrans
115
c5354052 116 // Create the constituent transformation
117 fTransformation = new TGeoCombiTrans(transform);
118
119 // Volume parameters
120 if (npar > 0) {
121 fParam = new Double_t[npar];
122 for (Int_t i=0; i<npar; i++) fParam[i] = param[i];
123 }
124}
125
d1cd2474 126//______________________________________________________________________________
127AliMUONGeometryConstituent::AliMUONGeometryConstituent()
128 : TNamed(),
129 fCopyNo(0),
130 fNpar(0),
131 fParam(0),
132 fTransformation(0)
133{
692de412 134/// Default constructor
d1cd2474 135}
136
137
138//______________________________________________________________________________
139AliMUONGeometryConstituent::AliMUONGeometryConstituent(
140 const AliMUONGeometryConstituent& rhs)
141 : TNamed(rhs)
142{
692de412 143/// Protected copy constructor
144
8c343c7c 145 AliFatal("Copy constructor is not implemented.");
d1cd2474 146}
147
148//______________________________________________________________________________
149AliMUONGeometryConstituent::~AliMUONGeometryConstituent()
150{
692de412 151/// Destructor
152
d1cd2474 153 delete fTransformation;
c6df4ef2 154 delete [] fParam;
d1cd2474 155}
156
157//______________________________________________________________________________
158AliMUONGeometryConstituent&
159AliMUONGeometryConstituent::operator = (const AliMUONGeometryConstituent& rhs)
160{
692de412 161/// Protected assignment operator
162
d1cd2474 163 // check assignement to self
164 if (this == &rhs) return *this;
165
8c343c7c 166 AliFatal("Assignment operator is not implemented.");
d1cd2474 167
168 return *this;
169}
170