SLAC PEP-II
BABAR
SLAC<->RAL
Babar logo
HEPIC E,S & H Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Unwrap page!
Search
Who's who?
Meetings
FAQ
Images
Archive
Operations
Sub-systems
Drift chamber
DCH Simulation
  Help needed
News
  Discussions
  Meetings
  Releases
bbsim code
  DchSimGeom
  DchSimGeom guide
Digitization code
  DchSim
De/dx code
  dE/dx in the simulation
Dch Database
  Conditions db
Geant4 framework codes
  BgsDchSim
  DchBgsModules
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

Bogus - Babar Object-Oriented Geant-based Unified Simulation
 
BgsDchSim
 
(Caterina Perri, Ernesto Lamanna)
   

This package contains different models for the Drift Chamber fast simulation.

The model can be switched in workdir/bogusrun.db using different strings:
 

  • "fast-cylinder"

  • This is the original model and consist of a single cylinder.
     
  • "cylinder"

  • This model describes the chamber as differents cylindrical volumes and contains a detailed description of the materials. 
    These volumes are:
    •  DCHA: Main drift chamber volume that contains:
        • - DCHG: Sensitive volume containing gas
        • - DCHO: Outer wall
        • - DCHI: Inner wall
        • - DCRP: Rear plate
        • - DCFP: Front plate

        •  
  • "layer"

  • This model contains the same volumes of "cylinder" one, but the DCHG volume is subdivided in more 40 volumes, one for each layer.
     
    • DCHA:
        • - DCHG: gas volume contains in this model:
            •   ->DL01, DL02 ...... DL40
        • - DCHO
        • - DCHI
        • - DCRP
        • - DCFP
For all these models the geometry is retrieved from the dbio file dch.db that is the file included in DchSimGeom (bbsim).
 

The classes included in this package are listed here, each one contains several function that are
briefly commented out.
To get more information you can look up at the header file of the specific class.

There are at the moment some functions that are duplicated because hype are not available, so the code is prepared to work with this new volume, but ready to work with G4Tubs and cylindrical geometry of the chamber.

This package is going to be tested to work with the downstream module DchBgsModules working with Andrei's BgsFwkModule.
 
The hits are stored in the hit collection _layerHC (data member of BgsDchLayerSD) and are declared in BgsDchLayerSD at the end of the event.

The collected parameters for "layer" model in the hit are:

    •  
       
      Number Information Name Type
      1 X  point of intersection (track - layer surface containing the sense wires)  _xPosition G4double
      2 Y point of intersection (track - layer surface containing the sense wires)  _yPosition G4double
      3 Z point of intersection (track - layer surface containing the sense wires ) _zPosition G4double
      4 px at the intersection point _px G4double
      5 py at the intersection point _py G4double
      6 pz at the intersection point _pz G4double
      7 layer number _layer G4int
      8 cell number _cell G4int
      9 particle id _particlePDG G4int
      10  track number _track G4int
      11 path between two layer surface intersactions _path G4double
      12 energy loss _energyLoss G4double
      13 Number of crossed radiation length _crossedRadLeng G4double
      14 Distance of the intersaction point from the sense wire (on the layer surface) _wireDistance G4double
      15 Intrinsic Resolution _resolution G4double
       

 
 
 
 


