Giter VIP home page Giter VIP logo

g4sbs's Introduction

g4sbs

Build Status

Seamus Riordan
[email protected]
March 11, 2016

Requirements:

  • Geant4 version 10.1 or later
  • cmake >= 3.9
  • root 5.34 (root version 6 strongly recommended; ROOT 5 no longer actively supported at JLab)
  • python
  • git (optional)

For detailed documentation:

See the documentation wiki in the Hall A homepage:

https://hallaweb.jlab.org/wiki/index.php/Documentation_of_g4sbs#Documentation_of_g4sbs:_Overview

Building and running G4SBS

Build using the standard cmake facilities. CTEQ tables built in automatically for DIS If you would like to get on a mail notification list, contact Andrew Puckett ([email protected])

IF YOU ARE DOING DEVELOPMENT, PLEASE DO NOT WORK IN THE master BRANCH

You need the BigBite field map for this as well, which can be found

http://hallaweb.jlab.org/12GeV/SuperBigBite/downloads/map_696A.dat

To build immediately after cloning (not in g4sbs/), create a local "build" directory parallel to the source directory. You can run g4sbs directly in the build folder.

mkdir build
cd build
cmake ../g4sbs
#  see below if you get an error about old versions
make

To run:

./g4sbs run_example.mac

run_example.mac demonstrates most of the features by example

NOTE: On the JLab farm, a newer version of cmake is available
So, if it complains about being too old, try:

/apps/cmake/bin/cmake ../g4sbs  

#########################################################

Coordinate systems in hall:

+z is down the nominal beam axis
+y is "up" (away from gravity)
+x makes a right handed coordinate system

Coordinate systems for detectors:

+z is nominally down the "central axis" in the particle direction
+x is "down" (into the floor)
+y makes a right handed coordinate system

#########################################################

Hits in the GEM chambers have tracking performed on them doing straight line fits with resolutions.

At the moment tracking is done in a very dumb way for simplicity!
It will end up averaging all the hits together if there is more than one track. It would be wise to ensure that tr.nhit <= 4

ROOT file output structure:

ev.*  
  count # Counts given the beam time/luminosity  
  rate # Counts per second given luminosity  
  solang # Integrating over this variable will give solid angle   
  sigma # Cross section [cm^-2]  
  W2 # Invariant mass squared [GeV^2]  
  xbj # Bjorken-x  
  Q2 # Q2 [GeV^2]  
  th # Polar angle of electron with zaxis [rad]  
  ph # Azimuthal angle of electron with zaxis [rad]  
  Aperp # perp component of asymmetry  
  Apar  # parallel component of asymmetry  
  vx,y,z # Vertex position [cm]  
  ep # Scattered electron momentum [GeV]  
  np # Scattered nucleon momentum [GeV]  
  epx,y,z Lab components of electron momentum  [GeV]  
  npx,y,z Lab components of nucleon momentum  [GeV]  
  nth  # Polar angle of nucleon wrt z-axis [rad]  
  nph     Azimuthal angle of nucleon wrt z-axis [rad]  
  pmperp # Missing momentum perp-component [GeV]  
  pmpar  # Missing momentum par-component [GeV]  
  nucl # Nucleon when scattering type, 0 for neutron, 1 for proton  
  fnucl # Final nucleon type (pion prod may change flavor), 0 for neutron, 1 for proton  

tr.*
  x # Track x coordinate intercept with z= 0 plane [m]
  y # Track y coordinate intercept with z= 0 plane [m]
  xp # Track dx/dz
  yp # Track dy/dz
  tx,ty,typ,txp
   # "True" track variables defined by track projection at first chamber
  hcal # 0 if no hit in HCAL,  1 if hit
  bb # 0 if no hit in BB cal, 1 if hit
  gemtr # 0 if no track found in GEMs, 1 if track found
  hcx # HCAL x hit position [cm]
  hcy # HCAL y hit position [cm]
  bcx # BB cal x hit position [cm]
  bcy # BB cal y hit position [cm]
  hct # HCAL time-of-flight [ns]
  hctex # HCAL expected time-of-flight from momentum-transfer [ns]
  hclx,y,z
   # HCAL hit position in lab coordinates [cm]
  hcdang # HCAL angular difference between q and nucleon p [rad]

gen.*
  thbb # BigBite angle [rad]
  thhcal # HCAL angle [rad]
  dbb # BigBite distance from target [m]
  dhc # HCAL distance from target [m]
  Ebeam # Beam energy [GeV]

ht.*
  ndata # Number of hits in ht.* array
  gid # GEM ID (counting starts at 1)
  x,y,z # GEM hit position (incl. resolution effects) [m]
  dx,dy # dx/dz and dy/dz of track at hit
  tx,ty # "True" GEM hit position (perfect resolution) [m]

g4sbs's People

Contributors

ajpuckett avatar dflay avatar efuchey avatar freddyox avatar freddyoxx avatar leadmocha avatar seamusriordan avatar sebastianseeds avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

g4sbs's Issues

ROOT 6 compatibility

Before too long, we will need to modify g4sbs to be compatible with ROOT 6. The only aspect of the code causing issues right now is the "G4SBSRunData" class that stores the run metadata in the output ROOT file.

Radiative/Multiple Scattering Effects

Radiative and multiple scattering effects needs to be included. Probably should be done with a volume vector that can be added to as components get added in DetectorConstruction

GEANT4 Multithreading

We would eventually like to make the g4sbs code capable of running in Multi-threaded mode. This is essential for the future and for large-scale simulations on the JLab batch farm. Given that the memory consumption of GEANT4 is so large, running g4sbs single-threaded is actually very inefficient even on the batch farm, because the farm nodes are configured at 32 GB RAM for 24 cores; i.e., 1.5 GB per core.

Macros executed by /control/execute not stored in rootfile

If a user creates a macro that then executes another macro via the /control/execute command, the other macro does not get stored in the ROOT file.

Since the purpose is to keep track of the entire state in which G4SBS was called, then the contents of the external script should also be included in the ROOT file.

Use flags to build geometry instead of relying on experiment name

Right now we have a few scattered conditionals that check for some experiment names to decide what to build. But these are scattered across the different source files.

I think we should, instead, make flags that get configured in just one file. Ex:

if (kGEp) {
fBuild48D48 = true;
fBuildTargetSnout = true;
// ...
} else if (kGMn) {
fBuild48D48 = true;
fBuildTargetSnout = false;
// ...
}

That way, all the settings are in one file, and can be re-configured much quicker and hopefully, with less errors.

Output Compatible with INFN GEM simulation

The INFN GEM simulation that provided rates from before provided output in a specific way so hits could be digitized. This code should have a separate tree which can be used with this.

Port event generators to remoll style

This requires a full re-write of the generator system as well as incorporating the quasielastic information. A beam/target class like remoll also needs to be implemented (and set in the detector construction).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.