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