]>
Commit | Line | Data |
---|---|---|
1 | /*************************************************************************** | |
2 | * | |
3 | * $Id$ | |
4 | *************************************************************************** | |
5 | * | |
6 | * | |
7 | *************************************************************************** | |
8 | * | |
9 | * $Log$ | |
10 | * Revision 1.4 2007/05/03 09:46:10 akisiel | |
11 | * Fixing Effective C++ warnings | |
12 | * | |
13 | * Revision 1.3 2007/04/27 07:25:59 akisiel | |
14 | * Make revisions needed for compilation from the main AliRoot tree | |
15 | * | |
16 | * Revision 1.1.1.1 2007/04/25 15:38:41 panos | |
17 | * Importing the HBT code dir | |
18 | * | |
19 | * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki | |
20 | * First version on CVS | |
21 | * | |
22 | * | |
23 | **************************************************************************/ | |
24 | ||
25 | #include "AliFemtoQPairCut.h" | |
26 | #include <string> | |
27 | #include <cstdio> | |
28 | ||
29 | #ifdef __ROOT__ | |
30 | ClassImp(AliFemtoQPairCut) | |
31 | #endif | |
32 | ||
33 | //__________________ | |
34 | AliFemtoQPairCut::AliFemtoQPairCut(): | |
35 | fNPairsPassed(0), | |
36 | fNPairsFailed(0) | |
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 | //__________________ | |
45 | AliFemtoQPairCut::~AliFemtoQPairCut() | |
46 | { | |
47 | // /* no-op */ | |
48 | } | |
49 | //__________________ | |
50 | bool AliFemtoQPairCut::Pass(const AliFemtoPair* pair) | |
51 | { | |
52 | //bool temp = true; | |
53 | //temp ? fNPairsPassed++ : fNPairsFailed++; | |
54 | if ((fabs(pair->QLongCMS())<fQlong[0])||(fabs(pair->QLongCMS())>fQlong[1])) | |
55 | { | |
56 | fNPairsFailed++; | |
57 | return false; | |
58 | } | |
59 | if ((fabs(pair->QOutCMS())<fQout[0])||(fabs(pair->QOutCMS())>fQout[1])) | |
60 | { | |
61 | fNPairsFailed++; | |
62 | return false; | |
63 | } | |
64 | if ((fabs(pair->QSideCMS())<fQside[0])||(fabs(pair->QSideCMS())>fQside[1])) | |
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 | //__________________ | |
78 | AliFemtoString 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 | //__________________ |