26 #include "StHbtMaker/Cut/HitMergingPairCut.h"
27 #include "Infrastructure/StHbtPair.hh"
37 HitMergingPairCut::HitMergingPairCut(){
38 mNPairsPassed = mNPairsFailed = 0;
40 setDefaultHalfFieldMergingPar();
47 void HitMergingPairCut::setMergingPar(
double aMaxDuInner,
double aMaxDzInner,
48 double aMaxDuOuter,
double aMaxDzOuter){
50 tPair.setMergingPar(aMaxDuInner, aMaxDzInner,
51 aMaxDuOuter, aMaxDzOuter);
53 void HitMergingPairCut::setDefaultFullFieldMergingPar(){
55 tPair.setDefaultFullFieldMergingPar();
57 void HitMergingPairCut::setDefaultHalfFieldMergingPar(){
59 tPair.setDefaultHalfFieldMergingPar();
63 bool HitMergingPairCut::Pass(
const StHbtPair* pair){
64 bool temp = pair->getFracOfMergedRow()<mMaxFracPair;
65 temp ? mNPairsPassed++ : mNPairsFailed++;
69 StHbtString HitMergingPairCut::Report(){
70 string Stemp =
"HitMerging Pair Cut - total dummy-- always returns true\n";
72 sprintf(Ctemp,
"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",mNPairsPassed,mNPairsFailed);
74 StHbtString returnThis = Stemp;
78 std::ostringstream* HitMergingPairCut::finalReport()
const{
79 std::ostringstream* tFinalReport =
new std::ostringstream;
80 (*tFinalReport) <<
"_____ HitMerging pair Cut _____ " << endl
81 <<
" N pairs passed : " << mNPairsPassed << endl
82 <<
" N pairs failed : " << mNPairsFailed << endl