1 /**************************************************************************
2 * Author: Panos Christakoglou. *
3 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 //-----------------------------------------------------------------
17 // AliLHCTagCuts class
18 // This is the class to deal with the LHC tag level cuts
19 // Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
20 //-----------------------------------------------------------------
24 #include "AliLHCTag.h"
25 #include "AliLHCTagCuts.h"
27 ClassImp(AliLHCTagCuts)
30 //___________________________________________________________________________
31 AliLHCTagCuts::AliLHCTagCuts() :
34 fLHCStateFlag(kFALSE),
37 fLHCLuminosityFlag(kFALSE),
39 fNBunchesFlag(kFALSE),
41 fFillingSchemeFlag(kFALSE),
45 fBeamEnergyFlag(kFALSE),
46 fBunchIntensityRange(),
47 fBunchIntensityFlag(kFALSE)
49 //Default constructor which calls the Reset method.
53 //___________________________________________________________________________
54 AliLHCTagCuts::~AliLHCTagCuts() {
58 //___________________________________________________________________________
59 void AliLHCTagCuts::Reset() {
60 //Sets dummy values to every private member.
62 fLHCStateFlag = kFALSE;
63 fLHCLuminosityMin = -1.0;
64 fLHCLuminosityMax = 0.0;
65 fLHCLuminosityFlag = kFALSE;
66 fNBunchesRange[0] = 0;
67 fNBunchesRange[1] = 10000;
68 fNBunchesFlag = kFALSE;
70 fFillingSchemeFlag = kFALSE;
72 fFillNoRange[1] = 10000000;
74 fBeamEnergyRange[0] = 0.0;
75 fBeamEnergyRange[1] = 10000;
76 fBeamEnergyFlag = kFALSE;
77 fBunchIntensityRange[0] = 0.0;
78 fBunchIntensityRange[1] = 1e30;
79 fBunchIntensityFlag = kFALSE;
82 //___________________________________________________________________________
83 Bool_t AliLHCTagCuts::IsAccepted(AliLHCTag *lhcTag) const {
84 //Returns true if the event is accepted otherwise false.
86 if((lhcTag->GetLHCState() != fLHCState))
88 if(fLHCLuminosityFlag)
89 if((lhcTag->GetLuminosity() < fLHCLuminosityMin)||(lhcTag->GetLuminosity() > fLHCLuminosityMax))
92 if ((lhcTag->GetNBunches() < fNBunchesRange[0]) || (lhcTag->GetNBunches() > fNBunchesRange[1]))
94 if (fFillingSchemeFlag)
95 if (!(lhcTag->GetFillingScheme().Contains(fFillingScheme)))
98 if ((lhcTag->GetFillNo() < fFillNoRange[0]) || (lhcTag->GetFillNo() > fFillNoRange[1]))
101 if ((lhcTag->GetBeamEnergy() < fBeamEnergyRange[0]) || (lhcTag->GetBeamEnergy() > fBeamEnergyRange[1]))
103 if (fBunchIntensityFlag)
104 if ((lhcTag->GetBunchIntensity() < fBunchIntensityRange[0]) || (lhcTag->GetBunchIntensity() > fBunchIntensityRange[1]))