]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMD1.cxx
Add protection against infinite loop
[u/mrichter/AliRoot.git] / FMD / AliFMD1.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 **************************************************************************/
15
16/* $Id$ */
17
b9ced2a3 18//____________________________________________________________________
4347b38f 19//
20// Concrete implementation of AliFMDSubDetector
21//
22// This implements the geometry for FMD1
23//
4347b38f 24#ifndef ALIFMD1_H
25# include "AliFMD1.h"
26#endif
0d0e6995 27#ifndef ALIFMDRING_H
28# include "AliFMDRing.h"
29#endif
4347b38f 30#ifndef ROOT_TVirtualMC
31# include <TVirtualMC.h>
32#endif
33#ifndef ALILOG_H
34# include "AliLog.h"
35#endif
36
37
38//____________________________________________________________________
39ClassImp(AliFMD1);
40
41//____________________________________________________________________
42AliFMD1::AliFMD1()
43 : AliFMDSubDetector(1)
b9ced2a3 44{
45 // Default constructor for the FMD1 sub-detector
46}
4347b38f 47
48//____________________________________________________________________
49AliFMD1::~AliFMD1()
b9ced2a3 50{
51 // Destructor - does nothing
52}
4347b38f 53
54//____________________________________________________________________
55void
56AliFMD1::SetupGeometry(Int_t airId, Int_t kaptionId)
57{
b9ced2a3 58 // Setup the FMD1 sub-detector geometry
59 //
60 // Parameters:
61 //
62 // airId Id # of the Air medium
63 // kaptionId Id # of the Aluminium medium
64 //
4347b38f 65 fInnerHoneyLowR = fInner->GetLowR() + 1;
66 fInnerHoneyHighR = fInner->GetHighR() + 1;
67 fOuterHoneyLowR = 0;
68 fOuterHoneyHighR = 0;
69
70 Double_t par[3];
71 par[0] = fInner->GetLowR();
72 par[1] = fInnerHoneyHighR;
73 par[2] = fDz = (fInner->GetLegLength()
74 + fInner->GetSiThickness()
75 + fInner->GetPrintboardThickness()
76 + fInner->GetModuleSpacing()
77 + fHoneycombThickness) / 2;
78 fVolumeId = gMC->Gsvolu("FMD1", "TUBE", airId, par, 3);
79
80 // Rotate the full sub-detector
81 gMC->Matrix(fRotationId, 270, 180, 90, 90, 180, 0);
82
83 AliFMDSubDetector::SetupGeometry(airId, kaptionId);
84}
85
86//____________________________________________________________________
87void
88AliFMD1::Geometry(const char* mother, Int_t pbRotId,
89 Int_t idRotId, Double_t z)
90{
b9ced2a3 91 // Position the FMD1 sub-detector volume
92 //
93 // Parameters
94 //
95 // mother name of the mother volume
96 // pbRotId Printboard roation matrix ID
97 // idRotId Identity rotation matrix ID
98 // z Z position (not really used here, but passed down)
99 //
4347b38f 100 // The Z passed in isn't used.
101 z = fInnerZ + fDz;
102 gMC->Gspos("FMD1", 1, mother, 0, 0, z, fRotationId);
103
104 AliFMDSubDetector::Geometry("FMD1", pbRotId, idRotId, z);
105}
106
107
108
109//____________________________________________________________________
110//
111// EOF
112//