16 InitJANAPlugin(locApplication);
62 vector<double> locBeamPeriodVector;
63 locEventLoop->GetCalib(
"PHOTON_BEAM/RF/beam_period", locBeamPeriodVector);
67 map<string, double> photon_beam_param;
68 if(locEventLoop->GetCalib(
"/ANALYSIS/beam_asymmetry/coherent_energy", photon_beam_param) ==
false)
69 dCoherentPeakRange = pair<double, double>(photon_beam_param[
"cohmin_energy"], photon_beam_param[
"cohedge_energy"]);
105 vector<const DBeamPhoton*> locBeamPhotons;
106 locEventLoop->Get(locBeamPhotons);
108 vector<const DChargedTrack*> locChargedTracks;
109 locEventLoop->Get(locChargedTracks,
"PreSelect");
112 locEventLoop->GetSingle(locEventRFBunch);
143 bool locIsTrackEventFlag = !locChargedTracks.empty();
146 bool locCoherentPeakFlag =
false;
147 if(std::isnan(locEventRFBunch->
dTime))
148 locCoherentPeakFlag =
true;
149 for(
auto& locBeamPhoton : locBeamPhotons)
154 double locBeamRFDeltaT = locBeamPhoton->time() - locEventRFBunch->
dTime;
157 locCoherentPeakFlag =
true;
165 locEventLoop->GetSingle(locEventWriterREST);
168 if(locCoherentPeakFlag && locIsTrackEventFlag)
177 double locP = locChargedHypo->
momentum().Mag();
178 double locShowerEOverP = -1.0;
181 if(locFCALShowerMatchParams != NULL)
183 const DFCALShower* locFCALShower = locFCALShowerMatchParams->dFCALShower;
184 locShowerEOverP = locFCALShower->
getEnergy()/locP;
186 else if(locBCALShowerMatchParams != NULL)
188 const DBCALShower* locBCALShower = locBCALShowerMatchParams->dBCALShower;
189 locShowerEOverP = locBCALShower->
E/locP;
197 double locDeltaT = locTimeToStepTo - locTimeToStep;
bool Cut_ShowerEOverP(const DChargedTrackHypothesis *locChargedHypo) const
double Step_TimeToNearInputTime(double locTimeToStep, double locTimeToStepTo) const
jerror_t evnt(jana::JEventLoop *locEventLoop, uint64_t locEventNumber)
Called every event.
jerror_t brun(jana::JEventLoop *locEventLoop, int32_t locRunNumber)
Called every time a new run number is detected.
bool Write_RESTEvent(JEventLoop *locEventLoop, string locOutputFileNameSubString) const
pair< double, double > dCoherentPeakRange
DGeometry * GetDGeometry(unsigned int run_number)
shared_ptr< const DFCALShowerMatchParams > Get_FCALShowerMatchParams(void) const
map< Particle_t, map< DetectorSystem_t, double > > dTimingCutMap
const DVector3 & momentum(void) const
jerror_t init(void)
Called once at program start.
shared_ptr< const DBCALShowerMatchParams > Get_BCALShowerMatchParams(void) const
bool GetTargetZ(double &z_target) const
z-location of center of target