StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
franksV0PairCut.cxx
1 /***************************************************************************
2  *
3  * $Id: franksV0PairCut.cxx,v 1.2 2001/11/14 21:07:20 lisa Exp $
4  *
5  * Author: Frank Laue, Ohio State, laue@mps.ohio-state.edu
6  ***************************************************************************
7  *
8  * Description: part of STAR HBT Framework: StHbtMaker package
9  *
10  ***************************************************************************
11  *
12  * $Log: franksV0PairCut.cxx,v $
13  * Revision 1.2 2001/11/14 21:07:20 lisa
14  * Fixed several small things (mostly discarded const) that caused fatal errors with gcc2.95.3
15  *
16  * Revision 1.1 2000/05/03 17:47:24 laue
17  * new pair cut
18  *
19  *
20  **************************************************************************/
21 
22 #include "StHbtMaker/Cut/franksV0PairCut.h"
23 #include <string>
24 #include <cstdio>
25 
26 #ifdef __ROOT__
27 ClassImp(franksV0PairCut)
28 #endif
29 
30 //__________________
31 franksV0PairCut::franksV0PairCut() : mTrackIdCut(0), mNPairsPassed(0), mNPairsFailed(0) {
32 }
33 //__________________
34 //franksV0PairCut::~franksV0PairCut(){
35 // /* no-op */
36 //}
37 //__________________
38 inline bool franksV0PairCut::Pass(const StHbtPair* pair){
39  bool temp = true;
40 
41  if ( mTrackIdCut == 1 ) {
42  if ( (pair->track1()->NegTrackId() == pair->track2()->NegTrackId()) ||
43  (pair->track1()->PosTrackId() == pair->track2()->PosTrackId())
44  )
45  temp = false;
46  }
47 
48 
49  temp ? mNPairsPassed++ : mNPairsFailed++;
50  mNPairsPassed++;
51  return temp;
52 }
53 //__________________
54 StHbtString franksV0PairCut::Report(){
55  string Stemp = " Franks V0 Pair Cut \n";
56  char Ctemp[100];
57  sprintf(Ctemp,"mTrackIdCut = %d \n",mTrackIdCut);
58  Stemp += Ctemp;
59  sprintf(Ctemp,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",mNPairsPassed,mNPairsFailed);
60  Stemp += Ctemp;
61  StHbtString returnThis = Stemp;
62  return returnThis;
63 }
64 //__________________