]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMD2.cxx
New member function to calculate fDz
[u/mrichter/AliRoot.git] / FMD / AliFMD2.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 FMD2
23 //
24 //////////////////////////////////////////////////////////////////////////////
25 #ifndef ALIFMD2_H
26 # include "AliFMD2.h"
27 #endif 
28 #ifndef ROOT_TVirtualMC
29 # include <TVirtualMC.h>
30 #endif
31 #ifndef ALILOG_H
32 # include "AliLog.h"
33 #endif
34 #ifndef ALIFMDRING_H
35 # include "AliFMDRing.h"
36 #endif 
37
38 //____________________________________________________________________
39 ClassImp(AliFMD2);
40
41 //____________________________________________________________________
42 AliFMD2::AliFMD2() 
43   : AliFMDSubDetector(2) 
44 {}
45
46 //____________________________________________________________________
47 AliFMD2::~AliFMD2() 
48 {}
49
50 //____________________________________________________________________
51 void 
52 AliFMD2::SetupGeometry(Int_t airId, Int_t kaptionId) 
53 {
54   fInnerHoneyLowR  = fInner->GetLowR() + 1;
55   fInnerHoneyHighR = fInner->GetHighR() + 1;
56   fOuterHoneyLowR  = fOuter->GetLowR() + 1;
57   fOuterHoneyHighR = fOuter->GetHighR() + 1;
58
59   Double_t par[3];
60   par[0] = fInner->GetLowR();
61   par[1] = fOuterHoneyHighR;
62   par[2] = fDz = (TMath::Abs(fInnerZ - fOuterZ)
63                   + fInner->GetSiThickness() 
64                   + fInner->GetPrintboardThickness() 
65                   + fInner->GetLegLength() 
66                   + fInner->GetModuleSpacing() 
67                   + fHoneycombThickness) / 2;
68   fVolumeId = gMC->Gsvolu("FMD2", "TUBE", airId, par, 3);
69
70   // Rotate the full sub-detector 
71   gMC->Matrix(fRotationId, 270, 180, 90, 90, 180, 0); 
72
73   AliFMDSubDetector::SetupGeometry(airId, kaptionId);
74 }
75
76 //____________________________________________________________________
77 void 
78 AliFMD2::Geometry(const char* mother, Int_t pbRotId, 
79                   Int_t idRotId, Double_t z) 
80 {
81   z = fDz + fOuterZ;
82   AliFMDSubDetector::Geometry("FMD2", pbRotId, idRotId, z);
83   gMC->Gspos("FMD2", 1, mother, 0, 0, z, fRotationId);  
84 }
85
86   
87
88 //____________________________________________________________________
89 //
90 // EOF
91 //