1 / 26

OSCAR 2 (for the Tracker)

OSCAR 2 (for the Tracker). (Adattamento della presentazione di T. Boccali al Tracker Tutorial 3/3/2003). CMSIM. Geant4. OSCAR. OSCAR is the implementation of a simulation program based upon Geant4 libraries

Télécharger la présentation

OSCAR 2 (for the Tracker)

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. OSCAR 2 (for the Tracker) (Adattamento della presentazione di T. Boccali al Tracker Tutorial 3/3/2003)

  2. CMSIM Torino, 14-16 Aprile 2003

  3. Geant4 Torino, 14-16 Aprile 2003

  4. OSCAR • OSCAR is the implementation of a simulation program based upon Geant4 libraries • We are at the second Major release (OSCAR2), which differs quite a lot from the previous release. Torino, 14-16 Aprile 2003

  5. OSCAR Major Versions • OSCAR 1: • A Geant 4 program which uses some features of our framework (COBRA) • OSCAR 2: • A COBRA application which uses Geant 4 libraries • This implies we have for free persistency, observer mechanism, profiling and so on. Torino, 14-16 Aprile 2003

  6. Modus operandi Torino, 14-16 Aprile 2003

  7. The User and OSCAR • As for Cmsim, the standard user should not need to write any code, but simply interact with OSCAR via data cards and other sorts of input. • Only if the user needs to access something which cannot be seen from data in ORCA, he will really have to look inside OSCAR Torino, 14-16 Aprile 2003

  8. OSCAR for you... Pythia ??? Cmsim/OSCAR ORCA Particle Gun Torino, 14-16 Aprile 2003

  9. Interact with OSCAR • Interactions with OSCAR: • we need to specify a (some) DDD geometry file(s) • we might need to specify a special set of production cuts • we might want to specify a Pythia ntuple as input • we might want to use the internal particle guns to generate simple test events • we have to decide what to really do (how many events, which detectors are switched on...) .orcarc G4 macro Torino, 14-16 Aprile 2003

  10. Running OSCAR • scram project OSCAR OSCAR_2_2_0_pre2b • This version uses gcc 2.95.2, i.e.: check that SCRAM_ARCH is NOT set • cd OSCAR_2_2_0_pre2b/src • cmscvsroot OSCAR; cvs login • Password is “98passwd” • cvs co –r OSCAR_2_2_0_pre2b OscarApplication/G4SimApplication • cd OscarApplication/G4SimApplication/test • See the file test/README! Torino, 14-16 Aprile 2003

  11. The .orcarc • Copy the .orcarc: • cp ~namapane/public/Tutorial/day3/hitsOscar/.orcarc . • Let’s have a look to it: • Specify XML geometry file: Geometry:ConfigurationFileName = […]/configuration.xml Torino, 14-16 Aprile 2003

  12. .orcarc: Production cuts • The standard particle production cuts are being tuned right now by the PRS, but • Physics:FileNameForPhysicsRangeCuts = PhysicsRangeCuts-127.data • specifies a different file if needed • Please note G4 default: cuts are in Range! Thick_Stand.Concretegamma 470.107*mm Thick_Stand.Concretee- 972.332*mm Thick_Stand.Concretee+ 24.6053*mm Torino, 14-16 Aprile 2003

  13. .orcarc: reading Pythia ntuples • As usually done with Cmsim! • Module MantisNtplReader must be linked • via BuildFile, or directly at runtime with • ExternalPackages = MantisNtplReader • Specify the input file with: • EventNtplReader:NtplFileName = w_enu.ntpl • EventNtplReader:NtplID = 101 Torino, 14-16 Aprile 2003

  14. .orcarc: using the Particle gun • Instead of MantisNtplReader, link • MantisGunReader • ParticleGun:PID = 13 • ParticleGun:MinEta = -2.5 • ParticleGun:MaxEta = 2.5 • Then, you choose a Gun • ParticleGun:Gun = FlatRandomPtGun • ParticleGun:MinPt = 19.8 • ParticleGun:MaxPt = 20.2 • ParticleGun:Gun = FlatRandomEGun • ParticleGun:MinE = 10 • ParticleGun:MaxE = 10 Torino, 14-16 Aprile 2003

  15. .orcarc: Vertex Smearing • Smear the 0th vertex • ParticleGun:VertexGenerator = FlatEventVertexGenerator • VertexGenerator:MinX = 0. • VertexGenerator:MinY = 0. • VertexGenerator:MinZ = 0. • VertexGenerator:MaxX = 0. • VertexGenerator:MaxY = 0. • VertexGenerator:MaxZ = 0. • EventNtplReader:VertexGenerator = GaussianEventVertexGenerator • VertexGenerator:MeanX = 0. • VertexGenerator:MeanY = 0. • VertexGenerator:MeanZ = 0. • VertexGenerator:SigmaX = 0.015 • VertexGenerator:SigmaY = 0.015 • VertexGenerator:SigmaZ = 53. Torino, 14-16 Aprile 2003

  16. .orcarc: Macro file • Either run interactively, or specify a G4 macro file • G4InputFile = hit-writing.macro Torino, 14-16 Aprile 2003

  17. The macro file • Minimal: • /load MantisSetupBuilder • /load BaseMagneticField • /load MantisMagneticField • /run/initialize • /run/beamOn 2 loads the geometry Magnetic field Initialization of xsec Fire 2 events but in this way we have no sensitive detector! Torino, 14-16 Aprile 2003

  18. Sensitive detectors • For the Tracker, you have to load SensDet libraries before the instantiation of the geometry • /load MantisSensitiveDetector • /load PersistentTrackingHits • /load TrackingHitsWriter • /load TkNumbering • /load TrackerNumberingScheme • /load TkSensitiveDetector MantisFramework COBRA/Tracker stuff Tracker numbering Concrete sensitive detectors Torino, 14-16 Aprile 2003

  19. Let’s go! • Go to OscarApplication/G4SimApplication/test • eval `scram runtime –csh` • scram b • source writeTrigger.csh • oscar • After some time (!) a set of database files is created (*.TestG4) in the current dir! • They contain SimHits Torino, 14-16 Aprile 2003

  20. Digitising (tracker only) Only a demonstration – final product will be different! • Go to ORCA_7_2_0_pre13/src • Must use gcc 2.95.2: SCRAM_ARCH is NOT set! • Retrieve the code and compile: • cmscvsroot ORCA; cvs login • cvs co -r ORCA_7_2_0_pre13 Tracker/TkDDDInterface • cd Tracker/TkDDDInterface/test • scram b Torino, 14-16 Aprile 2003

  21. Digitising: settings • Geometry must be the same used by OSCAR • setenv DDCONFIG ~namapane/public/Tutorial/day3/hitsOscar/configuration.xml • Cards • cp ~namapane/public/Tutorial/day3/digiFromOscar/.orcarc . • Have a look! • TkDDDInterface:UseDDD = 1 • FilePath = directory where we ran oscar • InputCollections = /System/TestG4/testOSCAR/testOSCAR • OutputDataSet = /System/NoPu/testOSCAR • GoPersistent = 1 • … Torino, 14-16 Aprile 2003

  22. Digitising: run • Execute • testBuilding • The digis are added to the database!!! Torino, 14-16 Aprile 2003

  23. Reading Back! • For example, reconstruct tracks! • cvs co -r ORCA_7_2_0_pre13 TrackerReco/GtfPattern • cd TrackerReco/GtfPattern/test • The BuildFile: add <group name=TkOscarReader> • cp ~namapane/public/Tutorial/day3/tracks/BuildFile . • scram b • The cards • cp ~namapane/public/Tutorial/day3/tracks/.orcarc . Torino, 14-16 Aprile 2003

  24. And Finally… • Run! • Tracks • Tracks are reconstructed! Torino, 14-16 Aprile 2003

  25. How to “program” OSCAR? • Mechanism very close to the one you are used in ORCA: “observe” something • class MyActions : • private Observer<const BeginOfEvent *>, • private Observer<const G4Step *>, • private Observer<const EndOfEvent *> • { “upDated” at each new event “upDated” at each step (= interaction) “upDated” at each end of event Torino, 14-16 Aprile 2003

  26. and then implement the methods • void upDate(const BeginOfEvent * evt); • void upDate(const G4Step * step); • void upDate(const EndOfEvent * evt); Torino, 14-16 Aprile 2003

More Related