Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JEventProcessor_FCALgains.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DEventProcessor_FCAL_Shower.h
4 // Created: Fri Oct 10 16:41:18 EDT 2014
5 // Creator: adesh (on Linux ifarm1101 2.6.32-220.7.1.el6.x86_64 x86_64)
6 //
7 
8 #ifndef _DEventProcessor_FCAL_Shower_
9 #define _DEventProcessor_FCAL_Shower_
10 
11 #include <JANA/JEventProcessor.h>
12 #include <JANA/JApplication.h>
13 
15 #include <HDDM/DEventWriterREST.h>
18 #include "TRACKING/DTrackFinder.h"
19 
20 #include "DLorentzVector.h"
21 #include "TMatrixD.h"
22 
23 
24 using namespace jana;
25 using namespace std;
26 
27 class JEventProcessor_FCALgains : public jana::JEventProcessor
28 {
29  public:
32  const char* className(void){return "JEventProcessor_FCALgains";}
33  //DVector3 Calc_CrudeVertex(const deque< const DKinematicData* > & locParticles) const;
34 
35 
36  private:
37  //const DAnalysisUtilities* dAnalysisUtilities;
38  jerror_t init(void); ///< Called once at program start.
39  jerror_t brun(jana::JEventLoop* locEventLoop, int32_t locRunNumber); ///< Called every time a new run number is detected.
40  jerror_t evnt(jana::JEventLoop* locEventLoop, uint64_t locEventNumber); ///< Called every event.
41  jerror_t erun(void); ///< Called every time run number changes, provided brun has been called.
42  jerror_t fini(void); ///< Called after last event of last event source has been processed
43  //jerror_t fillHists();
44 //double m_x;
45 
46 //vector<vector<string> > ParseTSV(const char* s);
47  int XYtoAbsNum(int my_x, int my_y);
48  pair<int,int> AbsNumtoXY(int channel);
49 
52 
53 
54 
55 
56  // bool read_gains;
57 
58  int faredge;
59  int beamline;
60 
62 
65  int m_event;
66  int m_recon;
67  int m_nmesons;
69  int *m_hits;
70  int *m_channel;
71  double *m_grad;
72  double m_mesonmass;
73  double m_pi0mass;
74  double m_etamass;
75  double scale1;
76  double scale2;
77  double z_diff;
78 
79  double scale_factors[10000];
80 
81 
82  //PLUGIN PARAMETERS
83  // string GAIN_FACTOR_PATH;
84  double SCALE_FACTOR;
85  //string outfile;
87  double MASS_CUT_HI;
88  double MASS_CUT_LO;
89  int NHITS_CUT;
90 
91  vector<double> gainfactors;
92  vector<int> nhits_vec;
93 
94  TFile* m_rootFile;
95 
96  TMatrixD m_mC;
97  TMatrixD m_mD;
98  TMatrixD m_mL;
99  TMatrixD m_mLt;
100  TMatrixD m_mPi0;
101  TMatrixD m_massDiff;
102  TMatrixD m_nhits;
103  double m_massbias;
104 
105  TH2F* h2D_mC;
106  TH1F* h1D_mL;
107  TH1F* h1D_mD;
109  TH1F* h1D_mPi0;
112  TH1F* h1D_nhits;
115  TH2F* hits2D;
116  TH2F* hits2D_pi0;
117  TH1F* h1D_ebyp;
118 
119 };
120 
121 #endif // _DEventProcessor_FCAL_Shower_
122 
pair< int, int > AbsNumtoXY(int channel)