source: trunk/examples/advanced/Rich/include/RichTbGeometryParameters.hh @ 1309

Last change on this file since 1309 was 1230, checked in by garnier, 14 years ago

update to geant4.9.3

File size: 17.5 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26// Rich advanced example for Geant4
27// RichTbGeometryParameters.hh for Rich of LHCb
28// History:
29// Created: Sajan Easo (Sajan.Easo@cern.ch)
30// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
31/////////////////////////////////////////////////////////////////////////////
32#ifndef RichTbGeometryParameters_h
33#define RichTbGeometryParameters_h 1
34
35#include "globals.hh"
36#include "AerogelTypeSpec.hh"
37#include <cmath>
38extern void InitializeRichTbGeometry();
39extern G4double GetCurAerogelLength(G4int);
40//
41//
42static const G4double sqroot3=std::pow(3.0,0.5);
43
44//Size of the LHCb Rich Testbeam Hall.
45static const G4double ExpHallHalfX=4000.0*mm;
46static const G4double ExpHallHalfY=4000.0*mm;
47static const G4double ExpHallHalfZ=8000.0*mm;
48// The Hall is kept at the orgin of the coord system.
49// The coord system has +z along the beam direction and +y
50// going upwards.
51//
52//Now for the Vessel
53static const G4double VesselInnerRad=0.0*mm;
54static const G4double VesselOuterRad=275.0*mm;
55static const G4double VesselHalfZ=540.0*mm;
56static const G4double VesselStartPhi=0.0*rad;
57static const G4double VesselDelPhi=twopi*rad;
58static const G4double VesselPosX=0.0*mm;
59static const G4double VesselPosY=0.0*mm;
60static const G4double VesselPosZ=VesselHalfZ;
61
62//Now for the box containing the  aerogel sample.
63static const G4double RadFrameHalfX=55.0*mm;
64static const G4double RadFrameHalfY=55.0*mm;
65static const G4double RadFrameHalfZ=55.0*mm;
66static const G4double RadFramePosX=0.0*mm;
67static const G4double RadFramePosY=0.0*mm;
68//The following are the Z positons of start of the radiator frame
69// and aerogel tiles.
70static const G4double RadFrameGenStartZ=185.0*mm;
71static const G4double AgelTileGenStartZ=190.0*mm;
72static const G4double RadFramePosZ=
73            RadFrameGenStartZ+RadFrameHalfZ-VesselHalfZ;
74// Now for the aerogel blocks. They are made to start at 190mm from the
75// upstream edge of the box.
76// The following are dimensioned to MaxNumberOfAerogelTiles which
77// from the AerogelTypeSpec.hh file
78//
79//Now for the window of the radframe at its upstream and downstream
80// ends.
81//
82static const G4double RadHoldUpHalfX=50.0*mm;
83static const G4double RadHoldUpHalfY=50.0*mm;
84static const G4double RadHoldUpHalfZ=1.0*mm;
85static const G4double RadHoldUpPosX=0.0*mm;
86static const G4double RadHoldUpPosY=0.0*mm;
87static const G4double RadHoldUpPosZ=-RadFrameHalfZ+ RadHoldUpHalfZ;
88static const G4double RadWinUpOuterRad=40.0*mm;
89static const G4double RadWinUpInnerRad=0.0*mm;
90static const G4double RadWinUpHalfZ= RadHoldUpHalfZ+5.0*mm;
91static const G4double RadWinUpStartPhi=0.0*rad;
92static const G4double RadWinUpDelPhi=twopi*rad;
93static const G4double RadWinUpShiftX=0.0*mm;
94static const G4double RadWinUpShiftY=0.0*mm;
95static const G4double RadWinUpShiftZ=0.0*mm;
96//
97static const G4double RadHoldDnHalfX=50.0*mm;
98static const G4double RadHoldDnHalfY=50.0*mm;
99static const G4double RadHoldDnHalfZ=1.0*mm;
100static const G4double RadHoldDnPosX=0.0*mm;
101static const G4double RadHoldDnPosY=0.0*mm;
102static const G4double RadHoldDnShiftZ=15.0*mm;
103static const G4double RadHoldDnPosZ=RadFrameHalfZ- 
104                      RadHoldDnShiftZ- RadHoldDnHalfZ;
105static const G4double RadWinDnOuterRad=40.0*mm;
106static const G4double RadWinDnInnerRad=0.0*mm;
107static const G4double RadWinDnHalfZ= RadHoldDnHalfZ+5.0*mm;
108static const G4double RadWinDnStartPhi=0.0*rad;
109static const G4double RadWinDnDelPhi=twopi*rad;
110static const G4double RadWinDnShiftX=0.0*mm;
111static const G4double RadWinDnShiftY=0.0*mm;
112static const G4double RadWinDnShiftZ=0.0*mm;
113// the following three variables are for each of the aerogel types.
114// In the G4example only 1 type is simply repeated 5 times.
115static const G4double AgelHalfX[]={35.0*mm,35.0*mm,35.0*mm,35.0*mm,35.0*mm};
116static const G4double AgelHalfY[]={40.0*mm,40.0*mm,40.0*mm,40.0*mm,40.0*mm};
117static const G4double AgelHalfZ[]={20.0*mm,20.0*mm,20.0*mm,20.0*mm,20.0*mm};
118// The following 2 variables are for each tile.
119// for now no shifts forseen in the XY direction.
120static const G4double AgelPosX[]={0.0*mm,0.0*mm,0.0*mm,0.0*mm,0.0*mm};
121static const G4double AgelPosY[]={0.0*mm,0.0*mm,0.0*mm,0.0*mm,0.0*mm};
122static const G4double AgelStartZ= 
123                AgelTileGenStartZ-RadFrameGenStartZ-RadFrameHalfZ;
124static const G4double TotalAgelThickness=80.0*mm;
125static const G4double AgelTileGapZ=1.0*mm;
126static const G4double AgelEndZ= AgelStartZ+TotalAgelThickness+AgelTileGapZ;
127
128
129//Now for the wraps above and below the aerogel tiles.
130static const G4double AgelWrapTopHalfX[]=
131               {35.0*mm,35.0*mm,35.0*mm,35.0*mm,35.0*mm};
132static const G4double AgelWrapTopHalfY[]=
133               {1.0*mm,1.0*mm,1.0*mm,1.0*mm,1.0*mm};
134static const G4double AgelWrapTopHalfZ[]=
135               {20.0*mm,20.0*mm,20.0*mm,20.0*mm,20.0*mm};
136
137static const G4double AgelWrapTopPosX[]=
138               {0.0*mm,0.0*mm,0.0*mm,0.0*mm,0.0*mm};
139
140static const G4double AgelWrapBotHalfX[]=
141               {35.0*mm,35.0*mm,35.0*mm,35.0*mm,35.0*mm};
142static const G4double AgelWrapBotHalfY[]=
143               {1.0*mm,1.0*mm,1.0*mm,1.0*mm,1.0*mm};
144static const G4double AgelWrapBotHalfZ[]=
145               {20.0*mm,20.0*mm,20.0*mm,20.0*mm,20.0*mm};
146
147static const G4double AgelWrapBotPosX[]=
148               {0.0*mm,0.0*mm,0.0*mm,0.0*mm,0.0*mm};
149// in the G4Example only 1 type of filter is used.
150static const G4double FilterHalfX=53.0*mm;
151static const G4double FilterHalfY=53.0*mm;
152static const G4double GlassD263HalfZ=0.15*mm;
153static const G4double FilterHalfZArray[]={GlassD263HalfZ, GlassD263HalfZ,
154       GlassD263HalfZ, GlassD263HalfZ,  GlassD263HalfZ,   GlassD263HalfZ };
155// have a nominal value for the filter thickness.
156static const G4double FilterHalfZNominal= GlassD263HalfZ;
157static const G4double FilterPosX=0.0*mm;
158static const G4double FilterPosY=0.0*mm;
159//gap between aerogel and Filter in Z.
160static const G4double FilterAgelGapZ=2.5*mm;
161//nominal value for the Filter position
162static const G4double FilterPosZNominal=
163                 AgelEndZ+FilterAgelGapZ+ FilterHalfZNominal; 
164//Now for the mirror
165//
166static const G4double MirrorRInner=1185.0*mm;
167static const G4double MirrorROuter=1191.0*mm;
168static const G4double MirrorHorizontalChord=350.0*mm;
169static const G4double MirrorVerticalChord=290.0*mm;
170// the following is 600+117+6 mm.
171// here 121 is the hpd Q window outer Z and 6 is the
172// thickness of the mirror
173// static const G4double MirrorShiftFromEnd=707.0*mm;
174static const G4double MirrorShiftFromEnd=723.0*mm;
175static const G4double MirrorNominalPosZ=MirrorShiftFromEnd-VesselHalfZ
176                                 -MirrorRInner;
177static const G4double MirrorNominalRotX=0.0*rad;
178static const G4double MirrorNominalRotY=0.0*rad;
179
180//Now for each of the HPDs.
181// First the size of each part.
182static const   G4double HpdMasterRad=64.00*mm;
183//static const   G4double HpdMasterHalfZ=55.0*mm;
184static const   G4double HpdMasterHalfZ=60.0*mm;
185static const   G4double HpdEnvelopeLargeTubeInnerRad=58.5*mm;
186static const   G4double HpdEnvelopeLargeTubeOuterRad=63.5*mm;
187//static const   G4double HpdEnvelopeLargeTubeHalfZ=8.73*mm;
188static const   G4double HpdEnvelopeLargeTubeHalfZ=11.0*mm;
189static const   G4double HpdEnvelopeConeHalfZ=20.0*mm;
190static const   G4double HpdEnvelopeSmallTubeHalfZ=10.0*mm;
191static const   G4double HpdEnvelopeSmallTubeInnerRad=35.0*mm;
192static const   G4double HpdEnvelopeSmallTubeOuterRad=40.0*mm;
193static const   G4double HpdEnvelopeConeOuterR2=HpdEnvelopeLargeTubeOuterRad;
194static const   G4double HpdEnvelopeConeInnerR2=HpdEnvelopeLargeTubeInnerRad;
195static const   G4double HpdEnvelopeConeOuterR1=HpdEnvelopeSmallTubeOuterRad;
196static const   G4double HpdEnvelopeConeInnerR1=HpdEnvelopeSmallTubeInnerRad;
197//
198static const   G4double HpdEnvelopeEndCapRad=HpdEnvelopeSmallTubeOuterRad;
199static const   G4double HpdEnvelopeEndCapHalfZ=2.5*mm;
200static const   G4double HpdQuartzWindowThickness=4.0*mm;
201static const   G4double HpdQuarzWindowROuter=100.0*mm;
202static const   G4double HpdQuarzWindowRInner= HpdQuarzWindowROuter
203                         -HpdQuartzWindowThickness;
204static const G4double PhotoCathodeThickness=0.00004*mm;
205static const   G4double HpdPhCathodeROuter= HpdQuarzWindowRInner;
206static const   G4double HpdPhCathodeRInner= 
207             HpdQuarzWindowRInner - PhotoCathodeThickness;
208// The following obtained by arcsin(63.5/100)
209static const   G4double HpdQuartzWThetaSize=0.6880*rad;
210// The following obtained by arcsin(57/(100-4))
211static const   G4double HpdPhCathodeThetaSize=0.6357*rad;
212
213// For defining cylinders and spherical segment..
214static const   G4double HpdMasterInnerRad=0.0*mm;
215static const   G4double HpdMasterStartPhi=0.0*rad;
216static const   G4double HpdMasterEndPhi=twopi*rad;
217
218static const   G4double HpdEnvelopeLargeTubeStartPhi=0.0*rad;
219static const   G4double HpdEnvelopeLargeTubeEndPhi=twopi*rad;
220
221static const   G4double HpdEnvelopeConeStartPhi=0.0*rad;
222static const   G4double HpdEnvelopeConeEndPhi=twopi*rad;
223
224
225static const   G4double HpdEnvelopeSmallTubeStartPhi=0.0*rad;
226static const   G4double HpdEnvelopeSmallTubeEndPhi=twopi*rad;
227
228static const   G4double HpdEnvelopeEndCapInnerRad=0.0*mm;
229static const   G4double HpdEnvelopeEndCapStartPhi=0.0*rad;
230static const   G4double HpdEnvelopeEndCapEndPhi=twopi*rad;
231
232static const   G4double HpdQuartzWPhiSize=twopi*rad;
233static const   G4double HpdQuartzWStartTheta=0.0*rad;
234static const   G4double HpdQuartzWStartPhi=0.0*rad;
235static const   G4double HpdPhCathodePhiSize=twopi*rad;
236static const   G4double HpdPhCathodeStartTheta=0.0*rad;
237static const   G4double HpdPhCathodeStartPhi=0.0*rad;
238// Z locations of the various parts.
239static const   G4double HpdQuartzPartFromEndZ=4.0*mm;
240//static const   G4double HpdEnvelopePartFromEndZ=18.0*mm;
241// The following obtained by requiring 100-std::sqrt(100*100-63.5*63.5)=22.75
242// for the quartz region in Z. The total is 22.75+4+4=30.75. 
243static const   G4double HpdEnvelopePartFromEndZ=30.75*mm;
244static const G4double HpdPhotoCathodeSiZdist=100.0*mm;
245
246
247//Silicon detector inside the HPD
248static const G4int NumberOfSiDetSectors=16;
249// Now for each one of the sector.
250// In the following the 0.0001 is to avoid graphics from crashing
251// for zero length of a triangle made from a trapozoid.
252
253static const G4double SiSectAngSize=(22.5*pi/180)*rad;
254static const G4double SiSectAngHalfSize=SiSectAngSize/2.0;
255static const G4double SiSectHeight=25.0*mm;
256static const G4double SiSectSide= SiSectHeight/std::cos(SiSectAngHalfSize);
257static const G4double SiSectHalfMoonGap=0.0*mm;
258static const G4double SiSectTrapHalfY1=0.15*mm;  // halfthickness of Si.
259static const G4double SiSectTrapHalfY2= SiSectTrapHalfY1;
260static const G4double SiSectTrapHalfX1=0.0001*mm;
261static const G4double SiSectTrapHalfX2 = SiSectHeight*std::tan(SiSectAngHalfSize);
262static const G4double SiSectTrapHalfZ  = SiSectHeight/2.0 ;
263static const G4double SiSectRotX=(90*pi/180)*rad;
264static const G4double SiSectAngStart=(pi/2.0)*rad-SiSectAngSize/2.0;
265// SiSectPosX and SiSectPosY are calculated in the cc file.
266static const G4double SiSectPosZ=
267         HpdMasterHalfZ-HpdQuartzPartFromEndZ- 
268         HpdQuartzWindowThickness-HpdPhotoCathodeSiZdist;
269//
270//
271//Now for the coating on the Silicon surface.
272static const G4double SiSectCoatingAngSize=SiSectAngSize;
273static const G4double SiSectCoatingAngHalfSize=SiSectAngSize/2.0;
274static const G4double SiSectCoatingSide=SiSectSide;
275static const G4double SiSectCoatingHalfMoonGap=SiSectHalfMoonGap;
276static const G4double SiSectCoatingTrapHalfY1=0.05*mm; // SiCoating HalfThick.
277static const G4double SiSectCoatingTrapHalfY2= SiSectCoatingTrapHalfY1;
278static const G4double SiSectCoatingTrapHalfX1= SiSectTrapHalfX1;
279static const G4double SiSectCoatingTrapHalfX2= SiSectTrapHalfX2;
280static const G4double SiSectCoatingTrapHalfZ= SiSectTrapHalfZ;
281static const G4double SiSectCoatingRotX=SiSectRotX;
282static const G4double  SiSectCoatingAngStart=SiSectAngStart;
283// SiSectCoatingPosX and SiSectCoatingPosY are calculated in the cc file.
284static const G4double SiSectCoatingPosZ =
285      SiSectPosZ + SiSectTrapHalfY1+SiSectCoatingTrapHalfY1;
286//
287//
288static const G4double XsizePix=1.0*mm;
289static const G4double YsizePix=1.0*mm;
290static const G4double YsizeBigPix=2.0*mm;
291// the number of the big pixel in the pixel map on the web=59, hence
292// in the c++ array 58 since the array start from 0.
293static const G4int BigPixelNum=58;
294//Silicon pixels inside the Silicon detector.
295static const G4double SiPixelHalfY= SiSectTrapHalfY1;
296static const G4double SiPixelHalfX= XsizePix/2.0;
297static const G4double SiPixelHalfZ= YsizePix/2.0;
298// now for the big pixel at the centre of the hpd.
299static const G4double SiBigPixelHalfZ=YsizeBigPix/2.0;
300//Now for their relative locations
301static const G4double HpdEnvelopeLargeTubePosX=0.0*mm;
302static const G4double HpdEnvelopeLargeTubePosY=0.0*mm;
303static const G4double HpdEnvelopeLargeTubePosZ=
304         HpdMasterHalfZ-HpdEnvelopePartFromEndZ-HpdEnvelopeLargeTubeHalfZ;
305
306static const G4double HpdEnvelopeConeShiftX=0.0*mm;
307static const G4double HpdEnvelopeConeShiftY=0.0*mm;
308static const G4double HpdEnvelopeConeShiftZ=
309    -(HpdEnvelopeLargeTubeHalfZ+HpdEnvelopeConeHalfZ);
310
311static const G4double HpdEnvelopeSmallTubeShiftX=0.0*mm;
312static const G4double HpdEnvelopeSmallTubeShiftY=0.0*mm;
313static const G4double HpdEnvelopeSmallTubeShiftZ=
314            -(HpdEnvelopeLargeTubeHalfZ+2*HpdEnvelopeConeHalfZ+
315              HpdEnvelopeSmallTubeHalfZ);
316static const G4double HpdEnvelopeEndCapShiftX=0.0*mm;
317static const G4double HpdEnvelopeEndCapShiftY=0.0*mm;
318static const G4double HpdEnvelopeEndCapShiftZ=
319-(HpdEnvelopeLargeTubeHalfZ+2*HpdEnvelopeConeHalfZ+
320  2*HpdEnvelopeSmallTubeHalfZ+HpdEnvelopeEndCapHalfZ);
321
322static const   G4double HpdQuartzWPosX=0.0*mm;
323static const   G4double HpdQuartzWPosY=0.0*mm;
324static const   G4double HpdQuartzWPosZ= 
325       HpdMasterHalfZ- HpdQuartzPartFromEndZ-HpdQuarzWindowROuter;
326
327static const   G4double HpdPhCathodePosX=0.0*mm;
328static const   G4double HpdPhCathodePosY=0.0*mm;
329static const   G4double HpdPhCathodePosZ= HpdQuartzWPosZ; 
330
331
332//Placement of the Hpd Si pixels in the Hpd Si Sector.
333static const G4int NumberOfPadHpdSiPixels=128;
334static const G4int MaxNumberOfPixRow=24;
335static const G4int MaxNumberOfPixCol=10;
336extern G4double PixRowNumSect[NumberOfPadHpdSiPixels];
337extern G4double PixColNumSect[NumberOfPadHpdSiPixels];
338extern G4bool PixelAtSectEdge[NumberOfPadHpdSiPixels];
339// the following is for the rows after the central big pixel.
340// the central pixel is at row 0.
341// the others start from row number start at 1.
342// the following is 1 mm in the current setup.
343static const G4double RowInitPointBigPixel= SiSectTrapHalfZ*2.0
344                               -(MaxNumberOfPixRow-1) * YsizePix
345                               -  YsizeBigPix/2.0;
346// the following is 1.5 mm in the current setup.
347static const G4double RowInitPoint= SiSectTrapHalfZ*2.0
348                               -(MaxNumberOfPixRow-1) * YsizePix
349                               - YsizePix/2.0;
350//The follwing two variables are defined in the cc file for this
351//include file as part of the class declared below. Since the
352// Si det plane is in the XZ plane, a swap of Y->Z and Z->Y is done
353// while positioning the Si Pixel.
354static const G4double HpdSiPixPosZ=0.0*mm;
355#ifndef RichTbPadHpdSiPixPos_h
356#define RichTbPadHpdSiPixPos_h 1
357class RichTbPadHpdSiPixPos{
358public:
359  RichTbPadHpdSiPixPos(G4int);
360  virtual ~RichTbPadHpdSiPixPos();
361  G4double getPadHpdSiPixPosX() {return PadHpdSiPixPosX;}
362  G4double getPadHpdSiPixPosY() {return PadHpdSiPixPosY;}
363  G4double getCurrentPixelnum(){return icurpixel;} 
364private:
365G4double PadHpdSiPixPosX;
366G4double PadHpdSiPixPosY;
367G4int icurpixel;
368};
369#endif
370
371//Placement of all the HPDs.
372
373static const G4int NumberOfHpds=4;
374static const G4double HpdPosRad=146.5*mm;
375static const G4double HpdZfromEnd=HpdMasterHalfZ-VesselPosZ+1.0*mm;
376
377static const  G4double HpdMasterPosX[NumberOfHpds]=
378    {HpdPosRad,0.0*mm,-HpdPosRad,0.0*mm};
379static const  G4double HpdMasterPosY[NumberOfHpds]=
380     {0.0*mm,-HpdPosRad,0.0*mm,HpdPosRad};
381static const  G4double HpdMasterPosZ[NumberOfHpds]=
382     {HpdZfromEnd,HpdZfromEnd,HpdZfromEnd,HpdZfromEnd};
383//rot1 version of hpd rotations.
384static const G4double HpdMasterRotZ[NumberOfHpds]=
385 {0.0*rad,(69.5*pi/180.0)*rad,(22.5*pi/180.0)*rad,(7.5*pi/180.0)*rad};
386//
387//
388#endif
389
390
391
392
393
394
395
Note: See TracBrowser for help on using the repository browser.