Preparing the detector geometry - ATTPC/ATTPCROOTv2 Wiki

Creating detectors

There are a number of scripts in geometry/ for building detector geometries. Each of these output two root files that are then passed to the simulation code. In these script files, all of the materials of the detector can be changed including the gas in the attpc, and window material. If the ion chamber or some other detector is present those can also be added.

The file ATTPC_v1_2.C has the basic geometry for the full sized TPC. The file ATTPC_Proto_v1_0.C has the basic geometry for the pATTPC. Both of these files are pretty self explanatory if opened.

To generate the root files that will be used for the physics simulation just run the macro root ATTPC_v1_2.C. If the compilation is successful, the RunEve window will appear with the detector cylinder without producing errors in the code. Two files should have been created: ATTPC_v1.2.root, ATTPC_v1.2_geomanager.root. The simulation macros will look in the geometry/ folder for these files.

Adding materials

Each material that can be used in a detector is defined in the global file geometry/media.geo. If you would like to add any new materials, it can be done in that file. The header has detailed instructions for adding new materials.