/[PAMELA software]/PamVMC/tof/src/PamVMCDetTofS1.cxx
ViewVC logotype

Contents of /PamVMC/tof/src/PamVMCDetTofS1.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri Jun 12 18:39:41 2009 UTC (15 years, 5 months ago) by pam-rm2
Branch: MAIN
CVS Tags: v1r0, HEAD
Changes since 1.1: +0 -0 lines
- Introduced user-defined names of output files and random seeds number.
Users can do it use options of PamVMCApplication constructor:
PamVMCApplication(const char* name,  const char *title, const char*
filename="pamtest", Int_t seed=0).
The Random object that I use is TRandom3 object which has astronomical
large period (in case of default initialization 0). All random generators
in the code use this object by calling of gRandom singleton which keeps
it.

- Corrected TOF digitization routine. No problems with TDC hits due to
hadronic interactions anymore.

- Some small changes was done to compile code under Root 5.23. +
geant4_vmc v. 2.6 without any warnings

- Some classes of PamG4RunConfiguartion was changed for geant4_vmc v.
2.6.Some obsolete classes was deleted as soon as developers implemented
regions.

- Navigation was changed from "geomRootToGeant4" to "geomRoot", because on
VMC web page written that as soon as Geant4 has no option ONLY/MANY
translation of overlapped geometry to Geant4 through VGM could be wrong.
I'd like to stay with Root navigation:
http://root.cern.ch/root/vmc/Geant4VMC.html. This should be default
option.

- New Tracker digitization routine written by Sergio was implemented

- PamVMC again became compatible with geant4_vmc v.2.5 and ROOT 5.20.
 The problem was that ROOT developers introduced in TVirtualMC class a new
method SetMagField and new base class:TVirtualMagField from which
user-defined classes shoukd be derived

