Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JEventProcessor_ST_Propagation_Time.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: JEventProcessor_ST_Propagation_Time.h
4 // Created: Thu Jan 14 12:16:20 EST 2016
5 // Creator: mkamel (on Linux ifarm1401 2.6.32-431.el6.x86_64 x86_64)
6 //
7 
8 #ifndef _JEventProcessor_ST_Propagation_Time_
9 #define _JEventProcessor_ST_Propagation_Time_
10 
11 #include <JANA/JEventProcessor.h>
12 // ROOT header files
13 #include <TMath.h>
14 #include <TDirectory.h>
15 #include <TH1.h>
16 #include <TH2.h>
17 #include <TTree.h>
18 // C++ header files
19 #include <stdint.h>
20 #include <vector>
21 #include <stdio.h>
22 // PID libraries
23 #include <PID/DEventRFBunch.h>
24 #include <PID/DParticleID.h>
25 #include <PID/DDetectorMatches.h>
26 #include <PID/DParticleID.h>
27 #include <PID/DChargedTrack.h>
28 // Tracking libraries
30 // RF libraries
31 #include <RF/DRFTDCDigiTime.h>
32 #include <RF/DRFTime_factory.h>
33 // ST libraries
34 #include <START_COUNTER/DSCHit.h>
38 // TOF libraries
39 #include <TOF/DTOFHit.h>
40 // DAQ/EPICS libraries
41 #include <DAQ/DEPICSvalue.h>
42 // Translation table libraries
43 #include <TTAB/DTTabUtilities.h>
44 #include <TTAB/DTranslationTable.h>
45 //
46 const Int_t NCHANNELS = 30;
47 class JEventProcessor_ST_Propagation_Time:public jana::JEventProcessor{
48  public:
51  const char* className(void){return "JEventProcessor_ST_Propagation_Time";}
52 
53  private:
54  jerror_t init(void); ///< Called once at program start.
55  jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
56  jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
57  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
58  jerror_t fini(void); ///< Called after last event of last event source has been processed.
59  // Define constants
62  double z_target_center; // Target center along z
63  double dRFBunchPeriod; // RF bunch period from CCDBr
64  //////////////////////////////////
65  //double locSCHitTime, locSCTrackFlightTime, locFlightTimeCorrectedSCTime;
66  //double locTOFHitTime, locTOFTrackFlightTime, locFlightTimeCorrectedTOFTime;
67  //double locCenteredRFTime, locCenterToVertexRFTime, locVertexRFTime, locPeriod;
68  //double locTOFRFShiftedTime;
69  ///double locSCzIntersection;
70  //double locSCPropTime;
71  //double sc_pos_soss, sc_pos_eoss, sc_pos_eobs, sc_pos_eons;
72  //double Corr_Time,Corr_Time_ss,Corr_Time_bs,Corr_Time_ns, Corr_Time_bn;
73  //double time_lower_limit, time_upper_limit, z_lower_limit, z_upper_limit;
74  //int NoBins_time, NoBins_z;
75 
76  vector<vector<DVector3> >sc_pos; // SC geometry vector
77  vector<vector<DVector3> >sc_norm;
78  // Grab match track detector parameters
79  //DTOFHitMatchParams locTOFHitMatchParams; // TOF
80  //DSCHitMatchParams locSCHitMatchParams; // SC
81  // Declare event vertex vector
82  //DVector3 vertex;
83  // Declare a vector which quantizes the point of the intersection of a charged particle
84  // with a plane in the middle of the scintillator
85  //DVector3 IntersectionPoint;
86  // Declare a vector which quantizes the unit vector of the charged particle track traversing
87  // through the scintillator with its origin at the intersection point
88  //DVector3 IntersectionDir;
89  // Grab the paramteres associated to a track matched to the ST
90  //vector<DSCHitMatchParams> st_params;
91  // Declare r and z coord. of track vertex, sc array index
92  //double z_v, r_v;
93  //int sc_index;
94  double Photonspeed;
95  // Cuts
97  double pim_pmag_cut;
98  double sc_angle_corr;
99  //bool z_vertex_cut, r_vertex_cut;
100  //bool foundTOF, foundSC, foundSCandTOF;
101  //bool sc_match, sc_match_pid;
102  // ******************* 2D histos **************
107 
111 
113  //Define Calibration parameters variable called from CCDB
114  vector<vector<double> >propagation_time_corr;
115  vector<vector<double> >PTC_Boundary;
116 };
117 #endif // _JEventProcessor_ST_Propagation_Time_
118 
jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber)
Called every event.
const Int_t NCHANNELS
jerror_t fini(void)
Called after last event of last event source has been processed.
jerror_t init(void)
Called once at program start.
jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber)
Called everytime a new run number is detected.
jerror_t erun(void)
Called everytime run number changes, provided brun has been called.
vector< vector< DVector3 > > sc_pos
double locSCzIntersection;