1 / 7

Python MC Simulation Framework

Python MC Simulation Framework. Tsunefumi Mizuno mizuno@SLAC.Stanford.EDU October 6, 2003. Checkout and run. (checkout package) setenv CVS_RSH ssh setenv CVSROOT /afs/slac/g/astro_gam/cvs/EndToEndMC umask 002 cvs checkout PythonSimTest (run simulator) cd PythonSimTest ./set.csh

paul-tyler
Télécharger la présentation

Python MC Simulation Framework

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Python MC Simulation Framework Tsunefumi Mizuno mizuno@SLAC.Stanford.EDU October 6, 2003 vrvs_2003-10-06.ppt

  2. Checkout and run (checkout package) setenv CVS_RSH ssh setenv CVSROOT /afs/slac/g/astro_gam/cvs/EndToEndMC umask 002 cvs checkout PythonSimTest (run simulator) cd PythonSimTest ./set.csh cd PySim/bin ./run_PySimTest.csh LatEnv.csv (digitization in case of BFEM) cp -rf ../../Simulators/BfemSimulator/scripts/ . cd scripts ./makeirf.sh vrvs_2003-10-06.ppt

  3. Directory structure Simulator LatSimulator Simulators EgretSimulator PythonSimTest BfemSimulator SrcGen EGRETSrcGenerator CrGenerator PySim • Reference of BfemSimulator and CrGenerator: • http://www.slac.stanford.edu/~mizuno/GLAST/Geant4/BalloonGeometry_2003-10-06.pdf • http://www.slac.stanford.edu/~mizuno/GLAST/Geant4/CRGene_2003-09-12.pdf • http://www.slac.stanford.edu/~mizuno/meeting/CosmicRayModel_2003-09-12a.ppt • http://www.slac.stanford.edu/~mizuno/meeting/CosmicRayModel_2003-09-12b.ppt vrvs_2003-10-06.ppt

  4. Flow control(PySimTest.py) crgen = CrGenerator("CrProtonPrimary") crgen.addComponent("CrProtonReentrant") crgen.dump() eggen = EgretSource("../../SrcGen/EGRETSrcGenerator/thirdCatalog.txt") eggen.addComponent(1) # addComponent(i) can add source of ID i ….. event = PyEventGen() event.addGen(crgen) event.addGen(eggen) ….. sim = EventSim( "LAT" ) #sim = EventSim( "BFEM" ) #sim = EventSim( “EGRET" ) ..... data = GenDataCol() event.genEvents(envMatrix,rand,data) data.saveToBinaryFile( "gendata.dat" ) simdata = GenDataCol() simdata.readFromBinaryFile( "gendata.dat" ) simdata.randomPos( r, d, center ) ….. num = simdata.size() sim.simData( simdata, num ) # simulate events using generator data. construct event generators construct simulator Read environment file (Latenv.csv) and generate events run simulator vrvs_2003-10-06.ppt

  5. List of CR models(see CrGenerator.cxx) "CrProtonPrimary.hh" "CrProtonSplash.hh" "CrProtonReentrant.hh“ "CrAlphaPrimary.hh" "CrElectronPrimary.hh" "CrElectronSplash.hh" "CrElectronReentrant.hh" "CrGammaPrimary.hh" "CrGammaSecondaryDownward.hh" "CrGammaSecondaryUpward.hh" "CrPositronPrimary.hh" "CrPositronSplash.hh" "CrPositronReentrant.hh" "CrMuonMinusSplash.hh" "CrMuonMinusReentrant.hh" "CrMuonPlusSplash.hh" "CrMuonPlusReentrant.hh" "BfemElectronSecondaryDownward.hh" "BfemElectronSecondaryUpward.hh" "BfemPositronSecondaryDownward.hh" "BfemPositronSecondaryUpward.hh" "BfemProtonSecondaryDownward.hh" "BfemProtonSecondaryUpward.hh" vrvs_2003-10-06.ppt

  6. Environment file (LatEnv.csv) # LatEnv # each column means: # number of Events, time, latitude,longitude,altitude, # s/c location in ECI(discos xyz), CBN in ECI(3 sets of dircos xyz) ####################################################################### 500, 57801600, 31.78, -95.73, 500.0, 1.0,0.0,0.0, 0.0,1.0,0.0, 0.0,0.0,1.0, 1.0,0.0,0.0 500, 57801600, 31.78, -95.73, 500.0, 1.0,0.0,0.0, 0.0,1.0,0.0, 0.0,0.0,1.0, 1.0,0.0,0.0 #100, 1, 0.5,0.5,10.0, 1.0,0.0,0.0, 0.0,1.0,0.0, 0.0,0.0,1.0, 1.0,0.0,0.0 #100, 1, 0.5,0.5,10.0, 0.7071,0.7071,0.0, -0.7071,0.7071,0.0, 0.0,0.0,1.0, 0.7071,0.7071,0.0 latitude, longitude (degree), altitude (km) for Palestine, Texas elapsed seconds of 2001-11-01 (solar maximum) from 2000-01-01 vrvs_2003-10-06.ppt

  7. Compare with standalone simulator bfemElectronSecondary (Downward/Upward) gammaSecondaryUpward Standalone simulator (red) and BfemSimulator in framework (black) give consistent results. vrvs_2003-10-06.ppt

More Related