Presentation is loading. Please wait.

Presentation is loading. Please wait.

LHCb Simulation Tutorial CERN, 21 st -22 nd February 2012 01 10 100 111 01 1 01 01 00 01 01 010 10 11 01 00 B 00 l e How to pass a detector geometry to.

Similar presentations


Presentation on theme: "LHCb Simulation Tutorial CERN, 21 st -22 nd February 2012 01 10 100 111 01 1 01 01 00 01 01 010 10 11 01 00 B 00 l e How to pass a detector geometry to."— Presentation transcript:

1 LHCb Simulation Tutorial CERN, 21 st -22 nd February 2012 01 10 100 111 01 1 01 01 00 01 01 010 10 11 01 00 B 00 l e How to pass a detector geometry to Geant4 Modeling the geometry with Geant4

2 Making the geometry known to Geant4 Geant4 Persistency Service Data Files Transient Event Store Persistency Service Data Files Transient Detector Store GiGa Service G4 Hits G4 Kine Kine ‘Convertion’ Algorithms Action Hits ‘Conversion’ Algorithms G4 Geom GiGaGeom Conversion Service Gauss (Gaudi) Gauss uses a dedicated set of services, algorithm and converters to transform the geometry to simulate into the Geant4 description Simulation Tutorial - Feb. 2012 - 2Geometry To Geant4

3 Geant4 Persistency Service geo DB Transient Detector Store GiGa Service GiGa Geometry Conversion Service “Geo” (Gaudi Algorithm) Converters and GiGaGeo Service G4 geometry G4 geometry Transferring the geometry in practice condition DB from Configurables import GiGaInputStream geo = GiGaInputStream( ” Geo ”, ConversionSvcName=“GiGaGeo”, DataProviderSvc=‘DetectorDataSvc’, ExecuteOnce=True ) geo.StreamItems += ["/dd/Structure/LHCb/BeforeMagnetRegion/Rich1”] geo.StreamItems += ["/dd/Geometry/BeforeMagnetRegion/Rich1/Rich1Surfaces”] from Configurables import GiGaInputStream geo = GiGaInputStream( ” Geo ”, ConversionSvcName=“GiGaGeo”, DataProviderSvc=‘DetectorDataSvc’, ExecuteOnce=True ) geo.StreamItems += ["/dd/Structure/LHCb/BeforeMagnetRegion/Rich1”] geo.StreamItems += ["/dd/Geometry/BeforeMagnetRegion/Rich1/Rich1Surfaces”] Example from Gauss() List of detectors (elements) to give to model to Geant4 as property of the algorithm Simulation Tutorial - Feb. 2012 - 3Geometry To Geant4

4 Positions and calibrations Detector information varying with time is separate from the geometry structure DetectorElement MuonStation Geometry Info IGeometryInfo Specific detector description LVolume PVolume Solid ISolid Detector Description Geometry IDetectorElement ILVolume Solid SolidBox IPVolume * info about misalignment GiGaLVolumeCnv convert to G4 all its geometry tree with their positions GiGaDetectorElementCnv only called when given as StreamItems position as given in geometry tree Same geometry tree exists in G4 Material Alignment Exploited in a 1 to 1 mapping when passing the information to G4 Simulation Tutorial - Feb. 2012 4Geometry To Geant4

5 Positions and misalignment To take into account the misalignment from the DetectorElement take the geometry information from it instead of the Physical Volume but… There must be a single one-to-one correspondence between a PhysicalVolume and a DetectorElement Children are positioned with respect to their parents and it is not possible to take into account misalignment of both parent and child volume automatically Must pass all detectors (elements) to misalign as options of Geo.StreamItems Also pass all geometry at the same level to what needs to be misaligned CloseVelo SemiOpenVelo OpenVelo Simulation Tutorial - Feb. 2012 5Geometry To Geant4

6 LHCb predefined geometries The standard configuration of the LHCb detector to model is predefined in the Gauss() configurable The standard detectors can be switched on/off via Gauss() It provides internal checking and takes care of special cases as when geometry changes with databases - 6Geometry To Geant4 Simulation Tutorial - Feb. 2012 from Configurables import Gauss print Gauss() -DetectorGeo = {'VELO': ['Velo', 'PuVeto'], 'MUON': ['Muon'], 'TT': ['TT'], 'IT': ['IT'], 'MAGNET': True, 'RICH': ['Rich1', 'Rich2'], 'CALO': ['Spd', 'Prs', 'Ecal', 'Hcal'], 'OT': ['OT']} from Configurables import Gauss print Gauss() -DetectorGeo = {'VELO': ['Velo', 'PuVeto'], 'MUON': ['Muon'], 'TT': ['TT'], 'IT': ['IT'], 'MAGNET': True, 'RICH': ['Rich1', 'Rich2'], 'CALO': ['Spd', 'Prs', 'Ecal', 'Hcal'], 'OT': ['OT']} From python prompt: Gauss().DetectorGeo = {'VELO': ['Velo', 'PuVeto'], 'MUON': [], 'TT': ['TT'], 'MAGNET': True, 'RICH': ['Rich1’], 'IT': ['IT'], 'OT': ['OT’], 'CALO': [],} Gauss().DetectorGeo = {'VELO': ['Velo', 'PuVeto'], 'MUON': [], 'TT': ['TT'], 'MAGNET': True, 'RICH': ['Rich1’], 'IT': ['IT'], 'OT': ['OT’], 'CALO': [],} Switch off everything after the trackers but for beam pipe

