/[PAMELA software]/PamVMC/ac/src/PamVMCDetCat.cxx
ViewVC logotype

Annotation of /PamVMC/ac/src/PamVMCDetCat.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Fri Jun 12 18:39:02 2009 UTC (15 years, 6 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 nikolas 1.1 #include "PamVMCDetCat.h"
2    
3     ClassImp(PamVMCDetCat)
4     void PamVMCDetCat::DefineGeometry(){
5    
6     TGeoMaterial *m=0;
7     TGeoMixture *x=0;
8     TString s = "ALUMINIUM";
9     m = GetMat(s);
10     if(!m){
11     m = new TGeoMaterial(s,26.98,13,2.7);
12     m->SetUniqueID( 9);
13     }
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 = "PLAST";
33     x = (TGeoMixture*)GetMat(s);
34     if(!x){
35     x = new TGeoMixture(s,2, 1.03200 );
36     x->SetUniqueID( 28);
37     x->DefineElement(0,12.01,6,0.9929774);
38     x->DefineElement(1,1.01,1,0.7022570E-02);
39     }
40    
41     s = "TIALVA";
42     x = (TGeoMixture*)GetMat(s);
43     if(!x){
44     x = new TGeoMixture(s,3, 4.49234 );
45     x->SetUniqueID( 32);
46     x->DefineElement(0,47.867,22,0.9);
47     x->DefineElement(1,26.9815,13,0.6000000E-01);
48     x->DefineElement(2,50.9415,23,0.4000000E-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 = "PLASTIC";
63     n = (GetMed(s))?GetMed(s): new TGeoMedium(s,18,28,-1,1,40,1,100,0.5000000E-01,0.1000000E-01,0.5000000E-03);
64    
65     s = "TITANIUM Mixture";
66     n = (GetMed(s))?GetMed(s):new TGeoMedium(s,24,32,-1,1,40,1,0.5000000E-01,0.5000000E-01,0.3200000E-01,0.5000000E-03);
67    
68    
69     TGeoVolume *v = 0;
70    
71     TPLAfirst = kFALSE;
72     s = "TPLA";
73     v = GetVol(s);
74     if(!v) {
75     v = gGeoManager->MakeBox("TPLA",GetMed("N2 GAS"),28.,27.165,1.6);
76     TPLAfirst = kTRUE;
77     }
78    
79     s = "TPTU";
80     v = (GetVol(s))?GetVol(s):gGeoManager->MakeBox(s,GetMed("TITANIUM Mixture"),2.55,1.95,0.6);
81     s = "TPTM";
82     v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("TITANIUM Mixture"),3.45,3.3,0.75);
83     s = "TPTL";
84     v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("TITANIUM Mixture"),21.9,21.1,0.25);
85     s = "TPCV";
86     v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("N2 GAS"),8.5,7.,0.25);
87     s = "CATA";
88     v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("N2 GAS"),28.,0.6,27.165);
89     s = "ATBB";
90     v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("ALUMINIUM"),28.,0.6,27.165);
91     s = "PLA2";
92     v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("PLASTIC"),27.65,0.4,26.815);
93     s = "TOP1";
94     v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("SCINTILLATOR"),26.85,0.4,26.015);
95     s = "PTBM";
96     v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("PLASTIC"),10.11,0.4,8.44);
97     s = "ATBM";
98     v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("ALUMINIUM"),9.41,0.4,7.74);
99     s = "LTBM";
100     v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("N2 GAS"),9.11,0.6,7.44);
101     s = "PTBC";
102     v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("PLASTIC"),4.975,0.4,5.5575);
103     s = "ATBC";
104     v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("ALUMINIUM"),4.975,0.4,5.5575);
105     s = "LTBC";
106     v = (GetVol(s))?GetVol(s): gGeoManager->MakeBox(s,GetMed("N2 GAS"),4.975,0.6,5.5575);
107     s = "PTRT";
108     v = (GetVol(s))?GetVol(s): gGeoManager->MakeTrd1(s,GetMed("PLASTIC"),0.,16.9,0.4,2.405);
109     s = "ATRT";
110     v = (GetVol(s))?GetVol(s): gGeoManager->MakeTrd1(s,GetMed("ALUMINIUM"),0.,17.7,0.4,2.405);
111     s = "LTRT";
112     v = (GetVol(s))?GetVol(s): gGeoManager->MakeTrd1(s,GetMed("N2 GAS"),0.,18.05,0.6,2.405);
113     s = "PTRB";
114     v = (GetVol(s))?GetVol(s): gGeoManager->MakeTrd1(s,GetMed("PLASTIC"),16.9,0.,0.4,2.405);
115     s = "ATRB";
116     v = (GetVol(s))?GetVol(s): gGeoManager->MakeTrd1(s,GetMed("ALUMINIUM"),17.7,0.,0.4,2.405);
117     s = "LTRB";
118     v = (GetVol(s))?GetVol(s): gGeoManager->MakeTrd1(s,GetMed("N2 GAS"),18.05,0.,0.6,2.405);
119     s = "PTRL";
120     v = (GetVol(s))?GetVol(s): gGeoManager->MakeTrd1(s,GetMed("PLASTIC"),0.,14.9,0.4,2.375);
121     s = "ATRL";
122     v = (GetVol(s))?GetVol(s): gGeoManager->MakeTrd1(s,GetMed("ALUMINIUM"),0.,15.7,0.4,2.375);
123     s = "LTRL";
124     v = (GetVol(s))?GetVol(s): gGeoManager->MakeTrd1(s,GetMed("N2 GAS"),0.,16.05,0.6,2.375);
125    
126     GetVol("TPTL")->AddNode(GetVol("TPCV"),1,gGeoIdentity);
127     GetVol("CATA")->AddNode(GetVol("ATBB"),1,gGeoIdentity); //only
128     GetVol("ATBB")->AddNodeOverlap(GetVol("PLA2"),1,gGeoIdentity); //only
129     GetVol("PLA2")->AddNodeOverlap(GetVol("TOP1"),1,gGeoIdentity); //only
130     GetVol("TOP1")->AddNode(GetVol("PTBM") ,1,gGeoIdentity);//only
131     GetVol("TOP1")->AddNode(GetVol("PTBC"),1,new TGeoTranslation(-21.875,0.,20.4575));
132     GetVol("TOP1")->AddNode(GetVol("PTBC"),2,new TGeoTranslation(21.875,0.,20.4575));
133     GetVol("TOP1")->AddNode(GetVol("PTBC"),3,new TGeoTranslation(-21.875,0.,-20.4575));
134     GetVol("TOP1")->AddNode(GetVol("PTBC"),4,new TGeoTranslation(21.875,0.,-20.4575));
135     GetVol("TOP1")->AddNode(GetVol("PTRT"),1,new TGeoTranslation(0.,0.,23.61));
136     GetVol("TOP1")->AddNode(GetVol("PTRB"),1,new TGeoTranslation(0.,0.,-23.61));
137     GetVol("TOP1")->AddNode(GetVol("PTRL"),1,new TGeoCombiTrans(-24.475,0.,0.,GetRot("rot7")));
138     GetVol("TOP1")->AddNode(GetVol("PTRL"),2,new TGeoCombiTrans(24.475,0.,0.,GetRot("rot8")));
139     GetVol("PLA2")->AddNode(GetVol("ATBM"),1,gGeoIdentity);
140     GetVol("PLA2")->AddNode(GetVol("ATBC"),1,new TGeoTranslation(-22.675,0.,21.2575));
141     GetVol("PLA2")->AddNode(GetVol("ATBC"),2,new TGeoTranslation(22.675,0.,21.2575));
142     GetVol("PLA2")->AddNode(GetVol("ATBC"),3,new TGeoTranslation(-22.675,0.,-21.2575));
143     GetVol("PLA2")->AddNode(GetVol("ATBC"),4,new TGeoTranslation(22.675,0.,-21.2575));
144     GetVol("PLA2")->AddNode(GetVol("ATRT"),1,new TGeoTranslation(0.,0.,24.41));
145     GetVol("PLA2")->AddNode(GetVol("ATRB"),1,new TGeoTranslation(0.,0.,-24.41));
146     GetVol("PLA2")->AddNode(GetVol("ATRL"),1,new TGeoCombiTrans(-25.275,0.,0.,GetRot("rot7")));
147     GetVol("PLA2")->AddNode(GetVol("ATRL"),2,new TGeoCombiTrans(25.275,0.,0.,GetRot("rot8")));
148     GetVol("ATBB")->AddNode(GetVol("LTBM"),1,gGeoIdentity);
149     GetVol("ATBB")->AddNode(GetVol("LTBC"),1,new TGeoTranslation(-23.025,0.,21.6075));
150     GetVol("ATBB")->AddNode(GetVol("LTBC"),2,new TGeoTranslation(23.025,0.,21.6075));
151     GetVol("ATBB")->AddNode(GetVol("LTBC"),3,new TGeoTranslation(-23.025,0.,-21.6075));
152     GetVol("ATBB")->AddNode(GetVol("LTBC"),4,new TGeoTranslation(23.025,0.,-21.6075));
153     GetVol("ATBB")->AddNode(GetVol("LTRT"),1,new TGeoTranslation(0.,0.,24.76));
154     GetVol("ATBB")->AddNode(GetVol("LTRB"),1,new TGeoTranslation(0.,0.,-24.76));
155     GetVol("ATBB")->AddNode(GetVol("LTRL"),1,new TGeoCombiTrans(-25.625,0.,0.,GetRot("rot7")));
156     GetVol("ATBB")->AddNode(GetVol("LTRL"),2,new TGeoCombiTrans(25.625,0.,0.,GetRot("rot8")));
157     GetVol("TPLA")->AddNodeOverlap(GetVol("TPTU"),1,new TGeoTranslation(-20.65,-20.15,1.));
158     GetVol("TPLA")->AddNodeOverlap(GetVol("TPTU"),2,new TGeoTranslation(-20.65,20.15,1.));
159     GetVol("TPLA")->AddNodeOverlap(GetVol("TPTU"),3,new TGeoTranslation(20.65,-20.15,1.));
160     GetVol("TPLA")->AddNodeOverlap(GetVol("TPTU"),4,new TGeoTranslation(20.65,20.15,1.));
161    
162    
163     if(TPLAfirst) SetMotherProp(GetVol("TPLA"),1,new TGeoTranslation(0.,0.,73.489));
164    
165     GetVol("TPLA")->AddNode(GetVol("TPTL"),1,new TGeoTranslation(0.,0.,-1.35));
166     GetVol("TPLA")->AddNode(GetVol("TPTM"),1,new TGeoTranslation(-19.75,-18.8,-0.35));
167     GetVol("TPLA")->AddNode(GetVol("TPTM"),2,new TGeoTranslation(-19.75,18.8,-0.35));
168     GetVol("TPLA")->AddNode(GetVol("TPTM"),3,new TGeoTranslation(19.75,-18.8,-0.35));
169     GetVol("TPLA")->AddNode(GetVol("TPTM"),4,new TGeoTranslation(19.75,18.8,-0.35));
170     GetVol("TPLA")->AddNode(GetVol("CATA"),1,new TGeoCombiTrans(0.,0.,1.,GetRot("rot2")));
171     };
172    
173     void PamVMCDetCat::DefineCuts(){
174    
175     TString s ="ALUMINIUM"; // default GPAMELA parameters
176     if (GetMed(s) && !GetCC(s))
177     SetCC(s, new pCutControl(GetMedID(s), 0.0001, 0.001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001,
178     0.001, 0.01, 1., 1., 1., 0., 1., 1., 1., 4., 1., 1., 1., 1.));
179     s ="N2 GAS";
180     if (GetMed(s) && !GetCC(s))
181     SetCC(s, new pCutControl(GetMedID(s), 0.0001, 0.001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001,
182     0.001, 0.01, 1., 1., 1., 0., 0., 1., 1., 4., 1., 1., 2., 1.));
183     s ="SCINTILLATOR";// default GPAMELA parameters
184     if (GetMed(s) && !GetCC(s))
185     SetCC(s, new pCutControl(GetMedID(s), 0.0001, 0.001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001,
186     0.001, 0.01, 1., 1., 1., 0., 1., 1., 1., 4., 1., 1., 1., 1.));
187     s = "PLASTIC";// default GPAMELA parameters
188     if (GetMed(s) && !GetCC(s))
189     SetCC(s, new pCutControl(GetMedID(s), 0.0001, 0.001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001,
190     0.001, 0.01, 1., 1., 1., 0., 1., 1., 1., 4., 1., 1., 1., 1.));
191     s = "TITANIUM Mixture"; // default GPAMELA parameters
192     if (GetMed(s) && !GetCC(s))
193     SetCC(s, new pCutControl(GetMedID(s), 0.0001, 0.001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001,
194     0.001, 0.01, 1., 1., 1., 0., 1., 1., 1., 4., 1., 1., 1., 1.));
195    
196     }

  ViewVC Help
Powered by ViewVC 1.1.23