]>
Commit | Line | Data |
---|---|---|
672432f7 | 1 | #include "AliAnalysisV0LamCutProcessing.h" |
2 | ||
3 | ||
4 | ||
5 | AliAnalysisV0LamCut::AliAnalysisV0LamCut(std::vector<double> variableCutValues, bool isUpperBound) | |
6 | { | |
7 | //Contructor for the cut class | |
8 | fIsAnUpperLimit = isUpperBound; | |
9 | fNumberOfCutValues = variableCutValues.size(); | |
10 | fCutValues = variableCutValues; | |
11 | } | |
12 | ||
13 | AliAnalysisV0LamCut::~AliAnalysisV0LamCut() | |
14 | { | |
15 | //default destructor | |
16 | } | |
17 | ||
18 | ||
19 | ||
20 | AliAnalysisV0LamCutProcessing::AliAnalysisV0LamCutProcessing(TList *const outputList) | |
21 | { | |
22 | //Constructor for the cut processing class. | |
23 | //Sets up the cuts that will be used for V0 reconstruction. Also initializes | |
24 | //output histograms that will store information about the V0s. | |
25 | ||
26 | //New recontruction cuts should be put in here. | |
27 | fOutputList = outputList; //Get the output list from the main analysis task | |
28 | fNumberOfCutTypes = 10; //Manually set this to the number of recon cuts | |
29 | double valueDCAPrimProton[] = {0.1}; //default 0.1 | |
30 | double valueDCAPrimPion[] = {0.3};//default 0.3 | |
31 | double valueDCADaughters[] = {0.4};//default 0.4 | |
32 | double valueProperDecayLength[] = {60.}; //default 60 | |
33 | double valueEta[] = {0.8};//default 0.8 | |
34 | double valueCosPointing[] = {0.9993};//default 0.9993 | |
35 | double valueV0DCA[] = {0.5};//default 0.5 | |
36 | double valuePt[] = {0.4};//default 0.4 | |
37 | double valueMassLamDiff[] = {0.0038}; // default 0.0038 | |
38 | double valueMassALamDiff[] = {0.0038};// default 0.0038 | |
39 | std::vector< vector<double> > cutValues(10); | |
40 | //for each "assign", manually set second term to +1 or +N, where N is number | |
41 | //of variable cuts | |
42 | cutValues[0].assign(valueDCAPrimProton, valueDCAPrimProton+1); | |
43 | cutValues[1].assign(valueDCAPrimPion, valueDCAPrimPion+1); | |
44 | cutValues[2].assign(valueDCADaughters, valueDCADaughters+1); | |
45 | cutValues[3].assign(valueProperDecayLength, valueProperDecayLength+1); | |
46 | cutValues[4].assign(valueEta, valueEta+1); | |
47 | cutValues[5].assign(valueCosPointing, valueCosPointing+1); | |
48 | cutValues[6].assign(valueV0DCA, valueV0DCA+1); | |
49 | cutValues[7].assign(valuePt, valuePt+1); | |
50 | cutValues[8].assign(valueMassLamDiff, valueMassLamDiff+1); | |
51 | cutValues[9].assign(valueMassALamDiff, valueMassALamDiff+1); | |
52 | fNumberOfVariableCutValues = 1;//needs to be manually set if values change | |
53 | fDefaultVariableCutIndex = 0; //needs to be manually set if values change | |
54 | //Make cut objects for each cut type | |
55 | fCuts[0] = new AliAnalysisV0LamCut(cutValues[0], false); //v0->daughterPosDCAPrimaryVertex; | |
56 | fCuts[1] = new AliAnalysisV0LamCut(cutValues[1], false); //v0->daughterNegDCAPrimaryVertex; | |
57 | fCuts[2] = new AliAnalysisV0LamCut(cutValues[2], true); //v0->daughtersDCA; | |
58 | fCuts[3] = new AliAnalysisV0LamCut(cutValues[3], true); //v0->decayLength; | |
59 | fCuts[4] = new AliAnalysisV0LamCut(cutValues[4], true); //v0->v0Eta; | |
60 | fCuts[5] = new AliAnalysisV0LamCut(cutValues[5], false); //v0->cosPointing; | |
61 | fCuts[6] = new AliAnalysisV0LamCut(cutValues[6], true); //v0->v0DCA; | |
62 | fCuts[7] = new AliAnalysisV0LamCut(cutValues[7], false); //v0->Pt; | |
63 | fCuts[8] = new AliAnalysisV0LamCut(cutValues[8], true); //v0->massLamDifference; | |
64 | fCuts[9] = new AliAnalysisV0LamCut(cutValues[9], true); //v0->massALamDifference; | |
65 | InitHistograms(); | |
66 | } | |
67 | ||
68 | AliAnalysisV0LamCutProcessing::~AliAnalysisV0LamCutProcessing() | |
69 | { | |
70 | //Destructor for the cut processor. Cleans up the cut objects | |
71 | for (int i = 0; i < fNumberOfCutTypes; i++){ | |
72 | if(fCuts[i]) delete fCuts[i]; | |
73 | fCuts[i] = NULL; | |
74 | } | |
75 | } | |
76 | ||
77 | void AliAnalysisV0LamCutProcessing::ProcessCut(AliReconstructedV0 *v0, int index, bool isLambdaCandidate) | |
78 | { | |
79 | //This function processes a single reconstruction cut of a V0. If the cut in | |
80 | //question is a variable cut, the function loops over each value of that cut | |
81 | //and stores whether the V0 passes or fails each particular value. | |
82 | //If isLambdaCandidate is false, the V0 is an Antilambda candidate | |
83 | ||
84 | //First we get the relevant V0 information that will be tested by this cut. | |
85 | double v0Value; | |
86 | if (0 == index){ //Get the proton DCA to primary | |
87 | if(isLambdaCandidate) v0Value = v0->daughterPosDCAPrimaryVertex; | |
88 | else v0Value = v0->daughterNegDCAPrimaryVertex; | |
89 | } | |
90 | else if(1 == index){ //Get the pion DCA to primary | |
91 | if(isLambdaCandidate) v0Value = v0->daughterNegDCAPrimaryVertex; | |
92 | else v0Value = v0->daughterPosDCAPrimaryVertex; | |
93 | } | |
94 | else if(2 == index) v0Value = v0->daughtersDCA; | |
95 | else if(3 == index){ | |
96 | if(v0->lorentzGammaLam >0) v0Value = (v0->decayLength / v0->lorentzGammaLam); | |
97 | else v0Value = 1000; // something is wrong if gamma <=0, so set to a fail val | |
98 | } | |
99 | else if(4 == index) v0Value = v0->v0Eta; | |
100 | else if(5 == index) v0Value = v0->cosPointing; | |
101 | else if(6 == index) v0Value = v0->v0DCA; | |
102 | else if(7 == index) v0Value = v0->v0Pt; | |
103 | else if(8 == index) v0Value = v0->massLamDifference; | |
104 | else if(9 == index) v0Value = v0->massALamDifference; | |
105 | else cerr<<"ERROR: No cut for this index value \n"; | |
106 | //Find how many cut values are associated with this cut | |
107 | int numberOfCutValues = fCuts[index]->fNumberOfCutValues; | |
108 | if(0 == numberOfCutValues) cerr<<"ERROR: Must have at least one cut value \n"; | |
109 | else { | |
110 | for(int i = 0; i < numberOfCutValues; i++){ | |
111 | //check if v0 passes each cut value and set v0 bools accordingly | |
112 | //Cut can either be an upper bound or a lower bound. | |
113 | if(fCuts[index]->fIsAnUpperLimit){ //upper bound cuts | |
114 | if(fCuts[index]->fCutValues[i] > v0Value ) | |
115 | { | |
116 | //v0 passed cut. Set v0 bool accordingly | |
117 | v0->hasPassedCut[index][i] = kTRUE; | |
118 | } | |
119 | } | |
120 | else { //lower bound cuts | |
121 | if(fCuts[index]->fCutValues[i] < v0Value ) | |
122 | { | |
123 | //v0 passed cut. Set v0 bool accordingly | |
124 | v0->hasPassedCut[index][i] = kTRUE; | |
125 | } | |
126 | } | |
127 | } | |
128 | } //end numberOfCutValues > 1 | |
129 | } | |
130 | ||
131 | void AliAnalysisV0LamCutProcessing::CheckIfV0PassesCuts(AliReconstructedV0 *v0) | |
132 | { | |
133 | // Called by the Analysis Task | |
134 | // Function which checks if V0 passes cuts. | |
135 | // First the code processes each cut. | |
136 | // If the candidate passes all the cuts, DetermineIfTrueV0 sets | |
137 | // isLamCenter or isALamCenter to true | |
138 | ||
139 | for(int cutTypeIndex = 0; cutTypeIndex < fNumberOfCutTypes; cutTypeIndex++) | |
140 | { | |
141 | //First default these to false | |
142 | v0->isLamCenter[cutTypeIndex] = kFALSE; | |
143 | v0->isALamCenter[cutTypeIndex] = kFALSE; | |
144 | v0->isDeemedUnworthy[cutTypeIndex] = kFALSE; | |
145 | for(int varCutIndex = 0; varCutIndex < fNumberOfVariableCutValues; varCutIndex++){ | |
146 | v0->hasPassedCut[cutTypeIndex][varCutIndex]=kFALSE; | |
147 | } | |
148 | } | |
149 | //At this point, a V0 could simultaneously be a lambda candidate and an | |
150 | //antilambda candidates (based only on the PID of the daughters). It is | |
151 | //necessary to check both cases separately. | |
152 | ||
153 | //Process cuts for lambda candidates | |
154 | if(v0->hasProtonDaughter && v0->hasPiMinusDaughter){ | |
155 | bool isLambdaCandidate = kTRUE; | |
156 | for(int cutIndex = 0; cutIndex < 8; cutIndex++) ProcessCut(v0,cutIndex,isLambdaCandidate); //General cuts | |
157 | ProcessCut(v0,8,isLambdaCandidate); //Lambda specific cut | |
158 | AliAnalysisV0LamCutProcessing::DetermineIfTrueV0(v0,isLambdaCandidate); | |
159 | } | |
160 | //Process cuts for antilambda candidates | |
161 | if(v0->hasAntiProtonDaughter && v0->hasPiPlusDaughter){ | |
162 | bool isLambdaCandidate = kFALSE; | |
163 | for(int cutIndex = 0; cutIndex < 8; cutIndex++) ProcessCut(v0,cutIndex,isLambdaCandidate); //General cuts | |
164 | ProcessCut(v0,9,isLambdaCandidate); //AntiLambda specific cut | |
165 | AliAnalysisV0LamCutProcessing::DetermineIfTrueV0(v0,isLambdaCandidate); | |
166 | } | |
167 | } | |
168 | ||
169 | void AliAnalysisV0LamCutProcessing::DetermineIfTrueV0(AliReconstructedV0 *v0, bool isLambda) | |
170 | { | |
171 | //Checks to see if the V0 passed all the standard cuts and any of the | |
172 | //variable cuts. The function either checks if the v0 look like a Lambda | |
173 | //or looks like an antiLambda, as set by the isLambda input variable. | |
174 | vector<bool> passedCut(fNumberOfVariableCutValues,kTRUE); | |
175 | bool hasFailedStandardCut = kFALSE; | |
176 | //Check which cuts the V0 passed and failed | |
177 | for(int cutIndex = 0; cutIndex < fNumberOfCutTypes; cutIndex++){ | |
178 | int numberOfCutValues = fCuts[cutIndex]->fNumberOfCutValues; //find how many cut values | |
179 | for(int i = 0; i < numberOfCutValues; i++){ | |
180 | if(8 > cutIndex /* update this if number of cuts changes*/){ //check generic V0 cuts | |
181 | if(!v0->hasPassedCut[cutIndex][i]){ | |
182 | if(1 == numberOfCutValues) hasFailedStandardCut = kTRUE; | |
183 | else passedCut[i] = kFALSE; | |
184 | } | |
185 | } | |
186 | if((8 == cutIndex) && isLambda){ //Only check for Lambda case | |
187 | if(!v0->hasPassedCut[cutIndex][i]){ | |
188 | if(1 == numberOfCutValues) hasFailedStandardCut = kTRUE; | |
189 | else passedCut[i] = kFALSE; | |
190 | } | |
191 | } | |
192 | if((9 == cutIndex) && !isLambda){ //Only check for AntiLambda case | |
193 | if(!v0->hasPassedCut[cutIndex][i]){ | |
194 | if(1 == numberOfCutValues) hasFailedStandardCut = kTRUE; | |
195 | else passedCut[i] = kFALSE; | |
196 | } | |
197 | } | |
198 | } | |
199 | } | |
200 | if(hasFailedStandardCut){ | |
201 | //if it failed any standard (i.e. non-variable cuts) cuts, set all | |
202 | //passedCut values to failed | |
203 | for(int i = 0; i < fNumberOfVariableCutValues; i++){ | |
204 | passedCut[i] = kFALSE; | |
205 | } | |
206 | } | |
207 | for(int i = 0; i < fNumberOfVariableCutValues; i++){ | |
208 | //Now, for each candidate that passed cuts, determine if Lam or antiLam | |
209 | if(passedCut[i]){ //if this is true at this point, the v0 has passed ALL the | |
210 | //standard cuts AND the ith variable cut | |
211 | if(isLambda) v0->isLamCenter[i]=kTRUE; | |
212 | else v0->isALamCenter[i]=kTRUE; | |
213 | } //Otherwise isLamCenter and isALamCenter are false by default | |
214 | } | |
215 | } | |
216 | ||
217 | ||
218 | ||
219 | ||
220 | void AliAnalysisV0LamCutProcessing::DoV0Histogramming(AliReconstructedV0 *v0) | |
221 | { | |
222 | //Called by the analysis task. Histograms the V0's reconstruction parameters. | |
223 | //Does separate histogramming for lambda and antilambda cases | |
224 | if(v0->hasProtonDaughter && v0->hasPiMinusDaughter){ | |
225 | SortAndFillCutHistograms(v0, true); | |
226 | } | |
227 | if(v0->hasAntiProtonDaughter && v0->hasPiPlusDaughter){ | |
228 | SortAndFillCutHistograms(v0,false); | |
229 | } | |
230 | } | |
231 | ||
232 | void AliAnalysisV0LamCutProcessing::SortAndFillCutHistograms(AliReconstructedV0 *v0, bool isLambda) | |
233 | { | |
234 | //Loops through each cut type to attempt to histogram it. If all the *other* | |
235 | //cuts pass, then the V0's value for this cut is histogrammed. FillHist is | |
236 | //called to handle the filling of the histogram | |
237 | //e.g. Only fill Minv hist if V0 passed decaylength, DCA, etc. | |
238 | for(int cutTypeIndex = 0; cutTypeIndex < fNumberOfCutTypes; cutTypeIndex++) | |
239 | { //Loop over each cut type | |
240 | bool passesOtherCuts = true; | |
241 | //Ignore irrelevant species specific cuts | |
242 | if(isLambda && (9 == cutTypeIndex)) continue; //ignore antilambda cut | |
243 | if(!isLambda && (8 == cutTypeIndex)) continue; //ignore lambda cut | |
244 | vector<bool> passesOtherVariableCuts(fNumberOfVariableCutValues, true); | |
245 | for(int variableCutIndex = 0; variableCutIndex < fNumberOfVariableCutValues; variableCutIndex++) | |
246 | { //Loop over number of variable cut values | |
247 | if(!passesOtherCuts) break; //If it fails a cut, don't need to histogram it | |
248 | for(int otherCutTypeIndex =0; otherCutTypeIndex < fNumberOfCutTypes; otherCutTypeIndex++) | |
249 | { | |
250 | if(cutTypeIndex == otherCutTypeIndex) continue; //only need to pass the OTHER cuts | |
251 | //Again, ignore irrelevant species specific cuts | |
252 | if(isLambda && (9 == otherCutTypeIndex)) continue; | |
253 | if(!isLambda && (8 == otherCutTypeIndex)) continue; | |
254 | if(fCuts[otherCutTypeIndex]->fNumberOfCutValues > 1){ | |
255 | if(!v0->hasPassedCut[otherCutTypeIndex][variableCutIndex]) { | |
256 | passesOtherVariableCuts[variableCutIndex] = false; | |
257 | break; | |
258 | } | |
259 | } | |
260 | else if(!v0->hasPassedCut[otherCutTypeIndex][0]){ | |
261 | passesOtherCuts = false; | |
262 | break; | |
263 | } | |
264 | } | |
265 | //Finally, if it passes all standard cuts and the current variable cut, | |
266 | //fill the histogram for that cut type. | |
267 | if(passesOtherCuts && passesOtherVariableCuts[variableCutIndex]){ | |
268 | FillHist(v0,cutTypeIndex,variableCutIndex,isLambda); | |
269 | } | |
270 | } | |
271 | } | |
272 | } | |
273 | ||
274 | void AliAnalysisV0LamCutProcessing::InitHistograms() | |
275 | { | |
276 | //Initilizes histograms for V0 characteristics | |
277 | TString nameDaughterPosDcaToPrimLam = "fHistDaughterPosDcaToPrimLam"; | |
278 | TString nameDaughterPosDcaToPrimALam = "fHistDaughterPosDcaToPrimALam"; | |
279 | TString nameDaughterNegDcaToPrimLam = "fHistDaughterNegDcaToPrimLam"; | |
280 | TString nameDaughterNegDcaToPrimALam = "fHistDaughterNegDcaToPrimALam"; | |
281 | TString nameDaughtersDcaLam = "fHistDaughtersDcaLam"; | |
282 | TString nameDaughtersDcaALam = "fHistDaughtersDcaALam"; | |
283 | TString nameDecayLengthLam = "fHistDecayLengthLam"; | |
284 | TString nameDecayLengthALam = "fHistDecayLengthALam"; | |
285 | TString nameProperDecayLengthLam = "fHistProperDecayLengthLam"; | |
286 | TString nameProperDecayLengthALam = "fHistProperDecayLengthALam"; | |
287 | TString nameEtaLam = "fHistEtaLam"; | |
288 | TString nameEtaALam = "fHistEtaALam"; | |
289 | TString nameCosPointingLam = "fHistCosPointingLam"; | |
290 | TString nameCosPointingALam = "fHistCosPointingALam"; | |
291 | TString nameDcaLam = "fHistDcaLam"; | |
292 | TString nameDcaALam = "fHistDcaALam"; | |
293 | TString namePtLam = "fHistPtLam"; | |
294 | TString namePtALam = "fHistPtALam"; | |
295 | TString nameMassLam = "fHistMassLam"; | |
296 | TString nameMassALam = "fHistMassALam"; | |
297 | TString nameMassCentralityLam = "fHistMassCentralityLam"; | |
298 | TString nameMassCentralityALam = "fHistMassCentralityALam"; | |
299 | fHistDaughterPosDcaToPrimLam = new TH2F((nameDaughterPosDcaToPrimLam).Data(),"DCA of proton daughter to primary vertex", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 100, 0., 10.); | |
300 | fHistDaughterPosDcaToPrimALam = new TH2F((nameDaughterPosDcaToPrimALam).Data(),"DCA of piplus daughter to primary vertex", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 100, 0., 10.); | |
301 | fHistDaughterNegDcaToPrimLam = new TH2F((nameDaughterNegDcaToPrimLam).Data(),"DCA of piminus daughter to primary vertex", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 100, 0., 10.); | |
302 | fHistDaughterNegDcaToPrimALam = new TH2F((nameDaughterNegDcaToPrimALam).Data(),"DCA of antiproton daughter to primary vertex", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 100, 0., 10.); | |
303 | fHistDaughtersDcaLam = new TH2F((nameDaughtersDcaLam).Data(), "DCA of Lambda daughters to each other", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 100, 0., 1.5); | |
304 | fHistDaughtersDcaALam = new TH2F((nameDaughtersDcaALam).Data(), "DCA of AntiLambda daughters to each other", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 100, 0., 1.5); | |
305 | fHistDecayLengthLam = new TH2F((nameDecayLengthLam).Data(), "Lambda decay length", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 500, 0., 100.); | |
306 | fHistDecayLengthALam = new TH2F((nameDecayLengthALam).Data(), "AntiLambda decay length", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 500, 0., 100.); | |
307 | fHistProperDecayLengthLam = new TH2F((nameProperDecayLengthLam).Data(), "Lambda proper decay length", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 500, 0., 100.); | |
308 | fHistProperDecayLengthALam = new TH2F((nameProperDecayLengthALam).Data(), "AntiLambda proper decay length", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 500, 0., 100.); | |
309 | fHistEtaLam = new TH2F((nameEtaLam).Data(), "Eta distribution of Lambdas", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 100, 0.0, 1.); | |
310 | fHistEtaALam = new TH2F((nameEtaALam).Data(), "Eta distribution of AntiLambdas", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 100, 0.0, 1.); | |
311 | fHistCosPointingLam = new TH2F((nameCosPointingLam).Data(), "Cosine(pointing angle) of Lambdas", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5,100, .97, 1.); | |
312 | fHistCosPointingALam = new TH2F((nameCosPointingALam).Data(), "Cosine(pointing angle) of AntiLambdas", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 100, .97, 1.); | |
313 | fHistDcaLam = new TH2F((nameDcaLam).Data(), "DCA of Lambdas to primary vertex", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 100, 0., 5.); | |
314 | fHistDcaALam = new TH2F((nameDcaALam).Data(), "DCA of AntiLambdas to primary vertex", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 100, 0., 5.); | |
315 | fHistPtLam = new TH2F((namePtLam).Data(), "Lambda pT distribution", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 500, 0., 10.); | |
316 | fHistPtALam = new TH2F((namePtALam).Data(), "AntiLambda pT distribution", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 500, 0., 10.); | |
317 | fHistMassLam = new TH2F((nameMassLam).Data(), "Lambda Minv", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 600,1.04,1.19); | |
318 | fHistMassALam = new TH2F((nameMassALam).Data(), "AntiLambda Minv", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 600,1.04,1.19); | |
319 | fHistMassCentralityLam = new TH3F((nameMassCentralityLam).Data(), "Lambda Minv vs Centrality", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 20, .5, 20+.5, 600, 1.04,1.19); | |
320 | fHistMassCentralityALam = new TH3F((nameMassCentralityALam).Data(), "AntiLambda Minv vs Centrality", fNumberOfVariableCutValues, -0.5, fNumberOfVariableCutValues -0.5, 20, .5, 20+.5, 600, 1.04,1.19); | |
321 | fOutputList->Add(fHistDaughterPosDcaToPrimLam); | |
322 | fOutputList->Add(fHistDaughterPosDcaToPrimALam); | |
323 | fOutputList->Add(fHistDaughterNegDcaToPrimLam); | |
324 | fOutputList->Add(fHistDaughterNegDcaToPrimALam); | |
325 | fOutputList->Add(fHistDaughtersDcaLam); | |
326 | fOutputList->Add(fHistDaughtersDcaALam); | |
327 | fOutputList->Add(fHistDecayLengthLam); | |
328 | fOutputList->Add(fHistDecayLengthALam); | |
329 | fOutputList->Add(fHistProperDecayLengthLam); | |
330 | fOutputList->Add(fHistProperDecayLengthALam); | |
331 | fOutputList->Add(fHistEtaLam); | |
332 | fOutputList->Add(fHistEtaALam); | |
333 | fOutputList->Add(fHistCosPointingLam); | |
334 | fOutputList->Add(fHistCosPointingALam); | |
335 | fOutputList->Add(fHistDcaLam); | |
336 | fOutputList->Add(fHistDcaALam); | |
337 | fOutputList->Add(fHistPtLam); | |
338 | fOutputList->Add(fHistPtALam); | |
339 | fOutputList->Add(fHistMassLam); | |
340 | fOutputList->Add(fHistMassALam); | |
341 | fOutputList->Add(fHistMassCentralityLam); | |
342 | fOutputList->Add(fHistMassCentralityALam); | |
343 | //Don't need to call PostData here, since PostData will be called by | |
344 | //the main analysis task | |
345 | } | |
346 | ||
347 | void AliAnalysisV0LamCutProcessing::FillHist(AliReconstructedV0 *v0, int cutTypeIndex, int variableCutIndex, bool isLambda) | |
348 | { | |
349 | //Maps each cutTypeIndex to a different histogram and fills the associated value from the v0. | |
350 | //If isLambda is false, the V0 is an antilambda | |
351 | if(0 == cutTypeIndex){ | |
352 | if(isLambda) fHistDaughterPosDcaToPrimLam->Fill(variableCutIndex, v0->daughterPosDCAPrimaryVertex); | |
353 | else fHistDaughterNegDcaToPrimALam->Fill(variableCutIndex, v0->daughterNegDCAPrimaryVertex); | |
354 | } | |
355 | if(1 == cutTypeIndex){ | |
356 | if(isLambda) fHistDaughterNegDcaToPrimLam->Fill(variableCutIndex, v0->daughterNegDCAPrimaryVertex); | |
357 | else fHistDaughterPosDcaToPrimALam->Fill(variableCutIndex, v0->daughterPosDCAPrimaryVertex); | |
358 | } | |
359 | if(2 == cutTypeIndex){ | |
360 | if(isLambda) fHistDaughtersDcaLam->Fill(variableCutIndex, v0->daughtersDCA); | |
361 | else fHistDaughtersDcaALam->Fill(variableCutIndex, v0->daughtersDCA); | |
362 | } | |
363 | if(3 == cutTypeIndex){ | |
364 | if(isLambda){ | |
365 | fHistDecayLengthLam->Fill(variableCutIndex, v0->decayLength); | |
366 | if(v0->lorentzGammaLam > 0){ | |
367 | fHistProperDecayLengthLam->Fill(variableCutIndex, v0->decayLength/v0->lorentzGammaLam); | |
368 | } | |
369 | } | |
370 | else{ | |
371 | fHistDecayLengthALam->Fill(variableCutIndex, v0->decayLength); | |
372 | if(v0->lorentzGammaLam > 0){ | |
373 | fHistProperDecayLengthALam->Fill(variableCutIndex, v0->decayLength/v0->lorentzGammaLam); | |
374 | } | |
375 | } | |
376 | } | |
377 | if(4 == cutTypeIndex){ | |
378 | if(isLambda) fHistEtaLam->Fill(variableCutIndex, v0->v0Eta); | |
379 | else fHistEtaALam->Fill(variableCutIndex, v0->v0Eta); | |
380 | } | |
381 | if(5 == cutTypeIndex){ | |
382 | if(isLambda) fHistCosPointingLam->Fill(variableCutIndex, v0->cosPointing); | |
383 | else fHistCosPointingALam->Fill(variableCutIndex, v0->cosPointing); | |
384 | } | |
385 | if(6 == cutTypeIndex){ | |
386 | if(isLambda) fHistDcaLam->Fill(variableCutIndex, v0->v0DCA); | |
387 | else fHistDcaALam->Fill(variableCutIndex, v0->v0DCA); | |
388 | } | |
389 | if(7 == cutTypeIndex){ | |
390 | if(isLambda) fHistPtLam->Fill(variableCutIndex, v0->v0Pt); | |
391 | else fHistPtALam->Fill(variableCutIndex, v0->v0Pt); | |
392 | } | |
393 | if(8 == cutTypeIndex){ | |
394 | if(isLambda){ //only do this histogramming for Lambdas | |
395 | fHistMassLam->Fill(variableCutIndex, v0->massLam); | |
396 | fHistMassCentralityLam->Fill(variableCutIndex, fCurrentCentralityBin+1,v0->massLam); | |
397 | } | |
398 | } | |
399 | if(9 == cutTypeIndex){ | |
400 | if(!isLambda){ //Only do this histogramming for AntiLambdas | |
401 | fHistMassALam->Fill(variableCutIndex, v0->massALam); | |
402 | fHistMassCentralityALam->Fill(variableCutIndex, fCurrentCentralityBin+1,v0->massALam); | |
403 | } | |
404 | } | |
405 | } |