]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - FMD/AliFMD3.cxx
Full set of updated misalignment macros (Raffaele)
[u/mrichter/AliRoot.git] / FMD / AliFMD3.cxx
... / ...
CommitLineData
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 **************************************************************************/
15/* $Id$ */
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*/
21//____________________________________________________________________
22//
23// Concrete implementation of AliFMDDetector
24//
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.
29// The support is a special cone of carbon-fibre made by a Danish
30// Yacht company.
31//
32
33#include <TMath.h> // ROOT_TMath
34
35#include "AliFMD3.h" // ALIFMD3_H
36#include "AliLog.h" // ALILOG_H
37#include "AliFMDRing.h" // ALIFMDRING_H
38
39//====================================================================
40ClassImp(AliFMD3)
41#if 0
42 ; // This is here to keep Emacs for indenting the next line
43#endif
44
45//____________________________________________________________________
46AliFMD3::AliFMD3(AliFMDRing* inner, AliFMDRing* outer)
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)
63{
64 // Constructor.
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();
80}
81
82//____________________________________________________________________
83void
84AliFMD3::Init()
85{
86 // Initialize
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();
98}
99
100//____________________________________________________________________
101Double_t
102AliFMD3::ConeR(Double_t z, Option_t* opt) const
103{
104 // Calculate the cone radius at Z
105 if (fAlpha < 0) {
106 AliWarning(Form("alpha not set: %lf", fAlpha));
107 return -1;
108 }
109 if (z > fNoseZ) {
110 AliWarning(Form("z=%lf is before start of cone %lf", z, fNoseZ));
111 return -1;
112 }
113 if (z < fOuterZ - fOuter->GetRingDepth() - fHoneycombThickness) {
114 AliWarning(Form("z=%lf is after end of cone %lf", z,
115 fOuterZ - fOuter->GetRingDepth() - fHoneycombThickness));
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;
124}
125
126
127//____________________________________________________________________
128//
129// EOF
130//