StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcPointFinderIU.h
1 
12 #ifndef _ST_POINT_FINDER_IU_H_
13 #define _ST_POINT_FINDER_IU_H_
14 
15 #include <set>
16 
17 #include "StRoot/St_base/Stypes.h"
18 #include "StRoot/StEEmcUtil/EEmcGeom/EEmcGeomDefs.h"
19 #include "StRoot/StEEmcUtil/EEmcGeom/EEmcGeomSimple.h"
20 #include "StRoot/StEEmcUtil/EEmcSmdMap/EEmcSmdMap.h"
21 #include "StRoot/StEEmcUtil/StEEmcSmd/EEmcSmdGeom.h"
22 
23 #include "StEEmcPointFinder.h"
24 #include "StSimpleCluster.h"
25 #include "StEEmcHit.h"
26 #include "StEEmcHitMaker.h"
27 #include "StESMDClustersPerSector.h"
28 
30 
31  public:
33  virtual ~StEEmcPointFinderIU_t() { /* */ };
34 
36  virtual void clear(){ /* */ };
37 
39  virtual Int_t find( const EEmcEnergy_t& eemcEnergy,
40  const StSimpleClusterVec_t &towerClusterVec,
41  const StESMDClustersVec_t &smdClusterVec,
42  const Double_t* smdEuEvRatio,
43  StEEmcHitVec_t& hitVec );
44 
45  // modifiers
46  void setMinUVRatio( Float_t ratio ){ mMinUVratio = ratio; };
47  void setTowerThreshold( Float_t thres ){ mTowerThreshold = thres; };
48  void setZratioThres( Float_t thres ){ mZratioThres = thres; };
49 
50  protected:
51  // function used to sort strips
52  // defined here so is inlined
53  struct clusterLessThan {
54  const Bool_t operator()( const StSimpleCluster_t *a, const StSimpleCluster_t *b) const {
55  // check for 0
56  if (a == 0) {
57  return b != 0; // if b is also 0, then they are equal, hence a is not < than b
58  } else if (b == 0) {
59  return false;
60  } else {
61  return a->getSeedMember() < b->getSeedMember();
62  };
63  };
64  };
65  struct clusterMoreThan {
66  const Bool_t operator()( const StSimpleCluster_t *a, const StSimpleCluster_t *b) const {
67  // check for 0
68  if (b == 0) {
69  return a != 0; // if a is also 0, then they are equal, hence a is not > than b
70  } else if (a == 0) {
71  return false;
72  } else {
73  return a->getSeedMember() > b->getSeedMember();
74  };
75  };
76  };
77 
78  // Function used to sort candidate hits.
79  static Bool_t hitTtest2LessThan( const StEEmcHit_t &h1, const StEEmcHit_t &h2 ) {
80  return h1.getTtest2() < h2.getTtest2();
81  };
82 
83  // typedef for the cluster pools
84  typedef std::set< const StSimpleCluster_t*, clusterLessThan > StClusterPool_t;
85  //typedef std::set< const StSimpleCluster_t* > StClusterPool_t;
86 
87 
88  // geometry type classes
89  EEmcSmdGeom *mEEmcSmdGeom;
90  EEmcSmdMap *mEEmcSmdMap;
91  EEmcGeomSimple mEEmcGeomSimple;
92 
93  // the ratio of u/v energy and v/u energy must both be greater than this minimum
94  Float_t mMinUVratio;
95  Float_t mZratioThres;
96  Float_t mTtestThres;
97  Bool_t mUseBugFixes;
98 
99  // Minimun energy for a tower to allow a point underneath
100  Float_t mTowerThreshold;
101 
102  // class variable to keep track of things for recurseive algo
103  Int_t mSector;
104  Int_t mLastSMDhitID;
105 
106  // recursive point finder
107  Int_t findPoints( const EEmcEnergy_t& eemcEnergy,
108  StClusterPool_t &uClusterVec,
109  StClusterPool_t &vClusterVec,
110  StEEmcHitVec_t& hitVec );
111 
112  private:
113  ClassDef( StEEmcPointFinderIU_t, 1 );
114 
115 };
116 
117 #endif
118 
119 /*
120  * $Id: StEEmcPointFinderIU.h,v 1.2 2013/02/21 22:00:44 sgliske Exp $
121  * $Log: StEEmcPointFinderIU.h,v $
122  * Revision 1.2 2013/02/21 22:00:44 sgliske
123  * general update
124  *
125  * Revision 1.1 2012/11/26 19:05:55 sgliske
126  * moved from offline/users/sgliske/StRoot/StEEmcPool/StEEmcHitMaker to StRoot/StEEmcPool/StEEmcHitMaker
127  *
128  *
129  */
Int_t findPoints(const EEmcEnergy_t &eemcEnergy, StClusterPool_t &uClusterVec, StClusterPool_t &vClusterVec, StEEmcHitVec_t &hitVec)
virtual Int_t find(const EEmcEnergy_t &eemcEnergy, const StSimpleClusterVec_t &towerClusterVec, const StESMDClustersVec_t &smdClusterVec, const Double_t *smdEuEvRatio, StEEmcHitVec_t &hitVec)
find some some points
The class.
Definition: StEEmcHit.h:37
virtual void clear()
clear things before doing the finding for the next event
EEMC simple geometry.