00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef STAR_StPointCollection
00036 #define STAR_StPointCollection
00037
00038 #ifndef HEP_SYSTEM_OF_UNITS_H
00039 #include "SystemOfUnits.h"
00040 #endif
00041
00042 #include "StEpcConstants.h"
00043 #include "StEpcCut.h"
00044 #include <vector>
00045 #include <algorithm>
00046 #include <utility>
00047 #include "TObjArray.h"
00048 #include "TDataSet.h"
00049 #include "TDataSetIter.h"
00050 #include "TTableSorter.h"
00051 #include "StPi0Candidate.h"
00052 #include "StMessMgr.h"
00053
00054 #if !defined(ST_NO_NAMESPACES)
00055 using std::vector;
00056 using namespace units;
00057 using std::min;
00058 using std::max;
00059 #endif
00060
00061 #ifdef ST_NO_TEMPLATE_DEF_ARGS
00062 #define StVector(T) vector<T, allocator<T> >
00063
00064 typedef vector<int, allocator<int> > intVector;
00065 typedef vector<Float_t,allocator<Float_t> > FloatVector;
00066 #else
00067 #define StVector(T) vector<T>
00068
00069 typedef vector<int> intVector;
00070 typedef vector<Float_t> FloatVector;
00071 #endif
00072
00073 class TBrowser;
00074 class StEmcClusterCollection;
00075 class StEmcCluster;
00076 class StEvent;
00077 class StEmcPoint;
00078 class StEmcPosition;
00079
00080 typedef StVector(StEmcCluster*) StMatchVecClus;
00081 typedef StVector(StEmcCluster*)::iterator StMatchVecClusIter;
00082
00083 class StPointCollection : public TDataSet
00084 {
00085
00086 private:
00087 TObjArray mPoints;
00088 TObjArray mPointsReal;
00089 Int_t mNPoints;
00090 Int_t mNPointsReal;
00091 double mBField;
00092 Bool_t mPrint;
00093 StEmcPosition* mPosition;
00094 protected:
00095
00096 public:
00097
00098 StPointCollection();
00099 StPointCollection(const Char_t *);
00100 virtual ~StPointCollection();
00101 virtual void Browse(TBrowser* b);
00102
00103 void SetBField(double B)
00104 {
00105 mBField=B;
00106 }
00107 Int_t NPoints() const;
00108 const TObjArray* Points() const;
00109 Int_t NPointsReal() const;
00110 const TObjArray* PointsReal() const;
00111
00112 Int_t makeEmcPoints(StEvent* event);
00113
00114 Int_t findMatchedClusters(StEmcClusterCollection*,
00115 StEmcClusterCollection*,
00116 StEmcClusterCollection*,
00117 StEmcClusterCollection*);
00118
00119 StEmcPoint* makePoint(StEmcCluster*,StEmcCluster*,StEmcCluster*,StEmcCluster*,Float_t=1);
00120
00121 void ClusterSort(StEmcClusterCollection*,
00122 StEmcClusterCollection*,
00123 StEmcClusterCollection*,
00124 StEmcClusterCollection*);
00125
00126 virtual Int_t matchClusters(const StMatchVecClus,
00127 const StMatchVecClus,
00128 const StMatchVecClus,
00129 const StMatchVecClus);
00130
00131 virtual Int_t matchToTracks(StEvent*);
00132
00133 void setPrint(Bool_t a)
00134 {
00135 LOG_INFO << "::setPrint() is obsolete. Use logger config file to set verbosity instead." << endm;
00136 }
00137
00138 ClassDef(StPointCollection,1)
00139 };
00140
00141 inline Int_t StPointCollection::NPointsReal() const
00142 {
00143 return mNPointsReal;
00144 }
00145 inline const TObjArray* StPointCollection::PointsReal() const
00146 {
00147 return &mPointsReal;
00148 }
00149 inline Int_t StPointCollection::NPoints() const
00150 {
00151 return mNPoints;
00152 }
00153 inline const TObjArray* StPointCollection::Points() const
00154 {
00155 return &mPoints;
00156 }
00157
00158 #endif
00159
00160
00161
00162
00163