ACTARSim
ACTAR TPC Simulation Reference Guide
HodoParametrisation.cc
Go to the documentation of this file.
1 // HodoParametrisation.cc
2 // Sunyelei ��Ҷ��
3 //email:sunyp09@gmail.com
4 #include "HodoParametrisation.hh"
5 #include "G4PhysicalConstants.hh"
6 #include "G4SystemOfUnits.hh"
7 
8 #include "G4VPhysicalVolume.hh"
9 #include "G4ThreeVector.hh"
10 #include "G4Tubs.hh"
11 #include "G4Box.hh"
12 HodoParametrisation::HodoParametrisation(G4int NodE, G4int Noe1,G4int Noe2,G4double zpos)
13 {
14  fNoDE=NodE;
15  fNoE1=Noe1;
16  fNoE2=Noe2;
17  fzpos=zpos;
18  fzspacing[0]=107*mm;//Gap Between DE and E1
19  fzspacing[1]=22*mm;//gap Between E1 and E2
20 
21  DEHodoPos[0]=-45.605*cm;//DE position in x-axis
22  DEHodoPos[1]=-35.505*cm;
23  DEHodoPos[2]=-25.405*cm;
24  DEHodoPos[3]=-15.305*cm;
25  DEHodoPos[4]=-8.205 *cm;
26  DEHodoPos[5]=-4.105*cm;
27  DEHodoPos[6]=0.0*cm;
28  DEHodoPos[7]=4.105*cm;
29  DEHodoPos[8]=8.205*cm;
30  DEHodoPos[9]=15.305*cm;
31  DEHodoPos[10]=25.405*cm;
32  DEHodoPos[11]=35.505*cm;
33  DEHodoPos[12]=45.605*cm;
34 
35  E1HodoPos[0]=-456.*mm;//E1 position in y-axis
36  E1HodoPos[1]=-380.*mm;
37  E1HodoPos[2]=-304.*mm;
38  E1HodoPos[3]=-228.*mm;
39  E1HodoPos[4]=-152.*mm;
40  E1HodoPos[5]=-94.5*mm;
41  E1HodoPos[6]=-56.5*mm;
42  E1HodoPos[7]=-18.5*mm;
43  E1HodoPos[8]=19.5*mm;
44  E1HodoPos[9]=57.5*mm;
45  E1HodoPos[10]=95.5*mm;
46  E1HodoPos[11]=153.*mm;
47  E1HodoPos[12]=229.*mm;
48  E1HodoPos[13]=305.*mm;
49  E1HodoPos[14]=381.*mm;
50  E1HodoPos[15]=457.*mm;
51 
52  E2HodoPos[0] = -456 *mm;//E2 position in y-axis
53  E2HodoPos[1] = -380 *mm;
54  E2HodoPos[2] = -304 *mm;
55  E2HodoPos[3] = -228 *mm;
56  E2HodoPos[4] = -152 *mm;
57  E2HodoPos[5] = -76 *mm;
58  E2HodoPos[6] = 0.0 *mm;
59  E2HodoPos[7] = 76 *mm;
60  E2HodoPos[8] = 152 *mm;
61  E2HodoPos[9] = 228 *mm;
62  E2HodoPos[10] = 304 *mm;
63  E2HodoPos[11] = 380 *mm;
64  E2HodoPos[12] = 456 *mm;
65 
66  DEwidth1=100.*mm;DEwidth2=40.0*mm;
67  DEthick1=5.0*mm; DEthick2=5.5*mm;
68 
69  E1width1=75.0*mm; E1width2=38.0*mm;
70  E1thick=60.0*mm;
71 
72  E2width=75.0*mm; E2thick=60.0*mm;
73 
74  Length=100.0*cm;
75 
76  if( fNoDE > 13||fNoE1>16||fNoE2>13 )
77  //{ G4Exception("scsiParameterisation construction: NoScintBars >82");}
78  { G4Exception("","",JustWarning,"scsiParameterisation construction: NoScintBars >82");}
79 
80 }
81 
83 {;}
84 
86 (const G4int copyNo,G4VPhysicalVolume *physVol) const
87 {
88  G4double Xposition=0.,Yposition=0.,Zposition=0.;
89 
90  //For DE positon De certer is the Hodo chamber center
91  if(copyNo<fNoDE){
92  Xposition=DEHodoPos[copyNo];
93  Yposition=0.0*cm;
94  Zposition=fzpos;
95  }
96  //For E1 position
97  else if(copyNo>(fNoDE-1)&&copyNo<(fNoDE+fNoE1)){
98  Xposition=0.0*cm;
99  Yposition=E1HodoPos[copyNo-fNoDE];
100  Zposition=fzpos+fzspacing[0]+DEthick1/2+E1thick/2;
101  }
102  //For E2 position
103  else if(copyNo>(fNoDE+fNoE1-1)&&copyNo<(fNoDE+fNoE1+fNoE2)){
104  Xposition=0.0*cm;
105  Yposition=E2HodoPos[copyNo-fNoDE-fNoE1];
106  Zposition=fzpos+fzspacing[0]+fzspacing[1]+E1thick/2+E2thick/2;
107  }
108 
109  G4ThreeVector origin(Xposition,Yposition,Zposition);
110  physVol->SetTranslation(origin);
111  physVol->SetRotation(0);
112 }
113 
115 (G4Box& ScintBar, const G4int copyNo, const G4VPhysicalVolume*) const
116 {
117  G4double XHalfLength=0.,YHalfLength=0.,ZHalfLength=0.;
118 
119  //For DE dimension
120  if(copyNo<4||(copyNo>8&&copyNo<13)){
121  XHalfLength=0.5*DEwidth1;
122  YHalfLength=0.5*Length;
123  ZHalfLength=0.5*DEthick1;
124  }
125  if(copyNo>3&&copyNo<9){
126  XHalfLength=0.5*DEwidth2;
127  YHalfLength=0.5*Length;
128  ZHalfLength=0.5*DEthick2;
129  }
130  //For E1 dimension
131  else if((copyNo>12&&copyNo<18)||(copyNo>23&&copyNo<29)){
132  XHalfLength=0.5*Length;
133  YHalfLength=0.5*E1width1;
134  ZHalfLength=0.5*E1thick;
135  }
136  else if(copyNo>17&&copyNo<24){
137  XHalfLength=0.5*Length;
138  YHalfLength=0.5*E1width2;
139  ZHalfLength=0.5*E1thick;
140  }
141  //For E2 dimension
142  else if(copyNo>28&&copyNo<42){
143  XHalfLength=0.5*Length;
144  YHalfLength=0.5*E2width;
145  ZHalfLength=0.5*E2thick;
146  }
147  ScintBar.SetXHalfLength(XHalfLength);
148  ScintBar.SetYHalfLength(YHalfLength);
149  ScintBar.SetZHalfLength(ZHalfLength);
150 }
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume *physVol) const
void ComputeDimensions(G4Box &, const G4int copyNo, const G4VPhysicalVolume *physVol) const
HodoParametrisation(G4int NodE, G4int Noe1, G4int Noe2, G4double zpos)