Download presentation
Presentation is loading. Please wait.
Published byHarold Gallagher Modified over 9 years ago
1
How to run simulation job in BOSS Deng ziyan 2006.03.01
2
Introduction Generator Based on BESII GENBES Integrated with BOSS 30 generators included Simulation Based on Geant4 BOOST integrated with BOSS Ascii data format
3
How to run simulation job Assuming you have done: Setup your environment in ~/cmthome Checkout package TestRelease to your $workarea (1) cd TestRelease/*/cmt (2) vi requirements #======== for Generator ============ use PartPropSvc PartPropSvc-* Generator use Tester Tester-* Generator/BesGenInterface use Howl Howl-* Generator/BesGenInterface use Radee Radee-* Generator/BesGenInterface …………………………………………………………….. #========= for Simulation ============== use BesSim BesSim-* Simulation/BOOST
4
How to run simulation job (3) cmt broadcast cmt config (4) cmt broadcast gmake (5) source setup.csh (6) cd../run (7) edit jobOption file: jobOptions_sim.txt
5
jobOptions_sim.txt ApplicationMgr.DLLs += { "Tester", "BesSim" }; ApplicationMgr.TopAlg += { "BesGenModule", "BesSim"}; #include "Bes_Gen.txt" #include "PartPropSvc.txt“ BesSim.Mdc = 1; (0:no construction 1; construction) BesSim.Tof = 1; BesSim.Emc = 1; BesSim.Muc = 1; BesSim.Field = true; BesSim.PhysicsList = 4; 1:BesPhysicsList 2:LHEP_GN 3:QGSP_GN 4:QGSP for BOSS 5.0.0
6
jobOptions_sim.txt ApplicationMgr.DLLs += { "G4Svc" }; ApplicationMgr.ExtSvc += { "G4Svc" }; // interactive mode G4Svc.InteractiveG4 = false; //Geant4 run macro, to set directory and file name of output data G4Svc.FADSMacro = "run.mac"; // geant4 verbosity G4Svc.RunVerbosity = 1; G4Svc.EventVerbosity = 0; G4Svc.TrackingVerbosity = 0; //number of events to simulate ApplicationMgr.EvtMax = 10; for BOSS 5.0.0
7
How to run simulation job (8) edit generator card (run.cards) same as genbes.cards in BESII the generator name in run.cards must match with algorithm name in jobOptions_sim.txt ApplicationMgr.DLLs += { “Rhopi", "BesSim" }; ApplicationMgr.TopAlg += { "BesGenModule", "BesSim"}; generator_name 'rhopi‘ rhopi_ipar 1 Ineffective control in run.cards Event range (controlled in jobOption) Random seed (will be added in the future by yugw) for BOSS 5.0.0
8
Particle ID in run.cards same as BESII
9
How to run simulation job (9) edit run.mac /run/runID -9 /runAction/ascii 1 1 1 1 1 1 1 1 /home/dengzy/boost.dat you must specify a full directory name, such as /ihepbatch/besdata/public/dengzy/boost.dat (10) boss -q jobOptions_sim.txt MDCTRUTHTOFTRUTHEMCTRUTHMUCTRUTHMDCDIGITOFDIGIEMCDIGIMUCDIGI for BOSS 5.0.0
10
How to run simulation job In brief specify generator algorithm in jobOptions_sim.txt ApplicationMgr.DLLs += { “Rhopi", "BesSim" }; G4Svc.FADSMacro = "run.mac"; ApplicationMgr.EvtMax = 10; open generator in run.cards generator_name ‘rhopi’ specify output data file in run.mac /runAction/ascii 1 1 1 1 1 1 1 1 /home/dengzy/boost.dat using all the other default settings for BOSS 5.0.0
11
New interface in BOSS 5.1.0 BOSS 5.0.0 G4Svc.FADSMacro = "run.mac"; /runAction/ascii 1 1 1 1 1 1 1 1 /home/dengzy/boost.dat BOSS 5.1.0 Control data output in jobOption, not in run.mac BesSim.AsciiFlag = “11111111"; BesSim.AsciiFile =“/home/dengzy/boost.dat”; MDCTRUTHMDCDIGITOFTRUTHTOFDIGIEMCTRUTHEMCDIGIMUCTRUTHMUCDIGI MDCTRUTHTOFTRUTHEMCTRUTHMUCTRUTHMDCDIGITOFDIGIEMCDIGIMUCDIGI
12
Ascii data format (boost.dat) { EVHEAD runNo eventNo } EVHEAD { TrackTRUTH trackIndex PDGcode charge originalVertexIndex terminalVertexIndex px py pz minDaughterIndex maxDaughterIndex } TrackTRUTH { VertexTRUTH vertexIndex parentTrackIndex x y z time } VertexTRUTH
13
Ascii data format (boost.dat) { MDCTRUTH trackIndex layerId cellId edep driftD x y z posFlag } MDCTRUTH { MDCDIGI trackIndex layerNo cellNo energyDeposit driftTime } MDCDIGI { TOFTRUTH trackIndex partId scinNb x y z px py pz trackLength time } TOFTRUTH { TOFDIGI trackIndex partId scinNb forwADC forwTDC backADC backTDC } TOFDIGI
14
Ascii data format (boost.dat) { EMCTRUTH trackIndex partId numTheta numPhi x y z px py pz totalEdep } EMCTRUTH { EMCDIGI trackIndex partId numTheta numPhi energyDeposit time } EMCDIGI { MUCTRUTH trackIndex partId segId gapId stripId x y z px py pz } MUCTRUTH { MUCDIGI trackIndex partId segId gapId stripId } MUCDIGI http://boss.ihep.ac.cn/SofPro/simulation/AsciiData_format.txt
15
Geant4 PDGcode http://boss.ihep.ac.cn/SofPro/simulation/PDGsheme.pdf
16
Data flow Event GenEvent McGenEventCol McEvent McParticleCol MdcMcHitCol TofMcHitCol EmcMcHitCol MucMcHitCol DigiEvent MdcDigiCol TofDigiCol EmcDigiCol MucDigiCol Generator BesGenModule Simulation BesSim Reconstruction EmcRec … Transient Data Store ① ② ③ ④ Ascii file evt.dat boost.dat EventSelector.InputFiles ="boost.dat"
17
retrieve MC truth from TDS retrieve TOF MCtruth from TDS SmartDataPtr aMcHitCol(m_evtSvc,"/Event/MC/TofMcHitCol”); Event::TofMcHitCol::iterator iMcHitCol; for(iMcHitCol=aMcHitCol->begin(); iMcHitCol!=aMcHitCol->end(); iMcHitCol++) { const Identifier ident = (*iMcHitCol)->identify(); std::cout getTrackIndex(); std::cout<<" "<<TofID::barrel_ec(ident);; std::cout<<" "<<TofID::layer(ident); std::cout<<" "<<TofID::phi_module(ident); std::cout getPositionX(); std::cout getPositionY(); std::cout getPositionZ(); std::cout getPx(); std::cout getPy(); ………………………………… }
18
retrieve digit from TDS retrieve TOF digits from TDS SmartDataPtr aDigiCol(m_evtSvc,"/Event/Digi/TofDigiCol"); TofDigiCol::iterator iDigiCol; for(iDigiCol=aDigiCol->begin(); iDigiCol!=aDigiCol->end(); iDigiCol++) { const Identifier ident = (*iDigiCol)->identify(); std::cout<<"partId: "<<TofID::barrel_ec(ident); std::cout<<" layer: "<<TofID::layer(ident); std::cout<<" scinNb: "<<TofID::phi_module(ident); std::cout getChargeChannel(); std::cout getTimeChannel()<<std::endl; }
19
The end! Any questions or suggestions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.