# Simulate Tracks

# Line charge simulation

To start with an easy example, let's simulate an ideal-line charge in the protoDUNE-SP TPC.

wire-cell -c pgrapher/experiment/pdsp/wct-sim-check.jsonnet
1

The configuration is available here (opens new window). It is also possible to simulate multiple line charges. For instance, two line charges are simulated in the following example. The charge deposition is set to 2500 electrons per step, and the step length is set to 0.5mm. Therefore, it mimics two MIP tracks with charge deposition of ~5000 e/mm.

local cathpier = {
  tail: wc.point(-113, 585, 409, wc.cm),
  head: wc.point( 118,  24, 269, wc.cm),
};

local parallel = {
  tail: wc.point(-1.000, 3.0, 1.000, wc.m),
  head: wc.point(-1.000, 3.0, 2.000, wc.m),
};

local tracklist = [

  {
    time: 0 * wc.us,
    charge: -2500, // 2500 electrons/depo
    ray: cathpier,
  },
  {
    time: 0 * wc.us,
    charge: -2500,
    ray: parallel,
  },
]

local depos = sim.tracks(tracklist, step=0.5 * wc.mm);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

By runing the example configuration (wct-sim-check.jsonnet), a Magnify file is obtained. In this example, given the line-charge (electron) depositions in the space and time, the Wire-Cell core simulation is carried out. While more complicated simulations will be introduced below such as userdefined electron depos and realistic charge depos from Geant4 detector simulation.

# Userdefined charge deposition (in JSON format)

To be updated.

# Geant4-simulated charge deposition (LArSoft interface)

# Step 1: Generator

lar -n1 -c gen_protoDune_pion_7p0GeV_mono.fcl
1

You can get an output file with name similar to gen_protoDune_pion_7p0GeV_mono.root. Through eventdump, one can see that the generator information is saved in simb::MCTruth.

Begin processing the 1st record. run: 1 subRun: 0 event: 1 at 13-Aug-2019 13:47:55 EDT
PRINCIPAL TYPE: Event
PROCESS NAME | MODULE LABEL.. | PRODUCT INSTANCE NAME | DATA PRODUCT TYPE............ | SIZE
SinglesGen.. | generator..... | ..................... | std::vector<simb::MCTruth>... | ...1
SinglesGen.. | rns........... | ..................... | std::vector<art::RNGsnapshot> | ...1
SinglesGen.. | TriggerResults | ..................... | art::TriggerResults.......... | ...-
1
2
3
4
5
6

# Step 2: Geant4

lar -n1 -c pgrapher/experiment/pdsp/Quickstart/protoDUNE_g4_wirecell.fcl gen_protoDune_pion_7p0GeV_mono.root
1

The Geant4 simulation above requires a photon library data file in a special CVMFS repository (/cvmfs/dune.osgstorage.org/pnfs/fnal.gov/usr/dune/persistent/stash/PhotonPropagation/LibraryData/lib_Protodunev7.root). You have two options to access.

  1. Configure the proxy for dune.osgstorage.gov by following the instruction in Install CVMFS
  2. Download the PhotonPropagation.tar.gz (opens new window), unpack it and set the environment properly to make the directory PhotonPropagation available to LArSoft. For example,
export FW_SEARCH_PATH=$(pwd):$FW_SEARCH_PATH
1

Once the simulation accomplished, you can dump the event information for the output file gen_protoDune_pion_7p0GeV_mono_g4.root. Here, the G4:ionization:vector<sim::SimEnergyDeposit> is the data product we want to pass to the Wire-Cell simulation.

Begin processing the 1st record. run: 1 subRun: 0 event: 1 at 13-Aug-2019 13:26:38 CDT
PRINCIPAL TYPE: Event
PROCESS NAME | MODULE LABEL.. | PRODUCT INSTANCE NAME | DATA PRODUCT TYPE.................................................... | .SIZE
SinglesGen.. | generator..... | ..................... | std::vector<simb::MCTruth>........................................... | ....1
SinglesGen.. | rns........... | ..................... | std::vector<art::RNGsnapshot>........................................ | ....1
SinglesGen.. | TriggerResults | ..................... | art::TriggerResults.................................................. | ....-
G4.......... | largeant...... | ..................... | std::vector<sim::OpDetBacktrackerRecord>............................. | ...60
G4.......... | rns........... | ..................... | std::vector<art::RNGsnapshot>........................................ | ....2
G4.......... | largeant...... | Other................ | std::vector<sim::SimEnergyDeposit>................................... | .1168
G4.......... | TriggerResults | ..................... | art::TriggerResults.................................................. | ....-
G4.......... | largeant...... | ..................... | std::vector<simb::MCParticle>........................................ | .2086
G4.......... | largeant...... | ..................... | std::vector<sim::AuxDetSimChannel>................................... | .2048
G4.......... | largeant...... | TPCActive............ | std::vector<sim::SimEnergyDeposit>................................... | 90236
G4.......... | ionization.... | ..................... | std::vector<sim::SimEnergyDeposit>................................... | 90236
G4.......... | largeant...... | ..................... | art::Assns<simb::MCTruth,simb::MCParticle,sim::GeneratedParticleInfo> | .2086
G4.......... | largeant...... | ..................... | std::vector<sim::SimChannel>......................................... | .4010
G4.......... | largeant...... | ..................... | std::vector<sim::SimPhotonsLite>..................................... | ...60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

# Step 3: Wire-Cell electron drift simulation

lar -n1 -c pgrapher/experiment/pdsp/Quickstart/wcls-sim-check.fcl gen_protoDune_pion_7p0GeV_mono_g4.root
1

Please check if you can see the raw digit information in the output file: gen_protoDune_pion_7p0GeV_mono_g4_wcsim.root.

wclssim..... | tpcrawdecoder. | daq.................. | std::vector<raw::RawDigit>........................................... | 15360
1

# Step 4: Noise filtering, signal processing and 3D imaging

With the std::vector<raw::RawDigit> obtained above, the noise filtering/signal processing and 3D imaging can be performanced in order.

lar -n1 -c pgrapher/experiment/pdsp/wcls-nf-sp.fcl gen_protoDune_pion_7p0GeV_mono_g4_wcsim.root
1

Here is the 2D display of the deconvolved charge for the above 7-GeV pion interaction. protoDune-pion-7p0GeV

Last Updated: 8/30/2019, 10:49:43 PM