]>
Commit | Line | Data |
---|---|---|
0b3bd1ac | 1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // // | |
3 | // AliFemtoShareQualityKTPairCut - a pair cut which checks for some pair // | |
4 | // qualities that attempt to identify slit/doubly reconstructed tracks // | |
5 | // and selects pairs based on their transverse momentum kT // | |
6 | // // | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | /*************************************************************************** | |
9 | * | |
10 | * $Id: AliFemtoShareQualityKTPairCut.cxx,v 1.1.2.1 2007/10/19 13:35:33 akisiel Exp $ | |
11 | * | |
12 | * Author: Adam Kisiel, Ohio State, kisiel@mps.ohio-state.edu | |
13 | *************************************************************************** | |
14 | * | |
15 | * Description: part of STAR HBT Framework: AliFemtoMaker package | |
16 | * a cut to remove "shared" and "split" pairs | |
17 | * | |
18 | *************************************************************************** | |
19 | * | |
20 | * | |
21 | **************************************************************************/ | |
22 | ||
23 | #include "AliFemtoShareQualityKTPairCut.h" | |
24 | #include <string> | |
25 | #include <cstdio> | |
26 | ||
27 | #ifdef __ROOT__ | |
28 | ClassImp(AliFemtoShareQualityKTPairCut) | |
29 | #endif | |
30 | ||
31 | //__________________ | |
32 | AliFemtoShareQualityKTPairCut::AliFemtoShareQualityKTPairCut(): | |
33 | AliFemtoShareQualityPairCut(), | |
34 | fKTMin(0), | |
35 | fKTMax(1.0e6) | |
36 | { | |
37 | } | |
38 | //__________________ | |
39 | AliFemtoShareQualityKTPairCut::AliFemtoShareQualityKTPairCut(const AliFemtoShareQualityKTPairCut& c) : | |
40 | AliFemtoShareQualityPairCut(c), | |
41 | fKTMin(0), | |
42 | fKTMax(1.0e6) | |
43 | { | |
44 | fKTMin = c.fKTMin; | |
45 | fKTMax = c.fKTMax; | |
46 | } | |
47 | ||
48 | //__________________ | |
49 | AliFemtoShareQualityKTPairCut::~AliFemtoShareQualityKTPairCut(){ | |
50 | /* no-op */ | |
51 | } | |
52 | //__________________ | |
53 | bool AliFemtoShareQualityKTPairCut::Pass(const AliFemtoPair* pair){ | |
54 | // Accept a pair base on its Kt and sharity and quality | |
55 | bool temp = true; | |
56 | ||
57 | if (pair->KT() < fKTMin) | |
58 | temp = false; | |
59 | ||
60 | if (pair->KT() > fKTMax) | |
61 | temp = false; | |
62 | ||
63 | if (temp) { | |
64 | temp = AliFemtoShareQualityPairCut::Pass(pair); | |
65 | } | |
66 | else | |
67 | fNPairsFailed++; | |
68 | ||
69 | return temp; | |
70 | } | |
71 | //__________________ | |
72 | AliFemtoString AliFemtoShareQualityKTPairCut::Report(){ | |
73 | // Prepare a report from execution | |
74 | string stemp = "AliFemtoShareQuality Pair Cut - remove shared and split pairs\n"; char ctemp[100]; | |
db2d5b4b | 75 | sprintf(ctemp,"Accept pair with kT in range %f , %f",fKTMin,fKTMax); |
0b3bd1ac | 76 | stemp += ctemp; |
77 | sprintf(ctemp,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",fNPairsPassed,fNPairsFailed); | |
78 | stemp += ctemp; | |
79 | AliFemtoString returnThis = stemp; | |
80 | return returnThis;} | |
81 | //__________________ | |
82 | ||
83 | TList *AliFemtoShareQualityKTPairCut::ListSettings() | |
84 | { | |
85 | // return a list of settings in a writable form | |
86 | TList *tListSetttings = AliFemtoShareQualityPairCut::ListSettings(); | |
87 | char buf[200]; | |
db2d5b4b | 88 | snprintf(buf, 200, "AliFemtoShareQualityKTPairCut.ktmax=%f", fKTMax); |
0b3bd1ac | 89 | tListSetttings->AddLast(new TObjString(buf)); |
db2d5b4b | 90 | snprintf(buf, 200, "AliFemtoShareQualityKTPairCut.ktmin=%f", fKTMin); |
0b3bd1ac | 91 | tListSetttings->AddLast(new TObjString(buf)); |
92 | ||
93 | return tListSetttings; | |
94 | } | |
95 | ||
96 | void AliFemtoShareQualityKTPairCut::SetKTRange(double ktmin, double ktmax) | |
97 | { | |
98 | // Set the accepted kT range | |
99 | fKTMin = ktmin; | |
100 | fKTMax = ktmax; | |
101 | } |