StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AverageSepPairCut.cxx
1 /***************************************************************************
2  *
3  * $Id: AverageSepPairCut.cxx,v 1.1 2000/10/05 23:09:02 lisa Exp $
4  *
5  * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu
6  ***************************************************************************
7  *
8  * Description: part of STAR HBT Framework: StHbtMaker package
9  * cut on nominal average Separation of the pair - for dealing with track merging
10  *
11  ***************************************************************************
12  *
13  * $Log: AverageSepPairCut.cxx,v $
14  * Revision 1.1 2000/10/05 23:09:02 lisa
15  * Added kT-dependent radii to mixed-event simulator AND implemented AverageSeparation Cut and CorrFctn
16  *
17  *
18  **************************************************************************/
19 
20 #include "StHbtMaker/Cut/AverageSepPairCut.h"
21 #include <string>
22 #include <cstdio>
23 
24 #ifdef __ROOT__
25 ClassImp(AverageSepPairCut)
26 #endif
27 
28 //__________________
29 AverageSepPairCut::AverageSepPairCut(){
30  mNPairsPassed = mNPairsFailed = 0;
31 }
32 //__________________
33 //AverageSepPairCut::~AverageSepPairCut(){
34 // /* no-op */
35 //}
36 //__________________
37 bool AverageSepPairCut::Pass(const StHbtPair* pair){
38  double sep = pair->NominalTpcAverageSeparation();
39  bool temp = ( (sep>mAveSepLo) &&
40  (sep<mAveSepHi) );
41 
42  temp ? mNPairsPassed++ : mNPairsFailed++;
43  return temp;
44 }
45 //__________________
46 StHbtString AverageSepPairCut::Report(){
47  string Stemp = "Average Separation Pair Cut\n";
48  char Ctemp[100];
49  sprintf(Ctemp,"Range of cut:\t%E ... \t%E\n",mAveSepLo,mAveSepHi);
50  Stemp += Ctemp;
51  sprintf(Ctemp,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",mNPairsPassed,mNPairsFailed);
52  Stemp += Ctemp;
53  StHbtString returnThis = Stemp;
54  return returnThis;
55 }
56 //__________________
57 void AverageSepPairCut::SetAveSepRange(const double& Lo, const double& Hi) {
58  mAveSepLo = Lo;
59  mAveSepHi = Hi;
60 }
61 //__________________