Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JEventProcessor_FCAL_Hadronic_Eff.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: JEventProcessor_FCAL_Hadronic_Eff.h
4 //
5 
6 #ifndef _JEventProcessor_FCAL_Hadronic_Eff_
7 #define _JEventProcessor_FCAL_Hadronic_Eff_
8 
9 #include <JANA/JEventProcessor.h>
10 #include <JANA/JApplication.h>
11 
12 #include "TH1I.h"
13 #include "TH2I.h"
14 
15 #include "TRIGGER/DTrigger.h"
17 
18 #include "FCAL/DFCALShower.h"
19 #include "PID/DChargedTrack.h"
21 #include "PID/DParticleID.h"
22 #include "PID/DDetectorMatches.h"
23 #include "ANALYSIS/DCutActions.h"
25 
26 #include <vector>
27 #include <string>
28 #include <iostream>
29 #include <map>
30 #include <set>
31 #include <thread>
32 
33 using namespace jana;
34 using namespace std;
35 
36 class JEventProcessor_FCAL_Hadronic_Eff : public jana::JEventProcessor
37 {
38  public:
41  const char* className(void){return "JEventProcessor_FCAL_Hadronic_Eff";}
42 
43  private:
44  jerror_t init(void); ///< Called once at program start.
45  jerror_t brun(jana::JEventLoop* locEventLoop, int locRunNumber); ///< Called every time a new run number is detected.
46  jerror_t evnt(jana::JEventLoop* locEventLoop, uint64_t locEventNumber); ///< Called every event.
47  jerror_t erun(void); ///< Called every time run number changes, provided brun has been called.
48  jerror_t fini(void); ///< Called after last event of last event source has been processed.
49 
50  double Calc_FCALTiming(const DChargedTrackHypothesis* locChargedTrackHypothesis, const DParticleID* locParticleID, const DEventRFBunch* locEventRFBunch, double& locDeltaT);
51  bool Cut_TOFTiming(const DChargedTrackHypothesis* locChargedTrackHypothesis);
52 
53  //TRACK REQUIREMENTS
54  double dMaxTOFDeltaT;
56  unsigned int dMinNumTrackHits;
57  int dMinHitRingsPerCDCSuperlayer, dMinHitPlanesPerFDCPackage;
59  double dMaxVertexR;
61 
62  //HISTOGRAMS
67 
68  //TREE
70  //thread_local: Each thread has its own object: no lock needed
71  //important: manages it's own data internally: don't want to call new/delete every event!
72  static thread_local DTreeFillData dTreeFillData;
73 };
74 
75 #endif // _JEventProcessor_FCAL_Hadronic_Eff_
76 
static thread_local DTreeFillData dTreeFillData
DCutAction_TrackHitPattern * dCutAction_TrackHitPattern