136 genie::EventRecord *
event =
new genie::EventRecord;
137 int target = 1000180400;
139 genie::Interaction * interaction = genie::Interaction::NOsc(target,decay);
140 event->AttachSummary(interaction);
143 mcgen->ProcessEventRecord(event);
150 MF_LOG_DEBUG(
"NeutronOsc")
151 <<
"Generated event: " << *event;
153 std::unique_ptr< std::vector<simb::MCTruth> > truthcol(
new std::vector<simb::MCTruth>);
156 art::ServiceHandle<geo::Geometry const> geo;
165 for (
size_t i = 0; i<geo->NTPC(); ++i){
167 if (minx>tpc.
MinX()) minx = tpc.
MinX();
168 if (maxx<tpc.
MaxX()) maxx = tpc.
MaxX();
169 if (miny>tpc.
MinY()) miny = tpc.
MinY();
170 if (maxy<tpc.
MaxY()) maxy = tpc.
MaxY();
171 if (minz>tpc.
MinZ()) minz = tpc.
MinZ();
172 if (maxz<tpc.
MaxZ()) maxz = tpc.
MaxZ();
180 TIter partitr(event);
181 genie::GHepParticle *part = 0;
186 std::string primary(
"primary");
188 while( (part = dynamic_cast<genie::GHepParticle *>(partitr.Next())) ){
190 simb::MCParticle tpart(trackid,
197 TLorentzVector pos(X0, Y0, Z0, 0);
198 TLorentzVector mom(part->Px(), part->Py(), part->Pz(), part->E());
199 tpart.AddTrajectoryPoint(pos,mom);
200 if(part->PolzIsSet()) {
202 part->GetPolarization(polz);
203 tpart.SetPolarization(polz);
209 truth.SetOrigin(simb::kUnknown);
210 truthcol->push_back(truth);
212 e.put(std::move(truthcol));
process_name opdaq physics producers generator physics producers generator physics producers generator Z0
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
int SelectAnnihilationMode(int pdg_code)
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.
const genie::EventRecordVisitorI * mcgen
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.