]>
Commit | Line | Data |
---|---|---|
76ce4b5b | 1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // // | |
3 | // AliFemtoPairCutAntiGamma - a pair cut which checks // | |
4 | // for some pair qualities that attempt to identify slit/doubly // | |
5 | // reconstructed tracks and also selects pairs based on their separation // | |
6 | // at the entrance to the TPC // | |
7 | // // | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | /*************************************************************************** | |
10 | * | |
11 | * $Id: AliFemtoPairCutAntiGamma.cxx,v 1.1.2.1 2007/10/19 13:35:33 akisiel Exp $ | |
12 | * | |
13 | * Author: Adam Kisiel, Ohio State, kisiel@mps.ohio-state.edu | |
14 | *************************************************************************** | |
15 | * | |
16 | * Description: part of STAR HBT Framework: AliFemtoMaker package | |
17 | * a cut to remove "shared" and "split" pairs | |
18 | * | |
19 | *************************************************************************** | |
20 | * | |
21 | * | |
22 | **************************************************************************/ | |
23 | ||
24 | #include "AliFemtoPairCutAntiGamma.h" | |
25 | #include <string> | |
26 | #include <cstdio> | |
27 | #include <TMath.h> | |
28 | ||
29 | #ifdef __ROOT__ | |
30 | ClassImp(AliFemtoPairCutAntiGamma) | |
31 | #endif | |
32 | ||
33 | //__________________ | |
34 | AliFemtoPairCutAntiGamma::AliFemtoPairCutAntiGamma(): | |
35 | AliFemtoShareQualityPairCut(), | |
36 | fMaxEEMinv(0.0), | |
37 | fMaxDTheta(0.0), | |
38 | fDTPCMin(0), | |
973a91f8 | 39 | fDataType(kESD) |
76ce4b5b | 40 | { |
41 | } | |
42 | //__________________ | |
43 | AliFemtoPairCutAntiGamma::AliFemtoPairCutAntiGamma(const AliFemtoPairCutAntiGamma& c) : | |
44 | AliFemtoShareQualityPairCut(c), | |
45 | fMaxEEMinv(0.0), | |
46 | fMaxDTheta(0.0), | |
47 | fDTPCMin(0), | |
973a91f8 | 48 | fDataType(kESD) |
76ce4b5b | 49 | { |
50 | fMaxEEMinv = c.fMaxEEMinv; | |
51 | fMaxDTheta = c.fMaxDTheta; | |
52 | fDTPCMin = c.fDTPCMin; | |
973a91f8 | 53 | fDataType = c.fDataType; |
76ce4b5b | 54 | } |
55 | ||
56 | AliFemtoPairCutAntiGamma& AliFemtoPairCutAntiGamma::operator=(const AliFemtoPairCutAntiGamma& c) | |
57 | { | |
58 | if (this != &c) { | |
59 | fMaxEEMinv = c.fMaxEEMinv; | |
60 | fMaxDTheta = c.fMaxDTheta; | |
61 | fDTPCMin = c.fDTPCMin; | |
973a91f8 | 62 | fDataType = c.fDataType; |
76ce4b5b | 63 | } |
64 | ||
65 | return *this; | |
66 | ||
67 | } | |
68 | //__________________ | |
69 | AliFemtoPairCutAntiGamma::~AliFemtoPairCutAntiGamma(){ | |
70 | /* no-op */ | |
71 | } | |
72 | //__________________ | |
73 | bool AliFemtoPairCutAntiGamma::Pass(const AliFemtoPair* pair){ | |
74 | // Accept pairs based on their TPC entrance separation and | |
75 | // quality and sharity | |
76 | bool temp = true; | |
77 | ||
973a91f8 | 78 | if(fDataType==kKine) |
79 | return true; | |
80 | ||
76ce4b5b | 81 | double me = 0.000511; |
82 | ||
83 | if ((pair->Track1()->Track()->Charge() * pair->Track2()->Track()->Charge()) < 0.0) { | |
84 | double theta1 = pair->Track1()->Track()->P().Theta(); | |
85 | double theta2 = pair->Track2()->Track()->P().Theta(); | |
86 | double dtheta = TMath::Abs(theta1 - theta2); | |
87 | ||
88 | double e1 = TMath::Sqrt(me*me + pair->Track1()->Track()->P().Mag2()); | |
89 | double e2 = TMath::Sqrt(me*me + pair->Track2()->Track()->P().Mag2()); | |
90 | ||
91 | double minv = 2*me*me + 2*(e1*e2 - | |
92 | pair->Track1()->Track()->P().x()*pair->Track2()->Track()->P().x() - | |
93 | pair->Track1()->Track()->P().y()*pair->Track2()->Track()->P().y() - | |
94 | pair->Track1()->Track()->P().z()*pair->Track2()->Track()->P().z()); | |
95 | ||
96 | if ((minv < fMaxEEMinv) && (dtheta < fMaxDTheta)) temp = false; | |
97 | } | |
98 | ||
99 | bool tempTPCEntrance = true; | |
100 | ||
973a91f8 | 101 | if(fDataType==kAOD) |
76ce4b5b | 102 | { |
103 | double distx = pair->Track1()->Track()->NominalTpcEntrancePoint().x() - pair->Track2()->Track()->NominalTpcEntrancePoint().x(); | |
104 | double disty = pair->Track1()->Track()->NominalTpcEntrancePoint().y() - pair->Track2()->Track()->NominalTpcEntrancePoint().y(); | |
105 | double distz = pair->Track1()->Track()->NominalTpcEntrancePoint().z() - pair->Track2()->Track()->NominalTpcEntrancePoint().z(); | |
106 | double dist = sqrt(distx*distx + disty*disty + distz*distz); | |
107 | ||
108 | tempTPCEntrance = dist > fDTPCMin; | |
109 | } | |
973a91f8 | 110 | |
76ce4b5b | 111 | |
112 | if (temp && tempTPCEntrance) { | |
113 | temp = AliFemtoShareQualityPairCut::Pass(pair); | |
114 | if (temp) fNPairsPassed++; | |
115 | else fNPairsFailed++; | |
116 | return temp; | |
117 | } | |
118 | else | |
119 | { | |
120 | fNPairsFailed++; | |
121 | return false; | |
122 | } | |
123 | ||
124 | } | |
125 | //__________________ | |
126 | AliFemtoString AliFemtoPairCutAntiGamma::Report(){ | |
127 | // Prepare a report from the execution | |
128 | string stemp = "AliFemtoPairCutAntiGamma Pair Cut - remove pairs possibly coming from Gamma conversions\n"; | |
129 | char ctemp[100]; | |
130 | stemp += ctemp; | |
131 | snprintf(ctemp , 100, "Number of pairs which passed:\t%ld Number which failed:\t%ld\n",fNPairsPassed,fNPairsFailed); | |
132 | stemp += ctemp; | |
133 | AliFemtoString returnThis = stemp; | |
134 | return returnThis;} | |
135 | //__________________ | |
136 | ||
137 | TList *AliFemtoPairCutAntiGamma::ListSettings() | |
138 | { | |
139 | // return a list of settings in a writable form | |
140 | TList *tListSetttings = AliFemtoShareQualityPairCut::ListSettings(); | |
141 | char buf[200]; | |
142 | snprintf(buf, 200, "AliFemtoPairCutAntiGamma.maxeeminv=%f", fMaxEEMinv); | |
143 | snprintf(buf, 200, "AliFemtoPairCutAntiGamma.maxdtheta=%f", fMaxDTheta); | |
144 | tListSetttings->AddLast(new TObjString(buf)); | |
145 | ||
146 | return tListSetttings; | |
147 | } | |
148 | ||
149 | void AliFemtoPairCutAntiGamma::SetMaxEEMinv(Double_t maxeeminv) | |
150 | { | |
151 | fMaxEEMinv = maxeeminv; | |
152 | } | |
153 | ||
154 | ||
155 | void AliFemtoPairCutAntiGamma::SetMaxThetaDiff(Double_t maxdtheta) | |
156 | { | |
157 | fMaxDTheta = maxdtheta; | |
158 | } | |
159 | ||
160 | void AliFemtoPairCutAntiGamma::SetTPCEntranceSepMinimum(double dtpc) | |
161 | { | |
162 | fDTPCMin = dtpc; | |
163 | } | |
164 | ||
973a91f8 | 165 | void AliFemtoPairCutAntiGamma::SetDataType(AliFemtoDataType type) |
76ce4b5b | 166 | { |
973a91f8 | 167 | fDataType = type; |
76ce4b5b | 168 | } |