StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPointCollection.h
1 //
2 // $id$
3 //
4 // $Log: StPointCollection.h,v $
5 // Revision 1.8 2007/01/22 19:13:50 kocolosk
6 // use STAR logger for all output
7 //
8 // Revision 1.7 2005/05/23 12:35:14 suaide
9 // New Point maker code
10 //
11 // Revision 1.6 2003/05/26 13:44:35 suaide
12 // added setPrint() method
13 //
14 // Revision 1.5 2001/12/01 02:44:50 pavlinov
15 // Cleanp for events with zero number of tracks
16 //
17 // Revision 1.4 2001/11/06 23:35:27 suaide
18 // fixed bug in the way we get magnetic field
19 //
20 // Revision 1.3 2000/12/01 17:05:42 subhasis
21 // track matching after assignment, PRS, deltaeta,deltaphi added to StEmcPoint
22 //
23 // Revision 1.2 2000/08/29 20:13:39 subhasis
24 // Modified to accept StEvent input and writing out StEvent output for Emc
25 //
26 // Revision 1.1 2000/05/15 21:18:33 subhasis
27 // initial version
28 //
29 // Pi0 Candidate Finder Maker for EMC
30 //
31 //
32 // Author: Subhasis Chattopadhyay, Jan 2000
33 //
34 
35 #ifndef STAR_StPointCollection
36 #define STAR_StPointCollection
37 
38 #ifndef HEP_SYSTEM_OF_UNITS_H
39  #include "SystemOfUnits.h"
40 #endif
41 
42 #include "StEpcConstants.h"
43 #include "StEpcCut.h"
44 #include <vector>
45 #include <algorithm>
46 #include <utility>
47 #include "TObjArray.h"
48 #include "TDataSet.h"
49 #include "TDataSetIter.h"
50 #include "TTableSorter.h"
51 #include "StPi0Candidate.h"
52 #include "StMessMgr.h"
53 
54 #if !defined(ST_NO_NAMESPACES)
55 using std::vector;
56 using namespace units;
57 using std::min;
58 using std::max;
59 #endif
60 
61 #ifdef ST_NO_TEMPLATE_DEF_ARGS
62  #define StVector(T) vector<T, allocator<T> >
63 
64 typedef vector<int, allocator<int> > intVector;
65 typedef vector<Float_t,allocator<Float_t> > FloatVector;
66 #else
67  #define StVector(T) vector<T>
68 
69 typedef vector<int> intVector;
70 typedef vector<Float_t> FloatVector;
71 #endif
72 
73 class TBrowser;
75 class StEmcCluster;
76 class StEvent;
77 class StEmcPoint;
78 class StEmcPosition;
79 
80 typedef StVector(StEmcCluster*) StMatchVecClus;
81 typedef StVector(StEmcCluster*)::iterator StMatchVecClusIter;
82 
84 {
85 
86 private:
87  TObjArray mPoints;
88  TObjArray mPointsReal;
89  Int_t mNPoints;
90  Int_t mNPointsReal;
91  double mBField;
92  Bool_t mPrint;
93  StEmcPosition* mPosition;
94 protected:
95 
96 public:
97 
99  StPointCollection(const Char_t *);
100  virtual ~StPointCollection();
101  virtual void Browse(TBrowser* b); // mPoints ..
102 
103  void SetBField(double B)
104  {
105  mBField=B;
106  }
107  Int_t NPoints() const;
108  const TObjArray* Points() const;
109  Int_t NPointsReal() const;
110  const TObjArray* PointsReal() const;
111 
112  Int_t makeEmcPoints(StEvent* event);
113 
114  Int_t findMatchedClusters(StEmcClusterCollection*,
118 
120 
121  void ClusterSort(StEmcClusterCollection*,
125 
126  virtual Int_t matchClusters(const StMatchVecClus,
127  const StMatchVecClus,
128  const StMatchVecClus,
129  const StMatchVecClus);
130 
131  virtual Int_t matchToTracks(StEvent*);
132 
133  void setPrint(Bool_t a)
134  {
135  LOG_INFO << "::setPrint() is obsolete. Use logger config file to set verbosity instead." << endm;
136  }
137 
138  ClassDef(StPointCollection,1)// Base class for electromagnetic calorimeter Point collection
139 };
140 //
141 inline Int_t StPointCollection::NPointsReal() const
142 {
143  return mNPointsReal;
144 }
145 inline const TObjArray* StPointCollection::PointsReal() const
146 {
147  return &mPointsReal;
148 }
149 inline Int_t StPointCollection::NPoints() const
150 {
151  return mNPoints;
152 }
153 inline const TObjArray* StPointCollection::Points() const
154 {
155  return &mPoints;
156 }
157 
158 #endif
159 
160 
161 
162 
163 
void setPrint(Bool_t a)
Obsolete function; users can control messages with logger config file.