Module to generate particles created by radiological decay, patterned off of SingleGen
.
More...
Public Member Functions | |
RadioGen (fhicl::ParameterSet const &pset) | |
Private Types | |
typedef int | ti_PDGID |
typedef double | td_Mass |
Private Member Functions | |
void | produce (art::Event &evt) |
void | beginRun (art::Run &run) |
std::size_t | addvolume (std::string const &volumeName) |
void | SampleOne (unsigned int i, simb::MCTruth &mct) |
Checks that the node represents a box well aligned to world frame axes. More... | |
TLorentzVector | dirCalc (double p, double m) |
void | readfile (std::string nuclide, std::string const &filename) |
void | samplespectrum (std::string nuclide, int &itype, double &t, double &m, double &p) |
void | Ar42Gamma2 (std::vector< std::tuple< ti_PDGID, td_Mass, TLorentzVector >> &v_prods) |
void | Ar42Gamma3 (std::vector< std::tuple< ti_PDGID, td_Mass, TLorentzVector >> &v_prods) |
void | Ar42Gamma4 (std::vector< std::tuple< ti_PDGID, td_Mass, TLorentzVector >> &v_prods) |
void | Ar42Gamma5 (std::vector< std::tuple< ti_PDGID, td_Mass, TLorentzVector >> &v_prods) |
double | samplefromth1d (TH1D &hist) |
template<typename Stream > | |
void | dumpNuclideSettings (Stream &&out, std::size_t iNucl, std::string const &volumeName={}) const |
Prints the settings for the specified nuclide and volume. More... | |
std::pair< double, double > | defaulttimewindow () const |
Returns the start and end of the readout window. More... | |
Private Attributes | |
std::vector< std::string > | fNuclide |
List of nuclides to simulate. Example: "39Ar". More... | |
std::vector< std::string > | fMaterial |
List of regexes of materials in which to generate the decays. Example: "LAr". More... | |
std::vector< double > | fBq |
Radioactivity in Becquerels (decay per sec) per cubic cm. More... | |
std::vector< double > | fT0 |
Beginning of time window to simulate in ns. More... | |
std::vector< double > | fT1 |
End of time window to simulate in ns. More... | |
std::vector< double > | fX0 |
Bottom corner x position (cm) in world coordinates. More... | |
std::vector< double > | fY0 |
Bottom corner y position (cm) in world coordinates. More... | |
std::vector< double > | fZ0 |
Bottom corner z position (cm) in world coordinates. More... | |
std::vector< double > | fX1 |
Top corner x position (cm) in world coordinates. More... | |
std::vector< double > | fY1 |
Top corner y position (cm) in world coordinates. More... | |
std::vector< double > | fZ1 |
Top corner z position (cm) in world coordinates. More... | |
bool | fIsFirstSignalSpecial |
int | trackidcounter |
Serial number for the MC track ID. More... | |
std::vector< std::string > | spectrumname |
std::vector< std::unique_ptr < TH1D > > | alphaspectrum |
std::vector< double > | alphaintegral |
std::vector< std::unique_ptr < TH1D > > | betaspectrum |
std::vector< double > | betaintegral |
std::vector< std::unique_ptr < TH1D > > | gammaspectrum |
std::vector< double > | gammaintegral |
std::vector< std::unique_ptr < TH1D > > | neutronspectrum |
std::vector< double > | neutronintegral |
CLHEP::HepRandomEngine & | fEngine |
Module to generate particles created by radiological decay, patterned off of SingleGen
.
The module generates the products of radioactive decay of some known nuclides. Each nuclide decay producing a single particle (with exceptions, as for example argon(A=42)), whose spectrum is specified in a ROOT file to be found in the FW_SEARCH_PATH
path, and it can be a alpha, beta, gamma or neutron. In case multiple decay channels are possible, each decay is stochastically chosen weighting the channels according to the integral of their spectrum. The normalization of the spectrum is otherwise ignored.
Nuclides can be added by making the proper distributions available in a file called after the name used for it in the Nuclide
configuration parameter (e.g 14C.root
if the nuclide key is 14C
): check the existing nuclide files for examples.
A special treatment is encoded for argon(A=42) and radon(A=222) (and, "temporary", for nichel(A=59) ).
Decays happen only in volumes specified in the configuration, and with a rate also specified in the configuration. Volumes are always box-shaped, and can be specified by coordinates or by name. In addition, within each volume decays will be generated only in the subvolumes matching the specified materials.
X0
, Y0
, Z0
, X1
, Y1
, Z1
(lists of real numbers, optional): if specified, they describe the box volumes where to generate decays; all lists must have the same size, and each entry i
defines the box between coordinates (X0[i], Y0[i], Z0[i])
and (X1[i], Y1[i], Z1[i])
expressed in world coordinates and in centimeters;Volumes
(list of strings, optional): if specified, each entry represents all the volumes in the geometry whose name exactly matches the entry; the volumes are added after the ones explicitly listed by their coordinates (configuration parameters X0
, Y0
, Z0
, X1
, Y1
and Z1
); each volume name counts as one entry, even if it expands to multiple volumes; Volumes
can be omitted if volumes are specified with the coordinate parameters;Nuclide
(list of strings, mandatory): the list of decaying nuclides, one per volume entry; note that each of the elements in X0
(and the other 5 coordinate parameters) and each of the elements in Volumes
counts as one entry, even for entries of the latter which match multiple volumes (in that case, all matching volumes are assigned the same nuclide parameters); since documentation is never maintained, refer to the code for a list of the supported materials; a subset of them is: 39Ar
, 60Co
, 85Kr
, 40K
, 232Th
, 238U
, 222Rn
, 59Ni
and 42Ar
;Material
(list of regular expressions, mandatory): for each nuclide, the name of the materials allowed to decay in this mode; this name is a regular expression (C++ default std::regex
), which needs to match the name of the material as specified in the detector geometry (usually in GDML format); a material is mandatory for each nuclide; if no material selection is desired, the all-matching pattern ".*"
can be used;BqPercc
(list of real numbers, mandatory): activity of the nuclides, in the same order as they are in Nuclide
parameter; each value is specified as becquerel per cubic centimeter;T0
, T1
(list of real values, optional): range of time when the decay may happen, in simulation time; each nuclide is assigned a time range; differently from the other parameters, the list of times can be shorter than the number of nuclides, in which case all the nuclides with no matching time range will be assigned the last range specified; as a specially special case, if no time is specified at all, the time window is assigned as from one readout window (detinfo::DetectorPropertiesData::ReadOutWindowSize()
) before the nominal hardware trigger time (detinfo::DetectorClocksData::TriggerTime()
) up to a number of ticks after the trigger time equivalent to the full simulated TPC waveform (detinfo::DetectorPropertiesData::NumberTimeSamples()
); this makes it a quite poor default, so you may want to avoid it. Definition at line 188 of file RadioGen_module.cc.
|
private |
Definition at line 198 of file RadioGen_module.cc.
|
private |
Definition at line 197 of file RadioGen_module.cc.
|
explicit |
Definition at line 283 of file RadioGen_module.cc.
|
private |
Adds all volumes with the specified name to the coordinates. Volumes must be boxes aligned to the world frame axes.
Definition at line 434 of file RadioGen_module.cc.
|
private |
Definition at line 875 of file RadioGen_module.cc.
|
private |
Definition at line 884 of file RadioGen_module.cc.
|
private |
Definition at line 894 of file RadioGen_module.cc.
|
private |
Definition at line 913 of file RadioGen_module.cc.
|
private |
Definition at line 408 of file RadioGen_module.cc.
|
private |
Returns the start and end of the readout window.
Definition at line 982 of file RadioGen_module.cc.
|
private |
Definition at line 609 of file RadioGen_module.cc.
|
private |
Prints the settings for the specified nuclide and volume.
Definition at line 965 of file RadioGen_module.cc.
|
private |
unique_ptr allows ownership to be transferred to the art::Event after the put statement
Definition at line 415 of file RadioGen_module.cc.
|
private |
Definition at line 626 of file RadioGen_module.cc.
|
private |
Definition at line 838 of file RadioGen_module.cc.
|
private |
Checks that the node represents a box well aligned to world frame axes.
Definition at line 498 of file RadioGen_module.cc.
|
private |
Definition at line 770 of file RadioGen_module.cc.
|
private |
Definition at line 262 of file RadioGen_module.cc.
|
private |
Definition at line 261 of file RadioGen_module.cc.
|
private |
Definition at line 264 of file RadioGen_module.cc.
|
private |
Definition at line 263 of file RadioGen_module.cc.
|
private |
Radioactivity in Becquerels (decay per sec) per cubic cm.
Definition at line 243 of file RadioGen_module.cc.
|
private |
Definition at line 269 of file RadioGen_module.cc.
|
private |
Definition at line 252 of file RadioGen_module.cc.
|
private |
List of regexes of materials in which to generate the decays. Example: "LAr".
Definition at line 242 of file RadioGen_module.cc.
|
private |
List of nuclides to simulate. Example: "39Ar".
Definition at line 241 of file RadioGen_module.cc.
|
private |
Beginning of time window to simulate in ns.
Definition at line 244 of file RadioGen_module.cc.
|
private |
End of time window to simulate in ns.
Definition at line 245 of file RadioGen_module.cc.
|
private |
Bottom corner x position (cm) in world coordinates.
Definition at line 246 of file RadioGen_module.cc.
|
private |
Top corner x position (cm) in world coordinates.
Definition at line 249 of file RadioGen_module.cc.
|
private |
Bottom corner y position (cm) in world coordinates.
Definition at line 247 of file RadioGen_module.cc.
|
private |
Top corner y position (cm) in world coordinates.
Definition at line 250 of file RadioGen_module.cc.
|
private |
Bottom corner z position (cm) in world coordinates.
Definition at line 248 of file RadioGen_module.cc.
|
private |
Top corner z position (cm) in world coordinates.
Definition at line 251 of file RadioGen_module.cc.
|
private |
Definition at line 266 of file RadioGen_module.cc.
|
private |
Definition at line 265 of file RadioGen_module.cc.
|
private |
Definition at line 268 of file RadioGen_module.cc.
|
private |
Definition at line 267 of file RadioGen_module.cc.
|
private |
Definition at line 260 of file RadioGen_module.cc.
|
private |
Serial number for the MC track ID.
Definition at line 253 of file RadioGen_module.cc.