Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
monitoring/timing_online/JEventProcessor_HLDetectorTiming.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: JEventProcessor_HLDetectorTiming.h
4 // Created: Mon Jan 12 14:37:56 EST 2015
5 // Creator: mstaib (on Linux egbert 2.6.32-431.20.3.el6.x86_64 x86_64)
6 //
7 
8 #ifndef _JEventProcessor_HLDetectorTiming_
9 #define _JEventProcessor_HLDetectorTiming_
10 
11 #include <DAQ/DEPICSvalue.h>
12 #include <JANA/JEventProcessor.h>
13 #include <BCAL/DBCALHit.h>
14 #include <BCAL/DBCALTDCHit.h>
15 #include <BCAL/DBCALUnifiedHit.h>
16 #include <CDC/DCDCHit.h>
17 #include <FCAL/DFCALHit.h>
18 #include <FDC/DFDCHit.h>
19 #include <TOF/DTOFHit.h>
20 #include <START_COUNTER/DSCHit.h>
21 #include <TAGGER/DTAGHHit.h>
22 #include <TAGGER/DTAGMHit.h>
23 #include <RF/DRFTDCDigiTime.h>
24 #include <RF/DRFTime_factory.h>
25 #include <PID/DEventRFBunch.h>
26 #include <PID/DParticleID.h>
27 #include <TRACKING/DTrackFitter.h>
28 
29 #include "DFactoryGenerator_p2pi.h"
30 
31 #include "TFitResult.h"
32 #include "TF1.h"
33 #include "TH1D.h"
34 #include "TObjArray.h"
35 #include "TMath.h"
36 
37 //#include "HistogramTools.h"
38 
39 //class JEventProcessor_HLDetectorTiming:public jana::JEventProcessor, public HistogramTools{
40 class JEventProcessor_HLDetectorTiming:public jana::JEventProcessor{
41  public:
44  const char* className(void){return "JEventProcessor_HLDetectorTiming";}
45 
46  private:
47  jerror_t init(void); ///< Called once at program start.
48  jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
49  jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
50  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
51  jerror_t fini(void); ///< Called after last event of last event source has been processed.
52 
53  //HistogramTools *histoTools;
56  void DoRoughTiming();
57  void DoTDCADCAlign();
58  void DoTrackBased();
59 
60  int GetCCDBIndexTOF(const DTOFHit *);
61  int GetCCDBIndexBCAL(const DBCALHit *); ///< Not implimented
62  int GetCCDBIndexTAGM(const DTAGMHit *);
63  int GetCCDBIndexCDC(const DCDCHit *);
64  int GetCCDBIndexCDC(int, int);
65  double BEAM_CURRENT;
66  double Z_TARGET;
70  // The final setup requires some shifts relative to the previous values, need to store them
71 
73  float MIN_TDIFF, MAX_TDIFF;
80  vector<double> sc_tdc_time_offsets;
81  vector<double> tof_tdc_time_offsets;
82 
83 };
84 
85 #endif // _JEventProcessor_HLDetectorTiming_
86 
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.
File: DTOFHit.h Created: Tue Jan 18 16:15:26 EST 2011 Creator: B. Zihlmann Purpose: Container class t...
Definition: DTOFHit.h:16
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.