StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ExitSepPairCut.cxx
1 /***************************************************************************
2  *
3  * $Id: ExitSepPairCut.cxx,v 1.1 2000/09/14 18:36:58 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 Exit Separation of the pair - for dealing with track merging
10  *
11  ***************************************************************************
12  *
13  * $Log: ExitSepPairCut.cxx,v $
14  * Revision 1.1 2000/09/14 18:36:58 lisa
15  * Added Qinv and ExitSep pair cuts and BPLCMSFrame3DCorrFctn_SIM CorrFctn
16  *
17  *
18  **************************************************************************/
19 
20 #include "StHbtMaker/Cut/ExitSepPairCut.h"
21 #include <string>
22 #include <cstdio>
23 
24 #ifdef __ROOT__
25 ClassImp(ExitSepPairCut)
26 #endif
27 
28 //__________________
29 ExitSepPairCut::ExitSepPairCut(){
30  mNPairsPassed = mNPairsFailed = 0;
31 }
32 //__________________
33 //ExitSepPairCut::~ExitSepPairCut(){
34 // /* no-op */
35 //}
36 //__________________
37 bool ExitSepPairCut::Pass(const StHbtPair* pair){
38  double sep = pair->NominalTpcExitSeparation();
39  bool temp = ( (sep>mEntSepLo) &&
40  (sep<mEntSepHi) );
41 
42  temp ? mNPairsPassed++ : mNPairsFailed++;
43  return temp;
44 }
45 //__________________
46 StHbtString ExitSepPairCut::Report(){
47  string Stemp = "Exit Separation Pair Cut\n";
48  char Ctemp[100];
49  sprintf(Ctemp,"Range of cut:\t%E ... \t%E\n",mEntSepLo,mEntSepHi);
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 ExitSepPairCut::SetExitSepRange(const double& Lo, const double& Hi) {
58  mEntSepLo = Lo;
59  mEntSepHi = Hi;
60 }
61 //__________________