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