00001 /*************************************************************************** 00002 * 00003 * $Id: qualityPairCut.cxx,v 1.2 2000/07/31 01:19:24 lisa Exp $ 00004 * 00005 * Author: Randy Wells, Ohio State, rcwells@mps.ohio-state.edu 00006 *************************************************************************** 00007 * 00008 * Description: part of STAR HBT Framework: StHbtMaker package 00009 * Checks the Quality factor between two tracks ... if to high get thrown away 00010 * 00011 *************************************************************************** 00012 * 00013 * $Log: qualityPairCut.cxx,v $ 00014 * Revision 1.2 2000/07/31 01:19:24 lisa 00015 * add PairCut which contains collection of PairCuts - also 3D bertsch-pratt CorrFctn 00016 * 00017 * Revision 1.1 2000/04/05 18:56:18 rcwells 00018 * Adding class qualityPairCut 00019 * 00020 * Revision 1.3 2000/01/25 17:35:02 laue 00021 * I. In order to run the stand alone version of the StHbtMaker the following 00022 * changes have been done: 00023 * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements 00024 * b) unnecessary includes of StMaker.h have been removed 00025 * c) the subdirectory StHbtMaker/doc/Make has been created including everything 00026 * needed for the stand alone version 00027 * 00028 * II. To reduce the amount of compiler warning 00029 * a) some variables have been type casted 00030 * b) some destructors have been declared as virtual 00031 * 00032 * Revision 1.2 1999/07/06 22:33:21 lisa 00033 * Adjusted all to work in pro and new - dev itself is broken 00034 * 00035 * Revision 1.1.1.1 1999/06/29 16:02:56 lisa 00036 * Installation of StHbtMaker 00037 * 00038 **************************************************************************/ 00039 00040 #include "StHbtMaker/Cut/qualityPairCut.h" 00041 #include <string> 00042 #include <cstdio> 00043 00044 #ifdef __ROOT__ 00045 ClassImp(qualityPairCut) 00046 #endif 00047 00048 //__________________ 00049 qualityPairCut::qualityPairCut(){ 00050 mNPairsPassed = mNPairsFailed = 0; 00051 } 00052 //__________________ 00053 //qualityPairCut::~qualityPairCut(){ 00054 // /* no-op */ 00055 //} 00056 //__________________ 00057 bool qualityPairCut::Pass(const StHbtPair* pair){ 00058 double qual = pair->quality(); 00059 bool temp = ( (qual>mQualCutLo) && 00060 (qual<mQualCutHi) ); 00061 00062 temp ? mNPairsPassed++ : mNPairsFailed++; 00063 return temp; 00064 } 00065 //__________________ 00066 StHbtString qualityPairCut::Report(){ 00067 string Stemp = "Quality Pair Cut\n"; 00068 char Ctemp[100]; 00069 sprintf(Ctemp,"Range of cut:\t%E ... \t%E\n",mQualCutLo,mQualCutHi); 00070 Stemp += Ctemp; 00071 sprintf(Ctemp,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",mNPairsPassed,mNPairsFailed); 00072 Stemp += Ctemp; 00073 StHbtString returnThis = Stemp; 00074 return returnThis; 00075 } 00076 //__________________ 00077 void qualityPairCut::SetQualityCut(const double& QualCutLo, const double& QualCutHi) { 00078 mQualCutLo = QualCutLo; 00079 mQualCutHi = QualCutHi; 00080 } 00081 //__________________
1.5.9