00001 /*************************************************************************** 00002 * $Id: StGenericVertexFinder.cxx,v 1.15 2010/09/10 21:06:45 rjreed Exp $ 00003 * 00004 * Author: Lee Barnby, April 2003 00005 * 00006 *************************************************************************** 00007 * Description: Base class for vertex finders 00008 * 00009 ***************************************************************************/ 00010 #include "StGenericVertexFinder.h" 00011 #include "StMessMgr.h" 00012 #include "StMaker.h" 00013 00014 //______________________________________________________________________________ 00015 StGenericVertexFinder::StGenericVertexFinder() : 00016 mVertexConstrain(false), mMode(0), mDebugLevel(0), mUseBtof(false) 00017 { 00018 mVertexOrderMethod = orderByNumberOfDaughters; 00019 } 00020 //______________________________________________________________________________ 00021 StGenericVertexFinder::~StGenericVertexFinder() 00022 { 00023 } 00024 00030 //______________________________________________________________________________ 00031 void 00032 StGenericVertexFinder::FillStEvent(StEvent* event){ 00033 00034 for(UInt_t i=0;i<mVertexList.size(); i++) { 00035 //allocates new memory for each vertex 00036 StPrimaryVertex* primV = new StPrimaryVertex(mVertexList[i]); 00037 event->addPrimaryVertex(primV,mVertexOrderMethod); 00038 LOG_INFO << "StGenericVertexFinder::FillStEvent: Added " <<i+1 00039 <<" primary vertex (" << mVertexOrderMethod << ")" << endm; 00040 } 00041 00042 // Use StEvent's ordering 00043 // (might be undesirable for some debugging) 00044 // Also could be wrong if StEvent already has vertices for some reason 00045 mVertexList.clear(); 00046 for(UInt_t i=0;i<event->numberOfPrimaryVertices(); i++) 00047 mVertexList.push_back(*(event->primaryVertex(i))); 00048 00049 } 00050 //______________________________________________________________________________ 00051 void StGenericVertexFinder::addVertex(StPrimaryVertex* vtx) 00052 { 00053 mVertexList.push_back(*vtx); 00054 } 00055 //______________________________________________________________________________ 00056 void StGenericVertexFinder::UsePCT(bool usePCT) 00057 { 00058 LOG_WARN << "StGenericVertexFinder::UsePCT() not implemented for this vertex finder." << endm; 00059 LOG_WARN << "StGenericVertexFinder::Expect Post-crossing tracks to be used by default in old finders." << endm; 00060 } 00061 //_____________________________________________________________________________ 00062 int StGenericVertexFinder::size() const 00063 { 00064 return mVertexList.size(); 00065 } 00066 //______________________________________________________________________________ 00067 StPrimaryVertex* StGenericVertexFinder::getVertex(int idx) const 00068 { 00069 return (idx<(int)mVertexList.size())? (StPrimaryVertex*)(&(mVertexList[idx])) : 0; 00070 } 00071 //______________________________________________________________________________ 00072 void 00073 StGenericVertexFinder::Clear() 00074 { 00075 mVertexList.clear(); 00076 } 00077 00078 00079 00080 //______________________________________________________________________________ 00081 void StGenericVertexFinder::NoVertexConstraint() 00082 { 00083 mVertexConstrain = false; 00084 LOG_INFO << "StGenericVertexFinder::No Vertex Constraint" << endm; 00085 } 00086 00087 00088 // $Log: StGenericVertexFinder.cxx,v $ 00089 // Revision 1.15 2010/09/10 21:06:45 rjreed 00090 // Added function UseBOTF and bool mUseBtof to switch the use of the TOF on and off in vertex finding. Default value is off (false). 00091 // 00092 // Revision 1.14 2009/11/11 03:52:14 genevb 00093 // Re-order the vertices upon filling StEvent 00094 // 00095 // Revision 1.13 2008/10/23 20:37:31 genevb 00096 // Add switches for turning on/off use of Post-Crossing Tracks [default:off] 00097 // 00098 // Revision 1.12 2006/05/04 20:01:30 jeromel 00099 // Switched to logger 00100 // 00101 // Revision 1.11 2006/04/26 15:37:03 jeromel 00102 // mVertexOrderMethod (To be tested) 00103 // 00104 // Revision 1.10 2006/04/08 00:18:09 mvl 00105 // Added member for debuglevel 00106 // 00107 // Revision 1.9 2005/07/19 21:45:07 perev 00108 // MultiVertex 00109 // 00110 // Revision 1.8 2005/07/14 15:39:22 balewski 00111 // nothing, to force recompilation of this code by Autobuild 00112 // 00113 // Revision 1.7 2005/06/21 02:16:36 balewski 00114 // multiple prim vertices are stored in StEvent 00115 // 00116 // Revision 1.6 2004/12/13 20:39:58 fisyak 00117 // Add initaition of StGenericVertexFinder variables, replace mDumMaker by StMaker::GetChain() method 00118 // 00119 // Revision 1.5 2004/07/30 22:59:00 calderon 00120 // Setting the primary vertex flag to 1 for the moment, as per 00121 // dst_vertex.idl. This was causing the FTPC code to reject the 00122 // primary vertex used as their seed. 00123 // 00124 // Revision 1.4 2004/07/24 02:57:40 balewski 00125 // clean up of ppLMV, CTB-util separated 00126 // 00127 // Revision 1.3 2004/07/23 00:57:43 jeromel 00128 // Base class method implementation 00129 // 00130 // Revision 1.2 2004/04/06 02:43:43 lbarnby 00131 // Fixed identification of bad seeds (no z~0 problem now). Better flagging. Message manager used. 00132 // 00133 // Revision 1.1 2003/05/09 22:22:46 lbarnby 00134 // Initial revision: a base class for STAR (StEvent-based) vertex finders 00135 //
1.5.9