]>
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 |
4347b38f | 38 | |
1a1fdef7 | 39 | //==================================================================== |
925e6570 | 40 | ClassImp(AliFMD3) |
1a1fdef7 | 41 | #if 0 |
42 | ; // This is here to keep Emacs for indenting the next line | |
43 | #endif | |
4347b38f | 44 | |
45 | //____________________________________________________________________ | |
1a1fdef7 | 46 | AliFMD3::AliFMD3(AliFMDRing* inner, AliFMDRing* outer) |
b5ee4425 | 47 | : AliFMDDetector(3, inner, outer), |
48 | fNoseZ(0), | |
49 | fNoseLowR(0), | |
50 | fNoseHighR(0), | |
51 | fNoseLength(0), | |
52 | fBackLowR(0), | |
53 | fBackHighR(0), | |
54 | fBackLength(0), | |
55 | fBeamThickness(0), | |
56 | fBeamWidth(0), | |
57 | fConeLength(0), | |
58 | fFlangeR(0), | |
59 | fZ(0), | |
60 | fAlpha(0), | |
61 | fNBeam(0), | |
62 | fNFlange(0) | |
4347b38f | 63 | { |
088f8e79 | 64 | // Constructor. |
1a1fdef7 | 65 | SetInnerZ(-62.8); |
66 | SetOuterZ(-75.2); | |
67 | SetNoseZ(); | |
68 | SetNoseLowR(); | |
69 | SetNoseHighR(); | |
70 | SetNoseLength(); | |
71 | SetBackLowR(); | |
72 | SetBackHighR(); | |
73 | SetBackLength(); | |
74 | SetBeamThickness(); | |
75 | SetBeamWidth(); | |
76 | SetConeLength(); | |
77 | SetFlangeR(); | |
78 | SetNBeam(); | |
79 | SetNFlange(); | |
4347b38f | 80 | } |
81 | ||
82 | //____________________________________________________________________ | |
1a1fdef7 | 83 | void |
84 | AliFMD3::Init() | |
4347b38f | 85 | { |
088f8e79 | 86 | // Initialize |
1a1fdef7 | 87 | AliFMDDetector::Init(); |
88 | SetInnerHoneyHighR(GetOuterHoneyHighR()); | |
89 | Double_t zdist = fConeLength - fBackLength - fNoseLength; | |
90 | Double_t tdist = fBackHighR - fNoseHighR; | |
91 | Double_t innerZh = fInnerZ - fInner->GetRingDepth() - fHoneycombThickness; | |
92 | Double_t outerZh = fOuterZ - fOuter->GetRingDepth() - fHoneycombThickness; | |
93 | Double_t minZ = TMath::Min(fNoseZ - fConeLength, outerZh); | |
94 | fAlpha = tdist / zdist; | |
95 | fZ = fNoseZ + (minZ - fNoseZ) / 2; | |
96 | fInnerHoneyHighR = ConeR(innerZh + fHoneycombThickness,"O") - 1; | |
97 | fOuterHoneyHighR = GetBackLowR(); | |
4347b38f | 98 | } |
99 | ||
ba224443 | 100 | //____________________________________________________________________ |
1a1fdef7 | 101 | Double_t |
102 | AliFMD3::ConeR(Double_t z, Option_t* opt) const | |
ba224443 | 103 | { |
1a1fdef7 | 104 | // Calculate the cone radius at Z |
105 | if (fAlpha < 0) { | |
088f8e79 | 106 | AliWarning(Form("alpha not set: %lf", fAlpha)); |
1a1fdef7 | 107 | return -1; |
ba224443 | 108 | } |
1a1fdef7 | 109 | if (z > fNoseZ) { |
088f8e79 | 110 | AliWarning(Form("z=%lf is before start of cone %lf", z, fNoseZ)); |
1a1fdef7 | 111 | return -1; |
ba224443 | 112 | } |
1a1fdef7 | 113 | if (z < fOuterZ - fOuter->GetRingDepth() - fHoneycombThickness) { |
088f8e79 | 114 | AliWarning(Form("z=%lf is after end of cone %lf", z, |
115 | fOuterZ - fOuter->GetRingDepth() - fHoneycombThickness)); | |
1a1fdef7 | 116 | return -1; |
117 | } | |
118 | Double_t e = fBeamThickness / TMath::Cos(TMath::ATan(fAlpha)); | |
119 | if (opt[0] == 'I' || opt[1] == 'i') e *= -1; | |
120 | if (z > fNoseZ - fNoseLength) return fNoseHighR + e; | |
121 | if (z < fNoseZ - fConeLength + fBackLength) return fBackHighR + e; | |
122 | Double_t r = fNoseHighR + fAlpha * TMath::Abs(z - fNoseZ + fNoseLength) + e; | |
123 | return r; | |
ba224443 | 124 | } |
125 | ||
4347b38f | 126 | |
127 | //____________________________________________________________________ | |
128 | // | |
129 | // EOF | |
130 | // |