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
42 AliDebug(10, "\t\tDefault CTOR");
46 //____________________________________________________________________
49 // Destructor - does nothing
50 AliDebug(10, "\t\tDTOR");
54 //____________________________________________________________________
56 AliFMD3::SetupGeometry(Int_t airId, Int_t alId, Int_t carbonId)
58 // Setup the FMD3 sub-detector geometry
62 // airId Id # of the Air medium
63 // kaptionId Id # of the Aluminium medium
65 AliDebug(10, "\tSetting up the geometry for FMD3");
66 Double_t innerZl = fInnerZ;
67 Double_t innerZh = (fInnerZ
68 - fInner->GetModuleSpacing()
69 - fInner->GetLegLength()
70 - fInner->GetSiThickness()
71 - fInner->GetPrintboardThickness()
72 - fHoneycombThickness);
73 Double_t innerRl = fInner->GetLowR();
74 Double_t outerZl = fOuterZ;
75 Double_t outerZh = (fOuterZ
76 - fOuter->GetModuleSpacing()
77 - fOuter->GetLegLength()
78 - fOuter->GetSiThickness()
79 - fOuter->GetPrintboardThickness()
80 - fHoneycombThickness);
81 Double_t outerRl = fOuter->GetLowR();
83 fSupport.SetupGeometry(airId, carbonId,
84 innerZl, innerZh, innerRl,
85 outerZl, outerZh, outerRl);
87 fInnerHoneyLowR = fInner->GetLowR() + 1;
88 fInnerHoneyHighR = fSupport.ConeR(innerZh + fHoneycombThickness, "I");
89 fOuterHoneyLowR = fOuter->GetLowR() + 1;
90 fOuterHoneyHighR = fSupport.GetBackLowR();
93 gMC->Matrix(fRotationId, 90, 0, 90, 90, 0, 0);
94 //0, 180, 90, 90, 180, 0);
97 AliFMDSubDetector::SetupGeometry(airId, alId, carbonId);
100 //____________________________________________________________________
102 AliFMD3::Geometry(const char* mother, Int_t pbRotId,
103 Int_t idRotId, Double_t z)
105 // Position the FMD3 sub-detector volume
109 // mother name of the mother volume
110 // pbRotId Printboard roation matrix ID
111 // idRotId Identity rotation matrix ID
112 // z Z position (not really used here, but passed down)
115 fSupport.Geometry(mother, fRotationId, z);
116 AliDebug(10, Form("\t\tPassing z=%lf to ring volumes", z));
117 AliFMDSubDetector::Geometry("FMD3", pbRotId, idRotId, z);
121 //____________________________________________________________________
123 AliFMD3::SimpleGeometry(TList* nodes,
128 // We need to get the equation for the line that connects the
129 // outer circumfrences of the two rings, as well as for the line
130 // that connects the inner curcumfrences, so that we can project to
131 // where the honey-comb actually ends.
138 // For the outer line, we have the two equations
140 // fOuterHoneyHighR = a * x1 + b;
141 // fInnerHoneyHighR = a * x2 + b;
145 // x1 = (fOuterZ + fOuter->fSiThickness + fOuter->fPrintboardThickness
146 // + fOuter->fLegLength + fModuleSpacing)
147 // = fInner - fDz + fHoneycombThickness
148 // x2 = (fInnerZ + fInner->fSiThickness + fInner->fPrintboardThickness
149 // + fInner->fLegLength + fModuleSpacing)
153 // a = (fOuterHoneyHighR - fInnerHoneyHighR) / (x1 - x2)
156 AliDebug(10, "\tCreating simplified geometry for FMD3");
157 Double_t dz = (TMath::Abs(fInnerZ - fOuterZ)
158 + fOuter->GetSiThickness()
159 + fOuter->GetPrintboardThickness()
160 + fOuter->GetLegLength()
161 + fOuter->GetModuleSpacing()
162 + fHoneycombThickness) / 2;
164 Double_t x1 = (fOuterZ - (fOuter->GetSiThickness()
165 + fOuter->GetPrintboardThickness()
166 + fOuter->GetLegLength()
167 + fOuter->GetModuleSpacing()));
168 Double_t x2 = (fInnerZ - (fInner->GetSiThickness()
169 + fInner->GetPrintboardThickness()
170 + fInner->GetLegLength()
171 + fInner->GetModuleSpacing()));
173 Double_t ao1 = (fOuterHoneyHighR - fInnerHoneyHighR) / (x1 - x2);
174 Double_t ao2 = ((fOuter->GetHighR() - fInner->GetHighR())
175 / (fOuterZ - fInnerZ));
178 // std::cout << "Wafer determinds the size" << std::endl;
180 bo = fInner->GetHighR() - ao * fInnerZ;
184 bo = fOuterHoneyHighR - ao * x1;
187 Double_t y1o = ao * (fInnerZ - 2 * dz) + bo;
188 Double_t y2o = ao * fInnerZ + bo;
190 // We probably need to make a PCON here.
191 TShape* shape = new TCONS("FMD3", "FMD3", "", dz,
192 fOuter->GetLowR(), y1o, /* fOuterHoneyHighR, */
193 fInner->GetLowR(), y2o, /* fInnerHoneyHighR, */
196 zMother = fInnerZ - dz;
197 TNode* node = new TNode("FMD3", "FMD3", shape, 0, 0, zMother, 0);
198 node->SetVisibility(0);
200 AliFMDSubDetector::SimpleGeometry(nodes, node, colour, zMother);
203 //____________________________________________________________________
205 AliFMD3::Gsatt() const
207 // Set draw attributes for the FMD3
208 AliDebug(10, "Setting drawing attributes for FMD3");
209 AliFMDSubDetector::Gsatt();
213 //____________________________________________________________________