]>
Commit | Line | Data |
---|---|---|
0c4ee52f | 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 | // 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 | //----------------------------------------------------------------- | |
21 | ||
22 | class AliLog; | |
23 | class AliESD; | |
24 | ||
25 | #include "AliRunTag.h" | |
26 | #include "AliRunTagCuts.h" | |
27 | ||
28 | ClassImp(AliRunTagCuts) | |
29 | ||
30 | ||
31 | //___________________________________________________________________________ | |
32 | AliRunTagCuts::AliRunTagCuts() { | |
33 | //Default constructor which calls the Reset method. | |
34 | Reset(); | |
35 | } | |
36 | ||
37 | //___________________________________________________________________________ | |
38 | AliRunTagCuts::~AliRunTagCuts() { | |
39 | //Defaut destructor. | |
40 | } | |
41 | ||
42 | //___________________________________________________________________________ | |
43 | void AliRunTagCuts::Reset() { | |
44 | //Sets dummy values to every private member. | |
45 | fAliceRunId = -1; | |
46 | fAliceRunIdFlag = kFALSE; | |
47 | fAliceMagneticField = -1.; | |
48 | fAliceMagneticFieldFlag = kFALSE; | |
49 | fAliceRunStartTimeMin = -1; | |
50 | fAliceRunStartTimeMax = -1; | |
51 | fAliceRunStartTimeFlag = kFALSE; | |
52 | fAliceRunStopTimeMin = -1; | |
53 | fAliceRunStopTimeMax = -1; | |
54 | fAliceRunStopTimeFlag = kFALSE; | |
55 | fAlirootVersion = ""; | |
56 | fAlirootVersionFlag = kFALSE; | |
57 | fRootVersion = ""; | |
58 | fRootVersionFlag = kFALSE; | |
59 | fGeant3Version = ""; | |
60 | fGeant3VersionFlag = kFALSE; | |
61 | fAliceRunQuality = 0; | |
62 | fAliceRunQualityFlag = kFALSE; | |
63 | fAliceBeamEnergy = -1; | |
64 | fAliceBeamEnergyFlag = kFALSE; | |
65 | fAliceBeamType = ""; | |
66 | fAliceBeamTypeFlag = kFALSE; | |
67 | fAliceCalibrationVersion = -1; | |
68 | fAliceCalibrationVersionFlag = kFALSE; | |
69 | fAliceDataType = -1; | |
70 | fAliceDataTypeFlag = kFALSE; | |
71 | } | |
72 | ||
73 | //___________________________________________________________________________ | |
74 | Bool_t AliRunTagCuts::IsAccepted(AliRunTag *RunTag) const { | |
75 | //Returns true if the event is accepted otherwise false. | |
76 | if(fAliceRunIdFlag) | |
77 | if((RunTag->GetRunId() != fAliceRunId)) | |
78 | return kFALSE; | |
79 | if(fAliceMagneticFieldFlag) | |
80 | if((RunTag->GetMagneticField() != fAliceMagneticField)) | |
81 | return kFALSE; | |
82 | if(fAliceRunStartTimeFlag) | |
83 | if((RunTag->GetRunStartTime() < fAliceRunStartTimeMin) || (RunTag->GetRunStartTime() > fAliceRunStartTimeMax)) | |
84 | return kFALSE; | |
85 | if(fAliceRunStopTimeFlag) | |
86 | if((RunTag->GetRunStopTime() < fAliceRunStopTimeMin) || (RunTag->GetRunStopTime() > fAliceRunStopTimeMax)) | |
87 | return kFALSE; | |
88 | if(fAlirootVersionFlag) | |
89 | if((RunTag->GetAlirootVersion() != fAlirootVersion)) | |
90 | return kFALSE; | |
91 | if(fRootVersionFlag) | |
92 | if((RunTag->GetRootVersion() != fRootVersion)) | |
93 | return kFALSE; | |
94 | if(fGeant3VersionFlag) | |
95 | if((RunTag->GetGeant3Version() != fGeant3Version)) | |
96 | return kFALSE; | |
97 | if(fAliceRunQualityFlag) | |
98 | if(RunTag->GetRunQuality()) | |
99 | return kFALSE; | |
100 | if(fAliceBeamEnergyFlag) | |
101 | if(RunTag->GetBeamEnergy() != fAliceBeamEnergy) | |
102 | return kFALSE; | |
103 | if(fAliceBeamTypeFlag) | |
104 | if(RunTag->GetBeamType() != fAliceBeamType) | |
105 | return kFALSE; | |
106 | if(fAliceCalibrationVersionFlag) | |
107 | if(RunTag->GetBeamEnergy() != fAliceBeamEnergy) | |
108 | return kFALSE; | |
109 | if(fAliceDataTypeFlag) | |
110 | if(RunTag->GetDataType() != fAliceDataType) | |
111 | return kFALSE; | |
112 | ||
113 | return kTRUE; | |
114 | } |