]>
Commit | Line | Data |
---|---|---|
4347b38f | 1 | /************************************************************************** |
2 | * Copyright(c) 2004, 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 | **************************************************************************/ | |
4347b38f | 15 | /* $Id$ */ |
c2fc1258 | 16 | /** @file AliFMD3.cxx |
17 | @author Christian Holm Christensen <cholm@nbi.dk> | |
18 | @date Sun Mar 26 18:26:12 2006 | |
19 | @brief Concrete implementation of AliFMDDetector for FMD3 | |
20 | */ | |
ba224443 | 21 | //____________________________________________________________________ |
4347b38f | 22 | // |
1a1fdef7 | 23 | // Concrete implementation of AliFMDDetector |
4347b38f | 24 | // |
088f8e79 | 25 | // This implements the geometry for FMD3. |
26 | // This has 2 rings. | |
27 | // The support of the FMD3 is a carbon-fibre cone, attached to the ITS | |
28 | // support via flanges. The cone also supports the beam-pipe. | |
6169f936 | 29 | // The support is a special cone of carbon-fibre made by a Danish |
30 | // Yacht company. | |
4347b38f | 31 | // |
090026bf | 32 | |
33 | #include <TMath.h> // ROOT_TMath | |
34 | ||
e802be3e | 35 | #include "AliFMD3.h" // ALIFMD3_H |
f95a63c4 | 36 | #include "AliFMDDebug.h" // ALIFMDDEBUG_H ALILOG_H |
e802be3e | 37 | #include "AliFMDRing.h" // ALIFMDRING_H |
ed82d35e | 38 | #include <TVector3.h> |
4347b38f | 39 | |
1a1fdef7 | 40 | //==================================================================== |
925e6570 | 41 | ClassImp(AliFMD3) |
1a1fdef7 | 42 | #if 0 |
43 | ; // This is here to keep Emacs for indenting the next line | |
44 | #endif | |
4347b38f | 45 | |
46 | //____________________________________________________________________ | |
1a1fdef7 | 47 | AliFMD3::AliFMD3(AliFMDRing* inner, AliFMDRing* outer) |
b5ee4425 | 48 | : AliFMDDetector(3, inner, outer), |
f70f588a | 49 | // fNoseZ(16.54667) |
50 | fNoseZ(18.13 - inner->GetModuleDepth()-inner->GetModuleSpacing()/2), // From drawing | |
ed82d35e | 51 | fFlangeDepth(0), |
52 | fFlangeHighR(49.25), // From drawing | |
53 | fFlangeLength(0), | |
54 | fFlangeWidth(6), // From drawing | |
55 | fFiducialRadius(.25), | |
56 | fConeInnerAngle(0), | |
57 | fConeOuterAngle(0), | |
2e0139df | 58 | fHoleOffset(6.9), // From drawing |
ed82d35e | 59 | fHoleDepth(2), // What's needed |
2e0139df | 60 | fHoleLength(31.2), // From drawing |
61 | fHoleLowWidth(3), // 4), // What's needed | |
62 | fHoleHighWidth(18.5), // 17.5), // 18), // What's needed | |
ed82d35e | 63 | fBoltLength(1), // Guessed |
64 | fBoltRadius(0.15), // Estimate | |
65 | fConeRadii(6), | |
66 | fFiducialHoles(4) | |
4347b38f | 67 | { |
088f8e79 | 68 | // Constructor. |
1589afa1 | 69 | Double_t off = 0; // -0.39615-0.10185; // -0.25; |
2e0139df | 70 | if (off != 0) |
71 | AliWarning(Form("Z position of FMD3 rings may be off by %fcm!", off)); | |
72 | ||
73 | SetInnerZ(-62.8+off); // By design | |
74 | SetOuterZ(-75.2+off); // By design | |
ed82d35e | 75 | |
76 | SetInnerHoneyLowR(4.18207); // From drawing | |
77 | SetInnerHoneyHighR(19.74922); // From drawing | |
78 | SetOuterHoneyLowR(13.4776); // From drawing | |
79 | SetOuterHoneyHighR(31.01964); // From drawing | |
80 | ||
81 | // These are from the drawings | |
82 | fConeRadii.Add(new TVector3( 0, 5.55, 6.25)); | |
83 | fConeRadii.Add(new TVector3( 2.35, 5.55, 6.25)); | |
84 | fConeRadii.Add(new TVector3( 2.9935, 5.55, 6.88479)); | |
85 | fConeRadii.Add(new TVector3(28.9435, 31.50, 32.75850)); | |
86 | fConeRadii.Add(new TVector3(29.5, 31.50, 33.4)); | |
87 | fConeRadii.Add(new TVector3(30.9, 31.50, 33.4)); | |
88 | ||
89 | // These are from the drawings | |
90 | fFiducialHoles.Add(new TVector2(29.666, 32.495)); | |
91 | fFiducialHoles.Add(new TVector2(31.082, 33.910)); | |
92 | fFiducialHoles.Add(new TVector2(32.674, 35.503)); | |
93 | fFiducialHoles.Add(new TVector2(33.403, 34.818)); | |
4347b38f | 94 | } |
95 | ||
96 | //____________________________________________________________________ | |
1a1fdef7 | 97 | void |
98 | AliFMD3::Init() | |
4347b38f | 99 | { |
088f8e79 | 100 | // Initialize |
1a1fdef7 | 101 | AliFMDDetector::Init(); |
ed82d35e | 102 | // TVector3& v0 = *(static_cast<TVector3*>(fConeRadii.At(0))); |
103 | TVector3& v1 = *(static_cast<TVector3*>(fConeRadii.At(1))); | |
104 | TVector3& v2 = *(static_cast<TVector3*>(fConeRadii.At(2))); | |
105 | TVector3& v3 = *(static_cast<TVector3*>(fConeRadii.At(3))); | |
106 | TVector3& v4 = *(static_cast<TVector3*>(fConeRadii.At(4))); | |
107 | TVector3& v5 = *(static_cast<TVector3*>(fConeRadii.At(5))); | |
108 | ||
109 | fFlangeDepth = v5.X() - v4.X(); | |
110 | fFlangeLength = fFlangeHighR - v5.Y(); | |
111 | ||
112 | fConeInnerAngle = TMath::ATan2(v4.Z()-v1.Z(), v4.X()-v1.X()); | |
113 | fConeOuterAngle = TMath::ATan2(v3.Y()-v2.Y(), v3.X()-v2.X()); | |
114 | ||
2e0139df | 115 | #if 0 |
f70f588a | 116 | Double_t hz1 = -fHoleOffset+fInnerZ+fNoseZ; |
ed82d35e | 117 | fHoleLength = TMath::Sqrt(TMath::Power(v4.Z()-ConeR(hz1),2) + |
118 | TMath::Power(v4.X()-fHoleOffset,2)); | |
2e0139df | 119 | #endif |
4347b38f | 120 | } |
121 | ||
ba224443 | 122 | //____________________________________________________________________ |
1a1fdef7 | 123 | Double_t |
124 | AliFMD3::ConeR(Double_t z, Option_t* opt) const | |
ba224443 | 125 | { |
1a1fdef7 | 126 | // Calculate the cone radius at Z |
ed82d35e | 127 | // TVector3& v0 = *(static_cast<TVector3*>(fConeRadii.At(0))); |
128 | TVector3& v1 = *(static_cast<TVector3*>(fConeRadii.At(1))); | |
129 | TVector3& v2 = *(static_cast<TVector3*>(fConeRadii.At(2))); | |
130 | TVector3& v3 = *(static_cast<TVector3*>(fConeRadii.At(3))); | |
131 | TVector3& v4 = *(static_cast<TVector3*>(fConeRadii.At(4))); | |
132 | TVector3& v5 = *(static_cast<TVector3*>(fConeRadii.At(5))); | |
133 | ||
134 | if (z > fInnerZ + fNoseZ) { | |
135 | AliWarning(Form("z=%lf is before start of cone %lf", z, fInnerZ + fNoseZ)); | |
1a1fdef7 | 136 | return -1; |
ba224443 | 137 | } |
ed82d35e | 138 | if (z < fInnerZ + fNoseZ - v5.Z()) { |
088f8e79 | 139 | AliWarning(Form("z=%lf is after end of cone %lf", z, |
ed82d35e | 140 | fInnerZ + fNoseZ - v5.Z())); |
1a1fdef7 | 141 | return -1; |
142 | } | |
ed82d35e | 143 | Double_t rz = -(z-fInnerZ-fNoseZ); |
d98fbfa5 | 144 | Bool_t inner = opt[0] == 'I' || opt[1] == 'i'; |
ed82d35e | 145 | if (inner && rz <= v2.X()) return v2.Y(); |
146 | if (!inner && rz <= v1.X()) return v1.Z(); | |
147 | if (inner && rz > v3.X()) return v3.Y(); | |
148 | if (!inner && rz > v4.X()) return v4.Z(); | |
149 | ||
150 | rz -= (inner ? v2.X() : v1.X()); | |
151 | Double_t sr = (inner ? v2.Y() : v1.Z()); | |
152 | Double_t ang = (inner ? fConeInnerAngle : fConeOuterAngle); | |
153 | return sr + rz * TMath::Tan(ang); | |
ba224443 | 154 | } |
155 | ||
4347b38f | 156 | |
157 | //____________________________________________________________________ | |
158 | // | |
159 | // EOF | |
160 | // |