00001 /*************************************************************************** 00002 * 00003 * $Id: mikesEventCut.cxx,v 1.7 2000/02/18 21:27:10 laue Exp $ 00004 * 00005 * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu 00006 *************************************************************************** 00007 * 00008 * Description: part of STAR HBT Framework: StHbtMaker package 00009 * A simple event-wise cut that selects on multiplicity and z-position 00010 * of primary vertex 00011 * 00012 *************************************************************************** 00013 * 00014 * $Log: mikesEventCut.cxx,v $ 00015 * Revision 1.7 2000/02/18 21:27:10 laue 00016 * franksTrackCut changed. If mCharge is set to '0' there will be no cut 00017 * on charge. This is important for front-loaded cuts. 00018 * 00019 * Revision 1.6 2000/01/25 17:35:02 laue 00020 * I. In order to run the stand alone version of the StHbtMaker the following 00021 * changes have been done: 00022 * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements 00023 * b) unnecessary includes of StMaker.h have been removed 00024 * c) the subdirectory StHbtMaker/doc/Make has been created including everything 00025 * needed for the stand alone version 00026 * 00027 * II. To reduce the amount of compiler warning 00028 * a) some variables have been type casted 00029 * b) some destructors have been declared as virtual 00030 * 00031 * Revision 1.5 1999/10/15 01:57:03 lisa 00032 * Important enhancement of StHbtMaker - implement Franks CutMonitors 00033 * ---------------------------------------------------------- 00034 * This means 3 new files in Infrastructure area (CutMonitor), 00035 * several specific CutMonitor classes in the Cut area 00036 * and a new base class in the Base area (StHbtCutMonitor). 00037 * This means also changing all Cut Base class header files from .hh to .h 00038 * so we have access to CutMonitor methods from Cint command line. 00039 * This last means 00040 * 1) files which include these header files are slightly modified 00041 * 2) a side benefit: the TrackCuts and V0Cuts no longer need 00042 * a SetMass() implementation in each Cut class, which was stupid. 00043 * Also: 00044 * ----- 00045 * Include Franks StHbtAssociationReader 00046 * ** None of these changes should affect any user ** 00047 * 00048 * Revision 1.4 1999/07/24 16:24:20 lisa 00049 * adapt StHbtMaker to dev version of library - solaris still gives problems with strings 00050 * 00051 * Revision 1.3 1999/07/19 14:24:04 hardtke 00052 * modifications to implement uDST 00053 * 00054 * Revision 1.2 1999/07/06 22:33:21 lisa 00055 * Adjusted all to work in pro and new - dev itself is broken 00056 * 00057 * Revision 1.1.1.1 1999/06/29 16:02:56 lisa 00058 * Installation of StHbtMaker 00059 * 00060 **************************************************************************/ 00061 00062 #include "StHbtMaker/Cut/mikesEventCut.h" 00063 #include <cstdio> 00064 00065 #ifdef __ROOT__ 00066 ClassImp(mikesEventCut) 00067 #endif 00068 00069 mikesEventCut::mikesEventCut(){ 00070 mNEventsPassed = mNEventsFailed = 0; 00071 } 00072 //------------------------------ 00073 //mikesEventCut::~mikesEventCut(){ 00074 // /* noop */ 00075 //} 00076 //------------------------------ 00077 bool mikesEventCut::Pass(const StHbtEvent* event){ 00078 int mult = event->NumberOfTracks(); 00079 double VertexZPos = event->PrimVertPos().z(); 00080 cout << "mikesEventCut:: mult: " << mEventMult[0] << " < " << mult << " < " << mEventMult[1] << endl; 00081 cout << "mikesEventCut:: VertexZPos: " << mVertZPos[0] << " < " << VertexZPos << " < " << mVertZPos[1] << endl; 00082 bool goodEvent = 00083 ((mult > mEventMult[0]) && 00084 (mult < mEventMult[1]) && 00085 (VertexZPos > mVertZPos[0]) && 00086 (VertexZPos < mVertZPos[1])); 00087 goodEvent ? mNEventsPassed++ : mNEventsFailed++ ; 00088 cout << "mikesEventCut:: return : " << goodEvent << endl; 00089 return (goodEvent); 00090 } 00091 //------------------------------ 00092 StHbtString mikesEventCut::Report(){ 00093 string Stemp; 00094 char Ctemp[100]; 00095 sprintf(Ctemp,"\nMultiplicity:\t %d-%d",mEventMult[0],mEventMult[1]); 00096 Stemp = Ctemp; 00097 sprintf(Ctemp,"\nVertex Z-position:\t %E-%E",mVertZPos[0],mVertZPos[1]); 00098 Stemp += Ctemp; 00099 sprintf(Ctemp,"\nNumber of events which passed:\t%ld Number which failed:\t%ld",mNEventsPassed,mNEventsFailed); 00100 Stemp += Ctemp; 00101 StHbtString returnThis = Stemp; 00102 return returnThis; 00103 }
1.5.9