1 #ifndef ALIITSV11GEOMETRYSPD_H
2 #define ALIITSV11GEOMETRYSPD_H
5 * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved.
6 * See cxx source for full Copyright notice.
16 // Implementation of the SPD v11 central geometry.
18 // - the materials/media used for its volumes;
19 // - settings for the related transport parameters (GEANT3 types for the moment).
21 #include <TGeoManager.h>
22 #include <TVirtualMC.h>
25 #include <AliITSv11Geometry.h>
32 class AliITSv11GeometrySPD : public AliITSv11Geometry
35 // Default Constructor, should not be used by default
36 AliITSv11GeometrySPD() : AliITSv11Geometry(),fSPDsectorShapeName(),
37 fSPDsectorPoints0(),fSPDsectorPoints1() {};
38 // Standard Constructor, set explicitly debug level
39 AliITSv11GeometrySPD(Int_t debug) : AliITSv11Geometry(debug),
40 fSPDsectorShapeName("ITS SPD Carbon fiber support Sector A0"),
41 fSPDsectorPoints0(6),fSPDsectorPoints1() {};
42 virtual ~AliITSv11GeometrySPD() {}; // Destructor
46 // define/create materials
47 virtual Int_t CreateSPDCentralMaterials(Int_t &medOffset,
48 Int_t &matOffset) const;
49 // set SPD Central, GEANT3 type, tracking parameters
50 virtual void InitSPDCentral(Int_t offset,TVirtualMC *mc=gMC) const;
54 // creates standard figures for the documentation of this class
55 virtual void CreateFigure0(const Char_t *filepath = "",
56 const Char_t *type = "gif",
57 TGeoManager *mgr=gGeoManager);
59 /* Member functions which create pieces of the geometry */
61 // a single ladder (= 1 detector + 5 chips)
62 TGeoVolume* CreateLadder(Int_t layer, Double_t &width,
63 Double_t &height, Double_t &thickness,
64 TGeoManager *mgr = gGeoManager);
65 // the grounding foil (splitted in two components)
66 TGeoVolume* CreateGroundingFoilSingle(Bool_t kapLayer,Double_t &len,
67 Double_t &wid, Double_t &thick,
68 TGeoManager *mgr = gGeoManager);
69 TGeoVolume* CreateGroundingFoil(Double_t &thickness,
70 TGeoManager *mgr = gGeoManager);
71 // the MCM (incomplete: missing the internal chips)
72 TGeoVolume* CreateMCMBase(TGeoManager *mgr = gGeoManager) const;
73 TGeoVolume* CreateMCMCoverBorder(TGeoManager *mgr = gGeoManager);
74 TGeoVolume* CreateMCMCoverTop(TGeoManager *mgr = gGeoManager);
75 // the Pixel Bus & extenders
76 TGeoVolumeAssembly* CreatePixelBusAndExtensions(Bool_t zpos = kTRUE,
77 TGeoManager *mgr = gGeoManager);
78 // the thin part of a stave (grounding + ladders)
79 TGeoVolume *CreateStaveBase(Int_t layer, Double_t &width,
80 Double_t &height, Double_t &thickness,
81 TGeoManager *mgr=gGeoManager);
82 // the whole stave, including the thick parts (MCM cover,
83 // pixel bus & extensions)
84 TGeoVolumeAssembly* CreateStave(Int_t layer, Double_t &thickness,
86 // displacement of staves on the carbon fiber sector
87 virtual void StavesInSector(TGeoVolume *moth,
88 TGeoManager *mgr=gGeoManager);
89 // the complete Carbon Fiber sector (support + staves)
90 virtual void CarbonFiberSector(TGeoVolume *moth,
91 Double_t &xAAtubeCenter0,
92 Double_t &yAAtubeCenter0,
93 TGeoManager *mgr=gGeoManager);
94 // the whole SPD barrel
95 virtual void SPDSector(TGeoVolume *moth, TGeoManager *mgr=gGeoManager);
96 // Returns the mounting location and rotation needed to mount
98 virtual Bool_t GetSectorMountingPoints(
99 Int_t index,Double_t &x0,Double_t &y0,
100 Double_t &x1,Double_t &y1,
101 TGeoManager *mgr=gGeoManager)const;
102 // Functions to test aspects of this geometry.
103 // Fill TPolylines with crossections of the SPD Carbon
105 Bool_t Make2DcrossSections(TPolyLine &a0,TPolyLine &a1,
106 TPolyLine &b0,TPolyLine &b1,
107 TPolyMarker &p)const;
112 // all of the member functions which define a component of the
113 // final SPD will need to be defined as private once the design
114 // is fixed and does not
115 // need any longer to be checked and debugged.
117 // Computes shape of the SPD Sector given specific inputs
118 // (internal use only)
119 void SPDsectorShape(Int_t n, const Double_t *xc, const Double_t *yc,
121 const Double_t *ths, const Double_t *the, Int_t npr,
122 Int_t &m, Double_t **xp, Double_t **yp);
124 // computes a point to a line parallel to a given direction
125 // and with a fixed distance from it (internal use only)
126 void ParallelPosition(Double_t dist1, Double_t dist2,
127 Double_t phi, Double_t &x, Double_t &y);
129 // Some internal data
130 TString fSPDsectorShapeName; // SPD Sector Shape name
131 TArrayI fSPDsectorPoints0; // Array of sector points index
132 // used to mount SPD ladder to.
133 TArrayI fSPDsectorPoints1; // Array of sector points index
134 // used to mount SPD ladder to.
136 ClassDef(AliITSv11GeometrySPD,1) // ITS v11 Centeral SPD geometry