]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliEventTagCuts.cxx
Scalers moved to ESDZDC (Chiara Oppedisano)
[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   TObject(),
34   fPeriodNumberMin(0), fPeriodNumberMax(0xFFFFFFFF), fPeriodNumberFlag(kFALSE),
35   fOrbitNumberMin(0), fOrbitNumberMax(0xFFFFFFFF), fOrbitNumberFlag(kFALSE),
36   fBunchCrossNumberMin(0), fBunchCrossNumberMax(0xFFFF), 
37   fBunchCrossNumberFlag(kFALSE),
38   fEventType(7), fEventTypeFlag(kFALSE),
39
40   fNParticipantsMin(-1), fNParticipantsMax(10000),
41   fNParticipantsFlag(kFALSE),
42   fImpactParamMin(-1.0), fImpactParamMax(1000.0),
43   fImpactParamFlag(kFALSE),
44
45   fVxMin(-1000.0), fVxMax(1000.0), 
46   fVxFlag(kFALSE),
47   fVyMin(-1000.0), fVyMax(1000.0),  
48   fVyFlag(kFALSE),
49   fVzMin(-1000.0), fVzMax(1000.0),
50   fVzFlag(kFALSE),
51   fPrimaryVertexFlag(1),
52   fPVFlag(kFALSE),
53
54   fPrimaryVertexZErrorMin(-10000.), fPrimaryVertexZErrorMax(10000.),
55   fPVzErrorFlag(kFALSE),
56   fTriggerMask(0),
57   fTriggerMaskFlag(kFALSE),
58   fTriggerCluster(0),
59   fTriggerClusterFlag(kFALSE),
60  
61   fZDCNeutron1EnergyMin(-1.0), fZDCNeutron1EnergyMax(100000.0),
62   fZDCNeutron1EnergyFlag(kFALSE),
63   fZDCProton1EnergyMin(-1.0), fZDCProton1EnergyMax(100000.0),
64   fZDCProton1EnergyFlag(kFALSE),
65   fZDCNeutron2EnergyMin(-1.0), fZDCNeutron2EnergyMax(100000.0),
66   fZDCNeutron2EnergyFlag(kFALSE),
67   fZDCProton2EnergyMin(-1.0), fZDCProton2EnergyMax(100000.0),
68   fZDCProton2EnergyFlag(kFALSE),
69   fZDCEMEnergyMin(-1.0), fZDCEMEnergyMax(100000.0),
70   fZDCEMEnergyFlag(kFALSE),
71   fT0VertexZMin(-10000.0), fT0VertexZMax(10000.0),  
72   fT0VertexZFlag(kFALSE),
73   fMultMin(0), fMultMax(100000),  
74   fMultFlag(kFALSE),
75   fPosMultMin(-1), fPosMultMax(100000),
76   fPosMultFlag(kFALSE),
77   fNegMultMin(-1), fNegMultMax(100000),
78   fNegMultFlag(kFALSE),
79   fNeutrMultMin(-1), fNeutrMultMax(100000),
80   fNeutrMultFlag(kFALSE),
81   fNV0sMin(-1), fNV0sMax(1000000),
82   fNV0sFlag(kFALSE),
83   fNCascadesMin(-1), fNCascadesMax(100000),
84   fNCascadesFlag(kFALSE),
85   fNKinksMin(-1), fNKinksMax(1000000),
86   fNKinksFlag(kFALSE),
87
88   fNPMDTracksMin(-1), fNPMDTracksMax(100000),
89   fNPMDTracksFlag(kFALSE),
90   fNFMDTracksMin(-1), fNFMDTracksMax(100000),
91   fNFMDTracksFlag(kFALSE),
92   fNPHOSClustersMin(-1), fNPHOSClustersMax(100000),
93   fNPHOSClustersFlag(kFALSE),
94   fNEMCALClustersMin(-1), fNEMCALClustersMax(100000),
95   fNEMCALClustersFlag(kFALSE),
96   fNJetCandidatesMin(-1), fNJetCandidatesMax(100000),
97   fNJetCandidatesFlag(kFALSE),
98
99   fTopJetEnergyMin(-1.0), 
100   fTopJetEnergyMinFlag(kFALSE),
101   fTopNeutralEnergyMin(-1.0), 
102   fTopNeutralEnergyMinFlag(kFALSE),
103   fNHardPhotonCandidatesMin(-1), fNHardPhotonCandidatesMax(100000),
104   fNHardPhotonCandidatesFlag(kFALSE),
105   fNChargedAbove1GeVMin(-1), fNChargedAbove1GeVMax(100000),
106   fNChargedAbove1GeVFlag(kFALSE),
107   fNChargedAbove3GeVMin(-1), fNChargedAbove3GeVMax(100000),
108   fNChargedAbove3GeVFlag(kFALSE),
109   fNChargedAbove10GeVMin(-1), fNChargedAbove10GeVMax(100000),
110   fNChargedAbove10GeVFlag(kFALSE),
111   fNMuonsAbove1GeVMin(-1), fNMuonsAbove1GeVMax(100000),
112   fNMuonsAbove1GeVFlag(kFALSE),
113   fNMuonsAbove3GeVMin(-1), fNMuonsAbove3GeVMax(100000),
114   fNMuonsAbove3GeVFlag(kFALSE),
115   fNMuonsAbove10GeVMin(-1), fNMuonsAbove10GeVMax(100000), 
116   fNMuonsAbove10GeVFlag(kFALSE),
117   fNElectronsAbove1GeVMin(-1), fNElectronsAbove1GeVMax(100000),
118   fNElectronsAbove1GeVFlag(kFALSE),
119   fNElectronsAbove3GeVMin(-1), fNElectronsAbove3GeVMax(100000),
120   fNElectronsAbove3GeVFlag(kFALSE),
121   fNElectronsAbove10GeVMin(-1), fNElectronsAbove10GeVMax(100000),
122   fNElectronsAbove10GeVFlag(kFALSE),
123   fNElectronsMin(-1), fNElectronsMax(100000),
124   fNElectronsFlag(kFALSE),
125   fNFWMuonsMin(-1), fNFWMuonsMax(100000),
126   fNFWMuonsFlag(kFALSE),
127   fNMuonsMin(-1), fNMuonsMax(100000),
128   fNMuonsFlag(kFALSE),
129   fNPionsMin(-1), fNPionsMax(100000),
130   fNPionsFlag(kFALSE),
131   fNKaonsMin(-1), fNKaonsMax(100000),
132   fNKaonsFlag(kFALSE),
133   fNProtonsMin(-1), fNProtonsMax(100000),
134   fNProtonsFlag(kFALSE),
135   fNLambdasMin(-1), fNLambdasMax(100000),
136   fNLambdasFlag(kFALSE),
137   fNPhotonsMin(-1), fNPhotonsMax(100000),
138   fNPhotonFlag(kFALSE),
139   fNPi0sMin(-1), fNPi0sMax(100000), 
140   fNPi0sFlag(kFALSE),
141   fNNeutronsMin(-1), fNNeutronsMax(100000), 
142   fNNeutronsFlag(kFALSE),
143   fNKaon0sMin(-1), fNKaon0sMax(100000), 
144   fNKaon0sFlag(kFALSE),
145   fTotalPMin(-1.0), fTotalPMax(1000000.0),
146   fTotalPFlag(kFALSE),
147   fMeanPtMin(-1.0), fMeanPtMax(100000.0),
148   fMeanPtFlag(kFALSE),
149   fTopPtMin(-1.0),
150   fTopPtMinFlag(kFALSE),
151   fTotalNeutralPMin(-1.0), fTotalNeutralPMax(1000000.0),   
152   fTotalNeutralPFlag(kFALSE),
153   fMeanNeutralPtMin(-1.0), fMeanNeutralPtMax(1000000.0), 
154   fMeanNeutralPtFlag(kFALSE),
155   fTopNeutralPtMin(-1.0), 
156   fTopNeutralPtMinFlag(kFALSE),
157   fEventPlaneAngleMin(-10000000.0), fEventPlaneAngleMax(10000000.0), 
158   fEventPlaneAngleFlag(kFALSE),
159   fHBTRadiiMin(-1.0), fHBTRadiiMax(100000.0), 
160   fHBTRadiiFlag(kFALSE),
161
162   fNumberOfFiredChipsLayer1Min(0), fNumberOfFiredChipsLayer1Max(100000),
163   fNumberOfFiredChipsLayer1Flag(kFALSE),
164   fNumberOfFiredChipsLayer2Min(0), fNumberOfFiredChipsLayer2Max(100000),
165   fNumberOfFiredChipsLayer2Flag(kFALSE),
166   fNumberOfSPDTrackletsMin(0), fNumberOfSPDTrackletsMax(100000),
167   fNumberOfSPDTrackletsFlag(kFALSE)
168 {
169   //Default constructor which calls the Reset method.
170   Reset();
171 }
172
173 //___________________________________________________________________________
174 AliEventTagCuts::~AliEventTagCuts() {  
175   //Defaut destructor.
176 }
177
178 //___________________________________________________________________________
179 void AliEventTagCuts::Reset() {
180   //Sets dummy values to every private member.
181   fPeriodNumberFlag = kFALSE;
182   fOrbitNumberFlag = kFALSE;
183   fBunchCrossNumberFlag = kFALSE;
184   
185   fEventTypeFlag = kFALSE;
186
187   fNParticipantsFlag = kFALSE;
188   fImpactParamFlag = kFALSE;
189
190   fVxFlag = kFALSE;
191   fVyFlag = kFALSE;
192   fVzFlag = kFALSE;
193   fPVFlag = kFALSE;
194   fPVzErrorFlag = kFALSE;
195
196   fTriggerMaskFlag = kFALSE;
197   fTriggerClusterFlag = kFALSE;
198
199   fZDCNeutron1EnergyFlag = kFALSE;
200   fZDCProton1EnergyFlag = kFALSE;
201   fZDCNeutron2EnergyFlag = kFALSE;
202   fZDCProton2EnergyFlag = kFALSE;
203   fZDCEMEnergyFlag = kFALSE;
204   fT0VertexZFlag = kFALSE;
205   fMultFlag = kFALSE;
206   fPosMultFlag = kFALSE;
207   fNegMultFlag = kFALSE;
208   fNeutrMultFlag = kFALSE;
209   fNV0sFlag = kFALSE;
210   fNCascadesFlag = kFALSE;
211   fNKinksFlag = kFALSE;
212
213   fNPMDTracksFlag = kFALSE;
214   fNFMDTracksFlag = kFALSE;
215   fNPHOSClustersFlag = kFALSE;
216   fNEMCALClustersFlag = kFALSE;
217   fNJetCandidatesFlag = kFALSE;
218
219   fTopJetEnergyMinFlag = kFALSE;
220   fNHardPhotonCandidatesFlag = kFALSE;
221   fTopNeutralEnergyMinFlag = kFALSE;
222   fNChargedAbove1GeVFlag = kFALSE;
223   fNChargedAbove3GeVFlag = kFALSE;
224   fNChargedAbove10GeVFlag = kFALSE;
225   fNMuonsAbove1GeVFlag = kFALSE;
226   fNMuonsAbove3GeVFlag = kFALSE;
227   fNMuonsAbove10GeVFlag = kFALSE;
228   fNElectronsAbove1GeVFlag = kFALSE;
229   fNElectronsAbove3GeVFlag = kFALSE;
230   fNElectronsAbove10GeVFlag = kFALSE;
231   fNElectronsFlag = kFALSE;
232   fNFWMuonsFlag = kFALSE;
233   fNMuonsFlag = kFALSE;
234   fNPionsFlag = kFALSE;
235   fNKaonsFlag = kFALSE;
236   fNProtonsFlag = kFALSE;
237   fNLambdasFlag = kFALSE;
238   fNPhotonFlag = kFALSE;
239   fNPi0sFlag = kFALSE;
240   fNNeutronsFlag = kFALSE;
241   fNKaon0sFlag = kFALSE;
242   fTotalPFlag = kFALSE;
243   fMeanPtFlag = kFALSE;
244   fTopPtMinFlag = kFALSE;
245   fTotalNeutralPFlag = kFALSE;
246   fMeanNeutralPtFlag = kFALSE;
247   fTopNeutralPtMinFlag = kFALSE;
248   fEventPlaneAngleFlag = kFALSE;
249   fHBTRadiiFlag = kFALSE;
250
251   fNumberOfFiredChipsLayer1Flag = kFALSE;
252   fNumberOfFiredChipsLayer2Flag = kFALSE;
253   fNumberOfSPDTrackletsFlag = kFALSE;
254
255   fPeriodNumberMin = 0, fPeriodNumberMax = 0xFFFFFFFF;
256   fOrbitNumberMin = 0, fOrbitNumberMax = 0xFFFFFFFF;
257   fBunchCrossNumberMin = 0, fBunchCrossNumberMax = 0xFFFF;
258
259   fEventType = 7;
260
261   fVxMin = -1000.0; fVxMax = 1000.0; 
262   fVyMin = -1000.0; fVyMax = 1000.0;  
263   fVzMin = -1000.0; fVzMax = 1000.0;
264   fNParticipantsMin = -1; fNParticipantsMax = 10000;
265   fImpactParamMin = -1.0; fImpactParamMax = 1000.0;
266   fPrimaryVertexFlag = 1;
267
268   fPrimaryVertexZErrorMin = -10000.; fPrimaryVertexZErrorMax = 10000.;
269   fTriggerMask = 0;
270   fTriggerCluster = 0;
271  
272   fZDCNeutron1EnergyMin = -1.0; fZDCNeutron1EnergyMax = 100000.0;
273   fZDCProton1EnergyMin = -1.0; fZDCProton1EnergyMax = 100000.0;
274   fZDCNeutron2EnergyMin = -1.0; fZDCNeutron2EnergyMax = 100000.0;
275   fZDCProton2EnergyMin = -1.0; fZDCProton2EnergyMax = 100000.0;
276   fZDCEMEnergyMin = -1.0; fZDCEMEnergyMax = 100000.0;
277   fT0VertexZMin = -10000.0; fT0VertexZMax = 10000.0;  
278   fMultMin = 0; fMultMax = 100000;  
279   fPosMultMin = -1; fPosMultMax = 100000;
280   fNegMultMin = -1; fNegMultMax = 100000;
281   fNeutrMultMin = -1; fNeutrMultMax = 100000;
282   fNV0sMin = -1; fNV0sMax = 1000000;
283   fNCascadesMin = -1; fNCascadesMax = 100000;
284   fNKinksMin = -1; fNKinksMax = 1000000;
285
286   fNPMDTracksMin = -1, fNPMDTracksMax = 100000;
287   fNFMDTracksMin = -1, fNFMDTracksMax = 100000;
288   fNPHOSClustersMin = -1, fNPHOSClustersMax = 100000;
289   fNEMCALClustersMin = -1, fNEMCALClustersMax = 100000;
290   fNJetCandidatesMin = -1, fNJetCandidatesMax = 100000;
291
292   fTopJetEnergyMin = -1.0; 
293   fNHardPhotonCandidatesMin = -1; fNHardPhotonCandidatesMax = 100000;
294   fTopNeutralEnergyMin = -1.0; 
295   fNChargedAbove1GeVMin = -1; fNChargedAbove1GeVMax = 100000;
296   fNChargedAbove3GeVMin = -1; fNChargedAbove3GeVMax = 100000;
297   fNChargedAbove10GeVMin = -1; fNChargedAbove10GeVMax = 100000;
298   fNMuonsAbove1GeVMin = -1; fNMuonsAbove1GeVMax = 100000;
299   fNMuonsAbove3GeVMin = -1; fNMuonsAbove3GeVMax = 100000;
300   fNMuonsAbove10GeVMin = -1; fNMuonsAbove10GeVMax = 100000; 
301   fNElectronsAbove1GeVMin = -1; fNElectronsAbove1GeVMax = 100000;
302   fNElectronsAbove3GeVMin = -1; fNElectronsAbove3GeVMax = 100000;
303   fNElectronsAbove10GeVMin = -1; fNElectronsAbove10GeVMax = 100000;
304   fNElectronsMin = -1; fNElectronsMax = 100000;
305   fNFWMuonsMin = -1; fNFWMuonsMax = 100000;
306   fNMuonsMin = -1; fNMuonsMax = 100000;
307   fNPionsMin = -1; fNPionsMax = 100000;
308   fNKaonsMin = -1; fNKaonsMax = 100000;
309   fNProtonsMin = -1; fNProtonsMax = 100000;
310   fNLambdasMin = -1; fNLambdasMax = 100000;
311   fNPhotonsMin = -1; fNPhotonsMax = 100000;
312   fNPi0sMin = -1; fNPi0sMax = 100000; 
313   fNNeutronsMin = -1; fNNeutronsMax = 100000; 
314   fNKaon0sMin = -1; fNKaon0sMax = 100000; 
315   fTotalPMin = -1.0; fTotalPMax = 1000000.0;
316   fMeanPtMin = -1.0; fMeanPtMax = 100000.0;
317   fTopPtMin = -1.0; fTotalNeutralPMin = -1.0;
318   fTotalNeutralPMax = 1000000.0;   
319   fMeanNeutralPtMin = -1.0; fMeanNeutralPtMax = 1000000.0; 
320   fTopNeutralPtMin = -1.0; 
321   fEventPlaneAngleMin = -10000000.0; fEventPlaneAngleMax = 10000000.0; 
322   fHBTRadiiMin = -1.0; fHBTRadiiMax = 100000.0; 
323
324   fNumberOfFiredChipsLayer1Min = 0, fNumberOfFiredChipsLayer1Max = 100000;
325   fNumberOfFiredChipsLayer2Min = 0, fNumberOfFiredChipsLayer2Max = 100000;
326   fNumberOfSPDTrackletsMin = 0, fNumberOfSPDTrackletsMax = 100000;
327 }
328
329 //___________________________________________________________________________
330 void AliEventTagCuts::SetEventType(UInt_t ntype) {
331   //Sets the event type
332   //and the corresponding flag to kTRUE if the cut is used.
333   fEventType = ntype;
334   fEventTypeFlag = kTRUE;
335 }
336
337 //___________________________________________________________________________
338 void AliEventTagCuts::SetNumberOfFiredChipsLayer1Range(Int_t low, Int_t high) {
339   //Sets the range for the number of fired chips of layer 1
340   //and the corresponding flag to kTRUE if the cut is used.
341   fNumberOfFiredChipsLayer1Min = low;
342   fNumberOfFiredChipsLayer1Max = high;
343   fNumberOfFiredChipsLayer1Flag = kTRUE;
344 }
345
346 //___________________________________________________________________________
347 void AliEventTagCuts::SetNumberOfFiredChipsLayer2Range(Int_t low, Int_t high) {
348   //Sets the range for the number of fired chips of layer 2
349   //and the corresponding flag to kTRUE if the cut is used.
350   fNumberOfFiredChipsLayer2Min = low;
351   fNumberOfFiredChipsLayer2Max = high;
352   fNumberOfFiredChipsLayer2Flag = kTRUE;
353 }
354
355 //___________________________________________________________________________
356 void AliEventTagCuts::SetNumberOfSPDTrackletsRange(Int_t low, Int_t high) {
357   //Sets the range for the number of fired chips of layer 1
358   //and the corresponding flag to kTRUE if the cut is used.
359   fNumberOfSPDTrackletsMin = low;
360   fNumberOfSPDTrackletsMax = high;
361   fNumberOfSPDTrackletsFlag = kTRUE;
362 }
363
364 //___________________________________________________________________________
365 void AliEventTagCuts::SetPeriodNumberRange(UInt_t low, UInt_t high) {
366   //Sets the period number range
367   //and the corresponding flag to kTRUE if the cut is used.
368   fPeriodNumberMin = low;
369   fPeriodNumberMax = high; 
370   fPeriodNumberFlag = kTRUE;
371 }
372
373 //___________________________________________________________________________
374 void AliEventTagCuts::SetOrbitNumberRange(UInt_t low, UInt_t high) {
375   //Sets the orbit number range
376   //and the corresponding flag to kTRUE if the cut is used.
377   fOrbitNumberMin = low;
378   fOrbitNumberMax = high; 
379   fOrbitNumberFlag = kTRUE;
380 }
381
382 //___________________________________________________________________________
383 void AliEventTagCuts::SetBunchCrossNumberRange(UShort_t low, UShort_t high) {
384   //Sets the BC number range
385   //and the corresponding flag to kTRUE if the cut is used.
386   fBunchCrossNumberMin = low;
387   fBunchCrossNumberMax = high; 
388   fBunchCrossNumberFlag = kTRUE;
389 }
390
391 //___________________________________________________________________________
392 void AliEventTagCuts::SetPrimaryVertexXRange(Float_t low, Float_t high) {
393   //Sets the primary vertex x range 
394   //and the corresponding flag to kTRUE if the cut is used.
395   fVxMin = low;
396   fVxMax = high; 
397   fVxFlag = kTRUE;
398 }
399
400 //___________________________________________________________________________
401 void AliEventTagCuts::SetPrimaryVertexYRange(Float_t low, Float_t high) {
402   //Sets the primary vertex y range 
403   //and the corresponding flag to kTRUE if the cut is used.
404   fVyMin = low;
405   fVyMax = high; 
406   fVyFlag = kTRUE;
407 }
408
409 //___________________________________________________________________________
410 void AliEventTagCuts::SetPrimaryVertexZRange(Float_t low, Float_t high) {
411   //Sets the primary vertex z range 
412   //and the corresponding flag to kTRUE if the cut is used.
413   fVzMin = low;
414   fVzMax = high; 
415   fVzFlag = kTRUE;
416 }
417
418 //___________________________________________________________________________
419 void AliEventTagCuts::SetPrimaryVertexZErrorRange(Float_t low, Float_t high) {
420   //Sets the primary vertex z error range 
421   //and the corresponding flag to kTRUE if the cut is used.
422   fPrimaryVertexZErrorMin = low;
423   fPrimaryVertexZErrorMax = high; 
424   fPVzErrorFlag = kTRUE;
425 }
426
427 //___________________________________________________________________________
428 void AliEventTagCuts::SetTriggerMask(ULong64_t trmask) {
429   //Sets the trigger mask 
430   //and the corresponding flag to kTRUE if the cut is used.
431   fTriggerMask = trmask;
432   fTriggerMaskFlag = kTRUE;
433 }
434
435 //___________________________________________________________________________
436 void AliEventTagCuts::SetTriggerCluster(UChar_t trcluster) {
437   //Sets the trigger cluster 
438   //and the corresponding flag to kTRUE if the cut is used.
439   fTriggerCluster = trcluster;
440   fTriggerClusterFlag = kTRUE;
441 }
442
443 //___________________________________________________________________________
444 void AliEventTagCuts::SetMultiplicityRange(Int_t low, Int_t high) {
445   //Sets the primary multiplicity range 
446   //and the corresponding flag to kTRUE if the cut is used.
447   fMultMin = low;
448   fMultMax = high;
449   fMultFlag = kTRUE;
450 }
451
452 //___________________________________________________________________________
453 void AliEventTagCuts::SetNParticipantsRange(Int_t low, Int_t high) {
454   //Sets the number of participants range 
455   //and the corresponding flag to kTRUE if the cut is used.
456   fNParticipantsMin = low;
457   fNParticipantsMax = high;
458   fNParticipantsFlag = kTRUE;
459 }
460
461 //___________________________________________________________________________
462 void AliEventTagCuts::SetImpactParamRange(Float_t low, Float_t high) {
463   //Sets the impact parameter range 
464   //and the corresponding flag to kTRUE if the cut is used.
465   fImpactParamMin = low;
466   fImpactParamMax = high;
467   fImpactParamFlag = kTRUE;
468 }
469  
470
471 //___________________________________________________________________________
472 void AliEventTagCuts::SetPrimaryVertexFlag(Int_t flag) {
473   //Sets the primary vertex flag cut 
474   //and the corresponding flag to kTRUE if the cut is used.
475   fPrimaryVertexFlag = flag;
476   fPVFlag = kTRUE;
477 }
478
479 //___________________________________________________________________________
480 void AliEventTagCuts::SetZDCNeutron1Range(Float_t low, Float_t high) {
481   //Sets the ZDC's neutron energy range 
482   //and the corresponding flag to kTRUE if the cut is used.
483   fZDCNeutron1EnergyMin = low;
484   fZDCNeutron1EnergyMax = high;
485   fZDCNeutron1EnergyFlag = kTRUE;
486 }
487
488 //___________________________________________________________________________
489 void AliEventTagCuts::SetZDCProton1Range(Float_t low, Float_t high) {
490   //Sets the ZDC's proton energy range 
491   //and the corresponding flag to kTRUE if the cut is used.
492   fZDCProton1EnergyMin = low;
493   fZDCProton1EnergyMax = high;
494   fZDCProton1EnergyFlag = kTRUE;
495 }
496 //___________________________________________________________________________
497 void AliEventTagCuts::SetZDCNeutron2Range(Float_t low, Float_t high) {
498   //Sets the ZDC's neutron energy range 
499   //and the corresponding flag to kTRUE if the cut is used.
500   fZDCNeutron2EnergyMin = low;
501   fZDCNeutron2EnergyMax = high;
502   fZDCNeutron2EnergyFlag = kTRUE;
503 }
504 //___________________________________________________________________________
505 void AliEventTagCuts::SetZDCProton2Range(Float_t low, Float_t high) {
506   //Sets the ZDC's proton energy range 
507   //and the corresponding flag to kTRUE if the cut is used.
508   fZDCProton2EnergyMin = low;
509   fZDCProton2EnergyMax = high;
510   fZDCProton2EnergyFlag = kTRUE;
511 }
512 //___________________________________________________________________________
513 void AliEventTagCuts::SetZDCEMRange(Float_t low, Float_t high) {
514   //Sets the ZDC's em energy range 
515   //and the corresponding flag to kTRUE if the cut is used.
516   fZDCEMEnergyMin = low;
517   fZDCEMEnergyMax = high;
518   fZDCEMEnergyFlag = kTRUE;
519 }
520
521 //___________________________________________________________________________
522 void AliEventTagCuts::SetT0VertexZRange(Float_t low, Float_t high) {
523   //Sets the T0's Vz range 
524   //and the corresponding flag to kTRUE if the cut is used.
525   fT0VertexZMin = low;
526   fT0VertexZMax = high;
527   fT0VertexZFlag = kTRUE;
528 }
529
530 //___________________________________________________________________________
531 void AliEventTagCuts::SetPosMultiplicityRange(Int_t low, Int_t high) {
532   //Sets the positive multiplicity range 
533   //and the corresponding flag to kTRUE if the cut is used.
534   fPosMultMin = low;
535   fPosMultMax = high;
536   fPosMultFlag = kTRUE;
537 }
538
539
540 //___________________________________________________________________________
541 void AliEventTagCuts::SetNegMultiplicityRange(Int_t low, Int_t high) {
542   //Sets the negative multiplicity range 
543   //and the corresponding flag to kTRUE if the cut is used.
544   fNegMultMin = low;
545   fNegMultMax = high;
546   fNegMultFlag = kTRUE;
547 }
548
549
550 //___________________________________________________________________________
551 void AliEventTagCuts::SetNeutrMultiplicityRange(Int_t low, Int_t high) {
552   //Sets the neutral particle multiplicity range 
553   //and the corresponding flag to kTRUE if the cut is used.
554   fNeutrMultMin = low;
555   fNeutrMultMax = high;
556   fNeutrMultFlag = kTRUE;
557 }
558
559 //___________________________________________________________________________
560 void AliEventTagCuts::SetNV0sRange(Int_t low, Int_t high) {
561   //Sets the v0s multiplicity range 
562   //and the corresponding flag to kTRUE if the cut is used.
563   fNV0sMin = low;
564   fNV0sMax = high;
565   fNV0sFlag = kTRUE;
566 }
567
568 //___________________________________________________________________________
569 void AliEventTagCuts::SetNCascadesRange(Int_t low, Int_t high) {
570   //Sets the cascades multiplicity range 
571   //and the corresponding flag to kTRUE if the cut is used.
572   fNCascadesMin = low;
573   fNCascadesMax = high;
574   fNCascadesFlag = kTRUE;
575 }
576
577 //___________________________________________________________________________
578 void AliEventTagCuts::SetNKinksRange(Int_t low, Int_t high) {
579   //Sets the kinks multiplicity range 
580   //and the corresponding flag to kTRUE if the cut is used.
581   fNKinksMin = low;
582   fNKinksMax = high;
583   fNKinksFlag = kTRUE;
584 }
585
586 //___________________________________________________________________________
587 void AliEventTagCuts::SetNPMDTracksRange(Int_t low, Int_t high) {
588   //Sets the number of PMD tracks range 
589   //and the corresponding flag to kTRUE if the cut is used.
590   fNPMDTracksMin = low;
591   fNPMDTracksMax = high;
592   fNPMDTracksFlag = kTRUE;
593 }
594
595 //___________________________________________________________________________
596 void AliEventTagCuts::SetNFMDTracksRange(Int_t low, Int_t high) {
597   //Sets the number of FMD tracks range 
598   //and the corresponding flag to kTRUE if the cut is used.
599   fNFMDTracksMin = low;
600   fNFMDTracksMax = high;
601   fNFMDTracksFlag = kTRUE;
602 }
603
604 //___________________________________________________________________________
605 void AliEventTagCuts::SetNPHOSClustersRange(Int_t low, Int_t high) {
606   //Sets the number of PHOS clusters range 
607   //and the corresponding flag to kTRUE if the cut is used.
608   fNPHOSClustersMin = low;
609   fNPHOSClustersMax = high;
610   fNPHOSClustersFlag = kTRUE;
611 }
612
613 //___________________________________________________________________________
614 void AliEventTagCuts::SetNEMCALClustersRange(Int_t low, Int_t high) {
615   //Sets the number of EMCAL clusters range 
616   //and the corresponding flag to kTRUE if the cut is used.
617   fNEMCALClustersMin = low;
618   fNEMCALClustersMax = high;
619   fNEMCALClustersFlag = kTRUE;
620 }
621
622 //___________________________________________________________________________
623 void AliEventTagCuts::SetNJetCandidatesRange(Int_t low, Int_t high) {
624   //Sets the number of jet candidates range 
625   //and the corresponding flag to kTRUE if the cut is used.
626   fNJetCandidatesMin = low;
627   fNJetCandidatesMax = high;
628   fNJetCandidatesFlag = kTRUE;
629 }
630
631 //___________________________________________________________________________
632 void AliEventTagCuts::SetTopJetEnergyMin(Float_t low) {
633   //Sets the lower limit of the maximum jet energy
634   //and the corresponding flag to kTRUE if the cut is used.
635   fTopJetEnergyMin = low; 
636   fTopJetEnergyMinFlag = kTRUE;
637 }
638 //___________________________________________________________________________
639 void AliEventTagCuts::SetTopNeutralEnergyMin(Float_t low) {
640   //Sets the lower limit of the maximum neutral jet energy
641   //and the corresponding flag to kTRUE if the cut is used.
642   fTopNeutralEnergyMin = low; 
643   fTopNeutralEnergyMinFlag = kTRUE;
644 }
645 //___________________________________________________________________________
646 void AliEventTagCuts::SetNHardPhotonsRange(Int_t low, Int_t high) {
647   //Sets the hard photons multiplicity range
648   //and the corresponding flag to kTRUE if the cut is used.
649   fNHardPhotonCandidatesMin = low;
650   fNHardPhotonCandidatesMax = high;
651   fNHardPhotonCandidatesFlag = kTRUE;
652
653
654 //___________________________________________________________________________
655 void AliEventTagCuts::SetNChargedAbove1GeVRange(Int_t low, Int_t high) {
656   //Sets the number of charged above 1GeV range
657   //and the corresponding flag to kTRUE if the cut is used.
658   fNChargedAbove1GeVMin = low;
659   fNChargedAbove1GeVMax = high;
660   fNChargedAbove1GeVFlag = kTRUE;
661 }
662
663 //___________________________________________________________________________
664  void AliEventTagCuts::SetNChargedAbove3GeVRange(Int_t low, Int_t high) {
665   //Sets the number of charged above 3GeV range
666   //and the corresponding flag to kTRUE if the cut is used.
667   fNChargedAbove3GeVMin = low;
668   fNChargedAbove3GeVMax = high;
669   fNChargedAbove3GeVFlag = kTRUE;
670 }
671
672
673 //___________________________________________________________________________
674 void AliEventTagCuts::SetNChargedAbove10GeVRange(Int_t low, Int_t high) {
675   //Sets the number of charged above 10GeV range
676   //and the corresponding flag to kTRUE if the cut is used.
677   fNChargedAbove10GeVMin = low;
678   fNChargedAbove10GeVMax = high;
679   fNChargedAbove10GeVFlag = kTRUE;
680 }
681
682
683 //___________________________________________________________________________
684 void AliEventTagCuts::SetNMuonsAbove1GeVRange(Int_t low, Int_t high) {
685   //Sets the number of muons above 1GeV range
686   //and the corresponding flag to kTRUE if the cut is used.
687   fNMuonsAbove1GeVMin = low;
688   fNMuonsAbove1GeVMax = high;
689   fNMuonsAbove1GeVFlag = kTRUE;
690 }
691
692
693 //___________________________________________________________________________
694 void AliEventTagCuts::SetNMuonsAbove3GeVRange(Int_t low, Int_t high) {
695   //Sets the number of muons above 3GeV range
696   //and the corresponding flag to kTRUE if the cut is used.
697   fNMuonsAbove3GeVMin = low;
698   fNMuonsAbove3GeVMax = high;
699   fNMuonsAbove3GeVFlag = kTRUE;
700
701
702 //___________________________________________________________________________
703 void AliEventTagCuts::SetNMuonsAbove10GeVRange(Int_t low, Int_t high) {
704   //Sets the number of muons above 10GeV range
705   //and the corresponding flag to kTRUE if the cut is used.
706   fNMuonsAbove10GeVMin = low;
707   fNMuonsAbove10GeVMax = high; 
708   fNMuonsAbove10GeVFlag = kTRUE;
709 }
710
711
712 //___________________________________________________________________________
713 void AliEventTagCuts::SetNElectronsAbove1GeVRange(Int_t low, Int_t high) {
714   //Sets the number of electrons above 1GeV range
715   //and the corresponding flag to kTRUE if the cut is used.
716   fNElectronsAbove1GeVMin = low;
717   fNElectronsAbove1GeVMax = high;
718   fNElectronsAbove1GeVFlag = kTRUE;
719 }
720
721 //___________________________________________________________________________
722 void AliEventTagCuts::SetNElectronsAbove3GeVRange(Int_t low, Int_t high) {
723   //Sets the number of electrons above 3GeV range
724   //and the corresponding flag to kTRUE if the cut is used.
725   fNElectronsAbove3GeVMin = low;
726   fNElectronsAbove3GeVMax = high;
727   fNElectronsAbove3GeVFlag = kTRUE;
728 }
729
730 //___________________________________________________________________________
731 void AliEventTagCuts::SetNElectronsAbove10GeVRange(Int_t low, Int_t high) {  
732   //Sets the number of electrons above 10GeV range
733   //and the corresponding flag to kTRUE if the cut is used.
734   fNElectronsAbove10GeVMin = low;
735   fNElectronsAbove10GeVMax = high;
736   fNElectronsAbove10GeVFlag = kTRUE;
737 }
738 //___________________________________________________________________________
739 void AliEventTagCuts::SetNElectronRange(Int_t low, Int_t high) {
740   //Sets the electron multiplicity range
741   //and the corresponding flag to kTRUE if the cut is used.
742   fNElectronsMin = low;
743   fNElectronsMax = high;
744   fNElectronsFlag = kTRUE;
745 }
746 //___________________________________________________________________________
747 void AliEventTagCuts::SetNFWMuonRange(Int_t low, Int_t high) {
748   //Sets the forward muon multiplicity range
749   //and the corresponding flag to kTRUE if the cut is used.
750   fNFWMuonsMin = low;
751   fNFWMuonsMax = high;
752   fNFWMuonsFlag = kTRUE;
753 }
754
755 //___________________________________________________________________________
756 void AliEventTagCuts::SetNMuonRange(Int_t low, Int_t high) {
757   //Sets the muon multiplicity range
758   //and the corresponding flag to kTRUE if the cut is used.
759   fNMuonsMin = low;
760   fNMuonsMax = high;
761   fNMuonsFlag = kTRUE;
762 }
763
764 //___________________________________________________________________________
765 void AliEventTagCuts::SetNPionRange(Int_t low, Int_t high) {
766   //Sets the pion multiplicity range
767   //and the corresponding flag to kTRUE if the cut is used.
768   fNPionsMin = low;
769   fNPionsMax = high;
770   fNPionsFlag = kTRUE;
771
772
773 //___________________________________________________________________________
774 void AliEventTagCuts::SetNKaonRange(Int_t low, Int_t high) {
775   //Sets the kaon multiplicity range
776   //and the corresponding flag to kTRUE if the cut is used.
777   fNKaonsMin = low;
778   fNKaonsMax = high;
779   fNKaonsFlag = kTRUE;
780 }
781
782 //___________________________________________________________________________
783 void AliEventTagCuts::SetNProtonRange(Int_t low, Int_t high) {
784   //Sets the proton multiplicity range
785   //and the corresponding flag to kTRUE if the cut is used.
786   fNProtonsMin = low;
787   fNProtonsMax = high;
788   fNProtonsFlag = kTRUE;
789
790
791 //___________________________________________________________________________
792 void AliEventTagCuts::SetNLambdaRange(Int_t low, Int_t high) {
793   //Sets the lambda multiplicity range
794   //and the corresponding flag to kTRUE if the cut is used.
795   fNLambdasMin = low;
796   fNLambdasMax = high;
797   fNLambdasFlag = kTRUE;
798
799 //___________________________________________________________________________
800 void AliEventTagCuts::SetNPhotonRange(Int_t low, Int_t high) {
801   //Sets the photon multiplicity range
802   //and the corresponding flag to kTRUE if the cut is used.
803   fNPhotonsMin = low;
804   fNPhotonsMax = high;
805   fNPhotonFlag = kTRUE;
806
807 //___________________________________________________________________________
808 void AliEventTagCuts::SetNPi0Range(Int_t low, Int_t high) {
809   //Sets the pi0 multiplicity range
810   //and the corresponding flag to kTRUE if the cut is used.
811   fNPi0sMin = low;
812   fNPi0sMax = high; 
813   fNPi0sFlag = kTRUE;
814 }  
815
816 //___________________________________________________________________________
817 void AliEventTagCuts::SetNNeutronRange(Int_t low, Int_t high) {
818   //Sets the neutron multiplicity range
819   //and the corresponding flag to kTRUE if the cut is used.
820   fNNeutronsMin = low;
821   fNNeutronsMax = high; 
822   fNNeutronsFlag = kTRUE;
823 }
824
825 //___________________________________________________________________________
826 void AliEventTagCuts::SetNKaon0Range(Int_t low, Int_t high) {  
827   //Sets the K0s multiplicity range
828   //and the corresponding flag to kTRUE if the cut is used.
829   fNKaon0sMin = low;
830   fNKaon0sMax = high; 
831   fNKaon0sFlag = kTRUE;
832 }
833
834 //___________________________________________________________________________
835 void AliEventTagCuts::SetTotalPRange(Float_t low, Float_t high) {
836   //Sets the total momentum range
837   //and the corresponding flag to kTRUE if the cut is used.
838   fTotalPMin = low;
839   fTotalPMax = high;
840   fTotalPFlag = kTRUE;
841 }
842
843 //___________________________________________________________________________
844 void AliEventTagCuts::SetMeanPtRange(Float_t low, Float_t high) {
845   //Sets the mean Pt range
846   //and the corresponding flag to kTRUE if the cut is used.
847   fMeanPtMin = low;
848   fMeanPtMax = high;
849   fMeanPtFlag = kTRUE;
850 }  
851
852 //___________________________________________________________________________
853 void AliEventTagCuts::SetTopPtMin(Float_t low) {
854   //Sets the lower limit of the max Pt value
855   //and the corresponding flag to kTRUE if the cut is used.
856   fTopPtMin = low; 
857   fTopPtMinFlag = kTRUE;
858 }
859
860 //___________________________________________________________________________
861 void AliEventTagCuts::SetTotalNeutralPRange(Float_t low, Float_t high) {  
862   //Sets the total momentum of neutral particles range
863   //and the corresponding flag to kTRUE if the cut is used.
864   fTotalNeutralPMin =low ;
865   fTotalNeutralPMax = high;  
866   fTotalNeutralPFlag = kTRUE;
867 }
868 //___________________________________________________________________________
869 void AliEventTagCuts::SetMeanNeutralPtPRange(Float_t low, Float_t high) {  
870   //Sets the mean Pt of neutral particles range
871   //and the corresponding flag to kTRUE if the cut is used.
872   fMeanNeutralPtMin = low;
873   fMeanNeutralPtMax = high; 
874   fMeanNeutralPtFlag = kTRUE;
875 }
876 //___________________________________________________________________________
877 void AliEventTagCuts::SetTopNeutralPtMin(Float_t low) {  
878   //Sets the lower limit of the maximum Pt of neutral particles
879   //and the corresponding flag to kTRUE if the cut is used.
880   fTopNeutralPtMin = low; 
881   fTopNeutralPtMinFlag = kTRUE;
882 }
883
884 //___________________________________________________________________________
885 void AliEventTagCuts::SetEventPlaneAngleRange(Float_t low, Float_t high) {
886   //Sets the event plane range
887   //and the corresponding flag to kTRUE if the cut is used.
888   fEventPlaneAngleMin = low;
889   fEventPlaneAngleMax = high; 
890   fEventPlaneAngleFlag = kTRUE;
891 }
892
893 //___________________________________________________________________________
894 void AliEventTagCuts::SetHBTRadiiRange(Float_t low, Float_t high) {
895   //Sets the HBT radii range
896   //and the corresponding flag to kTRUE if the cut is used.
897   fHBTRadiiMin = low;
898   fHBTRadiiMax = high; 
899   fHBTRadiiFlag = kTRUE;
900 }
901
902 //___________________________________________________________________________
903 Bool_t AliEventTagCuts::IsAccepted(AliEventTag *EvTag) const {
904   //Returns true if the event is accepted otherwise false.
905   if(fEventTypeFlag)
906     if(EvTag->GetEventType() != fEventType)
907       return kFALSE;
908   
909   if(fNumberOfFiredChipsLayer1Flag)
910     if((EvTag->GetNumberOfFiredChipsLayer1() < fNumberOfFiredChipsLayer1Min) || (EvTag->GetNumberOfFiredChipsLayer1() > fNumberOfFiredChipsLayer1Max))
911       return kFALSE;
912
913   if(fNumberOfFiredChipsLayer2Flag)
914     if((EvTag->GetNumberOfFiredChipsLayer2() < fNumberOfFiredChipsLayer2Min) || (EvTag->GetNumberOfFiredChipsLayer2() > fNumberOfFiredChipsLayer2Max))
915       return kFALSE;
916
917   if(fNumberOfSPDTrackletsFlag)
918     if((EvTag->GetNumberOfSPDTracklets() < fNumberOfSPDTrackletsMin) || (EvTag->GetNumberOfSPDTracklets() > fNumberOfSPDTrackletsMax))
919       return kFALSE;
920
921   if(fPeriodNumberFlag)
922     if((EvTag->GetPeriodNumber() < fPeriodNumberMin) || (EvTag->GetPeriodNumber() > fPeriodNumberMax))
923       return kFALSE;
924
925   if(fOrbitNumberFlag)
926     if((EvTag->GetOrbitNumber() < fOrbitNumberMin) || (EvTag->GetOrbitNumber() > fOrbitNumberMax))
927       return kFALSE;
928
929   if(fBunchCrossNumberFlag)
930     if((EvTag->GetBunchCrossNumber() < fBunchCrossNumberMin) || (EvTag->GetBunchCrossNumber() > fBunchCrossNumberMax))
931       return kFALSE;
932
933
934   if(fVzFlag)
935     if((EvTag->GetVertexZ() < fVzMin) || (EvTag->GetVertexZ() > fVzMax))
936       return kFALSE;
937   
938   if(fVyFlag)
939     if((EvTag->GetVertexY() < fVyMin) || (EvTag->GetVertexY() > fVyMax))
940       return kFALSE;
941   
942   if(fVxFlag)
943     if((EvTag->GetVertexX() < fVxMin) || (EvTag->GetVertexX() > fVxMax))
944       return kFALSE;
945   
946   if(fNParticipantsFlag)
947     if((EvTag->GetNumOfParticipants() < fNParticipantsMin) || (EvTag->GetNumOfParticipants() > fNParticipantsMax))
948       return kFALSE; 
949   
950   if(fImpactParamFlag)
951     if((EvTag->GetImpactParameter() < fImpactParamMin) || (EvTag->GetImpactParameter() > fImpactParamMax))
952       return kFALSE; 
953   
954   if(fPVFlag)
955     if((EvTag->GetVertexFlag() != fPrimaryVertexFlag))
956       return kFALSE; 
957   
958   if(fPVzErrorFlag)
959     if((EvTag->GetVertexZError() < fPrimaryVertexZErrorMin) || (EvTag->GetVertexZError() > fPrimaryVertexZErrorMax))
960       return kFALSE; 
961   if(fTriggerMaskFlag)
962     if((EvTag->GetTriggerMask() & fTriggerMask) != fTriggerMask)
963       return kFALSE; 
964   if(fTriggerClusterFlag)
965     if((EvTag->GetTriggerCluster() != fTriggerCluster))
966       return kFALSE; 
967
968   if(fZDCNeutron1EnergyFlag)
969     if((EvTag->GetZDCNeutron1Energy() < fZDCNeutron1EnergyMin) || (EvTag->GetZDCNeutron1Energy() > fZDCNeutron1EnergyMax))
970       return kFALSE; 
971   
972   if(fZDCProton1EnergyFlag)
973     if((EvTag->GetZDCProton1Energy() < fZDCProton1EnergyMin) || (EvTag->GetZDCProton1Energy() > fZDCProton1EnergyMax))
974       return kFALSE; 
975   
976   if(fZDCNeutron2EnergyFlag)
977     if((EvTag->GetZDCNeutron2Energy() < fZDCNeutron2EnergyMin) || (EvTag->GetZDCNeutron2Energy() > fZDCNeutron2EnergyMax))
978       return kFALSE; 
979   
980   if(fZDCProton2EnergyFlag)
981     if((EvTag->GetZDCProton2Energy() < fZDCProton2EnergyMin) || (EvTag->GetZDCProton2Energy() > fZDCProton2EnergyMax))
982       return kFALSE; 
983   
984   if(fZDCEMEnergyFlag)
985     if((EvTag->GetZDCEMEnergy(1) < fZDCEMEnergyMin) || (EvTag->GetZDCEMEnergy(1) > fZDCEMEnergyMax))
986       return kFALSE; 
987   
988   if(fT0VertexZFlag)
989     if((EvTag->GetT0VertexZ() < fT0VertexZMin) || (EvTag->GetT0VertexZ() > fT0VertexZMax))
990       return kFALSE; 
991   
992   if(fMultFlag)
993     if((EvTag->GetNumOfTracks() < fMultMin) || (EvTag->GetNumOfTracks() > fMultMax))
994       return kFALSE; 
995   
996   if(fPosMultFlag)
997     if((EvTag->GetNumOfPosTracks() < fPosMultMin) || (EvTag->GetNumOfPosTracks() > fPosMultMax))
998       return kFALSE; 
999   
1000   if(fNegMultFlag)
1001     if((EvTag->GetNumOfNegTracks() < fNegMultMin) || (EvTag->GetNumOfNegTracks() > fNegMultMax))
1002       return kFALSE; 
1003   
1004   if(fNeutrMultFlag)
1005     if((EvTag->GetNumOfNeutrTracks() < fNeutrMultMin) || (EvTag->GetNumOfNeutrTracks() > fNeutrMultMax))
1006       return kFALSE; 
1007   
1008   if(fNV0sFlag)
1009     if((EvTag->GetNumOfV0s() < fNV0sMin) || (EvTag->GetNumOfV0s() > fNV0sMax))
1010       return kFALSE; 
1011   
1012   if(fNCascadesFlag)
1013     if((EvTag->GetNumOfCascades() < fNCascadesMin) || (EvTag->GetNumOfCascades() > fNCascadesMax))
1014       return kFALSE; 
1015   
1016   if(fNKinksFlag)
1017     if((EvTag->GetNumOfKinks() < fNKinksMin) || (EvTag->GetNumOfKinks() > fNKinksMax))
1018       return kFALSE; 
1019
1020
1021   if(fNPMDTracksFlag)
1022     if((EvTag->GetNumOfPMDTracks() < fNPMDTracksMin) || (EvTag->GetNumOfPMDTracks() > fNPMDTracksMax))
1023       return kFALSE; 
1024   if(fNFMDTracksFlag)
1025     if((EvTag->GetNumOfFMDTracks() < fNFMDTracksMin) || (EvTag->GetNumOfFMDTracks() > fNFMDTracksMax))
1026       return kFALSE; 
1027   if(fNPHOSClustersFlag)
1028     if((EvTag->GetNumOfPHOSClusters() < fNPHOSClustersMin) || (EvTag->GetNumOfPHOSClusters() > fNPHOSClustersMax))
1029       return kFALSE; 
1030   if(fNEMCALClustersFlag)
1031     if((EvTag->GetNumOfEMCALClusters() < fNEMCALClustersMin) || (EvTag->GetNumOfEMCALClusters() > fNEMCALClustersMax))
1032       return kFALSE; 
1033   if(fNJetCandidatesFlag)
1034     if((EvTag->GetNumOfJetCandidates() < fNJetCandidatesMin) || (EvTag->GetNumOfJetCandidates() > fNJetCandidatesMax))
1035       return kFALSE; 
1036
1037
1038   if(fTopJetEnergyMinFlag)
1039     if((EvTag->GetMaxJetEnergy() < fTopJetEnergyMin))
1040       return kFALSE; 
1041   
1042   if(fNHardPhotonCandidatesFlag)
1043     if((EvTag->GetNumOfHardPhotonsCandidates() < fNHardPhotonCandidatesMin) || (EvTag->GetNumOfHardPhotonsCandidates() > fNHardPhotonCandidatesMax))
1044       return kFALSE; 
1045   
1046   if(fTopNeutralEnergyMinFlag)
1047     if((EvTag->GetMaxNeutralEnergy() < fTopNeutralEnergyMin))
1048       return kFALSE; 
1049   
1050   if(fNChargedAbove1GeVFlag)
1051     if((EvTag->GetNumOfChargedAbove1GeV() < fNChargedAbove1GeVMin) || (EvTag->GetNumOfChargedAbove1GeV() > fNChargedAbove1GeVMax))
1052       return kFALSE; 
1053   
1054   if(fNChargedAbove3GeVFlag)
1055     if((EvTag->GetNumOfChargedAbove3GeV() < fNChargedAbove3GeVMin) || (EvTag->GetNumOfChargedAbove3GeV() > fNChargedAbove3GeVMax))
1056       return kFALSE; 
1057   
1058   if(fNChargedAbove10GeVFlag)
1059     if((EvTag->GetNumOfChargedAbove10GeV() < fNChargedAbove10GeVMin) || (EvTag->GetNumOfChargedAbove10GeV() > fNChargedAbove10GeVMax))
1060       return kFALSE; 
1061   
1062   if(fNMuonsAbove1GeVFlag)
1063     if((EvTag->GetNumOfMuonsAbove1GeV() < fNMuonsAbove1GeVMin) || (EvTag->GetNumOfMuonsAbove1GeV() > fNMuonsAbove1GeVMax))
1064       return kFALSE; 
1065   
1066   if(fNMuonsAbove3GeVFlag)
1067     if((EvTag->GetNumOfMuonsAbove3GeV() < fNMuonsAbove3GeVMin) || (EvTag->GetNumOfMuonsAbove3GeV() > fNMuonsAbove3GeVMax))
1068       return kFALSE; 
1069   
1070   if(fNMuonsAbove10GeVFlag)
1071     if((EvTag->GetNumOfMuonsAbove10GeV() < fNMuonsAbove10GeVMin) || (EvTag->GetNumOfMuonsAbove10GeV() > fNMuonsAbove10GeVMax))
1072       return kFALSE; 
1073   
1074   if(fNElectronsAbove1GeVFlag)
1075     if((EvTag->GetNumOfElectronsAbove1GeV()  < fNElectronsAbove1GeVMin) || (EvTag->GetNumOfElectronsAbove1GeV()  > fNElectronsAbove1GeVMax))
1076       return kFALSE; 
1077   
1078   if(fNElectronsAbove3GeVFlag)
1079     if((EvTag->GetNumOfElectronsAbove3GeV() < fNElectronsAbove3GeVMin) || (EvTag->GetNumOfElectronsAbove3GeV() > fNElectronsAbove3GeVMax))
1080       return kFALSE; 
1081   
1082   if(fNElectronsAbove10GeVFlag)
1083     if((EvTag->GetNumOfElectronsAbove10GeV() < fNElectronsAbove10GeVMin) || (EvTag->GetNumOfElectronsAbove10GeV() > fNElectronsAbove10GeVMax))
1084       return kFALSE; 
1085   
1086   if(fNElectronsFlag)
1087     if((EvTag->GetNumOfElectrons() < fNElectronsMin) || (EvTag->GetNumOfElectrons() > fNElectronsMax))
1088       return kFALSE; 
1089   
1090   if(fNFWMuonsFlag)
1091     if((EvTag->GetNumOfFWMuons() < fNFWMuonsMin) || (EvTag->GetNumOfFWMuons() > fNFWMuonsMax))
1092       return kFALSE; 
1093   
1094   if(fNMuonsFlag)
1095     if((EvTag->GetNumOfMuons() < fNMuonsMin) || (EvTag->GetNumOfMuons() > fNMuonsMax))
1096       return kFALSE; 
1097   
1098   if(fNPionsFlag)
1099     if((EvTag->GetNumOfPions() < fNPionsMin) || (EvTag->GetNumOfPions() > fNPionsMax))
1100       return kFALSE; 
1101   
1102   if(fNKaonsFlag)
1103     if((EvTag->GetNumOfKaons() < fNKaonsMin) || (EvTag->GetNumOfKaons() > fNKaonsMax))
1104       return kFALSE; 
1105   
1106   if(fNProtonsFlag)
1107     if((EvTag->GetNumOfProtons() < fNProtonsMin) || (EvTag->GetNumOfProtons() > fNProtonsMax))
1108       return kFALSE; 
1109   
1110   if(fNLambdasFlag)
1111     if((EvTag->GetNumOfLambdas() < fNLambdasMin) || (EvTag->GetNumOfLambdas() > fNLambdasMax))
1112       return kFALSE; 
1113   
1114   if(fNPhotonFlag)
1115     if((EvTag->GetNumOfPhotons() < fNPhotonsMin) || (EvTag->GetNumOfPhotons() > fNPhotonsMax))
1116       return kFALSE; 
1117   
1118   if(fNPi0sFlag)
1119     if((EvTag->GetNumOfPi0s() < fNPi0sMin) || (EvTag->GetNumOfPi0s() > fNPi0sMax))
1120       return kFALSE; 
1121   
1122   if(fNNeutronsFlag)
1123     if((EvTag->GetNumOfNeutrons() < fNNeutronsMin) || (EvTag->GetNumOfNeutrons() > fNNeutronsMax))
1124       return kFALSE; 
1125   
1126   if(fNKaon0sFlag)
1127     if((EvTag->GetNumOfKaon0s() < fNKaon0sMin) || (EvTag->GetNumOfKaon0s() > fNKaon0sMax))
1128       return kFALSE; 
1129   
1130   if(fTotalPFlag)
1131     if((EvTag->GetTotalMomentum() < fTotalPMin) || (EvTag->GetTotalMomentum() > fTotalPMax))
1132       return kFALSE; 
1133   
1134   if(fMeanPtFlag)
1135     if((EvTag->GetMeanPt() < fMeanPtMin) || (EvTag->GetMeanPt() > fMeanPtMax))
1136       return kFALSE; 
1137   
1138   if(fTopPtMinFlag)
1139     if((EvTag->GetMaxPt() < fTopPtMin))
1140       return kFALSE; 
1141   
1142   if(fTotalNeutralPFlag)
1143     if((EvTag->GetNeutralTotalMomentum() < fTotalNeutralPMin) || (EvTag->GetNeutralTotalMomentum() > fTotalNeutralPMax))
1144       return kFALSE; 
1145   
1146   if(fMeanNeutralPtFlag)
1147     if((EvTag->GetNeutralMeanPt() < fMeanNeutralPtMin) || (EvTag->GetNeutralMeanPt() >fMeanNeutralPtMax ))
1148       return kFALSE; 
1149   
1150   if(fTopNeutralPtMinFlag)
1151     if((EvTag->GetNeutralMaxPt() < fTopNeutralPtMin))
1152       return kFALSE; 
1153   
1154   if(fEventPlaneAngleFlag)
1155     if((EvTag->GetEventPlaneAngle() < fEventPlaneAngleMin) || (EvTag->GetEventPlaneAngle() > fEventPlaneAngleMax))
1156       return kFALSE; 
1157   
1158   if(fHBTRadiiFlag)
1159     if((EvTag->GetHBTRadii() < fHBTRadiiMin) || (EvTag->GetHBTRadii() > fHBTRadiiMax))
1160       return kFALSE; 
1161   
1162   return kTRUE;
1163 }