Classes and Functions

  • Common classes  for all models:
    • BgsDch:

    • Detector model manager. This class inherits from BgsVSubdetector.
        • getModel()                       [method instantiates one of the models]
     
    • BgsDchDescription:

    • Describes the models used in the simulation.
        • BgsDchDescription()
        • ~BgsDchDescription()
        • selectModel(const G4String& name)  [selecting different models]
       
    • BgsDchGeom:

    • DCH geometry description for Bogus, it contains several member function to define materials and to describe the geometry.
        • BgsDchGeom()
        • ~BgsDchGeom()
        • makeDchMaterial( const G4String& name )
        • getDchMaterial( const G4String& name )
        • makeDchMixture (const G4String& name)
        • getDchVolPosition ( G4String name )
        • getDchVolParameters ( G4String name )
        • getMatFromVolume ( G4String name )
        • getDchTube ( G4String name )
        • getDchHype ( G4int layer, const G4String& name )
        • getDchBox ( const G4String& name )
        • getShape( const G4String& name ) {
        • getDchRot( const G4String& name )
        • chLength(G4String name)
        • GetCylEnvelope( G4double* rin, G4double* rout, G4double* zlo,G4double* zhi)
        • Dump()
         
    • BgsDchHC:

    • Abstract class to describe Hit Collection object, from this class are derived the class that describe Hit Collections for the different models.
      This class inherits from G4VHitsCollection.
       
        • BgsDchHC(G4String aName, G4VSensitiveDetector* theSD) : G4VHitsCollection
        • ~BgsDchHC()
    • BgsDchWire

    • Wire abstract class.
      Its data members are common characteristics for each kind of wire (field or sense).
        • BgsDchWire()
        • BgsDchWire(G4double layer)
        • BgsDchWire(const BgsDchWire &right)
        • ~BgsDchWire()
        • findCell(G4double zPoint, G4double phiPoint)
        • Equation()
        • distanceVectWire(G4double& vectDir, G4double& wirDir)
        • rEndPlate(){}
        • phiEndPlate()
        • twistEndPlate()
         
    • BgsDchSenseWire

    • Describing Sense Wire object. This class is derived from BgsDchWire.
        • BgsDchSenseWire() : BgsDchWire()
        • BgsDchSenseWire(const BgsDchSenseWire &right)
        • ~BgsDchSenseWire()
        • setLayer(G4int Layer)
        • phiEndPlate(G4double zpoint)
        • findCell(G4double zPoint, G4double phiPoint)
        • findAxialCell( G4double phiPoint)       [this is one of the "duplicated functions" taking into account the fact that we are working only with axial wires, so the algorithm is different from the case of stereo wires]
        • Equation()
        • distanceVectWire(G4double vectdir[6])
        • distanceIntersectionWire(G4double xPoint, G4double yPoint,
        • distanceIntersectionAxialWire(G4double xPoint, G4double yPoint, G4int cell)

        • [another "duplicated function"]
        • sigmaCalibration(G4double distance)
        • dipLayer(G4double x, G4double y, G4double z, G4double stereo)
         
  • Submodels classes:
    • BgsDchFastCylinder:

    • Build "fast-cylinder" model geometry.
        • BgsDchFastCylinder() : BgsVModel("DCH","cylinder")
        • ~BgsDchFastCylinder()
     
    • BgsDchCylinder:

    • Build "cylinder" model geometry posizioning each logical volume into the mother volume and making physical volumes.
        • BgsDchCylinder() : BgsVModel("DCH","cylinder")
        • ~BgsDchCylinder()
        • DchMakeDCHA()
        • DchMakeDCFP()
        • DchMakeDCRP()
        • DchMakeDCHI()
        • DchMakeDCHO()
        • DchMakeDCHG()
        • getLogicalVolume( G4String nameMother )
        • DchMakeVol(G4String nameDaughter,G4String nameMother)
        • DchMakeCylinderSD()     [setting DCHG as sensitive volume]
        • get_SDMpointer();
     
    • BgsDchCylinderSD:

    • Definition of the sensitive detector.
        • BgsDchCylinderSD(G4String name) : G4VSensitiveDetector(name)
        • ~BgsDchCylinderSD()
        • initialize()
        • processHits(G4Step* aStep)

        • [method invoked by G4SteppingManager when a step has started in the sensitive volume.]
        • getTransportationManager()
        • endOfEvent(G4HCofThisEvent*HCE)                    [finish collecting hits.]
        • clear()
        • drawAll()
        • printAll()
     
    • BgsDchCylinderHit:

    • Definition of the hit structure. At the moment this model is not used to collect hits information, but in this way the structure to be filled is ready.
        • BgsDchCylinderHit()
        • ~BgsDchCylinderHit()
        • BgsDchCylinderHit(const BgsDchCylinderHit &right)
        • print()
        • printfile()
        • draw()
         
    • BgsDchCylinderHC:

    • Definition of the hit collection. This class is derived from BgsDchHC.
        • BgsDchCylinderHC() : BgsDchHC(aName, theSD)
        • BgsDchCylinderHC(G4String aName, G4VSensitiveDetector* theSD)
        • ~BgsDchCylinderHC()
        • drawAllHits()
        • printAllHits()
     
    • BgsDchLayers:

    • Build "layer" model geometry. Here is invoked the class BgsDchCylinder to build "cylinder" geometry and then 40 more volumes are added into DCHG.
        • BgsDchLayers() : BgsVModel("DCH","layer")
        • ~BgsDchLayers()
        • DchMakeLayersSD()
     
    • BgsDchLayerSD:

    • Definition of the sensitive detector. Each of the 40 layers is set as a sensitive volume.
      This class is derived from G4VSensitiveDetector.
        • BgsDchLayerSD(G4String name) : G4VSensitiveDetector(name)
        • ~BgsDchLayerSD()
        • initialize()
        • processHits(G4Step* aStep)

        • [method invoked by G4SteppingManager when a step has started in the sensitive volume]
        • getTransportationManager()
        • endOfEvent(G4HCofThisEvent*HCE)         [finish collecting hits.]
        • clear()
        • drawAll()
        • printAll()
     
    • BgsDchLayerHit:

    • Definition of the hit structure.
      The data members of this class are the information to be stored in the hit.
        • BgsDchLayerHit()
        • ~BgsDchLayerHit()
        • BgsDchLayerHit(const BgsDchLayerHit &right)
        • print()
        • printfile()
        • draw()
     
    • BgsDchLayerHC:

    • Definition of the hit collection.
        • BgsDchLayerHC() : BgsDch (aName, theSD)
        • BgsDchLayerHC(G4String aName, G4VSensitiveDetector* theSD)
        • ~BgsDchLayerHC()
        • drawAllHits()
        • printAllHits()
     
 
 Caterina Perri

Last modified: Wed Apr 29 12:53:53 METDST