139 event->AttachSummary(interaction);
150 <<
"Generated event: " << *
event;
152 std::unique_ptr< std::vector<simb::MCTruth> > truthcol(
new std::vector<simb::MCTruth>);
164 for (
size_t i = 0; i<geo->
NTPC(); ++i){
166 if (minx>tpc.
MinX()) minx = tpc.
MinX();
167 if (maxx<tpc.
MaxX()) maxx = tpc.
MaxX();
168 if (miny>tpc.
MinY()) miny = tpc.
MinY();
169 if (maxy<tpc.
MaxY()) maxy = tpc.
MaxY();
170 if (minz>tpc.
MinZ()) minz = tpc.
MinZ();
171 if (maxz<tpc.
MaxZ()) maxz = tpc.
MaxZ();
175 double X0 =
flatDist.fire( minx, maxx );
176 double Y0 =
flatDist.fire( miny, maxy );
177 double Z0 =
flatDist.fire( minz, maxz );
179 TIter partitr(
event);
187 while( (part = dynamic_cast<genie::GHepParticle *>(partitr.Next())) ){
196 TLorentzVector
pos(X0, Y0, Z0, 0);
197 TLorentzVector mom(part->
Px(), part->
Py(), part->
Pz(), part->
E());
198 tpart.AddTrajectoryPoint(
pos,mom);
202 tpart.SetPolarization(polz);
209 truthcol->push_back(truth);
virtual void ProcessEventRecord(GHepRecord *event_rec) const =0
double E(void) const
Get energy.
void SetOrigin(simb::Origin_t origin)
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.
double Mass(void) const
Mass that corresponds to the PDG code.
int SelectAnnihilationMode(int pdg_code)
double Pz(void) const
Get Pz.
GHepStatus_t Status(void) const
double Px(void) const
Get Px.
int FirstMother(void) const
Summary information for an interaction.
double MinZ() const
Returns the world z coordinate of the start of the box.
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
bool PolzIsSet(void) const
double MaxY() const
Returns the world y coordinate of the end of the box.
const genie::EventRecordVisitorI * mcgen
unsigned int NTPC(unsigned int cstat=0) const
Returns the total number of TPCs in the specified cryostat.
void GetPolarization(TVector3 &polz)
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
void Add(simb::MCParticle const &part)
double MaxZ() const
Returns the world z coordinate of the end of the box.
TPCGeo const & TPC(unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified TPC.
Event generator information.
LArSoft geometry interface.
double MinY() const
Returns the world y coordinate of the start of the box.
STDHEP-like event record entry that can fit a particle or a nucleus.
Event finding and building.
static Interaction * NOsc(int tgt, int annihilation_mode=-1)
double Py(void) const
Get Py.