StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
GenericTripletCut.cxx
1 /***************************************************************************
2  *
3  * $Id: GenericTripletCut.cxx,v 1.6 2001/06/03 21:05:07 willson Exp $
4  *
5  * Author: Robert Willson, Ohio State, willson@bnl.gov
6  ***************************************************************************
7  *
8  * Description: part of STAR HBT Framework: StHbtMaker package.
9  * A do-nothing triplet cut that simply says "true" to every triplet.
10  *
11  ***************************************************************************
12  *
13  * $Log: GenericTripletCut.cxx,v $
14  * Revision 1.6 2001/06/03 21:05:07 willson
15  * Cuts on entrance separation
16  *
17  * Revision 1.5 2000/08/15 23:24:24 lisa
18  * Fixed small typo in preprocessor directive ifdef
19  *
20  * Revision 1.4 2000/08/08 23:39:31 laue
21  * Updated for standalone version
22  *
23  * Revision 1.3 2000/04/12 01:53:35 willson
24  * Initial Installation - Comments Added
25  *
26  *
27  ***************************************************************************/
28 
29 #include "StHbtMaker/Cut/GenericTripletCut.h"
30 //#include <cstdio>
31 
32 #ifdef __ROOT__
33 ClassImp(GenericTripletCut)
34 #endif
35 
36 //__________________
37 GenericTripletCut::GenericTripletCut(float EntSepCut){
38  mEntSepCut = EntSepCut;
39  mNTripletsPassed = mNTripletsFailed = 0;
40 }
41 //__________________
42 //GenericTripletCut::~GenericTripletCut(){
43 // /* no-op */
44 //}
45 //__________________
46 bool GenericTripletCut::Pass(const StHbtTriplet* Triplet){
47  bool temp = true;
48  if (mEntSepCut) temp = (Triplet->NominalTpcEntranceSeparation()>mEntSepCut);
49  temp ? mNTripletsPassed++ : mNTripletsFailed++;
50  return temp;
51 }
52 //__________________
53 StHbtString GenericTripletCut::Report(){
54  StHbtString Stemp = "Generic Triplet Cut - total dummy-- always returns true\n";
55  char Ctemp[100];
56  sprintf(Ctemp,"Number of Triplets which passed:\t%ld Number which failed:\t%ld\n",mNTripletsPassed,mNTripletsFailed);
57  Stemp += Ctemp;
58  StHbtString returnThis = Stemp;
59  return returnThis;
60 }
61 //__________________