41 DVector3 pos(0.0, 0.0, dTargetCenterZ);
43 vector<const DTAGMHit*> tagm_hits;
44 locEventLoop->Get(tagm_hits,
"TRUTH");
45 for (
unsigned int ih=0; ih < tagm_hits.size(); ++ih)
47 if (tagm_hits[ih]->row > 0)
continue;
48 DVector3 mom(0.0, 0.0, tagm_hits[ih]->E);
53 gamma->
setTime(tagm_hits[ih]->t);
55 gamma->
dCounter = tagm_hits[ih]->column;
56 gamma->AddAssociatedObject(tagm_hits[ih]);
57 _data.push_back(gamma);
60 vector<const DTAGHHit*> tagh_hits;
61 locEventLoop->Get(tagh_hits,
"TRUTH");
62 for (
unsigned int ih=0; ih < tagh_hits.size(); ++ih)
64 DVector3 mom(0.0, 0.0, tagh_hits[ih]->E);
69 gamma->
setTime(tagh_hits[ih]->t);
71 gamma->
dCounter = tagh_hits[ih]->counter_id;
72 gamma->AddAssociatedObject(tagh_hits[ih]);
73 _data.push_back(gamma);
void setMomentum(const DVector3 &aMomentum)
void setTime(double locTime)
jerror_t erun(void)
Called everytime run number changes, provided brun has been called.
DGeometry * GetDGeometry(unsigned int run_number)
jerror_t init(void)
Called once at program start.
void setPID(Particle_t locPID)
jerror_t brun(jana::JEventLoop *locEventLoop, int32_t runnumber)
Called everytime a new run number is detected.
void setPosition(const DVector3 &aPosition)
jerror_t evnt(jana::JEventLoop *locEventLoop, uint64_t eventnumber)
Called every event.
jerror_t fini(void)
Called after last event of last event source has been processed.
bool GetTargetZ(double &z_target) const
z-location of center of target