Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DEventProcessor_track_hists.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DEventProcessor_track_hists.h
4 // Created: Wed Oct 10 13:30:37 EDT 2007
5 // Creator: davidl (on Darwin fwing-dhcp95.jlab.org 8.10.1 i386)
6 //
7 
8 #ifndef _DEventProcessor_track_hists_
9 #define _DEventProcessor_track_hists_
10 
11 #include <pthread.h>
12 #include <map>
13 using std::map;
14 
15 #include <TTree.h>
16 #include <TFile.h>
17 #include <TH1.h>
18 #include <TH2.h>
19 
20 #include <JANA/JFactory.h>
21 #include <JANA/JEventProcessor.h>
22 #include <JANA/JEventLoop.h>
23 
24 #include <PID/DKinematicData.h>
26 #include <TRACKING/DMCTrackHit.h>
27 #include <TRACKING/DMCThrown.h>
28 #include <CDC/DCDCTrackHit.h>
29 #include <FDC/DFDCHit.h>
30 #include <FDC/DFDCWire.h>
32 
33 #include "dchit.h"
34 #include "trackpar.h"
35 
36 class DEventProcessor_track_hists:public JEventProcessor{
37 
38  public:
41 
42  TTree *fdchits, *cdchits, *ttrack;
47 
49  const DLorentzDeflections *lorentz_def;//< Correction to FDC cathodes due to Lorentz force
50 
51  class hit_info_t{
52  public:
53  // Inputs
56  double tdrift;
57 
58  // Outputs
59  double doca;
60  double dist;
61  double tof;
62  double u;
63  double u_lorentz;
64  int LRfit;
66  TVector3 pos_doca;
67  TVector3 mom_doca;
68  TVector3 pos_wire;
69 
70  void FindLR(vector<const DMCTrackHit*> &mctrackhits, const DLorentzDeflections *lorentz_def=NULL);
71  };
72 
73 
74  private:
75  jerror_t init(void); ///< Invoked via DEventProcessor virtual method
76  jerror_t brun(JEventLoop *loop, int32_t runnumber);
77  jerror_t evnt(JEventLoop *loop, uint64_t eventnumber); ///< Invoked via DEventProcessor virtual method
78  jerror_t erun(void); ///< Invoked via DEventProcessor virtual method
79  jerror_t fini(void); ///< Invoked via DEventProcessor virtual method
80 
81  pthread_mutex_t mutex;
82 
84  int Nevents;
85 };
86 
87 #endif // _DEventProcessor_track_hists_
88 
jerror_t brun(JEventLoop *loop, int32_t runnumber)
const DLorentzDeflections * lorentz_def
jerror_t evnt(JEventLoop *loop, uint64_t eventnumber)
Invoked via DEventProcessor virtual method.
void FindLR(vector< const DMCTrackHit * > &mctrackhits, const DLorentzDeflections *lorentz_def=NULL)
jerror_t fini(void)
Invoked via DEventProcessor virtual method.
jerror_t erun(void)
Invoked via DEventProcessor virtual method.
jerror_t init(void)
Invoked via DEventProcessor virtual method.