StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EntranceSepPairCut.cxx
1 /***************************************************************************
2  *
3  * $Id: EntranceSepPairCut.cxx,v 1.1 2000/07/31 01:19:24 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 Entrance Separation of the pair - for dealing with track merging
10  *
11  ***************************************************************************
12  *
13  * $Log: EntranceSepPairCut.cxx,v $
14  * Revision 1.1 2000/07/31 01:19:24 lisa
15  * add PairCut which contains collection of PairCuts - also 3D bertsch-pratt CorrFctn
16  *
17  **************************************************************************/
18 
19 #include "StHbtMaker/Cut/EntranceSepPairCut.h"
20 #include <string>
21 #include <cstdio>
22 
23 #ifdef __ROOT__
24 ClassImp(EntranceSepPairCut)
25 #endif
26 
27 //__________________
28 EntranceSepPairCut::EntranceSepPairCut(){
29  mNPairsPassed = mNPairsFailed = 0;
30 }
31 //__________________
32 //EntranceSepPairCut::~EntranceSepPairCut(){
33 // /* no-op */
34 //}
35 //__________________
36 bool EntranceSepPairCut::Pass(const StHbtPair* pair){
37  double sep = pair->NominalTpcEntranceSeparation();
38  bool temp = ( (sep>mEntSepLo) &&
39  (sep<mEntSepHi) );
40 
41  temp ? mNPairsPassed++ : mNPairsFailed++;
42  return temp;
43 }
44 //__________________
45 StHbtString EntranceSepPairCut::Report(){
46  string Stemp = "Entrance Separation Pair Cut\n";
47  char Ctemp[100];
48  sprintf(Ctemp,"Range of cut:\t%E ... \t%E\n",mEntSepLo,mEntSepHi);
49  Stemp += Ctemp;
50  sprintf(Ctemp,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",mNPairsPassed,mNPairsFailed);
51  Stemp += Ctemp;
52  StHbtString returnThis = Stemp;
53  return returnThis;
54 }
55 //__________________
56 void EntranceSepPairCut::SetEntranceSepRange(const double& Lo, const double& Hi) {
57  mEntSepLo = Lo;
58  mEntSepHi = Hi;
59 }
60 //__________________