This commit was generated by cvs2svn to compensate for changes in r18145,
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemtoUser / Cut / AliFemtoQPairCut.cxx
CommitLineData
67427ff7 1/***************************************************************************
2 *
3 * $Id$
4 ***************************************************************************
5 *
6 *
7 ***************************************************************************
8 *
9 * $Log$
10 * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki
11 * First version on CVS
12 *
13 *
14 **************************************************************************/
15
16#include "Cut/AliFemtoQPairCut.h"
17#include <string>
18#include <cstdio>
19
20#ifdef __ROOT__
21ClassImp(AliFemtoQPairCut)
22#endif
23
24//__________________
25AliFemtoQPairCut::AliFemtoQPairCut()
26{
27 fNPairsPassed = fNPairsFailed = 0;
28 fQlong[0]=-1.0; fQlong[1]=100.0;
29 fQout[0]=-1.0; fQout[1]=100.0;
30 fQside[0]=-1.0; fQside[1]=100.0;
31 fQinv[0]=-1.0; fQinv[1]=100.0;
32}
33//__________________
34AliFemtoQPairCut::~AliFemtoQPairCut()
35{
36// /* no-op */
37}
38//__________________
39bool AliFemtoQPairCut::Pass(const AliFemtoPair* pair)
40{
41 //bool temp = true;
42 //temp ? fNPairsPassed++ : fNPairsFailed++;
43 if ((fabs(pair->qLongCMS())<fQlong[0])||(fabs(pair->qLongCMS())>fQlong[1]))
44 {
45 fNPairsFailed++;
46 return false;
47 }
48 if ((fabs(pair->qOutCMS())<fQout[0])||(fabs(pair->qOutCMS())>fQout[1]))
49 {
50 fNPairsFailed++;
51 return false;
52 }
53 if ((fabs(pair->qSideCMS())<fQside[0])||(fabs(pair->qSideCMS())>fQside[1]))
54 {
55 fNPairsFailed++;
56 return false;
57 }
58 if ((fabs(pair->KStar())<fQinv[0])||(fabs(pair->KStar())>fQinv[1]))
59 {
60 fNPairsFailed++;
61 return false;
62 }
63 fNPairsPassed++;
64 return true;
65}
66//__________________
67AliFemtoString AliFemtoQPairCut::Report()
68{
69 string Stemp = "AliFemtoQ Pair Cut \n";
70 char Ctemp[100];
71 sprintf(Ctemp,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",fNPairsPassed,fNPairsFailed);
72 Stemp += Ctemp;
73 AliFemtoString returnThis = Stemp;
74 return returnThis;
75}
76//__________________