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