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