Skip to content

Commit a3c51cc

Browse files
committed
Update README
1 parent 4b60f01 commit a3c51cc

1 file changed

Lines changed: 44 additions & 5 deletions

File tree

sbndcode/OpDetAnalyzer/PDSAnalyzer/README.md

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
# Overview
22

3-
# OpDetAnalyzer
3+
SBNDPDSAnalyzer is an art::analyzer that saves useful information for PDS MC/reco studies at different stages of the simulation:
4+
- Gen: MCTruth
5+
- G4: MCParticles and deposited energy
6+
- Detsim: OpDetWaveforms
7+
- Reco1: deconvolved waveforms, OpHits and OpFlashes
8+
- Reco2: flash matchers scores (SimpleFlash and OpT0Finder) and CRUMBS score
9+
10+
Two TTrees are created:
11+
- PDSMapTree: Creates a tree with the optical channel IDs, position (X, Y and Z in cm) and the photon detector type (0: CoatedPMT, 1: UncoatedPMT, 2: VUV XARAPUCA and 3: VIS XARAPUCA).
12+
- OpAnaTree: TTree with the analysis variables (described below). Each entry in the TTree corresponds to an event.
13+
- OpAnaPerTrackTree: TTree with the number of SimPhotons produced by each MC particle. Each entry in the TTree corresponds to one MC particle in one event. Requires SimPhotons (not SimPhotonsLite).
14+
15+
Configuration parameters:
16+
- SaveMCTruth, SaveMCParticles, ...: booleans to save different data products at different stages of the simulation/reconstruction chain.
17+
- Verbosity: shows some printous while running the analyzer.
18+
- MakePerTrackTree: option to make a tree with the number of SimPhotons per MCParticle (OpAnaPerTrackTree).
19+
- MakePDSGeoTree: option to dump the PDS mapping in a TTree (PDSMapTree)
20+
- UseSimPhotonsLite: use SimPhotonsLite or SimPhotons (default is true, i.e. use SimPhotonsLite)
21+
- KeepPDGCode: specify what PDG codes will be stored in the TTree from the MCParticle list. If no PDGs are specified, it saves all the MCParticles (default is [], so it saves everything).
22+
- MCTruthOrigin: specify the MCTruth origins that will be saved. Default is [1], i.e. neutrino generated events.
23+
- MCTruthPDG: specify the PDG codes of the candidate vertex particles for the MCTruth. Defaults is [12, -12, 14, -14], i.e. BNB neutrinos.
24+
- PDTypes: vector specifying the PD types for which it will save the SimPhotons (default is ["pmt_coated", "pmt_uncoated"])
25+
26+
# Variables in the TTree
27+
28+
# Variables in the TTree
429

530
### Variables at the particle generation stage
631

@@ -30,12 +55,13 @@
3055

3156
#### Variables regarding the deposited energy
3257

33-
| Branch name | Type | Description |
58+
| Branch name | Type | Description |
3459
|-----------------------------|---------------------------------------------|--------------|
3560
| energydep | std::vector\<std::vector<double\>\> | Energy deposition (in MeV) at each G4 tracking step. It's saved for each MC particle|
3661
| energydepX, energydepY, energydepZ | std::vector\<std::vector<double\>\> | Location (in cm) of each energy deposition. |
3762
| dEpromX, dEpromY, dEpromZ | std::vector<double\> | Average X, Y, Z (in cm) location of the energy depositions. It's saved for the two TPCs (vector size is 2)|
38-
| dEspreadX, dEspreadY, dEspreadZ | std::vector<double\> | X, Y, Z standard deviation of the energy depositions|
63+
| dEspreadX, dEspreadY, dEspreadZ | std::vector<double\> | X, Y, Z standard deviation of the energy depositions. It's saved for the two TPCs (vector size is 2)|
64+
| dElowedges, dEmaxedges | std::vector\<std::vector<double\>\> | (X, Y, Z) coordinates of the lowest (max) energy deposition. It's saved for the two TPCs (vector size is 2)|
3965

4066
Following the previous example, to read the energy deposition values and their locations induced by the primary proton you can take energydep[1], energydepX[1]...
4167

