/[PAMELA software]/PamVMC/src/PamVMCVolCrossMgr.cxx
ViewVC logotype

Contents of /PamVMC/src/PamVMCVolCrossMgr.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri Jun 12 18:39:33 2009 UTC (15 years, 5 months ago) by pam-rm2
Branch: MAIN
CVS Tags: v1r0, HEAD
Changes since 1.1: +1 -1 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 "PamVMCVolCrossMgr.h"
2
3 #include "PamVMCCrossTOF.h"
4 #include "PamVMCCrossTRK.h"
5 #include "PamVMCCrossMAG.h"
6
7 PamVMCVolCrossMgr::PamVMCVolCrossMgr(){
8
9 TString t;
10 t="S11Y";
11 fvolmap.Add(new TObjString(t), new PamVMCCrossS11Y());
12 t="S12X";
13 fvolmap.Add(new TObjString(t), new PamVMCCrossS12X());
14 t="S21X";
15 fvolmap.Add(new TObjString(t), new PamVMCCrossS21X());
16 t="S22Y";
17 fvolmap.Add(new TObjString(t), new PamVMCCrossS22Y());
18 t="S31Y";
19 fvolmap.Add(new TObjString(t), new PamVMCCrossS31Y());
20 t="S32X";
21 fvolmap.Add(new TObjString(t), new PamVMCCrossS32X());
22 t="TSPA";
23 fvolmap.Add(new TObjString(t), new PamVMCCrossTRK());
24 t="MGPL";
25 fvolmap.Add(new TObjString(t), new PamVMCCrossMGPL());
26 t="MGPA";
27 fvolmap.Add(new TObjString(t), new PamVMCCrossMGPA());
28
29 }
30
31 PamVMCVolCrossMgr * PamVMCVolCrossMgr::fcrm = 0;
32
33 PamVMCVolCrossMgr * PamVMCVolCrossMgr::Instance(){
34 if(fcrm == 0) {
35 fcrm = new PamVMCVolCrossMgr();
36 }
37 return fcrm;
38 }
39
40 Bool_t PamVMCVolCrossMgr::IsTrackGood(){
41
42
43 Bool_t S11=((PamVMCVolCross*)fvolmap.GetValue("S11Y"))->IsVolCross();
44 Bool_t S12=((PamVMCVolCross*)fvolmap.GetValue("S12X"))->IsVolCross();
45 Bool_t S1=kFALSE;
46 if (S11||S12) S1=kTRUE;
47 Bool_t S21=((PamVMCVolCross*)fvolmap.GetValue("S21X"))->IsVolCross();
48 Bool_t S22=((PamVMCVolCross*)fvolmap.GetValue("S22Y"))->IsVolCross();
49 Bool_t S2=kFALSE;
50 if(S21||S22) S2=kTRUE;
51 Bool_t S31=((PamVMCVolCross*)fvolmap.GetValue("S31Y"))->IsVolCross();
52 Bool_t S32=((PamVMCVolCross*)fvolmap.GetValue("S32X"))->IsVolCross();
53 Bool_t S3=kFALSE;
54 if(S31||S32) S3=kTRUE;
55
56 Bool_t TOF=((PamVMCVolCross*)fvolmap.GetValue("TSPA"))->IsVolCross();
57 Bool_t MGPL=((PamVMCVolCross*)fvolmap.GetValue("MGPL"))->IsVolCross();
58 Bool_t MGPA=((PamVMCVolCross*)fvolmap.GetValue("MGPA"))->IsVolCross();
59
60
61 return S1*S2*S3*TOF*MGPL*MGPA;
62 }
63
64 void PamVMCVolCrossMgr::Reset(){
65 TMapIter *n= (TMapIter *)fvolmap.MakeIterator();
66 TObject *o; while( (o=(TObject *) n->Next())) {
67 ((PamVMCVolCross*)fvolmap.GetValue(o))->Reset();
68 }
69 }

  ViewVC Help
Powered by ViewVC 1.1.23