]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMD2.cxx
Clean-up
[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 #include "AliFMD2.h"            // ALIFMD2_H 
25 #include "AliFMDRing.h"         // ALIFMDRING_H 
26 #include <AliLog.h>             // ALILOG_H
27 #include <TVirtualMC.h>         // ROOT_TVirtualMC
28
29 //____________________________________________________________________
30 ClassImp(AliFMD2);
31
32 //____________________________________________________________________
33 AliFMD2::AliFMD2() 
34   : AliFMDSubDetector(2) 
35 {
36   // Default constructor for the FMD2 sub-detector 
37 }
38
39 //____________________________________________________________________
40 AliFMD2::~AliFMD2() 
41 {
42   // Destructor - does nothing 
43 }
44
45
46 //____________________________________________________________________
47 void 
48 AliFMD2::SetupGeometry(Int_t airId, Int_t alId, Int_t cId) 
49 {
50   // Setup the FMD2 sub-detector geometry 
51   // 
52   // Parameters:
53   // 
54   //     airId         Id # of the Air medium 
55   //     alId     Id # of the Aluminium medium 
56   // 
57   fInnerHoneyLowR  = fInner->GetLowR() + 1;
58   fInnerHoneyHighR = fOuter->GetHighR() + 1;
59   fOuterHoneyLowR  = fOuter->GetLowR() + 1;
60   fOuterHoneyHighR = fOuter->GetHighR() + 1;
61
62   Double_t par[3];
63   par[0] = fInner->GetLowR();
64   par[1] = fOuterHoneyHighR;
65   par[2] = fDz = (TMath::Abs(fInnerZ - fOuterZ)
66                   + fInner->GetSiThickness() 
67                   + fInner->GetPrintboardThickness() 
68                   + fInner->GetLegLength() 
69                   + fInner->GetModuleSpacing() 
70                   + fHoneycombThickness) / 2;
71   fVolumeId = gMC->Gsvolu("FMD2", "TUBE", airId, par, 3);
72
73   // Rotate the full sub-detector 
74   gMC->Matrix(fRotationId, 270, 180, 90, 90, 180, 0); 
75
76   AliFMDSubDetector::SetupGeometry(airId, alId, cId);
77 }
78
79 //____________________________________________________________________
80 void 
81 AliFMD2::Geometry(const char* mother, Int_t pbRotId, 
82                   Int_t idRotId, Double_t z) 
83 {
84   // Position the FMD2 sub-detector volume 
85   // 
86   // Parameters 
87   //
88   //     mother     name of the mother volume 
89   //     pbRotId    Printboard roation matrix ID 
90   //     idRotId    Identity rotation matrix ID 
91   //     z          Z position (not really used here, but passed down)
92   //
93   z = fDz + fOuterZ;
94   AliFMDSubDetector::Geometry("FMD2", pbRotId, idRotId, z);
95   gMC->Gspos("FMD2", 1, mother, 0, 0, z, fRotationId);  
96 }
97
98   
99
100 //____________________________________________________________________
101 //
102 // EOF
103 //