Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Calibration/HLDetectorTiming/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 <DIRC/DDIRCGeometry.h>
38 #include <DIRC/DDIRCLut.h>
39 
40 //#include "HistogramTools.h"
41 
42 //class JEventProcessor_HLDetectorTiming:public jana::JEventProcessor, public HistogramTools{
43 class JEventProcessor_HLDetectorTiming:public jana::JEventProcessor{
44  public:
47  const char* className(void){return "JEventProcessor_HLDetectorTiming";}
48 
49  private:
50  jerror_t init(void); ///< Called once at program start.
51  jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
52  jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
53  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
54  jerror_t fini(void); ///< Called after last event of last event source has been processed.
55 
56  //HistogramTools *histoTools;
57 
58  void DoRoughTiming();
59  void DoTDCADCAlign();
60  void DoTrackBased();
61 
62  int GetCCDBIndexTOF(const DTOFHit *);
63  int GetCCDBIndexBCAL(const DBCALHit *); ///< Not implimented
64  int GetCCDBIndexTAGM(const DTAGMHit *);
65  int GetCCDBIndexCDC(const DCDCHit *);
66  int GetCCDBIndexCDC(int, int);
67  double BEAM_CURRENT;
68  double Z_TARGET;
73  bool NO_TRACKS;
74  // The final setup requires some shifts relative to the previous values, need to store them
75 
84  vector<double> sc_tdc_time_offsets;
85  vector<double> tof_tdc_time_offsets;
86 
87 };
88 
89 #endif // _JEventProcessor_HLDetectorTiming_
90 
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.