7 Not predefined geometry New geometry can be added in the Gauss configurable or for private development adding it directly to the “Geo” algorithm items list Gauss() takes care of consistency but … When switching off geometry make sure you also switch off the corresponding retrieval of hits and monitoring Some infrastructure not yet controllable. A finer granularity will be provided via the Gauss() configurable 7Geometry To Geant4 Simulation Tutorial - Feb. 2012 Gauss().DetectorSim = {'VELO': ['Velo', 'PuVeto'], 'TT': ['TT'], 'MAGNET': True, 'RICH': ['Rich1’], 'IT': ['IT'], 'OT': ['OT’], 'CALO': [], 'MUON': []} Gauss().DetectorMoni = … Gauss().DetectorSim = {'VELO': ['Velo', 'PuVeto'], 'TT': ['TT'], 'MAGNET': True, 'RICH': ['Rich1’], 'IT': ['IT'], 'OT': ['OT’], 'CALO': [], 'MUON': []} Gauss().DetectorMoni = … geo = GiGaInputStream( ” Geo ”) geo.StreamItems.remove(‘/dd/Structure/MagnetRegion/PipeInMagnet’) geo = GiGaInputStream( ” Geo ”) geo.StreamItems.remove(‘/dd/Structure/MagnetRegion/PipeInMagnet’) Must be switched off via “Geo” algorithm

8 Not standard behavior In some cases the checks in Gauss() prevent changing things if you know what you are doing you can force the behavior 8Geometry To Geant4 Simulation Tutorial - Feb. 2012 def wholeVeloGeometry(): from Configurables import GiGaInputStream geo = GiGaInputStream('Geo') geo.StreamItems += ["/dd/Structure/LHCb/UpstreamRegion/Velo"] appendPostConfigAction(wholeVeloGeometry) def wholeVeloGeometry(): from Configurables import GiGaInputStream geo = GiGaInputStream('Geo') geo.StreamItems += ["/dd/Structure/LHCb/UpstreamRegion/Velo"] appendPostConfigAction(wholeVeloGeometry) To be done with extreme care!! And only as a last resort!!

9 Checking! Always check what you are doing! 9Geometry To Geant4 Simulation Tutorial - Feb. 2012 gaudirun.py –n –v $DECFILESROOT/options/52210050.py $LBPGUNSROOT/options/PGuns.py MyOwnOptions.py $GAUSSOPTS/GaussJob.py gaudirun.py –n –v $DECFILESROOT/options/52210050.py $LBPGUNSROOT/options/PGuns.py MyOwnOptions.py $GAUSSOPTS/GaussJob.py Does not execute the job Shows the full python configuration 'Geo': {'ConversionSvcName': 'GiGaGeo', 'DataProviderSvcName': 'DetectorDataSvc’, ‘ExecuteOnce': True, 'StreamItems': ['/dd/Structure/LHCb/DownstreamRegion/PipeDownstream', … '/dd/Structure/LHCb/BeforeMagnetRegion/Velo/VacTank', '/dd/Structure/LHCb/BeforeMagnetRegion/Velo/VeloRight/RFFoilRight', '/dd/Structure/LHCb/BeforeMagnetRegion/Velo/VeloLeft/RFFoilLeft', '/dd/Structure/LHCb/BeforeMagnetRegion/Velo']}, 'Geo': {'ConversionSvcName': 'GiGaGeo', 'DataProviderSvcName': 'DetectorDataSvc’, ‘ExecuteOnce': True, 'StreamItems': ['/dd/Structure/LHCb/DownstreamRegion/PipeDownstream', … '/dd/Structure/LHCb/BeforeMagnetRegion/Velo/VacTank', '/dd/Structure/LHCb/BeforeMagnetRegion/Velo/VeloRight/RFFoilRight', '/dd/Structure/LHCb/BeforeMagnetRegion/Velo/VeloLeft/RFFoilLeft', '/dd/Structure/LHCb/BeforeMagnetRegion/Velo']}, Snippet of what would you see if you only use what in previous page It is probably NOT what you want...


Download ppt "LHCb Simulation Tutorial CERN, 21 st -22 nd February 2012 01 10 100 111 01 1 01 01 00 01 01 010 10 11 01 00 B 00 l e How to pass a detector geometry to."

Similar presentations


Ads by Google