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 #ifndef ROOT_TVirtualMC
25 # include <TVirtualMC.h>
43 # include "AliFMDRing.h"
47 //____________________________________________________________________
50 //____________________________________________________________________
52 : AliFMDSubDetector(3),
56 // Default constructor for the FMD3 sub-detector
60 //____________________________________________________________________
63 // Destructor - does nothing
67 //____________________________________________________________________
69 AliFMD3::SetupGeometry(Int_t airId, Int_t kaptionId)
71 // Setup the FMD3 sub-detector geometry
75 // airId Id # of the Air medium
76 // kaptionId Id # of the Aluminium medium
78 fInnerHoneyLowR = fInner->GetLowR() + 1;
79 fInnerHoneyHighR = fInner->GetHighR() + 1;
80 fOuterHoneyLowR = fOuter->GetLowR() + 1;
81 fOuterHoneyHighR = fOuter->GetHighR() + 1;
85 par[0] = fInner->GetLowR();
86 par[1] = fOuterHoneyHighR;
88 fVolumeId = gMC->Gsvolu("FMD3", "TUBE", airId, par, 3);
90 gMC->Matrix(fRotationId, 90, 0, 90, 90, 0, 0);
91 //0, 180, 90, 90, 180, 0);
93 AliFMDSubDetector::SetupGeometry(airId, kaptionId);
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 gMC->Gspos("FMD3", 1, mother, 0, 0, z, fRotationId);
113 AliFMDSubDetector::Geometry("FMD3", pbRotId, idRotId, 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)
154 Double_t x1 = (fOuterZ - (fOuter->GetSiThickness()
155 + fOuter->GetPrintboardThickness()
156 + fOuter->GetLegLength()
157 + fOuter->GetModuleSpacing()));
158 Double_t x2 = (fInnerZ - (fInner->GetSiThickness()
159 + fInner->GetPrintboardThickness()
160 + fInner->GetLegLength()
161 + fInner->GetModuleSpacing()));
163 Double_t ao1 = (fOuterHoneyHighR - fInnerHoneyHighR) / (x1 - x2);
164 Double_t ao2 = ((fOuter->GetHighR() - fInner->GetHighR())
165 / (fOuterZ - fInnerZ));
168 std::cout << "Wafer determinds the size" << std::endl;
170 bo = fInner->GetHighR() - ao * fInnerZ;
174 bo = fOuterHoneyHighR - ao * x1;
177 Double_t y1o = ao * (fInnerZ - 2 * fDz) + bo;
178 Double_t y2o = ao * fInnerZ + bo;
180 // We probably need to make a PCON here.
181 TShape* shape = new TCONS("FMD3", "FMD3", "", fDz,
182 fOuter->GetLowR(), y1o, /* fOuterHoneyHighR, */
183 fInner->GetLowR(), y2o, /* fInnerHoneyHighR, */
186 zMother = fInnerZ - fDz;
187 TNode* node = new TNode("FMD3", "FMD3", shape, 0, 0, zMother, 0);
188 node->SetVisibility(0);
190 AliFMDSubDetector::SimpleGeometry(nodes, node, colour, zMother);
193 //____________________________________________________________________
195 AliFMD3::CalculateDz()
198 fDz = (TMath::Abs(fInnerZ - fOuterZ)
199 + fOuter->GetSiThickness()
200 + fOuter->GetPrintboardThickness()
201 + fOuter->GetLegLength()
202 + fOuter->GetModuleSpacing()
203 + fHoneycombThickness) / 2;
206 //____________________________________________________________________