version HLT v0-3 tagged
[u/mrichter/AliRoot.git] / STEER / AliEventTagCuts.cxx
CommitLineData
c7e89ea3 1/**************************************************************************
2 * Author: Panos Christakoglou. *
3 * Contributors are mentioned in the code where appropriate. *
4 * *
5 * Permission to use, copy, modify and distribute this software and its *
6 * documentation strictly for non-commercial purposes is hereby granted *
7 * without fee, provided that the above copyright notice appears in all *
8 * copies and that both the copyright notice and this permission notice *
9 * appear in the supporting documentation. The authors make no claims *
10 * about the suitability of this software for any purpose. It is *
11 * provided "as is" without express or implied warranty. *
12 **************************************************************************/
13
14/* $Id$ */
15
16//-----------------------------------------------------------------
17// AliEventTagCuts class
18// This is the class to deal with the event tag level cuts
19// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
20//-----------------------------------------------------------------
21
22class AliLog;
23class AliESD;
24
25#include "AliEventTag.h"
26#include "AliEventTagCuts.h"
27
28ClassImp(AliEventTagCuts)
29
30
31//----------------------------------------//
32AliEventTagCuts::AliEventTagCuts()
33{
34 //Default constructor which calls the Reset method.
35 Reset();
36}
37
38//----------------------------------------//
39AliEventTagCuts::~AliEventTagCuts()
40{
41 //Defaut destructor.
42}
43
44//----------------------------------------//
45void AliEventTagCuts::Reset()
46{
47 //Sets dummy values to every private member.
48 fVxFlag = kFALSE;
49 fVyFlag = kFALSE;
50 fVzFlag = kFALSE;
51 fParticipantsFlag = kFALSE;
52 fImpactParamFlag = kFALSE;
53 fPVFlag = kFALSE;
32a5cab4 54 fZDCNeutron1EnergyFlag = kFALSE;
55 fZDCProton1EnergyFlag = kFALSE;
56 fZDCNeutron2EnergyFlag = kFALSE;
57 fZDCProton2EnergyFlag = kFALSE;
c7e89ea3 58 fZDCEMEnergyFlag = kFALSE;
59 fT0VertexZFlag = kFALSE;
60 fMultFlag = kFALSE;
61 fMultPosFlag = kFALSE;
62 fMultNegFlag = kFALSE;
63 fMultNeutrFlag = kFALSE;
64 fV0sFlag = kFALSE;
65 fCascadesFlag = kFALSE;
66 fkinksFlag = kFALSE;
67 fMaxJetEnergyFlag = kFALSE;
68 fNHardPhotonsCandidatesFlag = kFALSE;
69 fMaxNeutralFlag = kFALSE;
70 fChargedAbove1GeVFlag = kFALSE;
71 fChargedAbove3GeVFlag = kFALSE;
72 fChargedAbove10GeVFlag = kFALSE;
73 fMuonsAbove1GeVFlag = kFALSE;
74 fMuonsAbove3GeVFlag = kFALSE;
75 fMuonsAbove10GeVFlag = kFALSE;
76 fElectronsAbove1GeVFlag = kFALSE;
77 fElectronsAbove3GeVFlag = kFALSE;
78 fElectronsAbove10GeVFlag = kFALSE;
79 fElectronsFlag = kFALSE;
80 fMuonsFlag = kFALSE;
81 fPionsFlag = kFALSE;
82 fKaonsFlag = kFALSE;
83 fProtonsFlag = kFALSE;
84 fLambdasFlag = kFALSE;
85 fPhotonFlag = kFALSE;
86 fPi0sFlag = kFALSE;
87 fNeutronsFlag = kFALSE;
88 fKaon0sFlag = kFALSE;
89 fTotalPFlag = kFALSE;
90 fMeanPtFlag = kFALSE;
91 fMaxPtFlag = kFALSE;
92 fTotalNeutralPFlag = kFALSE;
93 fMeanNeutralPtFlag = kFALSE;
94 fMaxNeutralPtFlag = kFALSE;
95 fEventPlaneAngleFlag = kFALSE;
96 fHBTRadiiFlag = kFALSE;
97
98 fVxMin = -1000.0;
99 fVxMax = 1000.0;
100 fVyMin = -1000.0;
101 fVyMax = 1000.0;
102 fVzMin = -1000.0;
103 fVzMax = 1000.0;
104
105 fMultMin = 0;
106 fMultMax = 100000;
107
108 fParticipantsMin = -1;
109 fParticipantMax = 10000;
110 fImpactParamMin = -1.0;
111 fImpactParamMax = 1000.0;
112 fPrimaryVertexFlag = 1;
113
32a5cab4 114 fZDCNeutron1EnergyMin = -1.0;
115 fZDCNeutron1EnergyMax = 100000.0;
116 fZDCProton1EnergyMin = -1.0;
117 fZDCProton1EnergyMax = 100000.0;
118 fZDCNeutron2EnergyMin = -1.0;
119 fZDCNeutron2EnergyMax = 100000.0;
120 fZDCProton2EnergyMin = -1.0;
121 fZDCProton2EnergyMax = 100000.0;
c7e89ea3 122 fZDCEMEnergyMin = -1.0;
123 fZDCEMEnergyMax = 100000.0;
124 fT0VertexZMin = -10000.0;
125 fT0VertexZMax = 10000.0;
126
127 fMultPosMin = -1;
128 fMultPosMax = 100000;
129 fMultNegMin = -1;
130 fMultNegMax = 100000;
131 fMultNeutrMin = -1;
132 fMultNeutrMax = 100000;
133 fV0sMin = -1;
134 fV0sMax = 1000000;
135 fCascadesMin = -1;
136 fCascadesMax = 100000;
137 fkinksMin = -1;
138 fkinksMax = 1000000;
139
140 fMaxJetEnergy = -1.0;
141
142 fNHardPhotonsCandidatesMin = -1;
143 fNHardPhotonsCandidatesMax = 100000;
144 fMaxNeutralEnergy = -1.0;
145
146 fChargedAbove1GeVMin = -1;
147 fChargedAbove1GeVMax = 100000;
148 fChargedAbove3GeVMin = -1;
149 fChargedAbove3GeVMax = 100000;
150 fChargedAbove10GeVMin = -1;
151 fChargedAbove10GeVMax = 100000;
152 fMuonsAbove1GeVMin = -1;
153 fMuonsAbove1GeVMax = 100000;
154 fMuonsAbove3GeVMin = -1;
155 fMuonsAbove3GeVMax = 100000;
156 fMuonsAbove10GeVMin = -1;
157 fMuonsAbove10GeVMax = 100000;
158 fElectronsAbove1GeVMin = -1;
159 fElectronsAbove1GeVMax = 100000;
160 fElectronsAbove3GeVMin = -1;
161 fElectronsAbove3GeVMax = 100000;
162 fElectronsAbove10GeVMin = -1;
163 fElectronsAbove10GeVMax = 100000;
164
165 fElectronsMin = -1;
166 fElectronsMax = 100000;
167 fMuonsMin = -1;
168 fMuonsMax = 100000;
169 fPionsMin = -1;
170 fPionsMax = 100000;
171 fKaonsMin = -1;
172 fKaonsMax = 100000;
173 fProtonsMin = -1;
174 fProtonsMax = 100000;
175 fLambdasMin = -1;
176 fLambdasMax = 100000;
177 fPhotonsMin = -1;
178 fPhotonsMax = 100000;
179 fPi0sMin = -1;
180 fPi0sMax = 100000;
181 fNeutronsMin = -1;
182 fNeutronsMax = 100000;
183 fKaon0sMin = -1;
184 fKaon0sMax = 100000;
185
186 fTotalPMin = -1.0;
187 fTotalPMax = 1000000.0;
188 fMeanPtMin = -1.0;
189 fMeanPtMax = 100000.0;
190 fMaxPt = -1.0;
191 fTotalNeutralPMin = -1.0;
192 fTotalNeutralPMax = 1000000.0;
193 fMeanNeutralPtMin = -1.0;
194 fMeanNeutralPtMax = 1000000.0;
195 fMaxNeutralPt = -1.0;
196 fEventPlaneAngleMin = -10000000.0;
197 fEventPlaneAngleMax = 10000000.0;
198 fHBTRadiiMin = -1.0;
199 fHBTRadiiMax = 100000.0;
200}
201
202//----------------------------------------//
203void AliEventTagCuts::SetPrimaryVertexXRange(Float_t r1, Float_t r2)
204{
205 //Sets the primary vertex x range
206 //and the corresponding flag to kTRUE if the cut is used.
207 fVxMin = r1;
208 fVxMax = r2;
209 fVxFlag = kTRUE;
210}
211
212//----------------------------------------//
213void AliEventTagCuts::SetPrimaryVertexYRange(Float_t r1, Float_t r2)
214{
215 //Sets the primary vertex y range
216 //and the corresponding flag to kTRUE if the cut is used.
217 fVyMin = r1;
218 fVyMax = r2;
219 fVyFlag = kTRUE;
220}
221
222//----------------------------------------//
223void AliEventTagCuts::SetPrimaryVertexZRange(Float_t r1, Float_t r2)
224{
225 //Sets the primary vertex z range
226 //and the corresponding flag to kTRUE if the cut is used.
227 fVzMin = r1;
228 fVzMax = r2;
229 fVzFlag = kTRUE;
230}
231
232//----------------------------------------//
233void AliEventTagCuts::SetMultiplicityRange(Int_t n1, Int_t n2)
234{
235 //Sets the primary multiplicity range
236 //and the corresponding flag to kTRUE if the cut is used.
237 fMultMin = n1;
238 fMultMax = n2;
239 fMultFlag = kTRUE;
240}
241
242//----------------------------------------//
243void AliEventTagCuts::SetParticipantsRange(Int_t i1, Int_t i2)
244{
245 //Sets the number of participants range
246 //and the corresponding flag to kTRUE if the cut is used.
247 fParticipantsMin = i1;
248 fParticipantMax = i2;
249 fParticipantsFlag = kTRUE;
250}
251
252//----------------------------------------//
253void AliEventTagCuts::SetImpactParamRange(Float_t r1, Float_t r2)
254{
255 //Sets the impact parameter range
256 //and the corresponding flag to kTRUE if the cut is used.
257 fImpactParamMin = r1;
258 fImpactParamMax = r2;
259 fImpactParamFlag = kTRUE;
260}
261
262
263//----------------------------------------//
264void AliEventTagCuts::SetPrimaryVertexFlag(Int_t i)
265{
266 //Sets the primary vertex flag cut
267 //and the corresponding flag to kTRUE if the cut is used.
268 fPrimaryVertexFlag = i;
269 fPVFlag = kTRUE;
270}
271
272//----------------------------------------//
32a5cab4 273void AliEventTagCuts::SetZDCNeutr1Range(Float_t r1, Float_t r2)
c7e89ea3 274{
275 //Sets the ZDC's neutron energy range
276 //and the corresponding flag to kTRUE if the cut is used.
32a5cab4 277 fZDCNeutron1EnergyMin = r1;
278 fZDCNeutron1EnergyMax = r2;
279 fZDCNeutron1EnergyFlag = kTRUE;
c7e89ea3 280}
281//----------------------------------------//
32a5cab4 282void AliEventTagCuts::SetZDCProt1Range(Float_t r1, Float_t r2)
c7e89ea3 283{
284 //Sets the ZDC's proton energy range
285 //and the corresponding flag to kTRUE if the cut is used.
32a5cab4 286 fZDCProton1EnergyMin = r1;
287 fZDCProton1EnergyMax = r2;
288 fZDCProton1EnergyFlag = kTRUE;
289}
290//----------------------------------------//
291void AliEventTagCuts::SetZDCNeutr2Range(Float_t r1, Float_t r2)
292{
293 //Sets the ZDC's neutron energy range
294 //and the corresponding flag to kTRUE if the cut is used.
295 fZDCNeutron2EnergyMin = r1;
296 fZDCNeutron2EnergyMax = r2;
297 fZDCNeutron2EnergyFlag = kTRUE;
298}
299//----------------------------------------//
300void AliEventTagCuts::SetZDCProt2Range(Float_t r1, Float_t r2)
301{
302 //Sets the ZDC's proton energy range
303 //and the corresponding flag to kTRUE if the cut is used.
304 fZDCProton2EnergyMin = r1;
305 fZDCProton2EnergyMax = r2;
306 fZDCProton2EnergyFlag = kTRUE;
c7e89ea3 307}
308//----------------------------------------//
309void AliEventTagCuts::SetZDCEMRange(Float_t r1, Float_t r2)
310{
311 //Sets the ZDC's e/m energy range
312 //and the corresponding flag to kTRUE if the cut is used.
313 fZDCEMEnergyMin = r1;
314 fZDCEMEnergyMax = r2;
315 fZDCEMEnergyFlag = kTRUE;
316}
317
318//----------------------------------------//
319void AliEventTagCuts::SetT0VertexZRange(Float_t r1, Float_t r2)
320{
321 //Sets the T0's Vz range
322 //and the corresponding flag to kTRUE if the cut is used.
323 fT0VertexZMin = r1;
324 fT0VertexZMax = r2;
325 fT0VertexZFlag = kTRUE;
326}
327
328//----------------------------------------//
329void AliEventTagCuts::SetPosMultiplicityRange(Int_t n1, Int_t n2)
330{
331 //Sets the positive multiplicity range
332 //and the corresponding flag to kTRUE if the cut is used.
333 fMultPosMin = n1;
334 fMultPosMax = n2;
335 fMultPosFlag = kTRUE;
336}
337
338
339//----------------------------------------//
340void AliEventTagCuts::SetNegMultiplicityRange(Int_t n1, Int_t n2)
341{
342 //Sets the negative multiplicity range
343 //and the corresponding flag to kTRUE if the cut is used.
344 fMultNegMin = n1;
345 fMultNegMax = n2;
346 fMultNegFlag = kTRUE;
347}
348
349
350//----------------------------------------//
351void AliEventTagCuts::SetNeutrMultiplicityRange(Int_t n1, Int_t n2)
352{
353 //Sets the neutral particle multiplicity range
354 //and the corresponding flag to kTRUE if the cut is used.
355 fMultNeutrMin = n1;
356 fMultNeutrMax = n2;
357 fMultNeutrFlag = kTRUE;
358}
359
360//----------------------------------------//
361void AliEventTagCuts::SetV0sRange(Int_t n1, Int_t n2)
362{
363 //Sets the v0s multiplicity range
364 //and the corresponding flag to kTRUE if the cut is used.
365 fV0sMin = n1;
366 fV0sMax = n2;
367 fV0sFlag = kTRUE;
368}
369
370//----------------------------------------//
371void AliEventTagCuts::SetCascadesRange(Int_t n1, Int_t n2)
372{
373 //Sets the cascades multiplicity range
374 //and the corresponding flag to kTRUE if the cut is used.
375 fCascadesMin = n1;
376 fCascadesMax = n2;
377 fCascadesFlag = kTRUE;
378}
379
380//----------------------------------------//
381void AliEventTagCuts::SetKinksRange(Int_t n1, Int_t n2)
382{
383 //Sets the kinks multipliicity range
384 //and the corresponding flag to kTRUE if the cut is used.
385 fkinksMin = n1;
386 fkinksMax = n2;
387 fkinksFlag = kTRUE;
388}
389
390//----------------------------------------//
391void AliEventTagCuts::SetMaxJetEnergy(Float_t r1)
392{
393 //Sets the lower limit of the maximum jet energy
394 //and the corresponding flag to kTRUE if the cut is used.
395 fMaxJetEnergy = r1;
396 fMaxJetEnergyFlag = kTRUE;
397}
398//----------------------------------------//
399void AliEventTagCuts::SetMaxNeutralEnergy(Float_t r1)
400{
401 //Sets the lower limit of the maximum neutral jet energy
402 //and the corresponding flag to kTRUE if the cut is used.
403 fMaxNeutralEnergy = r1;
404 fMaxNeutralFlag = kTRUE;
405}
406//----------------------------------------//
407void AliEventTagCuts::SetHardPhotonsRange(Int_t i1, Int_t i2)
408{
409 //Sets the hard photons multiplicity range
410 //and the corresponding flag to kTRUE if the cut is used.
411 fNHardPhotonsCandidatesMin = i1;
412 fNHardPhotonsCandidatesMax = i2;
413 fNHardPhotonsCandidatesFlag = kTRUE;
414}
415
416//----------------------------------------//
417void AliEventTagCuts::SetNChargedAbove1GeVRange(Int_t i1, Int_t i2)
418{
419 //Sets the number of charged above 1GeV range
420 //and the corresponding flag to kTRUE if the cut is used.
421 fChargedAbove1GeVMin = i1;
422 fChargedAbove1GeVMax = i2;
423 fChargedAbove1GeVFlag = kTRUE;
424}
425
426//----------------------------------------//
427 void AliEventTagCuts::SetNChargedAbove3GeVRange(Int_t i1, Int_t i2)
428{
429 //Sets the number of charged above 3GeV range
430 //and the corresponding flag to kTRUE if the cut is used.
431 fChargedAbove3GeVMin = i1;
432 fChargedAbove3GeVMax = i2;
433 fChargedAbove3GeVFlag = kTRUE;
434}
435
436
437//----------------------------------------//
438void AliEventTagCuts::SetNChargedAbove10GeVRange(Int_t i1, Int_t i2)
439{
440 //Sets the number of charged above 10GeV range
441 //and the corresponding flag to kTRUE if the cut is used.
442 fChargedAbove10GeVMin = i1;
443 fChargedAbove10GeVMax = i2;
444 fChargedAbove10GeVFlag = kTRUE;
445}
446
447
448//----------------------------------------//
449void AliEventTagCuts::SetNMuonsAbove1GeVRange(Int_t i1, Int_t i2)
450{
451 //Sets the number of muons above 1GeV range
452 //and the corresponding flag to kTRUE if the cut is used.
453 fMuonsAbove1GeVMin = i1;
454 fMuonsAbove1GeVMax = i2;
455 fMuonsAbove1GeVFlag = kTRUE;
456}
457
458
459//----------------------------------------//
460void AliEventTagCuts::SetNMuonsAbove3GeVRange(Int_t i1, Int_t i2)
461{
462 //Sets the number of muons above 3GeV range
463 //and the corresponding flag to kTRUE if the cut is used.
464 fMuonsAbove3GeVMin = i1;
465 fMuonsAbove3GeVMax = i2;
466 fMuonsAbove3GeVFlag = kTRUE;
467}
468
469//----------------------------------------//
470void AliEventTagCuts::SetNMuonsAbove10GeVRange(Int_t i1, Int_t i2)
471{
472 //Sets the number of muons above 10GeV range
473 //and the corresponding flag to kTRUE if the cut is used.
474 fMuonsAbove10GeVMin = i1;
475 fMuonsAbove10GeVMax = i2;
476 fMuonsAbove10GeVFlag = kTRUE;
477}
478
479
480//----------------------------------------//
481void AliEventTagCuts::SetNElectronsAbove1GeVRange(Int_t i1, Int_t i2)
482{
483 //Sets the number of electrons above 1GeV range
484 //and the corresponding flag to kTRUE if the cut is used.
485 fElectronsAbove1GeVMin = i1;
486 fElectronsAbove1GeVMax = i2;
487 fElectronsAbove1GeVFlag = kTRUE;
488}
489
490//----------------------------------------//
491void AliEventTagCuts::SetNElectronsAbove3GeVRange(Int_t i1, Int_t i2)
492{
493 //Sets the number of electrons above 3GeV range
494 //and the corresponding flag to kTRUE if the cut is used.
495 fElectronsAbove3GeVMin = i1;
496 fElectronsAbove3GeVMax = i2;
497 fElectronsAbove3GeVFlag = kTRUE;
498}
499
500//----------------------------------------//
501void AliEventTagCuts::SetNElectronsAbove10GeVRange(Int_t i1, Int_t i2)
502{
503 //Sets the number of electrons above 10GeV range
504 //and the corresponding flag to kTRUE if the cut is used.
505 fElectronsAbove10GeVMin = i1;
506 fElectronsAbove10GeVMax = i2;
507 fElectronsAbove10GeVFlag = kTRUE;
508}
509//----------------------------------------//
510void AliEventTagCuts::SetNElectronRange(Int_t n1, Int_t n2)
511{
512 //Sets the electron multiplicity range
513 //and the corresponding flag to kTRUE if the cut is used.
514 fElectronsMin = n1;
515 fElectronsMax = n2;
516 fElectronsFlag = kTRUE;
517}
518//----------------------------------------//
519void AliEventTagCuts::SetNMuonRange(Int_t n1, Int_t n2)
520{
521 //Sets the muon multiplicity range
522 //and the corresponding flag to kTRUE if the cut is used.
523 fMuonsMin = n1;
524 fMuonsMax = n2;
525 fMuonsFlag = kTRUE;
526}
527
528//----------------------------------------//
529void AliEventTagCuts::SetNPionRange(Int_t n1, Int_t n2)
530{
531 //Sets the pion multiplicity range
532 //and the corresponding flag to kTRUE if the cut is used.
533 fPionsMin = n1;
534 fPionsMax = n2;
535 fPionsFlag = kTRUE;
536}
537
538//----------------------------------------//
539void AliEventTagCuts::SetNKaonRange(Int_t n1, Int_t n2)
540{
541 //Sets the kaon multiplicity range
542 //and the corresponding flag to kTRUE if the cut is used.
543 fKaonsMin = n1;
544 fKaonsMax = n2;
545 fKaonsFlag = kTRUE;
546}
547
548//----------------------------------------//
549void AliEventTagCuts::SetNProtonRange(Int_t n1, Int_t n2)
550{
551 //Sets the proton multiplicity range
552 //and the corresponding flag to kTRUE if the cut is used.
553 fProtonsMin = n1;
554 fProtonsMax = n2;
555 fProtonsFlag = kTRUE;
556}
557
558//----------------------------------------//
559void AliEventTagCuts::SetNLambdaRange(Int_t n1, Int_t n2)
560{
561 //Sets the lambda multiplicity range
562 //and the corresponding flag to kTRUE if the cut is used.
563 fLambdasMin = n1;
564 fLambdasMax = n2;
565 fLambdasFlag = kTRUE;
566}
567//----------------------------------------//
568void AliEventTagCuts::SetNPhotonRange(Int_t n1, Int_t n2)
569{
570 //Sets the photon multiplicity range
571 //and the corresponding flag to kTRUE if the cut is used.
572 fPhotonsMin = n1;
573 fPhotonsMax = n2;
574 fPhotonFlag = kTRUE;
575}
576//----------------------------------------//
577void AliEventTagCuts::SetNPi0Range(Int_t n1, Int_t n2)
578{
579 //Sets the pi0 multiplicity range
580 //and the corresponding flag to kTRUE if the cut is used.
581 fPi0sMin = n1;
582 fPi0sMax = n2;
583 fPi0sFlag = kTRUE;
584}
585
586//----------------------------------------//
587void AliEventTagCuts::SetNNeutronRange(Int_t n1, Int_t n2)
588{
589 //Sets the neutron multiplicity range
590 //and the corresponding flag to kTRUE if the cut is used.
591 fNeutronsMin = n1;
592 fNeutronsMax = n2;
593 fNeutronsFlag = kTRUE;
594}
595
596//----------------------------------------//
597void AliEventTagCuts::SetNKaon0Range(Int_t n1, Int_t n2)
598{
599 //Sets the K0s multiplicity range
600 //and the corresponding flag to kTRUE if the cut is used.
601 fKaon0sMin = n1;
602 fKaon0sMax = n2;
603 fKaon0sFlag = kTRUE;
604}
605
606//----------------------------------------//
607void AliEventTagCuts::SetTotalPRange(Float_t r1, Float_t r2)
608{
609 //Sets the total momentum range
610 //and the corresponding flag to kTRUE if the cut is used.
611 fTotalPMin = r1;
612 fTotalPMax = r2;
613 fTotalPFlag = kTRUE;
614}
615
616//----------------------------------------//
617void AliEventTagCuts::SetMeanPtRange(Float_t r1, Float_t r2)
618{
619 //Sets the mean Pt range
620 //and the corresponding flag to kTRUE if the cut is used.
621 fMeanPtMin = r1;
622 fMeanPtMax = r2;
623 fMeanPtFlag = kTRUE;
624}
625
626//----------------------------------------//
627void AliEventTagCuts::SetMaxPt(Float_t r1)
628{
629 //Sets the lower limit of the max Pt value
630 //and the corresponding flag to kTRUE if the cut is used.
631 fMaxPt = r1;
632 fMaxPtFlag = kTRUE;
633}
634
635//----------------------------------------//
636void AliEventTagCuts::SetTotalNeutralPRange(Float_t r1, Float_t r2)
637{
638 //Sets the total momentum of neutral particles range
639 //and the corresponding flag to kTRUE if the cut is used.
640 fTotalNeutralPMin =r1 ;
641 fTotalNeutralPMax = r2;
642 fTotalNeutralPFlag = kTRUE;
643}
644//----------------------------------------//
645void AliEventTagCuts::SetMeanNeutralPtPRange(Float_t r1, Float_t r2)
646{
647 //Sets the mean Pt of neutral particles range
648 //and the corresponding flag to kTRUE if the cut is used.
649 fMeanNeutralPtMin = r1;
650 fMeanNeutralPtMax = r2;
651 fMeanNeutralPtFlag = kTRUE;
652}
653//----------------------------------------//
654void AliEventTagCuts::SetMaxNeutralPt(Float_t r1)
655{
656 //Sets the lower limit of the maximum Pt of neutral particles
657 //and the corresponding flag to kTRUE if the cut is used.
658 fMaxNeutralPt = r1;
659 fMaxNeutralPtFlag = kTRUE;
660}
661
662//----------------------------------------//
663void AliEventTagCuts::SetEvPlaneAngleRange(Float_t r1, Float_t r2)
664{
665 //Sets the event plane range
666 //and the corresponding flag to kTRUE if the cut is used.
667 fEventPlaneAngleMin = r1;
668 fEventPlaneAngleMax = r2;
669 fEventPlaneAngleFlag = kTRUE;
670}
671
672//----------------------------------------//
673void AliEventTagCuts::SetHBTRadiiRange(Float_t r1, Float_t r2)
674{
675 //Sets the HBT radii range
676 //and the corresponding flag to kTRUE if the cut is used.
677 fHBTRadiiMin = r1;
678 fHBTRadiiMax = r2;
679 fHBTRadiiFlag = kTRUE;
680}
681
682//----------------------------------------//
683Bool_t AliEventTagCuts::IsAccepted(AliEventTag *EvTag) const
684{
685 //Returns true if the event is accepted otherwise false.
686 if(fMultFlag)
687 if((EvTag->GetNumOfTracks() < fMultMin) || (EvTag->GetNumOfTracks() > fMultMax))
688 return kFALSE;
689
690 if(fVzFlag)
691 if((EvTag->GetVertexZ() < fVzMin) || (EvTag->GetVertexZ() > fVzMax))
692 return kFALSE;
693
694 if(fVyFlag)
695 if((EvTag->GetVertexY() < fVyMin) || (EvTag->GetVertexY() > fVyMax))
696 return kFALSE;
697
698 if(fVxFlag)
699 if((EvTag->GetVertexX() < fVxMin) || (EvTag->GetVertexX() > fVxMax))
700 return kFALSE;
701
702 if(fParticipantsFlag)
703 if((EvTag->GetNumOfParticipants() < fParticipantsMin) || (EvTag->GetNumOfParticipants() > fParticipantMax))
704 return kFALSE;
705
706 if(fImpactParamFlag)
707 if((EvTag->GetImpactParameter() < fImpactParamMin) || (EvTag->GetImpactParameter() > fImpactParamMax))
708 return kFALSE;
709
710 if(fPVFlag)
711 if((EvTag->GetVertexFlag() != fPrimaryVertexFlag))
712 return kFALSE;
713
32a5cab4 714 if(fZDCNeutron1EnergyFlag)
715 if((EvTag->GetZDCNeutron1Energy() < fZDCNeutron1EnergyMin) || (EvTag->GetZDCNeutron1Energy() > fZDCNeutron1EnergyMax))
716 return kFALSE;
717
718 if(fZDCProton1EnergyFlag)
719 if((EvTag->GetZDCProton1Energy() < fZDCProton1EnergyMin) || (EvTag->GetZDCProton1Energy() > fZDCProton1EnergyMax))
720 return kFALSE;
721
722 if(fZDCNeutron2EnergyFlag)
723 if((EvTag->GetZDCNeutron2Energy() < fZDCNeutron2EnergyMin) || (EvTag->GetZDCNeutron2Energy() > fZDCNeutron2EnergyMax))
c7e89ea3 724 return kFALSE;
725
32a5cab4 726 if(fZDCProton2EnergyFlag)
727 if((EvTag->GetZDCProton2Energy() < fZDCProton2EnergyMin) || (EvTag->GetZDCProton2Energy() > fZDCProton2EnergyMax))
c7e89ea3 728 return kFALSE;
729
730 if(fZDCEMEnergyFlag)
731 if((EvTag->GetZDCEMEnergy() < fZDCEMEnergyMin) || (EvTag->GetZDCEMEnergy() > fZDCEMEnergyMax))
732 return kFALSE;
733
734 if(fT0VertexZFlag)
735 if((EvTag->GetT0VertexZ() < fT0VertexZMin) || (EvTag->GetT0VertexZ() > fT0VertexZMax))
736 return kFALSE;
737
738 if(fMultPosFlag)
739 if((EvTag->GetNumOfPosTracks() < fMultPosMin) || (EvTag->GetNumOfPosTracks() > fMultPosMax))
740 return kFALSE;
741
742 if(fMultNegFlag)
743 if((EvTag->GetNumOfNegTracks() < fMultNegMin) || (EvTag->GetNumOfNegTracks() > fMultNegMax))
744 return kFALSE;
745
746 if(fMultNeutrFlag)
747 if((EvTag->GetNumOfNeutrTracks() < fMultNeutrMin) || (EvTag->GetNumOfNeutrTracks() > fMultNeutrMax))
748 return kFALSE;
749
750 if(fV0sFlag)
751 if((EvTag->GetNumOfV0s() < fV0sMin) || (EvTag->GetNumOfV0s() > fV0sMax))
752 return kFALSE;
753
754 if(fCascadesFlag)
755 if((EvTag->GetNumOfCascades() < fCascadesMin) || (EvTag->GetNumOfCascades() > fCascadesMax))
756 return kFALSE;
757
758 if(fkinksFlag)
759 if((EvTag->GetNumOfKinks() < fkinksMin) || (EvTag->GetNumOfKinks() > fkinksMax))
760 return kFALSE;
761
762 if(fMaxJetEnergyFlag)
763 if((EvTag->GetMaxJetEnergy() < fMaxJetEnergy))
764 return kFALSE;
765
766 if(fNHardPhotonsCandidatesFlag)
767 if((EvTag->GetNumOfHardPhotonsCandidates() < fNHardPhotonsCandidatesMin) || (EvTag->GetNumOfHardPhotonsCandidates() > fNHardPhotonsCandidatesMax))
768 return kFALSE;
769
770 if(fMaxNeutralFlag)
771 if((EvTag->GetMaxNeutralEnergy() < fMaxNeutralEnergy))
772 return kFALSE;
773
774 if(fChargedAbove1GeVFlag)
775 if((EvTag->GetNumOfChargedAbove1GeV() < fChargedAbove1GeVMin) || (EvTag->GetNumOfChargedAbove1GeV() > fChargedAbove1GeVMax))
776 return kFALSE;
777
778 if(fChargedAbove3GeVFlag)
779 if((EvTag->GetNumOfChargedAbove3GeV() < fChargedAbove3GeVMin) || (EvTag->GetNumOfChargedAbove3GeV() > fChargedAbove3GeVMax))
780 return kFALSE;
781
782 if(fChargedAbove10GeVFlag)
783 if((EvTag->GetNumOfChargedAbove10GeV() < fChargedAbove10GeVMin) || (EvTag->GetNumOfChargedAbove10GeV() > fChargedAbove10GeVMax))
784 return kFALSE;
785
786 if(fMuonsAbove1GeVFlag)
787 if((EvTag->GetNumOfMuonsAbove1GeV() < fMuonsAbove1GeVMin) || (EvTag->GetNumOfMuonsAbove1GeV() > fMuonsAbove1GeVMax))
788 return kFALSE;
789
790 if(fMuonsAbove3GeVFlag)
791 if((EvTag->GetNumOfMuonsAbove3GeV() < fMuonsAbove3GeVMin) || (EvTag->GetNumOfMuonsAbove3GeV() > fMuonsAbove3GeVMax))
792 return kFALSE;
793
794 if(fMuonsAbove10GeVFlag)
795 if((EvTag->GetNumOfMuonsAbove10GeV() < fMuonsAbove10GeVMin) || (EvTag->GetNumOfMuonsAbove10GeV() > fMuonsAbove10GeVMax))
796 return kFALSE;
797
798 if(fElectronsAbove1GeVFlag)
799 if((EvTag->GetNumOfElectronsAbove1GeV() < fElectronsAbove1GeVMin) || (EvTag->GetNumOfElectronsAbove1GeV() > fElectronsAbove1GeVMax))
800 return kFALSE;
801
802 if(fElectronsAbove3GeVFlag)
803 if((EvTag->GetNumOfElectronsAbove3GeV() < fElectronsAbove3GeVMin) || (EvTag->GetNumOfElectronsAbove3GeV() > fElectronsAbove3GeVMax))
804 return kFALSE;
805
806 if(fElectronsAbove10GeVFlag)
807 if((EvTag->GetNumOfElectronsAbove10GeV() < fElectronsAbove10GeVMin) || (EvTag->GetNumOfElectronsAbove10GeV() > fElectronsAbove10GeVMax))
808 return kFALSE;
809
810 if(fElectronsFlag)
811 if((EvTag->GetNumOfElectrons() < fElectronsMin) || (EvTag->GetNumOfElectrons() > fElectronsMax))
812 return kFALSE;
813
814 if(fMuonsFlag)
815 if((EvTag->GetNumOfMuons() < fMuonsMin) || (EvTag->GetNumOfMuons() > fMuonsMax))
816 return kFALSE;
817
818 if(fPionsFlag)
819 if((EvTag->GetNumOfPions() < fPionsMin) || (EvTag->GetNumOfPions() > fPionsMax))
820 return kFALSE;
821
822 if(fKaonsFlag)
823 if((EvTag->GetNumOfKaons() < fKaonsMin) || (EvTag->GetNumOfKaons() > fKaonsMax))
824 return kFALSE;
825
826 if(fProtonsFlag)
827 if((EvTag->GetNumOfProtons() < fProtonsMin) || (EvTag->GetNumOfProtons() > fProtonsMax))
828 return kFALSE;
829
830 if(fLambdasFlag)
831 if((EvTag->GetNumOfLambdas() < fLambdasMin) || (EvTag->GetNumOfLambdas() > fLambdasMax))
832 return kFALSE;
833
834 if(fPhotonFlag)
835 if((EvTag->GetNumOfPhotons() < fPhotonsMin) || (EvTag->GetNumOfPhotons() > fPhotonsMax))
836 return kFALSE;
837
838 if(fPi0sFlag)
839 if((EvTag->GetNumOfPi0s() < fPi0sMin) || (EvTag->GetNumOfPi0s() > fPi0sMax))
840 return kFALSE;
841
842 if(fNeutronsFlag)
843 if((EvTag->GetNumOfNeutrons() < fNeutronsMin) || (EvTag->GetNumOfNeutrons() > fNeutronsMax))
844 return kFALSE;
845
846 if(fKaon0sFlag)
847 if((EvTag->GetNumOfKaon0s() < fKaon0sMin) || (EvTag->GetNumOfKaon0s() > fKaon0sMax))
848 return kFALSE;
849
850 if(fTotalPFlag)
851 if((EvTag->GetTotalMomentum() < fTotalPMin) || (EvTag->GetTotalMomentum() > fTotalPMax))
852 return kFALSE;
853
854 if(fMeanPtFlag)
855 if((EvTag->GetMeanPt() < fMeanPtMin) || (EvTag->GetMeanPt() > fMeanPtMax))
856 return kFALSE;
857
858 if(fMaxPtFlag)
859 if((EvTag->GetMaxPt() < fMaxPt))
860 return kFALSE;
861
862 if(fTotalNeutralPFlag)
863 if((EvTag->GetNeutralTotalMomentum() < fTotalNeutralPMin) || (EvTag->GetNeutralTotalMomentum() > fTotalNeutralPMax))
864 return kFALSE;
865
866 if(fMeanNeutralPtFlag)
867 if((EvTag->GetNeutralMeanPt() < fMeanNeutralPtMin) || (EvTag->GetNeutralMeanPt() >fMeanNeutralPtMax ))
868 return kFALSE;
869
870 if(fMaxNeutralPtFlag)
871 if((EvTag->GetNeutralMaxPt() < fMaxNeutralPt))
872 return kFALSE;
873
874 if(fEventPlaneAngleFlag)
875 if((EvTag->GetEventPlaneAngle() < fEventPlaneAngleMin) || (EvTag->GetEventPlaneAngle() > fEventPlaneAngleMax))
876 return kFALSE;
877
878 if(fHBTRadiiFlag)
879 if((EvTag->GetHBTRadii() < fHBTRadiiMin) || (EvTag->GetHBTRadii() > fHBTRadiiMax))
880 return kFALSE;
881
882 return kTRUE;
883}