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