Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DFDCCathodeCluster_factory.h
Go to the documentation of this file.
1 //********************************************************************
2 // DFDCCathodeCluster_factory.h: Class definition for a factory that
3 // associates cathode hits into clusters.
4 // Author: Craig Bookwalter
5 //********************************************************************
6 
7 #ifndef DFACTORY_DFDCCATHODECLUSTER_H
8 #define DFACTORY_DFDCCATHODECLUSTER_H
9 
10 #include <JANA/JFactory.h>
11 #include <JANA/JException.h>
12 #include <JANA/JStreamLog.h>
13 using namespace jana;
14 
15 #include "DFDCCathodeCluster.h"
16 #include "DFDCHit.h"
17 #include "DFDCGeometry.h"
18 
19 #include <algorithm>
20 #include <map>
21 #include <cmath>
22 
23 ///
24 /// class DFDCCathodeCluster_factory:
25 /// defines a JFactory for producing groups of cathode strips that form a cluster
26 ///
27 class DFDCCathodeCluster_factory : public JFactory<DFDCCathodeCluster> {
28  public:
29  ///
30  /// DFDCCathodeCluster_factory::DFDCCathodeCluster_factory():
31  /// default constructor--initializes log file
32  ///
34 
35  ///
36  /// DFDCCathodeCluster_factory::~DFDCCathodeCluster_factory():
37  /// default destructor--closes log file.
38  ///
40 
41  ///
42  /// DFDCCathodeCluster_factory::pique():
43  /// takes a single layer's worth of cathode hits and attempts to
44  /// create DFDCCathodeClusters
45  /// by grouping together hits with consecutive strip numbers.
46  ///
47  void pique(vector<const DFDCHit*>& h);
48 
49  protected:
50  ///
51  /// DFDCCathodeCluster_factory::evnt():
52  /// This (along with DFDCCathodeCluster_factory::pique())
53  /// is the place cathode hits are associated into cathode clusters. This function
54  /// should eventually be modified to do more sophisticated peak finding.
55  ///
56  jerror_t evnt(JEventLoop *eventLoop, uint64_t eventNo);
57  jerror_t init(void);
58  private:
59  JStreamLog* _log;
60  double TIME_SLICE;
61 };
62 
63 #endif // DFACTORY_DFDCCATHODECLUSTER_H
64 
class DFDCCathodeCluster_factory: defines a JFactory for producing groups of cathode strips that form...