Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DEventProcessor_eta_ntuple.h
Go to the documentation of this file.
1 // $Id: DEventProcessor_eta_ntuple.h 1816 2006-06-06 14:38:18Z davidl $
2 //
3 // File: DEventProcessor_eta_ntuple.h
4 // Created: Sun Apr 24 06:45:21 EDT 2005
5 // Creator: davidl (on Darwin Harriet.local 7.8.0 powerpc)
6 //
7 
8 #ifndef _DEventProcessor_eta_ntuple_
9 #define _DEventProcessor_eta_ntuple_
10 
11 #include <pthread.h>
12 
13 #include <TFile.h>
14 #include <TH1.h>
15 #include <TH2.h>
16 #include <TH3.h>
17 #include <TTree.h>
18 
19 #include <JANA/JFactory.h>
20 #include <JANA/JEventProcessor.h>
21 #include <JANA/JEventLoop.h>
22 using namespace jana;
23 
24 #include <Event.h>
25 
26 class DTrackWireBased;
27 class DMCThrown;
28 
29 #define MAX_PARTS 20
30 #define MAX_START 5
31 #define MAX_BCAL 10
32 
33 class DEventProcessor_eta_ntuple:public JEventProcessor{
34 
35  public:
36 
37  typedef struct{
38  int event; // event number
39  float E_beam; // E of beam photon
40  float px_beam; // px of beam photon
41  float py_beam; // py of beam photon
42  float pz_beam; // px of beam photon
43  float E_proton_thrown; // E of scattered proton
44  float px_proton_thrown; // px of scattered proton
45  float py_proton_thrown; // py of scattered proton
46  float pz_proton_thrown; // pz of scattered proton
47  float E_eta_thrown; // E of thrown eta
48  float px_eta_thrown; // px of thrown eta
49  float py_eta_thrown; // py of thrown eta
50  float pz_eta_thrown; // pz of thrown eta
51  float x; // x of interaction vertex (thrown)
52  float y; // y of interaction vertex (thrown)
53  float z; // z of interaction vertex (thrown)
54  int prod_mech; // production mechanism
55  int decay_mode; // decay mode
56  int Nfcal; // Number of reconstructed clusters in FCAL
57  float E_fcal[MAX_PARTS]; // E of the Nfcal clusters
58  float px_fcal[MAX_PARTS]; // px of the Nfcal clusters
59  float py_fcal[MAX_PARTS]; // py of the Nfcal clusters
60  float pz_fcal[MAX_PARTS]; // pz of the Nfcal clusters
61  float x_fcal[MAX_PARTS]; // x of the Nfcal clusters at FCAL
62  float y_fcal[MAX_PARTS]; // y of the Nfcal clusters at FCAL
63  float z_fcal[MAX_PARTS]; // z of the Nfcal clusters at FCAL
64  float E_eta_best; // E of reconstructed eta closest to eta mass
65  float px_eta_best; // px of reconstructed eta closest to eta mass
66  float py_eta_best; // py of reconstructed eta closest to eta mass
67  float pz_eta_best; // pz of reconstructed eta closest to eta mass
68  float M_eta_best; // M of reconstructed eta closest to eta mass
69  float t;
70  int Nstart; // Number of start counter hits
71  float phi_start[MAX_START]; // phi of paddle center for hit sc
72  float phi_start_diff[MAX_START]; // diff of sc phi and eta_best phi
73  float E_bcal_tot; // Total energy deposited in BCAL
74  int Nbcal; // Number of reconstructed BCAL photons
75  float E_bcal[MAX_BCAL]; // E of Nbcal clusters
76  float phi_bcal[MAX_BCAL]; // phi of Nbcal clusters
77  float theta_bcal[MAX_BCAL]; // theta of Nbcal clusters
79 
82 
83  Event *evt;
84  TTree *tree;
85 
86 
87  private:
88  jerror_t init(void); ///< Invoked via DEventProcessor virtual method
89  jerror_t evnt(JEventLoop *loop, uint64_t eventnumber); ///< Invoked via DEventProcessor virtual method
90  jerror_t erun(void); ///< Invoked via DEventProcessor virtual method
91  jerror_t fini(void); ///< Invoked via DEventProcessor virtual method
92 
93  TLorentzVector MakeTLorentz(const DKinematicData *track, double mass);
94 
95  pthread_mutex_t mutex;
96  bool make_root;
97  bool make_hbook;
99 
100  void FillNtuple(void);
101 };
102 
103 #endif // _DEventProcessor_eta_ntuple_
104 
Definition: track.h:16
#define MAX_BCAL
#define MAX_START
#define MAX_PARTS