]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMD1.cxx
Complete rewrite of the FMD code.
[u/mrichter/AliRoot.git] / FMD / AliFMD1.cxx
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
16 /* $Id$ */
17
18 //////////////////////////////////////////////////////////////////////////////
19 //                                                                          
20 // Concrete implementation of AliFMDSubDetector 
21 //
22 // This implements the geometry for FMD1 
23 //
24 //////////////////////////////////////////////////////////////////////////////
25 #ifndef ALIFMD1_H
26 # include "AliFMD1.h"
27 #endif 
28 #ifndef ROOT_TVirtualMC
29 # include <TVirtualMC.h>
30 #endif
31 #ifndef ALILOG_H
32 # include "AliLog.h"
33 #endif
34
35
36 //____________________________________________________________________
37 ClassImp(AliFMD1);
38
39 //____________________________________________________________________
40 AliFMD1::AliFMD1() 
41   : AliFMDSubDetector(1) 
42 {}
43
44 //____________________________________________________________________
45 AliFMD1::~AliFMD1() 
46 {}
47
48 //____________________________________________________________________
49 void 
50 AliFMD1::SetupGeometry(Int_t airId, Int_t kaptionId) 
51 {
52   fInnerHoneyLowR  = fInner->GetLowR() + 1;
53   fInnerHoneyHighR = fInner->GetHighR() + 1;
54   fOuterHoneyLowR  = 0;
55   fOuterHoneyHighR = 0;
56
57   Double_t par[3];
58   par[0] = fInner->GetLowR();
59   par[1] = fInnerHoneyHighR;
60   par[2] = fDz = (fInner->GetLegLength() 
61                   + fInner->GetSiThickness() 
62                   + fInner->GetPrintboardThickness() 
63                   + fInner->GetModuleSpacing() 
64                   + fHoneycombThickness) / 2;
65   fVolumeId = gMC->Gsvolu("FMD1", "TUBE", airId, par, 3);
66
67   // Rotate the full sub-detector 
68   gMC->Matrix(fRotationId, 270, 180, 90, 90, 180, 0); 
69
70   AliFMDSubDetector::SetupGeometry(airId, kaptionId);
71 }
72
73 //____________________________________________________________________
74 void 
75 AliFMD1::Geometry(const char* mother, Int_t pbRotId, 
76                   Int_t idRotId, Double_t z) 
77 {
78   // The Z passed in isn't used. 
79   z = fInnerZ + fDz;
80   gMC->Gspos("FMD1", 1, mother, 0, 0, z, fRotationId);
81
82   AliFMDSubDetector::Geometry("FMD1", pbRotId, idRotId, z);
83 }
84
85   
86
87 //____________________________________________________________________
88 //
89 // EOF
90 //