Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JEventProcessor_ST_Tresolution.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: JEventProcessor_ST_Tresolution.h
4 // Created: Fri Jan 8 09:07:34 EST 2016
5 // Creator: mkamel (on Linux ifarm1401 2.6.32-431.el6.x86_64 x86_64)
6 //
7 
8 #ifndef _JEventProcessor_ST_Tresolution_
9 #define _JEventProcessor_ST_Tresolution_
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_Tresolution:public jana::JEventProcessor{
48  public:
51  const char* className(void){return "JEventProcessor_ST_Tresolution";}
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  double z_target_center; // Target center along z
60  double dRFBunchPeriod; // RF bunch period from CCDBr
61  //////////////////////////////////
62  //double locSCHitTime, locSCTrackFlightTime, locFlightTimeCorrectedSCTime;
63  //double locTOFHitTime, locTOFTrackFlightTime, locFlightTimeCorrectedTOFTime;
64  //double locCenteredRFTime, locCenterToVertexRFTime, locVertexRFTime, locPeriod;
65  //double SC_RFShiftedTime;
66  //double locSCzIntersection;
67  //double locSCPropTime;
68  //double sc_pos_soss, sc_pos_eoss, sc_pos_eobs, sc_pos_eons;
69  //double Corr_Time,Corr_Time_ss,Corr_Time_bs,Corr_Time_ns, Corr_Time_bn;
70  //double time_lower_limit, time_upper_limit, z_lower_limit, z_upper_limit;
71  //int NoBins_time, NoBins_z;
72  //double st_time, FlightTime, st_corr_FlightTime;
73  vector<vector<DVector3> >sc_pos; // SC geometry vector
74  vector<vector<DVector3> >sc_norm;
75  // Grab match track detector parameters
76  //DTOFHitMatchParams locTOFHitMatchParams; // TOF
77  //DSCHitMatchParams locSCHitMatchParams; // SC
78  // Declare event vertex vector
79  //DVector3 vertex;
80  // Declare a vector which quantizes the point of the intersection of a charged particle
81  // with a plane in the middle of the scintillator
82  //DVector3 IntersectionPoint;
83  // Declare a vector which quantizes the unit vector of the charged particle track traversing
84  // through the scintillator with its origin at the intersection point
85  //DVector3 IntersectionDir;
86  // Grab the paramteres associated to a track matched to the ST
87  //vector<DSCHitMatchParams> st_params;
88  // Declare r and z coord. of track vertex, sc array index
89  //double z_v, r_v;
90  //int sc_index;
91  // Cuts
93  double pim_pmag_cut;
94  double sc_angle_corr;
95  //bool z_vertex_cut, r_vertex_cut;
96  //bool foundTOF, foundSC, foundSCandTOF;
97  //bool sc_match, sc_match_pid;
98  // ******************* 2D histos **************
100  //Define Calibration parameters variable called from CCDB
101  vector<vector<double> >propagation_time_corr;
102  vector<vector<double> >PTC_Boundary;
103 };
104 
105 #endif // _JEventProcessor_ST_Tresolution_
106 
const Int_t NCHANNELS
vector< vector< double > > propagation_time_corr
jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber)
Called every event.
jerror_t init(void)
Called once at program start.
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 erun(void)
Called everytime run number changes, provided brun has been called.