]>
Commit | Line | Data |
---|---|---|
4fbb2459 | 1 | AliRsnPairManager *RsnConfig_PHI(const char *name="PHI") |
5eb970a4 | 2 | { |
4fbb2459 | 3 | return CreatePairs(name, 333, AliAODTrack::kKaon, AliAODTrack::kKaon, 0, 10000); |
5eac34f4 | 4 | } |
5eb970a4 | 5 | |
4fbb2459 | 6 | AliRsnPairManager *RsnConfig_KSTAR(const char *name="KSTAR") |
5eb970a4 | 7 | { |
4fbb2459 | 8 | return CreatePairs(name, 313, AliAODTrack::kPion, AliAODTrack::kKaon, 0, 10000); |
5eac34f4 | 9 | } |
10 | ||
4fbb2459 | 11 | |
12 | AliRsnPairManager* CreatePairs | |
5eac34f4 | 13 | ( |
4fbb2459 | 14 | const char *pairMgrName, // name for the pair manager |
15 | Int_t resonancePDG, // PDG code of resonance (for true pairs) | |
16 | AliAODTrack::AODTrkPID_t type1, // PID of one member of decay (+) | |
17 | AliAODTrack::AODTrkPID_t type2, // PID of other member of decay (-) | |
18 | Int_t multMin, // lower edge of multiplicity cut | |
19 | Int_t multMax // upper edge of multiplicity cut | |
5eac34f4 | 20 | ) |
21 | { | |
22 | // | |
23 | // Creates an AliRsnPairMgr for a specified resonance, which contains: | |
24 | // - signal (inv. mass) | |
25 | // - event mixing (inv. mass) | |
26 | // - like-sign (inv. mass) | |
27 | // - true pairs (inv. mass, resolution) | |
28 | // | |
29 | // For all pairs, a binning in Pt and Eta is provided, and a cut in multiplicity | |
30 | // which defines a multiplicity bin where the analysis is computed. | |
31 | // | |
32 | // Arguments define how the pair manager must be built, and are explained above | |
33 | // | |
34 | ||
35 | AliRsnPairManager *pairMgr = new AliRsnPairManager(pairMgrName); | |
4fbb2459 | 36 | //cout << "Creating " << pairMgrName << endl; |
37 | ||
38 | // return pairMgr; | |
5eac34f4 | 39 | |
40 | // === PAIR DEFINITIONS ========================================================================= | |
41 | ||
42 | // if particle #1 and #2 are different, two histograms must be built | |
43 | // for each scheme (signal, true, mixed, like-sign) exchanging both particles and signs | |
44 | Int_t i, j, nArray = 1; | |
45 | if (type1 != type2) nArray = 2; | |
46 | ||
47 | AliRsnPairDef *defUnlike[2] = {0, 0}; | |
48 | AliRsnPairDef *defLikePP[2] = {0, 0}; | |
49 | AliRsnPairDef *defLikeMM[2] = {0, 0}; | |
50 | ||
51 | defUnlike[0] = new AliRsnPairDef(type1, '+', type2, '-', resonancePDG); | |
52 | defLikePP[0] = new AliRsnPairDef(type1, '+', type2, '+', resonancePDG); | |
53 | defLikeMM[0] = new AliRsnPairDef(type1, '-', type2, '-', resonancePDG); | |
54 | ||
55 | defUnlike[1] = new AliRsnPairDef(type2, '+', type1, '-', resonancePDG); | |
56 | defLikePP[1] = new AliRsnPairDef(type2, '+', type1, '+', resonancePDG); | |
57 | defLikeMM[1] = new AliRsnPairDef(type2, '-', type1, '-', resonancePDG); | |
58 | ||
59 | // === PAIR ANALYSIS ENGINES ==================================================================== | |
60 | ||
61 | // define null (dummy) objects and initialize only the ones which are needed, | |
62 | // depending again on particle types; | |
63 | // array is organized as follows: | |
64 | // [0] - true pairs | |
65 | // [1] - signal | |
4fbb2459 | 66 | // [2] - mixing |
67 | // [3] - like PP | |
68 | // [4] - like MM | |
69 | AliRsnPair *noPIDnoCut[2][5] = {0,0,0,0,0,0,0,0,0,0}; | |
70 | AliRsnPair *noPIDwithCut[2][5] = {0,0,0,0,0,0,0,0,0,0}; | |
71 | AliRsnPair *realisticPID[2][5] = {0,0,0,0,0,0,0,0,0,0}; | |
72 | AliRsnPair *perfectPID[2][5] = {0,0,0,0,0,0,0,0,0,0}; | |
5eac34f4 | 73 | |
74 | for (i = 0; i < nArray; i++) { | |
4fbb2459 | 75 | noPIDnoCut[i][0] = new AliRsnPair(AliRsnPair::kNoPID, defUnlike[i]); |
76 | noPIDnoCut[i][1] = new AliRsnPair(AliRsnPair::kNoPID, defUnlike[i]); | |
77 | noPIDnoCut[i][2] = new AliRsnPair(AliRsnPair::kNoPIDMix, defUnlike[i]); | |
78 | noPIDnoCut[i][3] = new AliRsnPair(AliRsnPair::kNoPID, defLikePP[i]); | |
79 | noPIDnoCut[i][4] = new AliRsnPair(AliRsnPair::kNoPID, defLikeMM[i]); | |
80 | ||
81 | noPIDwithCut[i][0] = new AliRsnPair(AliRsnPair::kNoPID, defUnlike[i]); | |
82 | noPIDwithCut[i][1] = new AliRsnPair(AliRsnPair::kNoPID, defUnlike[i]); | |
83 | noPIDwithCut[i][2] = new AliRsnPair(AliRsnPair::kNoPIDMix, defUnlike[i]); | |
84 | noPIDwithCut[i][3] = new AliRsnPair(AliRsnPair::kNoPID, defLikePP[i]); | |
85 | noPIDwithCut[i][4] = new AliRsnPair(AliRsnPair::kNoPID, defLikeMM[i]); | |
5eac34f4 | 86 | |
87 | realisticPID[i][0] = new AliRsnPair(AliRsnPair::kRealisticPID, defUnlike[i]); | |
88 | realisticPID[i][1] = new AliRsnPair(AliRsnPair::kRealisticPID, defUnlike[i]); | |
4fbb2459 | 89 | realisticPID[i][2] = new AliRsnPair(AliRsnPair::kRealisticPIDMix, defUnlike[i]); |
90 | realisticPID[i][3] = new AliRsnPair(AliRsnPair::kRealisticPID, defLikePP[i]); | |
91 | realisticPID[i][4] = new AliRsnPair(AliRsnPair::kRealisticPID, defLikeMM[i]); | |
92 | ||
93 | perfectPID[i][0] = new AliRsnPair(AliRsnPair::kPerfectPID, defUnlike[i]); | |
94 | perfectPID[i][1] = new AliRsnPair(AliRsnPair::kPerfectPID, defUnlike[i]); | |
95 | perfectPID[i][2] = new AliRsnPair(AliRsnPair::kPerfectPIDMix, defUnlike[i]); | |
96 | perfectPID[i][3] = new AliRsnPair(AliRsnPair::kPerfectPID, defLikePP[i]); | |
97 | perfectPID[i][4] = new AliRsnPair(AliRsnPair::kPerfectPID, defLikeMM[i]); | |
5eb970a4 | 98 | } |
99 | ||
100 | // === CUTS ===================================================================================== | |
101 | ||
4fbb2459 | 102 | /* |
5eb970a4 | 103 | // cuts for tracks: |
4fbb2459 | 104 | // - probability to be a kaon (only for kaons) |
105 | AliRsnCutStd *cutAssignedKaon = new AliRsnCut("cutAssignedKaon", "", AliRsnCut::kAssignedPID, AliAODTrack::kKaon); | |
106 | AliRsnCutStd *cutProbKaon = new AliRsnCut("cutProbKaon", "", AliRsnCut::kPIDProbForSpecies, (Int_t)AliAODTrack::kKaon); | |
107 | cutProbKaon->SetCutValues(AliRsnCut::kPIDProbForSpecies, 0.15, 1.0); | |
108 | */ | |
109 | AliRsnCutSet *cutSetTrack = new AliRsnCutSet("tracks"); | |
110 | //cutSetTrack->AddCut(cutAssignedKaon); | |
111 | //cutSetTrack->AddCut(cutProbKaon); | |
112 | //cutSetTrack->SetCutScheme("(!cutAssignedKaon)|(cutAssignedKaon&cutProbKaon)"); | |
5eb970a4 | 113 | |
114 | // cuts on pairs: | |
4fbb2459 | 115 | // - true daughters of the defined resonance (only for true pairs histogram) |
116 | AliRsnCutStd *cutPairTrue = new AliRsnCutStd("cutTrue", "", AliRsnCut::kTruePair, resonancePDG); | |
5eb970a4 | 117 | AliRsnCutSet *cutSetPairTrue = new AliRsnCutSet("truePairs"); |
4fbb2459 | 118 | cutSetPairTrue->AddCut(cutPairTrue); |
5eb970a4 | 119 | cutSetPairTrue->SetCutScheme("cutTrue"); |
120 | ||
4fbb2459 | 121 | // cuts on events: |
122 | // - multiplicity bin | |
123 | AliRsnCutStd *cutEventMult = new AliRsnCutStd("cutMult", "", AliRsnCut::kMultiplicity, multMin, multMax); | |
124 | AliRsnCutSet *cutSetEvent = new AliRsnCutSet("multiplicity"); | |
125 | cutSetEvent->AddCut(cutEventMult); | |
126 | cutSetEvent->SetCutScheme("cutMult"); | |
5eb970a4 | 127 | |
4fbb2459 | 128 | // define cut manager for NOT true pairs |
129 | AliRsnCutMgr *cutMgr = new AliRsnCutMgr("default", "All pairs"); | |
130 | cutMgr->SetCutSet(AliRsnCut::kEvent, cutSetEvent); | |
131 | ||
132 | // define cut manager for true pairs | |
133 | AliRsnCutMgr *cutMgrTrue = new AliRsnCutMgr("true", "True pairs"); | |
134 | cutMgrTrue->SetCutSet(AliRsnCut::kEvent, cutSetEvent); | |
5eb970a4 | 135 | cutMgrTrue->SetCutSet(AliRsnCut::kPair, cutSetPairTrue); |
136 | ||
4fbb2459 | 137 | // define cut manager for NOPID with kaon prob cut |
138 | // define cut manager for NOT true pairs | |
139 | AliRsnCutMgr *cutMgrProb = new AliRsnCutMgr("probK", "All pairs with kaon probability cut"); | |
140 | cutMgrProb->SetCutSet(AliRsnCut::kEvent, cutSetEvent); | |
141 | cutMgrProb->SetCutSet(AliRsnCut::kParticle, cutSetTrack); | |
142 | ||
143 | // define cut manager for true pairs | |
144 | AliRsnCutMgr *cutMgrTrueProb = new AliRsnCutMgr("true+probK", "True pairs with kaon probability cut"); | |
145 | cutMgrTrueProb->SetCutSet(AliRsnCut::kEvent, cutSetEvent); | |
146 | cutMgrTrueProb->SetCutSet(AliRsnCut::kPair, cutSetPairTrue); | |
147 | cutMgrTrueProb->SetCutSet(AliRsnCut::kParticle, cutSetTrack); | |
148 | ||
149 | // add cuts to pair analysis | |
5eb970a4 | 150 | for (i = 0; i < nArray; i++) { |
4fbb2459 | 151 | noPIDnoCut[i][0]->SetCutMgr(cutMgrTrue); |
152 | noPIDwithCut[i][0]->SetCutMgr(cutMgrTrueProb); | |
5eac34f4 | 153 | realisticPID[i][0]->SetCutMgr(cutMgrTrue); |
4fbb2459 | 154 | perfectPID[i][0]->SetCutMgr(cutMgrTrue); |
155 | for (j = 1; j < 5; j++) { | |
156 | noPIDnoCut[i][j]->SetCutMgr(cutMgr); | |
157 | noPIDwithCut[i][j]->SetCutMgr(cutMgrProb); | |
158 | realisticPID[i][j]->SetCutMgr(cutMgr); | |
159 | perfectPID[i][j]->SetCutMgr(cutMgr); | |
5eb970a4 | 160 | } |
161 | } | |
162 | ||
163 | // === FUNCTIONS ================================================================================ | |
164 | ||
4fbb2459 | 165 | // define histogram templates |
166 | AliRsnFunctionAxis *axisIM = new AliRsnFunctionAxis(AliRsnFunctionAxis::kPairInvMass, 1000, 0.0, 2.0); | |
167 | AliRsnFunctionAxis *axisPt = new AliRsnFunctionAxis(AliRsnFunctionAxis::kPairPt, 10, 0.0, 10.0); | |
168 | AliRsnFunctionAxis *axisEta = new AliRsnFunctionAxis(AliRsnFunctionAxis::kPairEta, 20, -1.0, 1.0); | |
169 | AliRsnFunctionAxis *axisMult = new AliRsnFunctionAxis(AliRsnFunctionAxis::kEventMult, 8, 0.0, 200.0); | |
b2028424 | 170 | |
4fbb2459 | 171 | // define functions axes |
172 | AliRsnFunction *fcnIM = new AliRsnFunction; | |
173 | fcnIM->AddAxis(axisIM); | |
174 | fcnIM->AddAxis(axisPt); | |
175 | fcnIM->AddAxis(axisEta); | |
176 | fcnIM->AddAxis(axisMult); | |
5eb970a4 | 177 | |
178 | for (i = 0; i < nArray; i++) { | |
4fbb2459 | 179 | for (j = 0; j < 5; j++) { |
180 | noPIDnoCut[i][j]->AddFunction(fcnIM); | |
181 | noPIDwithCut[i][j]->AddFunction(fcnIM); | |
182 | realisticPID[i][j]->AddFunction(fcnIM); | |
183 | perfectPID[i][j]->AddFunction(fcnIM); | |
5eb970a4 | 184 | } |
185 | } | |
186 | ||
187 | // === ADD TO PAIR MANAGER ====================================================================== | |
188 | ||
189 | for (i = 0; i < nArray; i++) { | |
4fbb2459 | 190 | for (j = 0; j < 5; j++) { |
191 | pairMgr->AddPair(noPIDnoCut[i][j]); | |
192 | pairMgr->AddPair(noPIDwithCut[i][j]); | |
5eac34f4 | 193 | pairMgr->AddPair(realisticPID[i][j]); |
4fbb2459 | 194 | pairMgr->AddPair(perfectPID[i][j]); |
5eb970a4 | 195 | } |
196 | } | |
197 | ||
198 | return pairMgr; | |
199 | } |