gemc / source

gemc website:
gemc.jlab.org
14 stars 72 forks source link

Where the generated track are merged #238

Closed yangshiyan closed 3 months ago

yangshiyan commented 3 months ago

Dear developers: I noticed that the option MERGE_LUND_BG can be used to merge tracks from background file “filename”: -MERGE_LUND_BG="filename" However, I didn't find the corresponding implementation function and process. Can you tell me which function is used to implement this process? I'm more curious about the implementation of this process。 Thank you very much. Best regards.

maureeungaro commented 3 months ago

Hello:

The implementation is done in src/MPrimaryGeneratorAction.cc starting at line 790.

In general, to use this, you would first run gemc to produce background, with option SAVE_ALL_MOTHERS=3, so that any particle that produces a hit is saved in the LUND file.

This first step is the one that could take a significant amount of time, and the MERGE_LUND_BG options allow one to use these saved particles to produce a background instantly.

Let me know if this helps!

Mauri

yangshiyan commented 3 months ago

I understand, thank you very much.