--- /dev/null
+/**************************************************************************
+ * Author: Panos Christakoglou. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+//-----------------------------------------------------------------
+// AliRunTagCuts class
+// This is the class to deal with the run tag level cuts
+// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
+//-----------------------------------------------------------------
+
+class AliLog;
+class AliESD;
+
+#include "AliRunTag.h"
+#include "AliRunTagCuts.h"
+
+ClassImp(AliRunTagCuts)
+
+
+//___________________________________________________________________________
+AliRunTagCuts::AliRunTagCuts() {
+ //Default constructor which calls the Reset method.
+ Reset();
+}
+
+//___________________________________________________________________________
+AliRunTagCuts::~AliRunTagCuts() {
+ //Defaut destructor.
+}
+
+//___________________________________________________________________________
+void AliRunTagCuts::Reset() {
+ //Sets dummy values to every private member.
+ fAliceRunId = -1;
+ fAliceRunIdFlag = kFALSE;
+ fAliceMagneticField = -1.;
+ fAliceMagneticFieldFlag = kFALSE;
+ fAliceRunStartTimeMin = -1;
+ fAliceRunStartTimeMax = -1;
+ fAliceRunStartTimeFlag = kFALSE;
+ fAliceRunStopTimeMin = -1;
+ fAliceRunStopTimeMax = -1;
+ fAliceRunStopTimeFlag = kFALSE;
+ fAlirootVersion = "";
+ fAlirootVersionFlag = kFALSE;
+ fRootVersion = "";
+ fRootVersionFlag = kFALSE;
+ fGeant3Version = "";
+ fGeant3VersionFlag = kFALSE;
+ fAliceRunQuality = 0;
+ fAliceRunQualityFlag = kFALSE;
+ fAliceBeamEnergy = -1;
+ fAliceBeamEnergyFlag = kFALSE;
+ fAliceBeamType = "";
+ fAliceBeamTypeFlag = kFALSE;
+ fAliceCalibrationVersion = -1;
+ fAliceCalibrationVersionFlag = kFALSE;
+ fAliceDataType = -1;
+ fAliceDataTypeFlag = kFALSE;
+}
+
+//___________________________________________________________________________
+Bool_t AliRunTagCuts::IsAccepted(AliRunTag *RunTag) const {
+ //Returns true if the event is accepted otherwise false.
+ if(fAliceRunIdFlag)
+ if((RunTag->GetRunId() != fAliceRunId))
+ return kFALSE;
+ if(fAliceMagneticFieldFlag)
+ if((RunTag->GetMagneticField() != fAliceMagneticField))
+ return kFALSE;
+ if(fAliceRunStartTimeFlag)
+ if((RunTag->GetRunStartTime() < fAliceRunStartTimeMin) || (RunTag->GetRunStartTime() > fAliceRunStartTimeMax))
+ return kFALSE;
+ if(fAliceRunStopTimeFlag)
+ if((RunTag->GetRunStopTime() < fAliceRunStopTimeMin) || (RunTag->GetRunStopTime() > fAliceRunStopTimeMax))
+ return kFALSE;
+ if(fAlirootVersionFlag)
+ if((RunTag->GetAlirootVersion() != fAlirootVersion))
+ return kFALSE;
+ if(fRootVersionFlag)
+ if((RunTag->GetRootVersion() != fRootVersion))
+ return kFALSE;
+ if(fGeant3VersionFlag)
+ if((RunTag->GetGeant3Version() != fGeant3Version))
+ return kFALSE;
+ if(fAliceRunQualityFlag)
+ if(RunTag->GetRunQuality())
+ return kFALSE;
+ if(fAliceBeamEnergyFlag)
+ if(RunTag->GetBeamEnergy() != fAliceBeamEnergy)
+ return kFALSE;
+ if(fAliceBeamTypeFlag)
+ if(RunTag->GetBeamType() != fAliceBeamType)
+ return kFALSE;
+ if(fAliceCalibrationVersionFlag)
+ if(RunTag->GetBeamEnergy() != fAliceBeamEnergy)
+ return kFALSE;
+ if(fAliceDataTypeFlag)
+ if(RunTag->GetDataType() != fAliceDataType)
+ return kFALSE;
+
+ return kTRUE;
+}
--- /dev/null
+#ifndef ALIRUNTAGCUTS_H
+#define ALIRUNTAGCUTS_H
+/* See cxx source for full Copyright notice */
+
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+// Class AliRunTagCuts
+// This is the class for the cuts in run tags
+//
+// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
+//-------------------------------------------------------------------------
+
+#include <TObject.h>
+
+class AliRunTag;
+
+//___________________________________________________________________________
+class AliRunTagCuts : public TObject {
+ public:
+ AliRunTagCuts();
+ ~AliRunTagCuts();
+ void Reset();
+
+ //____________________________________________________//
+ void SetRunId(Int_t Pid) {fAliceRunId = Pid; fAliceRunIdFlag = kTRUE;}
+ void SetMagneticField(Float_t Pmag) {fAliceMagneticField = Pmag; fAliceMagneticFieldFlag = kTRUE;}
+ void SetRunStartTimeRange(Int_t t0, Int_t t1) {fAliceRunStartTimeMin = t0; fAliceRunStartTimeMax = t1; fAliceRunStartTimeFlag = kTRUE;}
+ void SetRunStopTimeRange(Int_t t0, Int_t t1) {fAliceRunStopTimeMin = t0; fAliceRunStopTimeMax = t1; fAliceRunStartTimeFlag = kTRUE;}
+ void SetAlirootVersion(TString v) {fAlirootVersion = v; fAlirootVersionFlag = kTRUE;}
+ void SetRootVersion(TString v) {fRootVersion = v; fRootVersionFlag = kTRUE;}
+ void SetGeant3Version(TString v) {fGeant3Version = v; fGeant3VersionFlag = kTRUE;}
+ void SetRunQuality(Int_t Pn) {fAliceRunQuality = Pn; fAliceRunQualityFlag = kTRUE;}
+ void SetBeamEnergy(Float_t PE) {fAliceBeamEnergy = PE; fAliceBeamTypeFlag = kTRUE;}
+ void SetBeamType(TString Ptype) {fAliceBeamType = Ptype; fAliceCalibrationVersionFlag = kTRUE;}
+ void SetCalibVersion(Int_t Pn) {fAliceCalibrationVersion = Pn; fAliceCalibrationVersionFlag = kTRUE;}
+ void SetDataType(Int_t i) {fAliceDataType = i; fAliceDataTypeFlag = kTRUE;}
+
+ Bool_t IsAccepted(AliRunTag *RunTag) const;
+
+ //____________________________________________________//
+ private:
+ Int_t fAliceRunId; //the run id
+ Bool_t fAliceRunIdFlag; //Shows whether this cut is used or not
+ Float_t fAliceMagneticField; //value of the magnetic field
+ Bool_t fAliceMagneticFieldFlag; //Shows whether this cut is used or not
+ Int_t fAliceRunStartTimeMin; //minimum run start date
+ Int_t fAliceRunStartTimeMax; //maximum run start date
+ Bool_t fAliceRunStartTimeFlag; //Shows whether this cut is used or not
+ Int_t fAliceRunStopTimeMin; //minmum run stop date
+ Int_t fAliceRunStopTimeMax; //maximum run stop date
+ Bool_t fAliceRunStopTimeFlag; //Shows whether this cut is used or not
+ TString fAlirootVersion; //aliroot version
+ Bool_t fAlirootVersionFlag; //Shows whether this cut is used or not
+ TString fRootVersion; //root version
+ Bool_t fRootVersionFlag; //Shows whether this cut is used or not
+ TString fGeant3Version; //geant3 version
+ Bool_t fGeant3VersionFlag; //Shows whether this cut is used or not
+ Bool_t fAliceRunQuality; //validation script
+ Bool_t fAliceRunQualityFlag; //Shows whether this cut is used or not
+ Float_t fAliceBeamEnergy; //beam energy cm
+ Bool_t fAliceBeamEnergyFlag; //Shows whether this cut is used or not
+ TString fAliceBeamType; //run type (pp, AA, pA)
+ Bool_t fAliceBeamTypeFlag; //Shows whether this cut is used or not
+ Int_t fAliceCalibrationVersion; //calibration version
+ Bool_t fAliceCalibrationVersionFlag; //Shows whether this cut is used or not
+ Int_t fAliceDataType; //0: simulation -- 1: data
+ Bool_t fAliceDataTypeFlag; //Shows whether this cut is used or not
+
+ ClassDef(AliRunTagCuts, 1)
+};
+
+#endif
#pragma link C++ class AliTagCreator+;
#pragma link C++ class AliTagAnalysis+;
+#pragma link C++ class AliRunTagCuts+;
#pragma link C++ class AliEventTagCuts+;
#pragma link C++ class AliXMLCollection+;
AliKalmanTrack.cxx AliHelix.cxx AliExternalTrackParam.cxx \
AliLog.cxx AliPID.cxx AliESDV0MIParams.cxx \
AliRunTag.cxx AliLHCTag.cxx AliDetectorTag.cxx AliEventTag.cxx \
- AliTagCreator.cxx AliTagAnalysis.cxx AliEventTagCuts.cxx \
+ AliTagCreator.cxx AliTagAnalysis.cxx AliEventTagCuts.cxx AliRunTagCuts.cxx\
AliTrackPointArray.cxx AliCluster.cxx \
AliESDFMD.cxx AliFMDMap.cxx AliFMDFloatMap.cxx \
AliESDMultITS.cxx \