Adding position dependendent Q normalization (Marian)
[u/mrichter/AliRoot.git] / FMD / AliFMD3.cxx
CommitLineData
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 40ClassImp(AliFMD3)
1a1fdef7 41#if 0
42 ; // This is here to keep Emacs for indenting the next line
43#endif
4347b38f 44
45//____________________________________________________________________
1a1fdef7 46AliFMD3::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 83void
84AliFMD3::Init()
4347b38f 85{
088f8e79 86 // Initialize
1a1fdef7 87 AliFMDDetector::Init();
88 SetInnerHoneyHighR(GetOuterHoneyHighR());
d98fbfa5 89 Double_t zdist = fConeLength;
1a1fdef7 90 Double_t tdist = fBackHighR - fNoseHighR;
d98fbfa5 91 Double_t innerZh = (fInnerZ - fInner->GetRingDepth());
92 Double_t outerZh = (fOuterZ - fOuter->GetRingDepth() -
93 fOuter->GetHoneycombThickness());
1a1fdef7 94 Double_t minZ = TMath::Min(fNoseZ - fConeLength, outerZh);
95 fAlpha = tdist / zdist;
96 fZ = fNoseZ + (minZ - fNoseZ) / 2;
d98fbfa5 97 fInnerHoneyHighR = ConeR(innerZh,"I");
1a1fdef7 98 fOuterHoneyHighR = GetBackLowR();
4347b38f 99}
100
ba224443 101//____________________________________________________________________
1a1fdef7 102Double_t
103AliFMD3::ConeR(Double_t z, Option_t* opt) const
ba224443 104{
1a1fdef7 105 // Calculate the cone radius at Z
106 if (fAlpha < 0) {
088f8e79 107 AliWarning(Form("alpha not set: %lf", fAlpha));
1a1fdef7 108 return -1;
ba224443 109 }
1a1fdef7 110 if (z > fNoseZ) {
088f8e79 111 AliWarning(Form("z=%lf is before start of cone %lf", z, fNoseZ));
1a1fdef7 112 return -1;
ba224443 113 }
d98fbfa5 114 if (z < fOuterZ - fOuter->GetFullDepth()) {
088f8e79 115 AliWarning(Form("z=%lf is after end of cone %lf", z,
d98fbfa5 116 fOuterZ - fOuter->GetFullDepth()));
1a1fdef7 117 return -1;
118 }
d98fbfa5 119 Bool_t inner = opt[0] == 'I' || opt[1] == 'i';
120 Double_t off1 = (inner ? fNoseLowR : fNoseHighR);
121 Double_t off2 = (inner ? fBackLowR : fBackHighR);
122 Double_t off3 = (inner ? 0 : fBeamThickness/fAlpha);
123 if (z > fNoseZ - fNoseLength) return off1;
124 if (z < fNoseZ - fConeLength + fBackLength) return off2;
125 return (off1 + off3 + fAlpha * TMath::Abs(z - fNoseZ + fNoseLength));
ba224443 126}
127
4347b38f 128
129//____________________________________________________________________
130//
131// EOF
132//