Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DBCALCluster_factory.h
Go to the documentation of this file.
1 #ifndef _DBCALCluster_factory_
2 #define _DBCALCluster_factory_
3 
4 /*
5  * DBCALCluster_factory.h
6  *
7  * Created by Matthew Shepherd on 3/12/11.
8  *
9  */
10 
11 #include <JANA/JFactory.h>
12 #include <JANA/JEventLoop.h>
13 
14 using namespace jana;
15 
16 #include "BCAL/DBCALHit.h"
17 #include "BCAL/DBCALCluster.h"
18 #include "BCAL/DBCALUnifiedHit.h"
19 #include "BCAL/DBCALGeometry.h"
21 
22 #include "TF1.h"
23 
24 class DBCALCluster_factory : public JFactory< DBCALCluster > {
25 
26 public:
27 
30 
31 private:
32 
33  jerror_t evnt(JEventLoop *loop, uint64_t eventnumber);
34  jerror_t brun(JEventLoop *loop, int32_t runnumber);
35 
36  void clearPoints();
37 
38  // these routines combine points and clusters together
39 
40  vector<DBCALCluster*> clusterize( vector< const DBCALPoint* > points, vector< const DBCALPoint* > usedPoints, vector< const DBCALUnifiedHit* > hits, vector< const DTrackWireBased* > tracks ) const;
41  void merge( vector<DBCALCluster*>& clusters, double point_reatten_E ) const;
42 
43  // This routine removes a point from its original cluster and adds it to its closest cluster if applicable.
44  void recycle_points( vector<const DBCALPoint*> usedPoints, vector<DBCALCluster*>& clusters ) const;
45 
46  // these are the routines used for testing whether things should be
47  // combined -- right now very basic, but can be fine tuned in the future
48 
49  bool overlap( const DBCALCluster& highEClust,
50  const DBCALCluster& lowEClust ) const;
51 
52  bool overlap( const DBCALCluster& clust,
53  const DBCALPoint* point ) const;
54 
55  bool overlap_charged( const DBCALCluster& clust,
56  const DBCALPoint* point, float tracked_phi ) const;
57 
58  bool overlap( const DBCALCluster& clust,
59  const DBCALUnifiedHit* hit ) const;
60 
62  float m_mergeSig;
65  float m_timeCut;
67 
69 
70  vector<double> effective_velocities;
71  vector< vector<double > > attenuation_parameters;
72 
74 
75  /*
76  TF1* sep_inclusion_curve;
77  TF1* dtheta_inclusion_curve;
78  TF1* dphi_inclusion_curve;
79  TF1* C1_parm;
80  TF1* C2_parm;
81  */
82  jerror_t init();
83  jerror_t fini();
84 
85 };
86 
87 #endif
88 
The DTrackFitter class is a base class for different charged track fitting algorithms. It does not actually fit the track itself, but provides the interface and some common support features most algorthims will need to implement.
Definition: DTrackFitter.h:61
vector< vector< double > > attenuation_parameters
vector< double > effective_velocities
const DBCALGeometry * m_BCALGeom
const DTrackFitter * fitter