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