119 genie::EventRecord *
event =
new genie::EventRecord;
120 int target = 1000180400;
122 genie::Interaction * interaction = genie::Interaction::NDecay(target,decay,
dpdg);
123 event->AttachSummary(interaction);
126 mcgen->ProcessEventRecord(event);
133 MF_LOG_DEBUG(
"NucleonDecay")
134 <<
"Generated event: " << *event;
136 std::unique_ptr< std::vector<simb::MCTruth> > truthcol(
new std::vector<simb::MCTruth>);
139 art::ServiceHandle<geo::Geometry const> geo;
148 for (
size_t i = 0; i<geo->NTPC(); ++i){
150 if (minx>tpc.
MinX()) minx = tpc.
MinX();
151 if (maxx<tpc.
MaxX()) maxx = tpc.
MaxX();
152 if (miny>tpc.
MinY()) miny = tpc.
MinY();
153 if (maxy<tpc.
MaxY()) maxy = tpc.
MaxY();
154 if (minz>tpc.
MinZ()) minz = tpc.
MinZ();
155 if (maxz<tpc.
MaxZ()) maxz = tpc.
MaxZ();
163 TIter partitr(event);
164 genie::GHepParticle *part = 0;
169 std::string primary(
"primary");
171 while( (part = dynamic_cast<genie::GHepParticle *>(partitr.Next())) ){
173 simb::MCParticle tpart(trackid,
180 TLorentzVector pos(X0, Y0, Z0, 0);
181 TLorentzVector mom(part->Px(), part->Py(), part->Pz(), part->E());
182 tpart.AddTrajectoryPoint(pos,mom);
183 if(part->PolzIsSet()) {
185 part->GetPolarization(polz);
186 tpart.SetPolarization(polz);
188 tpart.SetRescatter(part->RescatterCode());
193 truth.SetOrigin(simb::kUnknown);
194 truthcol->push_back(truth);
196 e.put(std::move(truthcol));
genie::NucleonDecayMode_t gOptDecayMode
process_name opdaq physics producers generator physics producers generator physics producers generator Z0
const genie::EventRecordVisitorI * mcgen
double MinX() const
Returns the world x coordinate of the start of the box.
Geometry information for a single TPC.
double MaxX() const
Returns the world x coordinate of the end of the box.
process_name opdaq physics producers generator physics producers generator Y0
standard_singlep gaussian distribution X0
double MinZ() const
Returns the world z coordinate of the start of the box.
double MaxY() const
Returns the world y coordinate of the end of the box.
double MaxZ() const
Returns the world z coordinate of the end of the box.
double MinY() const
Returns the world y coordinate of the start of the box.