1 #include "PamVMCDetTofS1.h"
2
3 ClassImp(PamVMCDetTofS1)
4
5 void PamVMCDetTofS1::DefineGeometry(){
6
7 TGeoMaterial *m=0;
8 TGeoMixture *x=0;
9 TString s = "ALUMINIUM";
10 m = GetMat(s);
11 if(!m){
12 m = new TGeoMaterial(s,26.98,13,2.7);
13 m->SetUniqueID( 9);
14 }
15
16 s = "SCINT";
17 x = (TGeoMixture*)GetMat(s);
18 if(!x){
19 x = new TGeoMixture(s,2, 1.03200 );
20 x->SetUniqueID( 17);
21 x->DefineElement(0,12.01,6,0.922427);
22 x->DefineElement(1,1.01,1,0.7757296E-01);
23 }
24
25 s = "N2GAS";
26 m = GetMat(s);
27 if (!m){
28 m = new TGeoMaterial(s,14.01,7,0.1250000E-02);
29 m->SetUniqueID( 19);
30 }
31
32 s = "MYLAR";
33 x = (TGeoMixture*)GetMat(s);
34 if(!x){
35 x = new TGeoMixture(s,3, 1.39000 );
36 x->SetUniqueID( 29);
37 x->DefineElement(0,12.011,6,0.6250159);
38 x->DefineElement(1,1.00794,1,0.4196011E-01);
39 x->DefineElement(2,15.9994,8,0.3330241);
40 }
41
42 s = "POLYSTYRENE";
43 x = (TGeoMixture*)GetMat(s);
44 if(!x){
45 x = new TGeoMixture(s,2, 0.350000E-01);
46 x->SetUniqueID( 30);
47 x->DefineElement(0,12.011,6,0.9225789);
48 x->DefineElement(1,1.00794,1,0.7742105E-01);
49 }
50
51 TGeoMedium *n=0;
52
53 s="ALUMINIUM";
54 n = (GetMed(s))?GetMed(s): new TGeoMedium(s,1,9,-1,1,40,1,100,0.5000000E-01,0.136283,0.5000000E-03);
55
56 s = "N2 GAS";
57 n = (GetMed(s))?GetMed(s): new TGeoMedium(s,3,19,-1,1,40,1,0.5000000E-01,0.5000000E-01,0.1000000E-02,0.5000000E-03);
58
59 s = "SCINTILLATOR";
60 n = (GetMed(s))?GetMed(s): new TGeoMedium(s,10,17,1,1,40,1,0.5000000E-01,0.5000000E-01,0.1000000E-01,0.5000000E-03);
61
62 s = "MYLAR";
63 n = (GetMed(s))?GetMed(s): new TGeoMedium(s,19,29,-1,1,40,1,100,0.5000000E-01,0.2300000E-04,0.5000000E-03);
64
65 s = "POLYSTYRENE";
66 n = (GetMed(s))?GetMed(s): new TGeoMedium(s,20,30,-1,1,40,1,100,0.5000000E-01,0.4000000E-02,0.5000000E-03);
67
68 TGeoVolume *v=0;
69
70 s = "S1";
71 v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("ALUMINIUM"),20.4184,16.5138,1.3976);
72 s = "S1A";
73 v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("N2 GAS"),20.4184,16.5138,1.3646);
74 s = "S11M";
75 v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("MYLAR"),2.5523,16.5,0.3523);
76 s = "S12M";
77 v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("MYLAR"),20.4,2.7523,0.3523);
78 s = "S11Y";
79 v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("SCINTILLATOR"),2.55,16.5,0.35);
80 s = "S12X";
81 v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("SCINTILLATOR"),20.4,2.75,0.35);
82 s = "POL1";
83 v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("POLYSTYRENE"),20.4184,16.5138,0.45);
84 s = "POL2";
85 v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("POLYSTYRENE"),20.4184,16.5138,0.2);
86
87 GetVol("S1")->AddNode(GetVol("S1A"),0,gGeoIdentity);
88 GetVol("S1A")->AddNode(GetVol("POL2"),1,new TGeoTranslation(0.,0.,-1.1546));
89 GetVol("S1A")->AddNode(GetVol("S12M"),1,new TGeoTranslation(0.,-13.7615,-0.6023));
90 GetVol("S12M")->AddNode(GetVol("S12X"),1,gGeoIdentity);
91 GetVol("S1A")->AddNode(GetVol("S12M"),2,new TGeoTranslation(0.,-8.2569,-0.6023));
92 GetVol("S1A")->AddNode(GetVol("S12M"),3,new TGeoTranslation(0.,-2.7523,-0.6023));
93 GetVol("S1A")->AddNode(GetVol("S12M"),4,new TGeoTranslation(0.,2.7523,-0.6023));
94 GetVol("S1A")->AddNode(GetVol("S12M"),5,new TGeoTranslation(0.,8.2569,-0.6023));
95 GetVol("S1A")->AddNode(GetVol("S12M"),6,new TGeoTranslation(0.,13.7615,-0.6023));
96 GetVol("S1A")->AddNode(GetVol("S11M"),1,new TGeoTranslation(-17.8661,0.,0.1023));
97 GetVol("S11M")->AddNode(GetVol("S11Y"),1,gGeoIdentity);
98 GetVol("S1A")->AddNode(GetVol("S11M"),2,new TGeoTranslation(-12.7615,0.,0.1023));
99 GetVol("S1A")->AddNode(GetVol("S11M"),3,new TGeoTranslation(-7.6569,0.,0.1023));
100 GetVol("S1A")->AddNode(GetVol("S11M"),4,new TGeoTranslation(-2.5523,0.,0.1023));
101 GetVol("S1A")->AddNode(GetVol("S11M"),5,new TGeoTranslation(2.5523,0.,0.1023));
102 GetVol("S1A")->AddNode(GetVol("S11M"),6,new TGeoTranslation(7.6569,0.,0.1023));
103 GetVol("S1A")->AddNode(GetVol("S11M"),7,new TGeoTranslation(12.7615,0.,0.1023));
104 GetVol("S1A")->AddNode(GetVol("S11M"),8,new TGeoTranslation(17.8661,0.,0.1023));
105 GetVol("S1A")->AddNode(GetVol("POL1"),1,new TGeoTranslation(0.,0.,0.9046));
106
107
108 SetMotherProp(GetVol("S1"),0,new TGeoTranslation(0.,0.,102.8866));
109
110 };
111
112
113 void PamVMCDetTofS1::DefineCuts(){
114
115 TString s ="ALUMINIUM"; // default GPAMELA parameters
116 if (GetMed(s) && !GetCC(s))
117 SetCC(s, new pCutControl(GetMedID(s), 0.0001, 0.001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001,
118 0.001, 0.01, 1., 1., 1., 0., 1., 1., 1., 4., 1., 1., 1., 1.));
119 s ="N2 GAS";
120 if (GetMed(s) && !GetCC(s))
121 SetCC(s, new pCutControl(GetMedID(s), 0.0001, 0.001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001,
122 0.001, 0.01, 1., 1., 1., 0., 0., 1., 1., 4., 1., 1., 2., 1.));
123 s ="SCINTILLATOR";// default GPAMELA parameters
124 if (GetMed(s) && !GetCC(s))
125 SetCC(s, new pCutControl(GetMedID(s), 0.0001, 0.001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001,
126 0.001, 0.01, 1., 1., 1., 0., 1., 1., 1., 4., 1., 1., 1., 1.));
127 s ="MYLAR";
128 if (GetMed(s) && !GetCC(s))
129 SetCC(s, new pCutControl(GetMedID(s), 0.0001, 0.001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001,
130 0.001, 0.01, 1., 1., 1., 0., 1., 1., 1., 4., 1., 1., 1., 1.));
131 s = "POLYSTYRENE";
132 SetCC(s, new pCutControl(GetMedID(s), 0.00001, 0.00001, 0.00001, 0.00001, 0.001, 0.001, 0.01, 0.00001,
133 0.00001, 0.01, 1., 1., 1., 0., 1., 1., 1., 1., 1., 1., 1., 2.));
134 }
135

  ViewVC Help
Powered by ViewVC 1.1.23