17 #include <initializer_list>
22 #include "art/Framework/Core/EDProducer.h"
23 #include "art/Framework/Principal/Event.h"
24 #include "art/Framework/Principal/Run.h"
25 #include "fhiclcpp/types/Name.h"
26 #include "fhiclcpp/types/Comment.h"
27 #include "fhiclcpp/types/Atom.h"
28 #include "fhiclcpp/types/OptionalAtom.h"
29 #include "fhiclcpp/types/Sequence.h"
30 #include "art/Framework/Services/Registry/ServiceHandle.h"
31 #include "art/Framework/Core/ModuleMacros.h"
32 #include "messagefacility/MessageLogger/MessageLogger.h"
33 #include "cetlib_except/exception.h"
34 #include "cetlib/filesystem.h"
35 #include "cetlib/search_path.h"
38 #include "nurandom/RandomUtils/NuRandomService.h"
41 #include "nusimdata/SimulationBase/MCTruth.h"
42 #include "nusimdata/SimulationBase/MCParticle.h"
52 #include "TDatabasePDG.h"
57 #include "CLHEP/Random/RandFlat.h"
58 #include "CLHEP/Random/RandGaussQ.h"
72 Name(
"ParticleSelectionMode"),
77 Name(
"PadOutVectors"),
78 Comment(
"if true, all per-PDG-ID quantities must contain only one value, which is then used for all PDG IDs")
81 fhicl::Sequence<int>
PDG{
83 Comment(
"PDG ID of the particles to be generated; this is the key for the other options marked as \"per PDG ID\"")
92 fhicl::Sequence<double>
P0{
94 Comment(
"central momentum (GeV/c) to generate"),
100 Comment(
"variation in momenta (GeV/c)"),
104 fhicl::Sequence<double>
X0{
106 Comment(
"central x position (cm) in world coordinates [per PDG ID]")
109 fhicl::Sequence<double>
Y0{
111 Comment(
"central y position (cm) in world coordinates [per PDG ID]")
114 fhicl::Sequence<double>
Z0{
116 Comment(
"central z position (cm) in world coordinates [per PDG ID]")
119 fhicl::Sequence<double>
T0{
121 Comment(
"central time (s) [per PDG ID]")
126 Comment(
"variation (radius or RMS) in x position (cm) [per PDG ID]")
131 Comment(
"variation (radius or RMS) in y position (cm) [per PDG ID]")
136 Comment(
"variation (radius or RMS) in z position (cm) [per PDG ID]")
141 Comment(
"variation (semi-interval or RMS) in time (s) [per PDG ID]")
155 Name(
"SingleVertex"),
156 Comment(
"if true, all particles are produced at the same location"),
162 Comment(
"angle from Z axis on world X-Z plane (degrees)")
167 Comment(
"angle from Z axis on world Y-Z plane (degrees)")
171 Name(
"SigmaThetaXZ"),
172 Comment(
"variation in angle in X-Z plane (degrees)")
176 Name(
"SigmaThetaYZ"),
177 Comment(
"variation in angle in Y-Z plane (degrees)")
187 Name(
"HistogramFile"),
188 Comment(
"ROOT file containing the required distributions for the generation"),
194 Comment(
"name of the histograms of momentum distributions"),
206 Name(
"ThetaXzYzHist"),
207 Comment(
"name of the histograms of angular (X-Z and Y-Z) distribution"),
211 fhicl::OptionalAtom<rndm::NuRandomService::seed_t>
Seed{
213 Comment(
"override the random number generator seed")
243 void Sample(simb::MCTruth &mct);
245 bool PadVector(std::vector<double> &vec);
295 std::vector<std::unique_ptr<TH1>>
hPHist ;
312 void beginRun(art::Run& run)
override;
340 template <
typename OptionList>
342 (std::string Option, OptionList
const& allowedOptions) -> decltype(
auto);
357 template <
typename OptionList>
359 OptionList
const& allowedOptions,
bool printKey,
360 std::initializer_list<typename OptionList::value_type::first_type>
exclude
363 template <
typename OptionList>
365 (OptionList
const& allowedOptions,
bool printKey =
true)
370 template <
typename OptionList>
372 typename OptionList::value_type::first_type optionKey,
373 OptionList
const& allowedOptions,
374 std::string defName =
"<unknown>"
383 std::map<int, std::string>
names;
390 std::map<int, std::string>
names;
391 names[int(
kUNIF)] =
"uniform";
392 names[int(
kGAUS)] =
"Gaussian";
393 names[int(
kHIST)] =
"histograms";
403 template <
typename OptionList>
405 (std::string Option, OptionList
const& allowedOptions) -> decltype(
auto)
407 using key_type =
typename OptionList::value_type::first_type;
408 using tolower_type = int(*)(int);
409 auto toLower = [](
auto const&
S)
414 (tolower_type) &std::tolower);
417 auto option = toLower(Option);
418 for (
auto const& candidate: allowedOptions) {
419 if (toLower(candidate.second) ==
option)
return candidate.first;
423 key_type num = std::stoi(Option, &end);
424 if (allowedOptions.count(num) && (end == Option.length()))
return num;
426 catch (std::invalid_argument
const&) {}
427 throw std::runtime_error(
"Option '" + Option +
"' not supported.");
431 template <
typename OptionList>
433 OptionList
const& allowedOptions,
bool printKey ,
434 std::initializer_list<typename OptionList::value_type::first_type>
exclude
439 for (
auto const&
option: allowedOptions) {
440 auto const& key =
option.first;
441 if (std::find(exclude.begin(), exclude.end(), key) != exclude.end())
443 if (n++ > 0) msg +=
", ";
444 msg +=
'\"' + std::string(
option.second) +
'\"';
452 template <
typename OptionList>
454 typename OptionList::value_type::first_type optionKey,
455 OptionList
const& allowedOptions,
458 auto iOption = allowedOptions.find(optionKey);
459 return (iOption != allowedOptions.end())? iOption->second: defName;
471 ,
fMode (selectOption(config().ParticleSelectionMode(), ParticleSelectionModeNames))
474 , fP0 (config().
P0())
475 , fSigmaP (config().
SigmaP())
476 , fPDist (selectOption(config().
PDist(), DistributionNames))
477 , fX0 (config().
X0())
478 ,
fY0 (config().
Y0())
479 ,
fZ0 (config().
Z0())
480 ,
fT0 (config().
T0())
481 , fSigmaX (config().
SigmaX())
482 , fSigmaY (config().
SigmaY())
483 , fSigmaZ (config().
SigmaZ())
485 , fPosDist (selectOption(config().
PosDist(), DistributionNames))
486 ,
fTDist (selectOption(config().
TDist(), DistributionNames))
487 , fSingleVertex (config().SingleVertex())
492 , fAngleDist (selectOption(config().
AngleDist(), DistributionNames))
493 , fHistFileName (config().HistogramFile())
494 , fPHist (config().PHist())
495 , fThetaXzYzHist(config().ThetaXzYzHist())
496 ,
fEngine(art::ServiceHandle<rndm::NuRandomService>()->createEngine(*
this))
499 rndm::NuRandomService::seed_t
seed;
500 if (config().Seed(seed)) {
504 produces< std::vector<simb::MCTruth> >();
505 produces< sumdata::RunData, art::InRun >();
515 (std::make_unique<sumdata::RunData>(geom.
DetectorName()), art::fullRun());
524 std::vector<std::string> vlist(15);
534 vlist[9] =
"Theta0XZ";
535 vlist[10] =
"Theta0YZ";
536 vlist[11] =
"SigmaThetaXZ";
537 vlist[12] =
"SigmaThetaYZ";
539 vlist[14] =
"SigmaT";
548 if( !this->
PadVector(
fP0 ) ){ list.append(vlist[1].append(
", \n")); }
551 if( !this->
PadVector(
fX0 ) ){ list.append(vlist[3].append(
", \n")); }
552 if( !this->
PadVector(
fY0 ) ){ list.append(vlist[4].append(
", \n")); }
553 if( !this->
PadVector(
fZ0 ) ){ list.append(vlist[5].append(
", \n")); }
561 if( !this->
PadVector(
fT0 ) ){ list.append(vlist[13].append(
", \n")); }
567 throw cet::exception(
"SingleGen") <<
"The "<< list
568 <<
"\n vector(s) defined in the fhicl files has/have "
569 <<
"a different size than the PDG vector "
570 <<
"\n and it has (they have) more than one value, "
571 <<
"\n disallowing sensible padding "
572 <<
" and/or you have set fPadOutVectors to false. \n";
577 TFile* histFile =
nullptr;
583 if (!histFile || histFile->IsZombie() || !histFile->IsOpen()) {
586 throw art::Exception(art::errors::NotFound) <<
"Cannot open ROOT file specified in parameter HistogramFile: \"" <<
fHistFileName <<
"\"";
590 throw art::Exception(art::errors::NotFound) <<
"ROOT file specified in parameter HistogramFile: \"" <<
fHistFileName <<
"\" does not exist!";
595 std::string relative_filename{
"./"};
597 if (cet::file_exists(relative_filename)) {
598 histFile =
new TFile(relative_filename.c_str());
599 if (!histFile || histFile->IsZombie() || !histFile->IsOpen()) {
602 throw art::Exception(art::errors::NotFound) <<
"Cannot open ROOT file found using relative path and originally specified in parameter HistogramFile: \"" << relative_filename <<
'"';
606 cet::search_path sp{
"FW_SEARCH_PATH"};
607 std::string found_filename;
610 throw art::Exception(art::errors::NotFound) <<
"Cannot find ROOT file in current directory nor on FW_SEARCH_PATH specified in parameter HistogramFile: \"" <<
fHistFileName <<
'"';
612 histFile =
new TFile(found_filename.c_str());
613 if (!histFile || histFile->IsZombie() || !histFile->IsOpen()) {
616 throw art::Exception(art::errors::NotFound) <<
"Cannot open ROOT file found on FW_SEARCH_PATH and originally specified in parameter HistogramFile: \"" << found_filename <<
'"';
628 throw art::Exception(art::errors::Configuration)
629 <<
"Position distribution of type '"
640 throw art::Exception(art::errors::Configuration)
641 <<
"Time distribution of type '"
652 throw art::Exception(art::errors::Configuration)
653 <<
fPHist.size() <<
" momentum histograms to describe " <<
fPDG.size() <<
" particle types...";
656 for (
auto const& histName:
fPHist) {
657 TH1* pHist =
dynamic_cast<TH1*
>(histFile->Get(histName.c_str()));
659 throw art::Exception(art::errors::NotFound)
660 <<
"Failed to read momentum histogram '" << histName <<
"' from '" << histFile->GetPath() <<
"\'";
662 pHist->SetDirectory(
nullptr);
663 hPHist.emplace_back(pHist);
673 throw art::Exception(art::errors::Configuration)
674 <<
fThetaXzYzHist.size() <<
" direction histograms to describe " <<
fPDG.size() <<
" particle types...";
678 TH2* pHist =
dynamic_cast<TH2*
>(histFile->Get(histName.c_str()));
680 throw art::Exception(art::errors::NotFound)
681 <<
"Failed to read direction histogram '" << histName <<
"' from '" << histFile->GetPath() <<
"\'";
683 pHist->SetDirectory(
nullptr);
698 if( vec.size() !=
fPDG.size() ){
710 if(vec.size() != 1)
return false;
713 vec.resize(
fPDG.size(), vec[0]);
726 std::unique_ptr< std::vector<simb::MCTruth> > truthcol(
new std::vector<simb::MCTruth>);
729 truth.SetOrigin(simb::kSingleParticle);
732 MF_LOG_DEBUG(
"SingleGen") << truth;
734 truthcol->push_back(truth);
736 evt.put(std::move(truthcol));
747 CLHEP::RandGaussQ gauss(
fEngine);
759 p =
fP0[i] +
fSigmaP[i]*(2.0*flat.fire()-1.0);
763 static TDatabasePDG pdgt;
764 TParticlePDG* pdgp = pdgt.GetParticle(
fPDG[i]);
765 if (pdgp) m = pdgp->Mass();
775 x[0] =
fX0[i] +
fSigmaX[i]*(2.0*flat.fire()-1.0);
776 x[1] =
fY0[i] +
fSigmaY[i]*(2.0*flat.fire()-1.0);
777 x[2] =
fZ0[i] +
fSigmaZ[i]*(2.0*flat.fire()-1.0);
785 t =
fT0[i] +
fSigmaT[i]*(2.0*flat.fire()-1.0);
788 TLorentzVector pos(x[0], x[1], x[2], t);
795 double thyzradsplussigma = 0;
796 double thyzradsminussigma = 0;
806 thxz = (180./M_PI)*thetaxz;
807 thyz = (180./M_PI)*thetayz;
816 thyzrads = std::asin(std::sin((M_PI/180.)*(
fTheta0YZ[i])));
823 double sinthyzmin = std::sin(thyzradsminussigma);
824 double sinthyzmax = std::sin(thyzradsplussigma);
825 double sinthyz = sinthyzmin + flat.fire() * (sinthyzmax - sinthyzmin);
826 thyz = (180. / M_PI) * std::asin(sinthyz);
829 double thxzrad=thxz*M_PI/180.0;
830 double thyzrad=thyz*M_PI/180.0;
832 TLorentzVector pvec(p*std::cos(thyzrad)*std::sin(thxzrad),
834 p*std::cos(thxzrad)*std::cos(thyzrad),
838 int trackid = -1*(i+1);
839 std::string primary(
"primary");
841 simb::MCParticle part(trackid,
fPDG[i], primary);
842 part.AddTrajectoryPoint(pos, pvec);
858 CLHEP::RandGaussQ gauss(
fEngine);
868 x[0] =
fX0[0] +
fSigmaX[0]*(2.0*flat.fire()-1.0);
869 x[1] =
fY0[0] +
fSigmaY[0]*(2.0*flat.fire()-1.0);
870 x[2] =
fZ0[0] +
fSigmaZ[0]*(2.0*flat.fire()-1.0);
878 t =
fT0[0] +
fSigmaT[0]*(2.0*flat.fire()-1.0);
881 TLorentzVector pos(x[0], x[1], x[2], t);
884 for (
unsigned int i(0); i<
fPDG.size(); ++i){
895 p =
fP0[i] +
fSigmaP[i]*(2.0*flat.fire()-1.0);
898 static TDatabasePDG pdgt;
899 TParticlePDG* pdgp = pdgt.GetParticle(
fPDG[i]);
900 if (pdgp) m = pdgp->Mass();
908 double thyzradsplussigma = 0;
909 double thyzradsminussigma = 0;
919 thxz = (180./M_PI)*thetaxz;
920 thyz = (180./M_PI)*thetayz;
929 thyzrads = std::asin(std::sin((M_PI/180.)*(
fTheta0YZ[i])));
936 double sinthyzmin = std::sin(thyzradsminussigma);
937 double sinthyzmax = std::sin(thyzradsplussigma);
938 double sinthyz = sinthyzmin + flat.fire() * (sinthyzmax - sinthyzmin);
939 thyz = (180. / M_PI) * std::asin(sinthyz);
942 double thxzrad=thxz*M_PI/180.0;
943 double thyzrad=thyz*M_PI/180.0;
945 TLorentzVector pvec(p*std::cos(thyzrad)*std::sin(thxzrad),
947 p*std::cos(thxzrad)*std::cos(thyzrad),
951 int trackid = -1*(i+1);
952 std::string primary(
"primary");
954 simb::MCParticle part(trackid,
fPDG[i], primary);
955 part.AddTrajectoryPoint(pos, pvec);
976 for (
unsigned int i=0; i<
fPDG.size(); ++i) {
986 unsigned int i=flat.fireInt(
fPDG.size());
991 mf::LogWarning(
"UnrecognizeOption") <<
"SingleGen does not recognize ParticleSelectionMode "
1003 mf::LogInfo(
"SingleGen") <<
" You are using vector values for SingleGen configuration.\n "
1004 <<
" Some of the configuration vectors may have been padded out ,"
1005 <<
" because they (weren't) as long as the pdg vector"
1006 <<
" in your configuration. \n"
1007 <<
" The new input particle configuration is:\n" ;
1010 for(
size_t i = 0; i <=1; ++i){
1012 values.append(list[i]);
1013 values.append(
": [ ");
1015 for(
size_t e = 0;
e <
fPDG.size(); ++
e){
1016 std::stringstream buf;
1018 if(i == 0 ) buf <<
fPDG[
e] <<
", ";
1020 if(i == 1 ) buf <<
fP0[
e] <<
", ";
1021 if(i == 2 ) buf <<
fSigmaP[
e] <<
", ";
1022 if(i == 3 ) buf <<
fX0[
e] <<
", ";
1023 if(i == 4 ) buf <<
fY0[
e] <<
", ";
1024 if(i == 5 ) buf <<
fZ0[
e] <<
", ";
1025 if(i == 6 ) buf <<
fSigmaX[
e] <<
", ";
1026 if(i == 7 ) buf <<
fSigmaY[
e] <<
", ";
1027 if(i == 8 ) buf <<
fSigmaZ[
e] <<
", ";
1032 if(i == 13) buf <<
fT0[
e] <<
", ";
1033 if(i == 14) buf <<
fSigmaT[
e] <<
", ";
1034 values.append(buf.str());
1037 values.erase(values.find_last_of(
","));
1038 values.append(
" ] \n");
1042 mf::LogInfo(
"SingleGen") <<
values;
1051 CLHEP::RandFlat flat(
fEngine);
1053 double throw_value = h.Integral() * flat.fire();
1054 double cum_value(0);
1055 for (
int i(0); i < h.GetNbinsX()+1; ++i){
1056 cum_value += h.GetBinContent(i);
1057 if (throw_value < cum_value){
1058 return flat.fire()*h.GetBinWidth(i) + h.GetBinLowEdge(i);
1066 CLHEP::RandFlat flat(
fEngine);
1068 double throw_value = h.Integral() * flat.fire();
1069 double cum_value(0);
1070 for (
int i(0); i < h.GetNbinsX()+1; ++i){
1071 for (
int j(0); j < h.GetNbinsY()+1; ++j){
1072 cum_value += h.GetBinContent(i, j);
1073 if (throw_value < cum_value){
1074 x = flat.fire()*h.GetXaxis()->GetBinWidth(i) + h.GetXaxis()->GetBinLowEdge(i);
1075 y = flat.fire()*h.GetYaxis()->GetBinWidth(j) + h.GetYaxis()->GetBinLowEdge(j);
1089 DEFINE_ART_MODULE(SingleGen)
int fPDist
How to distribute momenta (gaus or uniform)
static const std::map< int, std::string > DistributionNames
Names of all distribution modes.
process_name physics producers generator physics producers generator SigmaZ
process_name opdaq physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator Theta0XZ
process_name physics producers generator PDist
int fTDist
How to distribute t (gaus, or uniform)
module to produce single or multiple specified particles in the detector
process_name stream1 can override from command line with o or output services DetectorPropertiesService services DetectorPropertiesService services DetectorPropertiesService services DetectorPropertiesService physics analyzers pmtresponse NeutronTrackingCut services LArG4Parameters gaussian physics producers generator PDG
then source grid fermiapp products dune setup_dune_fermiapp sh exit else echo No setup file found exit fi setup
see a below echo S(symbol in a section other than those above)
Utilities related to art service access.
bool PadVector(std::vector< double > &vec)
static std::string presentOptions(OptionList const &allowedOptions, bool printKey, std::initializer_list< typename OptionList::value_type::first_type > exclude)
Returns a string describing all options in the list.
process_name physics producers generator hPHist_pi physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator Theta0YZ
fhicl::Sequence< double > SigmaT
createEngine fPadOutVectors
static std::map< int, std::string > makeParticleSelectionModeNames()
Returns a vector with the name of particle selection mode keywords.
process_name opflash particleana ie x
static std::map< int, std::string > makeDistributionNames()
Returns a vector with the name of distribution keywords.
fhicl::Sequence< double > SigmaP
process_name opdaq physics producers generator PosDist
std::vector< std::unique_ptr< TH2 > > hThetaXzYzHist
actual TH1 for momentum distributions
std::vector< double > fSigmaT
Variation in t position (s)
process_name opdaq physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator SigmaP
fhicl::Sequence< double > SigmaThetaXZ
process_name opdaq physics producers generator physics producers generator physics producers generator Z0
std::vector< std::unique_ptr< TH1 > > hPHist
fhicl::OptionalAtom< rndm::NuRandomService::seed_t > Seed
process_name physics producers generator hPHist_pi physics producers generator physics producers generator SigmaX
process_name opdaq physics producers generator physics producers generator Y0
std::vector< std::string > fThetaXzYzHist
name of histogram for thetaxz/thetayz distribution
fhicl::Sequence< double > Y0
void SampleOne(unsigned int i, simb::MCTruth &mct)
bool fSingleVertex
if true - all particles produced at the same location
fhicl::Sequence< double > SigmaThetaYZ
fhicl::Sequence< double > SigmaZ
fhicl::Sequence< std::string > ThetaXzYzHist
tuple m
now if test mode generate materials, CRT shell, world, gdml header else just generate CRT shell for u...
int fPosDist
How to distribute xyz (gaus, or uniform)
void printVecs(std::vector< std::string > const &list)
fhicl::Sequence< double > P0
fhicl::Sequence< double > SigmaY
process_name physics producers generator hPHist_pi physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator AngleDist
std::vector< double > fSigmaZ
Variation in z position (cm)
fhicl::Sequence< double > X0
static constexpr int kSelectOneRandPart
fhicl::Sequence< double > Theta0YZ
Access the description of detector geometry.
fhicl::Sequence< double > T0
fhicl::Atom< std::string > HistogramFile
standard_singlep gaussian distribution ie ie ie gaussian TDist
std::vector< double > fT0
Central t position (s) in world coordinates.
fhicl::Atom< std::string > AngleDist
void produce(art::Event &evt) override
standard_singlep gaussian distribution X0
process_name opflash particleana ie ie y
std::string DetectorName() const
Returns a string with the name of the detector, as configured.
std::vector< double > fP0
Central momentum (GeV/c) to generate.
std::vector< double > fTheta0YZ
Angle in YZ plane (degrees)
fhicl::Atom< bool > SingleVertex
auto end(FixedBins< T, C > const &) noexcept
fEngine(art::ServiceHandle< rndm::NuRandomService >() ->createEngine(*this, pset,"Seed"))
fhicl::Sequence< double > SigmaX
BEGIN_PROLOG vertical distance to the surface Name
fhicl::Atom< std::string > ParticleSelectionMode
static constexpr int kSelectAllParts
One particle per entry is generated.
double SelectFromHist(const TH1 &h)
void Sample(simb::MCTruth &mct)
fhicl::Sequence< int > PDG
Description of geometry of one entire detector.
static auto selectOption(std::string Option, OptionList const &allowedOptions) -> decltype(auto)
Parses an option string and returns the corresponding option number.
fhicl::Sequence< double > Theta0XZ
fhicl::Sequence< double > Z0
process_name physics producers generator physics producers generator physics producers generator SigmaT
std::vector< double > fY0
Central y position (cm) in world coordinates.
std::vector< int > fPDG
PDG code of particles to generate.
static const std::vector< std::string > names
std::vector< double > fSigmaThetaYZ
Variation in angle in YZ plane.
std::vector< double > fSigmaP
Variation in momenta (GeV/c)
fhicl::Sequence< std::string > PHist
std::vector< double > fZ0
Central z position (cm) in world coordinates.
std::vector< std::string > fPHist
name of histogram of momenta
std::vector< double > fSigmaX
Variation in x position (cm)
std::string to_string(WindowPattern const &pattern)
fhicl::Atom< std::string > PosDist
then echo File list $list not found else cat $list while read file do echo $file sed s
static constexpr int kGAUS
Gaussian distribution.
bool fromHistogram(std::string const &key) const
Returns whether the specified mode is an histogram distribution.
std::vector< double > fX0
Central x position (cm) in world coordinates.
static std::string optionName(typename OptionList::value_type::first_type optionKey, OptionList const &allowedOptions, std::string defName="<unknown>")
Returns the name of the specified option key, or defName if not known.
static const std::map< int, std::string > ParticleSelectionModeNames
Names of all particle selection modes.
std::string fHistFileName
Filename containing histogram of momenta.
int fAngleDist
How to distribute angles (gaus, uniform)
SingleGen(Parameters const &config)
static constexpr int kUNIF
Uniform distribution.
std::vector< double > fTheta0XZ
Angle in XZ plane (degrees)
void beginRun(art::Run &run) override
Act on begin of run: write "RunData" information (sumdata::RunData).
physics producers generator PadOutVectors
process_name physics producers generator hPHist_pi physics producers generator P0
static constexpr int kHIST
process_name opdaq physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator SigmaThetaYZ
void setup()
Performs checks and initialization based on the current configuration.
fhicl::Atom< std::string > PDist
fhicl::Atom< bool > PadOutVectors
process_name physics producers generator SigmaY
art::EDProducer::Table< Config > Parameters
std::vector< double > fSigmaThetaXZ
Variation in angle in XZ plane.
void SampleMany(simb::MCTruth &mct)
art framework interface to geometry description
process_name opdaq physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator SigmaThetaXZ
fhicl::Atom< std::string > TDist
CLHEP::HepRandomEngine & fEngine
actual TH2 for angle distributions - Xz on x axis .
process_name opdaq physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator physics producers generator T0
std::vector< double > fSigmaY
Variation in y position (cm)