Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DDetectorMatches_factory_Combo.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DDetectorMatches_factory_Combo.h
4 // Created: Tue Aug 9 14:29:24 EST 2011
5 // Creator: pmatt (on Linux ifarml6 2.6.18-128.el5 x86_64)
6 //
7 
8 #ifndef _DDetectorMatches_factory_Combo_
9 #define _DDetectorMatches_factory_Combo_
10 
11 #include <iostream>
12 #include <iomanip>
13 
14 #include <JANA/JFactory.h>
16 
17 #include <PID/DDetectorMatches.h>
19 #include <PID/DParticleID.h>
20 #include <TOF/DTOFPoint.h>
21 #include <BCAL/DBCALShower.h>
22 #include <FCAL/DFCALShower.h>
23 
24 using namespace std;
25 using namespace jana;
26 
27 class DDetectorMatches_factory_Combo : public jana::JFactory<DDetectorMatches>
28 {
29  public:
30  DDetectorMatches_factory_Combo(){use_factory = 1;}; //prevents JANA from searching the input file for these objects
32  const char* Tag(void){return "Combo";}
33 
34  private:
35  jerror_t init(void); ///< Called once at program start.
36  jerror_t brun(jana::JEventLoop *locEventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
37  jerror_t evnt(jana::JEventLoop *locEventLoop, uint64_t eventnumber); ///< Called every event.
38  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
39  jerror_t fini(void); ///< Called after last event of last event source has been processed.
40 
41  pair<double, double> Calc_EnergyRatio(const DTrackTimeBased* locTrackTimeBased, const DTrackTimeBased* locOriginalTrackTimeBased) const;
42  double Calc_PVariance(const DTrackTimeBased* locTrack) const;
43 
45 };
46 
47 #endif // _DDetectorMatches_factory_Combo_
48 
DDetectorMatches_factory * dDetectorMatchesFactory