]>
Commit | Line | Data |
---|---|---|
45eb0b7a | 1 | ///////////////////////////////////////////////////////////////////////////////// |
2 | // // | |
3 | // AliFemtoPairCutRadialDistanceLM - 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 | * Author: Johanna Gramling, University of Heidelberg, jgramlin@cern.ch | |
12 | * Malgorzata Janik, Warsaw University of Technology, majanik@cern.ch | |
13 | * Lukasz Graczykowski, Warsaw University of Technology, lgraczyk@cern.ch | |
14 | * Jorge Mercado, University of Heidelberg, jmercado@cern.ch | |
15 | * | |
16 | ********************************************************************************/ | |
17 | ||
18 | #include "AliFemtoPairCutRadialDistanceLM.h" | |
19 | #include <string> | |
20 | #include <cstdio> | |
21 | ||
22 | #ifdef __ROOT__ | |
23 | ClassImp(AliFemtoPairCutRadialDistanceLM) | |
24 | #endif | |
25 | ||
26 | //__________________ | |
27 | AliFemtoPairCutRadialDistanceLM::AliFemtoPairCutRadialDistanceLM(): | |
28 | AliFemtoPairCutAntiGamma(), | |
29 | fDPhiStarMin(0), | |
30 | fEtaMin(0), | |
31 | fMinRad(0.8), | |
32 | fMagSign(1) | |
33 | { | |
34 | } | |
35 | //__________________ | |
36 | AliFemtoPairCutRadialDistanceLM::AliFemtoPairCutRadialDistanceLM(const AliFemtoPairCutRadialDistanceLM& c) : | |
37 | AliFemtoPairCutAntiGamma(c), | |
38 | fDPhiStarMin(0), | |
39 | fEtaMin(0), | |
40 | fMinRad(0.8), | |
41 | fMagSign(1) | |
42 | { | |
43 | fDPhiStarMin = c.fDPhiStarMin; | |
44 | fEtaMin = c.fEtaMin; | |
45 | fMinRad = c.fMinRad; | |
46 | fMagSign = c.fMagSign; | |
47 | } | |
48 | ||
49 | //__________________ | |
50 | AliFemtoPairCutRadialDistanceLM::~AliFemtoPairCutRadialDistanceLM(){ | |
51 | /* no-op */ | |
52 | } | |
53 | //__________________ | |
54 | bool AliFemtoPairCutRadialDistanceLM::Pass(const AliFemtoPair* pair){ | |
55 | // Accept pairs based on their TPC entrance separation and | |
56 | // quality and sharity | |
57 | // bool temp = true; | |
58 | ||
59 | // double pih = 3.14159265358979312; | |
60 | // double pit = 6.28318530717958623; | |
61 | ||
62 | ||
63 | double phi1 = pair->Track1()->Track()->P().Phi(); | |
64 | double phi2 = pair->Track2()->Track()->P().Phi(); | |
65 | double chg1 = pair->Track1()->Track()->Charge(); | |
66 | double chg2 = pair->Track2()->Track()->Charge(); | |
67 | double ptv1 = pair->Track1()->Track()->Pt(); | |
68 | double ptv2 = pair->Track2()->Track()->Pt(); | |
69 | double eta1 = pair->Track1()->Track()->P().PseudoRapidity(); | |
70 | double eta2 = pair->Track2()->Track()->P().PseudoRapidity(); | |
71 | ||
72 | ||
73 | Double_t rad; | |
74 | Bool_t pass5 = kTRUE; | |
75 | ||
76 | // cout << "min radius: " << fMinRad << endl; | |
77 | // cout << "min deta: " << fEtaMin << endl; | |
78 | // cout << "min dphi: " << fDPhiStarMin << endl; | |
79 | ||
80 | double etad = eta2 - eta1; | |
81 | ||
82 | if (fabs(etad)<fEtaMin) | |
83 | { | |
84 | rad = fMinRad; | |
85 | for (Double_t iter=fMinRad*100; iter<251; iter+=1.0) { | |
86 | Double_t dps = (phi1-phi2+(TMath::ASin(-0.075*chg1*fMagSign*rad/ptv1))-(TMath::ASin(-0.075*chg2*fMagSign*rad/ptv2))); | |
87 | if (fabs(dps)<fDPhiStarMin) { | |
88 | // cout << "5% cut is not passed - returning" << endl; | |
89 | pass5 = kFALSE; | |
90 | break; | |
91 | } | |
92 | rad+=0.01; | |
93 | } | |
94 | } | |
95 | ||
96 | ||
97 | if (pass5) { | |
98 | pass5 = AliFemtoPairCutAntiGamma::Pass(pair); | |
99 | } | |
100 | else | |
101 | fNPairsFailed++; | |
102 | ||
103 | return pass5; | |
104 | } | |
105 | //__________________ | |
106 | AliFemtoString AliFemtoPairCutRadialDistanceLM::Report(){ | |
107 | // Prepare a report from the execution | |
108 | string stemp = "AliFemtoRadialDistance Pair Cut - remove shared and split pairs and pairs with small separation at the specified radius\n"; char ctemp[100]; | |
109 | snprintf(ctemp , 100, "Accept pair with separation more that %f",fDPhiStarMin); | |
110 | stemp += ctemp; | |
111 | snprintf(ctemp , 100, "Number of pairs which passed:\t%ld Number which failed:\t%ld\n",fNPairsPassed,fNPairsFailed); | |
112 | stemp += ctemp; | |
113 | AliFemtoString returnThis = stemp; | |
114 | return returnThis;} | |
115 | //__________________ | |
116 | ||
117 | TList *AliFemtoPairCutRadialDistanceLM::ListSettings() | |
118 | { | |
119 | // return a list of settings in a writable form | |
120 | TList *tListSetttings = AliFemtoPairCutAntiGamma::ListSettings(); | |
121 | char buf[200]; | |
122 | snprintf(buf, 200, "AliFemtoPairCutRadialDistanceLM.phistarsepmin=%f", fDPhiStarMin); | |
123 | tListSetttings->AddLast(new TObjString(buf)); | |
124 | ||
125 | return tListSetttings; | |
126 | } | |
127 | ||
128 | void AliFemtoPairCutRadialDistanceLM::SetPhiStarDifferenceMinimum(double dtpc) | |
129 | { | |
130 | fDPhiStarMin = dtpc; | |
131 | } | |
132 | ||
133 | void AliFemtoPairCutRadialDistanceLM::SetEtaDifferenceMinimum(double etpc) | |
134 | { | |
135 | fEtaMin = etpc; | |
136 | } | |
137 | ||
138 | ||
139 | void AliFemtoPairCutRadialDistanceLM::SetMinimumRadius(double minrad) | |
140 | { | |
141 | fMinRad = minrad; | |
142 | } | |
143 | ||
144 | void AliFemtoPairCutRadialDistanceLM::SetMagneticFieldSign(int magsign) | |
145 | { | |
146 | if(magsign>1) fMagSign = 1; | |
147 | else if(magsign<1) fMagSign = -1; | |
148 | else fMagSign = magsign; | |
149 | } |