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 // AliRunTagCuts class
18 // This is the class to deal with the run tag level cuts
19 // Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
20 //-----------------------------------------------------------------
25 #include "AliRunTag.h"
26 #include "AliRunTagCuts.h"
28 ClassImp(AliRunTagCuts)
31 //___________________________________________________________________________
32 AliRunTagCuts::AliRunTagCuts() :
35 fAliceRunIdFlag(kFALSE),
36 fAliceMagneticField(-1.),
37 fAliceMagneticFieldFlag(kFALSE),
38 fAliceRunStartTimeMin(-1),
39 fAliceRunStartTimeMax(-1),
40 fAliceRunStartTimeFlag(kFALSE),
41 fAliceRunStopTimeMin(-1),
42 fAliceRunStopTimeMax(-1),
43 fAliceRunStopTimeFlag(kFALSE),
45 fAlirootVersionFlag(kFALSE),
47 fRootVersionFlag(kFALSE),
49 fGeant3VersionFlag(kFALSE),
51 fAliceRunQualityFlag(kFALSE),
53 fAliceBeamEnergyFlag(kFALSE),
55 fAliceBeamTypeFlag(kFALSE),
56 fAliceCalibrationVersion(-1),
57 fAliceCalibrationVersionFlag(kFALSE),
59 fAliceDataTypeFlag(kFALSE)
61 //Default constructor which calls the Reset method.
64 //___________________________________________________________________________
65 AliRunTagCuts::~AliRunTagCuts() {
69 //___________________________________________________________________________
70 void AliRunTagCuts::Reset() {
71 //Sets dummy values to every private member.
73 fAliceRunIdFlag = kFALSE;
74 fAliceMagneticField = -1.;
75 fAliceMagneticFieldFlag = kFALSE;
76 fAliceRunStartTimeMin = -1;
77 fAliceRunStartTimeMax = -1;
78 fAliceRunStartTimeFlag = kFALSE;
79 fAliceRunStopTimeMin = -1;
80 fAliceRunStopTimeMax = -1;
81 fAliceRunStopTimeFlag = kFALSE;
83 fAlirootVersionFlag = kFALSE;
85 fRootVersionFlag = kFALSE;
87 fGeant3VersionFlag = kFALSE;
89 fAliceRunQualityFlag = kFALSE;
90 fAliceBeamEnergy = -1;
91 fAliceBeamEnergyFlag = kFALSE;
93 fAliceBeamTypeFlag = kFALSE;
94 fAliceCalibrationVersion = -1;
95 fAliceCalibrationVersionFlag = kFALSE;
97 fAliceDataTypeFlag = kFALSE;
100 //___________________________________________________________________________
101 Bool_t AliRunTagCuts::IsAccepted(AliRunTag *RunTag) const {
102 //Returns true if the event is accepted otherwise false.
104 if((RunTag->GetRunId() != fAliceRunId))
106 if(fAliceMagneticFieldFlag)
107 if((RunTag->GetMagneticField() != fAliceMagneticField))
109 if(fAliceRunStartTimeFlag)
110 if((RunTag->GetRunStartTime() < fAliceRunStartTimeMin) || (RunTag->GetRunStartTime() > fAliceRunStartTimeMax))
112 if(fAliceRunStopTimeFlag)
113 if((RunTag->GetRunStopTime() < fAliceRunStopTimeMin) || (RunTag->GetRunStopTime() > fAliceRunStopTimeMax))
115 if(fAlirootVersionFlag)
116 if((RunTag->GetAlirootVersion() != fAlirootVersion))
119 if((RunTag->GetRootVersion() != fRootVersion))
121 if(fGeant3VersionFlag)
122 if((RunTag->GetGeant3Version() != fGeant3Version))
124 if(fAliceRunQualityFlag)
125 if(RunTag->GetRunQuality())
127 if(fAliceBeamEnergyFlag)
128 if(RunTag->GetBeamEnergy() != fAliceBeamEnergy)
130 if(fAliceBeamTypeFlag)
131 if(RunTag->GetBeamType() != fAliceBeamType)
133 if(fAliceCalibrationVersionFlag)
134 if(RunTag->GetBeamEnergy() != fAliceBeamEnergy)
136 if(fAliceDataTypeFlag)
137 if(RunTag->GetDataType() != fAliceDataType)