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