]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSv11GeometrySPD.h
Getting rid of trivial warnings.
[u/mrichter/AliRoot.git] / ITS / AliITSv11GeometrySPD.h
CommitLineData
db486a6e 1#ifndef ALIITSV11GEOMETRYSPD_H
2#define ALIITSV11GEOMETRYSPD_H
592651e2 3
4/*
59da35b6 5 * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved.
592651e2 6 * See cxx source for full Copyright notice.
7 */
bc3498f4 8
9 // Implementation of the SPD v11 central geometry.
10 // Contains also:
11 // - the materials/media used for its volumes;
12 // - settings for the related transport parameters
13 // (GEANT3 types for the moment).
14 //
a53658c6 15
543b7370 16/*
592651e2 17 * $Id$
543b7370 18 */
592651e2 19
a53658c6 20#include <TGeoManager.h>
21#include <TVirtualMC.h>
297369a1 22#include <TString.h>
23#include <TArrayI.h>
bc3498f4 24#include <TPolyLine.h>
25#include <TPolyMarker.h>
db486a6e 26#include <AliITSv11Geometry.h>
a53658c6 27
297369a1 28
bc3498f4 29class TGeoVolume;
db486a6e 30
592651e2 31class AliITSv11GeometrySPD : public AliITSv11Geometry
32{
33public:
297369a1 34
bc3498f4 35 // Default constructor
36 AliITSv11GeometrySPD(Double_t gap = 0.0075);
37 // Standard Constructor
38 AliITSv11GeometrySPD(Int_t debug, Double_t gap = 0.0075);
39 // Copy constructor (temporarily disabled)
40 // AliITSv11GeometrySPD(const AliITSv11GeometrySPD &s);
41 // Assignment operator (temporarily disabled)
42 // operator=(const AliITSv11GeometrySPD &s);
43 // Destructor
44 virtual ~AliITSv11GeometrySPD() {};
45
592651e2 46 /* Settings */
bc3498f4 47
592651e2 48 // define/create materials
bc3498f4 49 virtual Int_t CreateSPDCentralMaterials(Int_t &medOffset, Int_t &matOffset) const;
59da35b6 50 // set SPD Central, GEANT3 type, tracking parameters
bc3498f4 51 virtual void InitSPDCentral(Int_t offset, TVirtualMC *mc = gMC) const;
592651e2 52
53 /* Monitoring */
54
55 // creates standard figures for the documentation of this class
bc3498f4 56 virtual void CreateFigure0
57 (const Char_t *path = "", const Char_t *type = "gif", TGeoManager *mgr = gGeoManager) const;
58 // fill TPolylines with crossections of the SPD Carbon fiber sectors.
59 Bool_t Make2DCrossSections
60 (TPolyLine &a0, TPolyLine &a1, TPolyLine &b0, TPolyLine &b1, TPolyMarker &p) const;
592651e2 61
bc3498f4 62 /* Services */
63
64 // get names
65 virtual const char *GetSenstiveVolumeName1() const {return "LAY1_SENSOR";}
66 virtual const char *GetSenstiveVolumeName2() const {return "LAY2_SENSOR";}
67 virtual const char *GetSenstiveVolumeName(Int_t lay) const
68 {return (lay==1) ? GetSenstiveVolumeName1() : GetSenstiveVolumeName2();}
69 // get medium
70 virtual TGeoMedium* GetMedium(const char* mediumName, TGeoManager *mgr = gGeoManager) const;
71 // retrieve the mounting location and rotation needed to mount an SPD stave
72 virtual Bool_t GetSectorMountingPoints
73 (Int_t index, Double_t &x0, Double_t &y0, Double_t &x1, Double_t &y1) const;
74 // displace the staves on the carbon fiber sector
75 virtual void StavesInSector(TGeoVolume *moth, TGeoManager *mgr = gGeoManager);
76 // (debug purposes) define which staves to put in the sector
77 virtual void SetAddStave(Bool_t *mask);
78 // print class in ascii form to stream
79 virtual void PrintAscii(ostream *os) const;
80 // read in class in ascii form from stream
81 virtual void ReadAscii(istream *is);
82
83 /* Parts of the geometry */
592651e2 84
85 // a single ladder (= 1 detector + 5 chips)
bc3498f4 86 virtual TGeoVolume* CreateLadder
87 (Int_t layer, TArrayD &sizes, TGeoManager *mgr = gGeoManager) const;
88 // a clip on the central ladders
89 virtual TGeoVolume* CreateClip
90 (TArrayD &sizes, TGeoManager *mgr = gGeoManager) const;
91 // the grounding foil (splitted in many components)
92 virtual TGeoVolumeAssembly* CreateGroundingFoilSingle
93 (Int_t type, TArrayD &sizes, TGeoManager *mgr = gGeoManager) const;
94 virtual TGeoVolume* CreateGroundingFoil
95 (Bool_t isRight, TArrayD &sizes, TGeoManager *mgr = gGeoManager) const;
96 // the MCM (thin part + thick part with chips inside)
97 virtual TGeoVolumeAssembly* CreateMCM
98 (Bool_t isRight, TArrayD &sizes, TGeoManager *mgr = gGeoManager) const;
99 // the pixel bus (flat part + pt1000s + large capacitors/resistors)
100 virtual TGeoVolumeAssembly* CreatePixelBus
101 (Bool_t isRight, TArrayD &sizes, TGeoManager *mgr = gGeoManager) const;
102 // the extender complicated geometry
103 virtual TGeoVolume* CreateExtender
104 (const Double_t *params, const TGeoMedium *medium, TArrayD &sizes) const;
105 // the Pixel Bus & extenders (old method which will be removed)
106 virtual TGeoVolumeAssembly* CreatePixelBusAndExtensions
107 (Bool_t zpos = kTRUE, TGeoManager *mgr = gGeoManager) const;
108 // a half-stave (put together ladders + MCM + bus, and add clips if requested)
109 virtual TGeoVolumeAssembly* CreateHalfStave
110 (Bool_t isRight, Int_t layer, Int_t idxCentral, Int_t idxSide,
111 TArrayD &sizes, Bool_t addClips = kFALSE, TGeoManager *mgr = gGeoManager);
112 // the whole stave (2 half-staves of different orientation)
113 virtual TGeoVolumeAssembly* CreateStave
114 (Int_t layer, TArrayD &sizes, Bool_t addClips = kFALSE, TGeoManager *mgr = gGeoManager);
592651e2 115 // the complete Carbon Fiber sector (support + staves)
bc3498f4 116 virtual void CarbonFiberSector
117 (TGeoVolume *moth, Double_t &xAAtubeCenter0, Double_t &yAAtubeCenter0, TGeoManager *mgr = gGeoManager);
118 // the whole SPD barrel (the 10 sectors at once)
119 virtual void SPDSector(TGeoVolume *moth, TGeoManager *mgr = gGeoManager);
592651e2 120
121private:
bc3498f4 122
592651e2 123 // NOTE:
bc3498f4 124 // all of the member functions which define a component of the final SPD
125 // will need to be defined as private once the design is fixed and
126 // does not need any longer to be checked and debugged.
592651e2 127
bc3498f4 128 /* Service methods for internal use only */
592651e2 129
bc3498f4 130 // compute shape of the SPD Sector given specific inputs
131 void SPDsectorShape
132 (Int_t n,
133 const Double_t *xc, const Double_t *yc, const Double_t *r,
134 const Double_t *ths, const Double_t *the, Int_t npr,
135 Int_t &m, Double_t **xp, Double_t **yp) const;
136
137 // compute a point o a line parallel to a given direction
138 // and with a fixed distance from it
139 void ParallelPosition
140 (Double_t dist1, Double_t dist2, Double_t phi, Double_t &x, Double_t &y) const;
141
142 /* Data members */
143
144 Double_t fAlignmentGap; // thicknes of the empty (air) gap left between the
145 // ladder and the grounding foil for alignment
592651e2 146
bc3498f4 147 Bool_t fAddStave[6]; // [DEBUG] must be TRUE for all staves
148 // which will be mounted in the sector (used to check overlaps)
149
150 TArrayD fSPDsectorX0; // X of first edge of sector plane for stave
151 TArrayD fSPDsectorY0; // Y of first edge of sector plane for stave
152 TArrayD fSPDsectorX1; // X of second edge of sector plane for stave
153 TArrayD fSPDsectorY1; // Y of second edge of sector plane for stave
154
155 /* ROOT dictionary */
156
157 ClassDef(AliITSv11GeometrySPD,1) // ITS v11 Central SPD geometry
db486a6e 158};
159
bc3498f4 160// Input and output function for standard C++ input/output.
161ostream &operator<<(ostream &os, const AliITSv11GeometrySPD &s);
162istream &operator>>(istream &is, AliITSv11GeometrySPD &s);
297369a1 163
bc3498f4 164#endif