@@ -48,6 +74,7 @@
4874
| SimPhotonsperOpChVIS | std::vector\<double\> | Number of true photons at each PD (visible wavelength)|
4975
| SimPhotonsLiteVUV | std::vector\<std::vector<double\>\> | Photon arrival times at G4 stage (VUV). In ns.|
5076
| SimPhotonsLiteVIS | std::vector\<std::vector<double\>\> | Photon arrival times at G4 stage (VIS). In ns.|
77+
| NPhotons* variables| double | Integrated number of photons in the events per PD type. |
5178

5279
SBND has 312 PDs, hence the size of the SimPhotonsperOpChVUV(VIS) is 312. You can obtain the number of VUV photons reaching the coated PMT with ID 144 by taking SimPhotonsperOpChVUV[144]. The size of the SimPhotonsLiteVUV(VIS) is also 312. Each vector in the 'vector of vecrtors' contains the times (in ns) in which each photon gets to the given PD. Imagine 567 VUV photons reach the coated PMT with ID 144. The size of the vector SimPhotonsLiteVUV[144] will be 567.
5380

@@ -61,7 +88,6 @@
6188

6289
The PMT/XARAPUCA output signals (including electronic response) are stored in the previous vectors. We only save the regions of the waveforms going above a certain thereshold (region of interest or ROIs). The ADC values of each identifeid ROI correspond to an entry in the SignalsDigi "vector of vectors". Note that we may have more than one ROI per PD, so the size of the SignalsDigi branch will be in general different than the number of PDs (312). To get the start time and the channel corresponding to the $i_{th}$ ROI get the StampTime and OpChDigi with index $i_{th}$.
6390

64-
6591
### Variables at the reconstruction stage
6692

6793
#### Deconvolution
@@ -71,15 +97,19 @@ The PMT/XARAPUCA output signals (including electronic response) are stored in th
7197
| StampTimeDeco | std::vector\<double\> | Start time of each digitized waveform (in $\mu s$) |
7298
| OpChDeco | std::vector\<int\> | Associated PD ID |
7399

74-
Same as above, but storing the deconvolved signals.
100+
Same scheme followed, but storing the deconvolved signals instead of the raw waveforms.
75101

76102
#### Pulse finder (a.k.a. OpHits)
77103

104+
It dumps all the reconstructed OpHits in the event.
105+
78106
| Branch name | Type | Description |
79107
|-----------------------------|---------------------------------------------|--------------|
80108
| nophits | int | Total number of reconstructed OpHits |
81109
| ophit_opch | std::vector<int\> | Optical channel corresponding to the reconstructed OpHit |
82110
| ophit_peakT | std::vector<double\> | Waveform bin in which the OpHit gets the maximum value (in $\mu s$) |
111+
| ophit_startT | std::vector<double\>| Start of the OpHit (in $\mu s$) |
112+
| ophit_peakT | std::vector<double\> | OpHit rise time, relative to the StartTime (in $\mu s$) |
83113
| ophit_width | std::vector<double\> | With of the OpHit (in $\mu s$) |
84114
| ophit_amplitude | std::vector<double\> | Amplitude of the OpHit (in ADC units) |
85115
| ophit_area | std::vector<double\> | Area of the OpHit (in $\mu s$ x ADC units) |
@@ -88,6 +118,15 @@ Same as above, but storing the deconvolved signals.
88118

89119
#### Clustering among different PDs (a.k.a. OpFlash)
90120

121+
It dumps all the reconstructed OpFlash in the event and the associated OpHits associated to each OpFlash. Each entry in the following vectors correspond to one OpFlash.
122+
123+
| nopflash | int | Total number of reconstructed OpFlash objects |
124+
| flash_time| std::vector<double\> | t0 of the reconstructed OpFlashes |
125+
| flash_total_pe | std::vector<double\> | Integrated (all optical channels) number of photoelectrons in each OpFlash |
126+
| flash_pe_v | std::vector\<std::vector<double\>\> | Vector containing the reconstructed number of photoelectron in each optical channel for each OpFlash |
127+
| flash_x, flash_y, flash_z | std::vector<double\> | X, Y, Z position of the reconstructed OpFlash |
128+
| flash_ophit_* | std::vector\<std::vector<double\>\> | Save the attributes of the OpHits associated to each OpFlash |
129+
91130
#### Legend
92131
- PD: Photon Detector
93132
- PE: Photoelectron

0 commit comments

Comments
 (0)