00001 00012 #ifndef STAR_StGenericVertexFinder 00013 #define STAR_StGenericVertexFinder 00014 00015 #include "StEventTypes.h" 00016 #include "StPrimaryVertex.h" 00017 00018 class StEvent; 00019 00020 class StGenericVertexFinder { 00021 public: 00022 // virtual and '=0' ; those MUST be implemented 00023 virtual ~StGenericVertexFinder(); // virtual destructor 00024 virtual int fit(StEvent*)=0; // fit the vertex 00025 00026 StPrimaryVertex* getVertex(int idx) const; 00027 void addVertex(StPrimaryVertex*); 00028 int size() const; 00029 virtual void UseVertexConstraint(double, double, double, double, double)=0; 00030 void NoVertexConstraint(); 00031 int IsVertexConstraint() const {return mVertexConstrain;} 00032 virtual void UsePCT(bool usePCT = true); 00033 virtual void UseBTOF(bool useBTOF = true){mUseBtof=useBTOF;} 00034 virtual void CalibBeamLine(){ /* noop */;} // overload if useful 00035 00036 virtual void printInfo(ostream& = cout) const=0; 00037 00038 // General (default) 00039 virtual void SetMode(Int_t mode=0 ) {mMode = mode;} 00040 virtual int GetMode() const {return mMode;} 00041 void SetDebugLevel(Int_t level) {mDebugLevel=level;} 00042 virtual void Init(){ /* noop */;} 00043 virtual void Finish(){ /* noop */;} 00044 virtual void InitRun (int runumber){ /* noop */;} 00045 virtual void Clear(); 00046 const std::vector<StPrimaryVertex> *result() {return &mVertexList;} 00047 00048 void FillStEvent(StEvent*); 00049 00050 protected: //................................ 00051 00052 StGenericVertexFinder(); 00053 private: 00054 vector<StPrimaryVertex> mVertexList; // Holds all found prim veritcess 00055 00056 protected: //................................ 00057 StPrimaryVertexOrder mVertexOrderMethod; // will default to 0 i.e. orderByNumberOfDaughters 00058 bool mVertexConstrain; // Use vertex constraint from db 00059 int mMode; // used for any Finder behavior change 00060 int mDebugLevel; 00061 bool mUseBtof; // default use btof = false 00062 00063 }; 00064 00065 00066 00067 // $Log: StGenericVertexFinder.h,v $ 00068 // Revision 1.20 2010/09/10 21:06:45 rjreed 00069 // Added function UseBOTF and bool mUseBtof to switch the use of the TOF on and off in vertex finding. Default value is off (false). 00070 // 00071 // Revision 1.19 2009/11/11 03:52:14 genevb 00072 // Re-order the vertices upon filling StEvent 00073 // 00074 // Revision 1.18 2009/07/09 00:16:12 genevb 00075 // Create a calib mode for StGenericVertex when using VtxSeedCalG 00076 // 00077 // Revision 1.17 2008/10/23 20:37:31 genevb 00078 // Add switches for turning on/off use of Post-Crossing Tracks [default:off] 00079 // 00080 // Revision 1.16 2006/04/26 15:37:04 jeromel 00081 // mVertexOrderMethod (To be tested) 00082 // 00083 // Revision 1.15 2006/04/08 00:18:10 mvl 00084 // Added member for debuglevel 00085 // 00086 // Revision 1.14 2005/07/19 21:45:53 perev 00087 // MultiVertex 00088 // 00089 // Revision 1.13 2005/06/21 02:16:36 balewski 00090 // multiple prim vertices are stored in StEvent 00091 // 00092 // Revision 1.12 2005/03/11 22:23:53 balewski 00093 // towards PPV 00094 // 00095 // Revision 1.11 2005/03/09 19:24:18 balewski 00096 // preparation for PPV vertex finder 00097 // 00098 // Revision 1.10 2004/12/13 20:39:58 fisyak 00099 // Add initaition of StGenericVertexFinder variables, replace mDumMaker by StMaker::GetChain() method 00100 // 00101 // Revision 1.9 2004/09/13 15:41:30 balewski 00102 // fix bug in ppLMV4/5 switch 00103 // 00104 // Revision 1.8 2004/09/03 00:09:08 jeromel 00105 // Modified code to Implement Init() and SetMode() and allow passing a switch 00106 // to chose the vertex finder from within the same code implementation. Was 00107 // needed for ppLMV (one implementation, two algorithm) 00108 // 00109 // Revision 1.7 2004/08/04 21:57:56 balewski 00110 // toward smarter ppLMV5 00111 // 00112 // Revision 1.6 2004/07/24 19:40:38 balewski 00113 // fix swap of vert & errVert 00114 // 00115 // Revision 1.5 2004/07/24 02:57:40 balewski 00116 // clean up of ppLMV, CTB-util separated 00117 // 00118 // Revision 1.4 2004/07/23 02:24:38 jeromel 00119 // Oops ... Worng swithc (had twice Minuit). Now corrected. 00120 // 00121 // Revision 1.3 2004/07/23 00:58:19 jeromel 00122 // Base class method+data member (was duplicated in implementation) 00123 // 00124 // Revision 1.2 2004/04/06 02:43:43 lbarnby 00125 // Fixed identification of bad seeds (no z~0 problem now). Better flagging. Message manager used. 00126 // 00127 // Revision 1.1 2003/05/09 22:22:36 lbarnby 00128 // Initial revision: a base class for STAR (StEvent-based) vertex finders 00129 // 00130 #endif
1.5.9