00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "StHbtMaker/Cut/EntranceSepPairCut.h"
00020 #include <string>
00021 #include <cstdio>
00022
00023 #ifdef __ROOT__
00024 ClassImp(EntranceSepPairCut)
00025 #endif
00026
00027
00028 EntranceSepPairCut::EntranceSepPairCut(){
00029 mNPairsPassed = mNPairsFailed = 0;
00030 }
00031
00032
00033
00034
00035
00036 bool EntranceSepPairCut::Pass(const StHbtPair* pair){
00037 double sep = pair->NominalTpcEntranceSeparation();
00038 bool temp = ( (sep>mEntSepLo) &&
00039 (sep<mEntSepHi) );
00040
00041 temp ? mNPairsPassed++ : mNPairsFailed++;
00042 return temp;
00043 }
00044
00045 StHbtString EntranceSepPairCut::Report(){
00046 string Stemp = "Entrance Separation Pair Cut\n";
00047 char Ctemp[100];
00048 sprintf(Ctemp,"Range of cut:\t%E ... \t%E\n",mEntSepLo,mEntSepHi);
00049 Stemp += Ctemp;
00050 sprintf(Ctemp,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",mNPairsPassed,mNPairsFailed);
00051 Stemp += Ctemp;
00052 StHbtString returnThis = Stemp;
00053 return returnThis;
00054 }
00055
00056 void EntranceSepPairCut::SetEntranceSepRange(const double& Lo, const double& Hi) {
00057 mEntSepLo = Lo;
00058 mEntSepHi = Hi;
00059 }
00060