16 #include <JANA/JApplication.h>
17 #include <JANA/JFactory.h>
18 #include <TDirectory.h>
60 const double Tl = -200.0;
61 const double Th = 600.0;
63 TDirectory *
mainDir = gDirectory;
64 TDirectory *taghDir = gDirectory->mkdir(
"TAGH_timewalk");
66 gDirectory->mkdir(
"Offsets")->cd();
70 gDirectory->mkdir(
"Timewalk")->cd();
71 for (
int i = 0; i < 1+
Nslots; i++) {
72 stringstream ss; ss << i;
73 TString name =
"TAGHRF_tdcTimeDiffVsPulseHeight_" + ss.str();
74 TString title =
"TAGH counter " + ss.str();
89 vector<const DRFTime*> locRFTimes;
90 eventLoop->Get(locRFTimes);
104 vector<const DTAGHHit*> taghhits;
105 loop->Get(taghhits,
"Calib");
106 const DRFTime* rfTime =
nullptr;
107 vector <const DRFTime*> rfTimes;
108 loop->Get(rfTimes,
"TAGH");
109 if (rfTimes.size() > 0)
116 japp->RootFillLock(
this);
118 double t_RF = rfTime->
dTime;
119 for (
unsigned int i = 0; i < taghhits.size(); i++) {
123 double t_tdc = hit->
t;
133 japp->RootFillUnLock(
this);
static TH2I * hTAGHRF_tdcTimeDiffVsPulseHeight[1+Nslots]
~JEventProcessor_TAGH_timewalk()
jerror_t fini(void)
Called after last event of last event source has been processed.
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.
static TH2I * hTAGH_tdcadcTimeDiffVsSlotID
jerror_t erun(void)
Called everytime run number changes, provided brun has been called.
static TH2I * hTAGHRF_tdcTimeDiffVsSlotID
JEventProcessor_TAGH_timewalk()
jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber)
Called every event.
double Step_TimeToNearInputTime(double locTimeToStep, double locTimeToStepTo) const
DRFTime_factory * dRFTimeFactory