C++ Stand-alone library for Merging, Digitizing, and Triggering hits of photomultiplier tubes (PMTs) based on WCSim. A Python interface is optionally provided, requiring pre-installation of pybind11.
The library provides C++ classes that manage three tasks:
- Merging true hits (simulated photoelectrons by WCSim) of an events with those of any number of events
- Intrinsic dark noise can be added during this stage
- Digitizing true hits
- Timing and charge of a digitized hit is simulated by a simple model used in WCSim
- The library is capable of accomodating alternative models
- Parameters describing PMT charcteristics such as timing resolution can be varied
- Digitized hits by PMT afterpusing can be added
- Triggering digitized hits
- A simple algorithm that counts number of digitized hits falling in a sliding time winodw
- Selectable trigger window and thershold
Simple runtime procedures. First set up your ROOT and WCSIM:
source your_thisroot.sh
export WCSIMDIR=your_WCSIM_installation
If libWCSimRoot.so
is not directly under WCSIMDIR
, export to WCSIMROOTDIR
.
export WCSIMROOTDIR=your_libWCSimRoot.so_installation
Then set up the MDT environment.
source envMDT.sh
cd $MDTROOT/cpp; make clean; make all
cd $MDTROOT/app/utilities/WCRootData; make clean; make all
cd $MDTROOT/app/application; make clean; make all
cd $MDTROOT
# edit variables properly in run_test_mdt4wcte.sh
bash run_test_mdt4iwcd.sh
Essentially the same usage but with OD support.
# edit variables properly in run_test_mdt4iwcd.sh
bash run_test_mdt4iwcd.sh
Example usage
$MDTROOT/app/application/appGenPileUpSpill $MDTROOT/example/genPileUpConfig.txt
The application generates pile-up events by combining ID neutrino interaction events and beam background events in a spill.
Input variables are:
ListIDNuIntFiles
,ListBeamBkgFiles
: list of WCSim output files for the ID and background eventsOutFileNamePrefix
: output file name will be something like "OutFileNamePrefix".00000.rootMDTParFile
: MDT config fileInitialSeed
: Random seedIDNuIntRate
,BeamBkgRate
: Mean number of ID and background events per spill. In each spill, the actual number of interactions are drawn from a Poisson distribution, and interaction timing according to the bunch structure (seeBeamTiming
class underapp/utilities/WCRootData/
)UseOD
: Process OD hitsNumOfSpillsSavedPerFile
,TotalNumOfSpills
: output spill setup