1 /**************************************************************************
2 * Copyright(c) 2004, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 //____________________________________________________________________
20 // Concrete implementation of AliFMDSubDetector
22 // This implements the geometry for FMD2
24 #include "AliFMD2.h" // ALIFMD2_H
25 #include "AliFMDRing.h" // ALIFMDRING_H
26 #include <AliLog.h> // ALILOG_H
27 #include <TVirtualMC.h> // ROOT_TVirtualMC
29 //____________________________________________________________________
32 //____________________________________________________________________
34 : AliFMDSubDetector(2)
36 // Default constructor for the FMD2 sub-detector
39 //____________________________________________________________________
42 // Destructor - does nothing
46 //____________________________________________________________________
48 AliFMD2::SetupGeometry(Int_t airId, Int_t alId, Int_t cId)
50 // Setup the FMD2 sub-detector geometry
54 // airId Id # of the Air medium
55 // alId Id # of the Aluminium medium
57 AliDebug(10, "\tDefining the geometry for FMD1");
58 fInnerHoneyLowR = fInner->GetLowR() + 1;
59 fInnerHoneyHighR = fOuter->GetHighR() + 1;
60 fOuterHoneyLowR = fOuter->GetLowR() + 1;
61 fOuterHoneyHighR = fOuter->GetHighR() + 1;
64 par[0] = fInner->GetLowR();
65 par[1] = fOuterHoneyHighR;
66 par[2] = fDz = (TMath::Abs(fInnerZ - fOuterZ)
67 + fInner->GetSiThickness()
68 + fInner->GetPrintboardThickness()
69 + fInner->GetLegLength()
70 + fInner->GetModuleSpacing()
71 + fHoneycombThickness) / 2;
72 fVolumeId = gMC->Gsvolu("FMD2", "TUBE", airId, par, 3);
74 // Rotate the full sub-detector
75 gMC->Matrix(fRotationId, 270, 180, 90, 90, 180, 0);
77 AliFMDSubDetector::SetupGeometry(airId, alId, cId);
80 //____________________________________________________________________
82 AliFMD2::Geometry(const char* mother, Int_t pbRotId,
83 Int_t idRotId, Double_t z)
85 // Position the FMD2 sub-detector volume
89 // mother name of the mother volume
90 // pbRotId Printboard roation matrix ID
91 // idRotId Identity rotation matrix ID
92 // z Z position (not really used here, but passed down)
95 AliDebug(10, Form("\tPutting FMD2 in %s at z=%lf cm", mother, z));
96 AliFMDSubDetector::Geometry("FMD2", pbRotId, idRotId, z);
97 gMC->Gspos("FMD2", 1, mother, 0, 0, z, fRotationId);
102 //____________________________________________________________________