34 #include <JANA/JApplication.h>
35 #include <JANA/JFactory.h>
88 loop->GetSingle(trig);
100 loop->GetSingle(thisRFBunch);
102 vector <const DChargedTrack *> chargedTrackVector;
103 loop->Get(chargedTrackVector);
105 for (
unsigned int iTrack = 0; iTrack < chargedTrackVector.size(); iTrack++){
107 int charge = chargedTrackVector[iTrack]->Get_Charge();
111 bestHypothesis = chargedTrackVector[iTrack]->Get_Hypothesis(
PiPlus);
114 bestHypothesis = chargedTrackVector[iTrack]->Get_Hypothesis(
PiMinus);
117 if (bestHypothesis == NULL)
continue;
120 if (bcalMatch == NULL)
continue;
122 if (scMatch == NULL)
continue;
127 bestHypothesis->GetSingle(timeBasedTrack);
129 if (timeBasedTrack->
FOM < 0.0027)
continue;
131 if (timeBasedTrack->
Ndof < 10)
continue;
139 double pathLength, flightTime;
142 vector <const DBCALPoint*> pointVector;
143 thisShower->Get(pointVector);
146 for (
unsigned int iPoint = 0; iPoint < pointVector.size(); iPoint++){
147 const DBCALPoint *thisPoint = pointVector[iPoint];
148 if (thisPoint->
E() < 0.05)
continue;
149 double rpoint = thisPoint->
r();
152 float zmaxhall = 450;
157 double trackHitZ = proj_pos.z();
159 vector <const DBCALHit*> hitVector;
160 thisPoint->Get(hitVector);
163 double Deltat = hitVector[0]->t_raw - hitVector[1]->t_raw;
164 if (hitVector[0]->end==1) Deltat = -Deltat;
166 sprintf(title,
"%s Z_{Track} vs #Delta t;#Delta t = t_{US}-t_{DS};Z_{Track} [cm]", channame);
167 Fill2DHistogram (
"BCAL_ADC_Deltat",
"ZvsDeltat", channame, Deltat, trackHitZ, title,
168 480, -30, 30, 250, zminhall, zmaxhall);
~JEventProcessor_BCAL_ADC_4ns()
JEventProcessor_BCAL_ADC_4ns()
sprintf(text,"Post KinFit Cut")
DVector3 GetLastDOCAPoint(void) const
const DVector3 & position(void) const
jerror_t fini(void)
Called after last event of last event source has been processed.
jerror_t erun(void)
Called everytime run number changes, provided brun has been called.
jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber)
Called every event.
jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber)
Called everytime a new run number is detected.
jerror_t init(void)
Called once at program start.
int Ndof
Number of degrees of freedom in the fit.
shared_ptr< const DSCHitMatchParams > Get_SCHitMatchParams(void) const
jerror_t GetIntersectionWithRadius(double R, DVector3 &mypos, double *s=NULL, double *t=NULL, DVector3 *dir=NULL) const
shared_ptr< const DBCALShowerMatchParams > Get_BCALShowerMatchParams(void) const
const DBCALShower * dBCALShower