1 /**************************************************************************
2 * Copyright(c) 2004, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 //____________________________________________________________________
20 // Concrete implementation of AliFMDSubDetector
22 // This implements the geometry for FMD3
24 #include "TVirtualMC.h" // ROOT_TVirtualMC
25 #include "TCONS.h" // ROOT_TCONS
26 #include "TNode.h" // ROOT_TNode
27 #include "TList.h" // ROOT_TList
28 #include "AliFMD3.h" // ALIFMD3_H
29 #include "AliLog.h" // ALILOG_H
30 #include "AliFMDRing.h" // ALIFMDRING_H
31 #include <Riostream.h> // ROOT_Riostream
33 //____________________________________________________________________
36 //____________________________________________________________________
38 : AliFMDSubDetector(3),
41 // Default constructor for the FMD3 sub-detector
45 //____________________________________________________________________
48 // Destructor - does nothing
52 //____________________________________________________________________
54 AliFMD3::SetupGeometry(Int_t airId, Int_t alId, Int_t carbonId)
56 // Setup the FMD3 sub-detector geometry
60 // airId Id # of the Air medium
61 // kaptionId Id # of the Aluminium medium
63 Double_t innerZl = fInnerZ;
64 Double_t innerZh = (fInnerZ
65 - fInner->GetModuleSpacing()
66 - fInner->GetLegLength()
67 - fInner->GetSiThickness()
68 - fInner->GetPrintboardThickness()
69 - fHoneycombThickness);
70 Double_t innerRl = fInner->GetLowR();
71 Double_t outerZl = fOuterZ;
72 Double_t outerZh = (fOuterZ
73 - fOuter->GetModuleSpacing()
74 - fOuter->GetLegLength()
75 - fOuter->GetSiThickness()
76 - fOuter->GetPrintboardThickness()
77 - fHoneycombThickness);
78 Double_t outerRl = fOuter->GetLowR();
80 fSupport.SetupGeometry(airId, carbonId,
81 innerZl, innerZh, innerRl,
82 outerZl, outerZh, outerRl);
84 fInnerHoneyLowR = fInner->GetLowR() + 1;
85 fInnerHoneyHighR = fSupport.ConeR(innerZh + fHoneycombThickness, "I");
86 fOuterHoneyLowR = fOuter->GetLowR() + 1;
87 fOuterHoneyHighR = fSupport.GetBackLowR();
90 gMC->Matrix(fRotationId, 90, 0, 90, 90, 0, 0);
91 //0, 180, 90, 90, 180, 0);
93 AliFMDSubDetector::SetupGeometry(airId, alId, carbonId);
96 //____________________________________________________________________
98 AliFMD3::Geometry(const char* mother, Int_t pbRotId,
99 Int_t idRotId, Double_t z)
101 // Position the FMD3 sub-detector volume
105 // mother name of the mother volume
106 // pbRotId Printboard roation matrix ID
107 // idRotId Identity rotation matrix ID
108 // z Z position (not really used here, but passed down)
111 AliDebug(10, Form("Passing z=%lf to ring volumes", z));
112 AliFMDSubDetector::Geometry("FMD3", pbRotId, idRotId, z);
113 fSupport.Geometry(mother, fRotationId, z);
117 //____________________________________________________________________
119 AliFMD3::SimpleGeometry(TList* nodes,
124 // We need to get the equation for the line that connects the
125 // outer circumfrences of the two rings, as well as for the line
126 // that connects the inner curcumfrences, so that we can project to
127 // where the honey-comb actually ends.
134 // For the outer line, we have the two equations
136 // fOuterHoneyHighR = a * x1 + b;
137 // fInnerHoneyHighR = a * x2 + b;
141 // x1 = (fOuterZ + fOuter->fSiThickness + fOuter->fPrintboardThickness
142 // + fOuter->fLegLength + fModuleSpacing)
143 // = fInner - fDz + fHoneycombThickness
144 // x2 = (fInnerZ + fInner->fSiThickness + fInner->fPrintboardThickness
145 // + fInner->fLegLength + fModuleSpacing)
149 // a = (fOuterHoneyHighR - fInnerHoneyHighR) / (x1 - x2)
152 Double_t dz = (TMath::Abs(fInnerZ - fOuterZ)
153 + fOuter->GetSiThickness()
154 + fOuter->GetPrintboardThickness()
155 + fOuter->GetLegLength()
156 + fOuter->GetModuleSpacing()
157 + fHoneycombThickness) / 2;
159 Double_t x1 = (fOuterZ - (fOuter->GetSiThickness()
160 + fOuter->GetPrintboardThickness()
161 + fOuter->GetLegLength()
162 + fOuter->GetModuleSpacing()));
163 Double_t x2 = (fInnerZ - (fInner->GetSiThickness()
164 + fInner->GetPrintboardThickness()
165 + fInner->GetLegLength()
166 + fInner->GetModuleSpacing()));
168 Double_t ao1 = (fOuterHoneyHighR - fInnerHoneyHighR) / (x1 - x2);
169 Double_t ao2 = ((fOuter->GetHighR() - fInner->GetHighR())
170 / (fOuterZ - fInnerZ));
173 // std::cout << "Wafer determinds the size" << std::endl;
175 bo = fInner->GetHighR() - ao * fInnerZ;
179 bo = fOuterHoneyHighR - ao * x1;
182 Double_t y1o = ao * (fInnerZ - 2 * dz) + bo;
183 Double_t y2o = ao * fInnerZ + bo;
185 // We probably need to make a PCON here.
186 TShape* shape = new TCONS("FMD3", "FMD3", "", dz,
187 fOuter->GetLowR(), y1o, /* fOuterHoneyHighR, */
188 fInner->GetLowR(), y2o, /* fInnerHoneyHighR, */
191 zMother = fInnerZ - dz;
192 TNode* node = new TNode("FMD3", "FMD3", shape, 0, 0, zMother, 0);
193 node->SetVisibility(0);
195 AliFMDSubDetector::SimpleGeometry(nodes, node, colour, zMother);
198 //____________________________________________________________________
202 AliFMDSubDetector::Gsatt();
206 //____________________________________________________________________