Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DEventProcessor_candidate_tree.h
Go to the documentation of this file.
1 // $Id: DEventProcessor_candidate_tree.h 5685 2009-11-05 19:57:00Z staylor $
2 //
3 // File: DEventProcessor_candidate_tree.h
4 // Created: Fri Aug 20 13:22:33 EDT 2010
5 // Creator: davidl (on Darwin harriet.jlab.org 9.8.0)
6 //
7 
8 #ifndef _DEventProcessor_candidate_tree_
9 #define _DEventProcessor_candidate_tree_
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_candidate_tree: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
51 
52  class hit_info_t{
53  public:
54  // Inputs
57  double tdrift;
58 
59  // Outputs
60  double doca;
61  double dist;
62  double tof;
63  double u;
64  double u_lorentz;
65  int LRfit;
67  TVector3 pos_doca;
68  TVector3 mom_doca;
69  TVector3 pos_wire;
70 
71  void FindLR(vector<const DMCTrackHit*> &mctrackhits, const DLorentzDeflections *lorentz_def=NULL);
72  };
73 
74 
75  private:
76  jerror_t init(void); ///< Invoked via DEventProcessor virtual method
77  jerror_t brun(JEventLoop *loop, int32_t runnumber);
78  jerror_t evnt(JEventLoop *loop, uint64_t eventnumber); ///< Invoked via DEventProcessor virtual method
79  jerror_t erun(void); ///< Invoked via DEventProcessor virtual method
80  jerror_t fini(void); ///< Invoked via DEventProcessor virtual method
81 
82  pthread_mutex_t mutex;
83 
85  int Nevents;
86 
87  int Nwarnings;
88 };
89 
90 #endif // _DEventProcessor_candidate_tree_
91 
jerror_t init(void)
Invoked via DEventProcessor virtual method.
void FindLR(vector< const DMCTrackHit * > &mctrackhits, const DLorentzDeflections *lorentz_def=NULL)
jerror_t erun(void)
Invoked via DEventProcessor virtual method.
jerror_t fini(void)
Invoked via DEventProcessor virtual method.
jerror_t brun(JEventLoop *loop, int32_t runnumber)
jerror_t evnt(JEventLoop *loop, uint64_t eventnumber)
Invoked via DEventProcessor virtual method.