Update of the tag system. 1. Correct implementation of the event ID - period, orbit...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Apr 2009 14:46:25 +0000 (14:46 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Apr 2009 14:46:25 +0000 (14:46 +0000)
ANALYSIS/AliAnalysisTaskTagCreator.cxx
STEER/AliAODTagCreator.cxx
STEER/AliESDTagCreator.cxx
STEER/AliEventTag.cxx
STEER/AliEventTag.h
STEER/AliEventTagCuts.cxx
STEER/AliEventTagCuts.h

index 8bdcee0..82bc7ff 100644 (file)
@@ -97,7 +97,6 @@ void AliAnalysisTaskTagCreator::UserExec(Option_t */*option*/)
     } else {
        fturl = url->GetFile();
     }
-    evtTag->SetEventId(fInputHandler->GetReadEntry() + 1);
     evtTag->SetGUID(fguid);
     if(opt.Contains("grid")) {
        evtTag->SetMD5(0);
index fe8dd23..ea0dc14 100644 (file)
@@ -332,7 +332,7 @@ void AliAODTagCreator::CreateTags(const char* type)
        // Fill the event tag from the aod informatiom
        FillEventTag(fAODEvent, evTag);
        // Set the event and input file references
-       evTag->SetEventId(iEventNumber+1);
+       //evTag->SetEventId(iEventNumber+1);
        evTag->SetGUID(fguid);
        if(!strcmp(type,"grid")) {
            evTag->SetMD5(0);
index 892ea15..7534263 100644 (file)
@@ -428,7 +428,16 @@ void AliESDTagCreator::CreateTag(TChain* chain, const char *type) {
     //AliInfo(Form("URL: %s - GUID: %s",fturl.Data(),fguid.Data()));
     //AliInfo(Form("====================================="));
 
-    evTag->SetEventId(iEventNumber+1);
+    //First physics data
+    const AliMultiplicity *spdMult = esd->GetMultiplicity();
+    evTag->SetNumberOfFiredChipsLayer1(spdMult->GetNumberOfFiredChips(0));
+    evTag->SetNumberOfFiredChipsLayer2(spdMult->GetNumberOfFiredChips(1));
+    evTag->SetNumberOfSPDTracklets(spdMult->GetNumberOfTracklets());
+
+    //evTag->SetEventId(iEventNumber+1);
+    evTag->SetPeriodNumber(esd->GetPeriodNumber());
+    evTag->SetOrbitNumber(esd->GetOrbitNumber());
+    evTag->SetBunchCrossNumber(esd->GetBunchCrossNumber());
     evTag->SetGUID(fguid);
     if(fSession == "grid") {
       evTag->SetMD5(0);
@@ -751,7 +760,17 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *guid, const char *md5,
     // Fill the event tags 
     if(ntrack != 0) meanPt = meanPt/ntrack;
     
-    evTag->SetEventId(iEventNumber+1);
+    //First physics data
+    const AliMultiplicity *spdMult = esd->GetMultiplicity();
+    evTag->SetNumberOfFiredChipsLayer1(spdMult->GetNumberOfFiredChips(0));
+    evTag->SetNumberOfFiredChipsLayer2(spdMult->GetNumberOfFiredChips(1));
+    evTag->SetNumberOfSPDTracklets(spdMult->GetNumberOfTracklets());
+
+    //evTag->SetEventId(iEventNumber+1);
+    evTag->SetPeriodNumber(esd->GetPeriodNumber());
+    evTag->SetOrbitNumber(esd->GetOrbitNumber());
+    evTag->SetBunchCrossNumber(esd->GetBunchCrossNumber());
+
     evTag->SetGUID(fguid);
     evTag->SetMD5(fmd5);
     evTag->SetTURL(fturl);
@@ -1072,7 +1091,16 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *filepath, Int_t Counte
     // Fill the event tags 
     if(ntrack != 0) meanPt = meanPt/ntrack;
     
-    evTag->SetEventId(iEventNumber+1);
+    //First physics data
+    const AliMultiplicity *spdMult = esd->GetMultiplicity();
+    evTag->SetNumberOfFiredChipsLayer1(spdMult->GetNumberOfFiredChips(0));
+    evTag->SetNumberOfFiredChipsLayer2(spdMult->GetNumberOfFiredChips(1));
+    evTag->SetNumberOfSPDTracklets(spdMult->GetNumberOfTracklets());
+
+    //evTag->SetEventId(iEventNumber+1);
+    evTag->SetPeriodNumber(esd->GetPeriodNumber());
+    evTag->SetOrbitNumber(esd->GetOrbitNumber());
+    evTag->SetBunchCrossNumber(esd->GetBunchCrossNumber());
     evTag->SetPath(filepath);
  
     evTag->SetVertexX(vertexIn->GetXv());
@@ -1402,12 +1430,22 @@ void AliESDTagCreator::CreateESDTags(Int_t fFirstEvent, Int_t fLastEvent, AliGRP
        }
       }
     }//muon track loop
+
     
     // Fill the event tags 
     if(ntrack != 0)
       meanPt = meanPt/ntrack;
-    
-    evTag->SetEventId(iEventNumber+1);
+
+    //First physics data
+    const AliMultiplicity *spdMult = esd->GetMultiplicity();
+    evTag->SetNumberOfFiredChipsLayer1(spdMult->GetNumberOfFiredChips(0));
+    evTag->SetNumberOfFiredChipsLayer2(spdMult->GetNumberOfFiredChips(1));
+    evTag->SetNumberOfSPDTracklets(spdMult->GetNumberOfTracklets());
+
+    //evTag->SetEventId(iEventNumber+1);
+    evTag->SetPeriodNumber(esd->GetPeriodNumber());
+    evTag->SetOrbitNumber(esd->GetOrbitNumber());
+    evTag->SetBunchCrossNumber(esd->GetBunchCrossNumber());
     if (vertexIn) {
       evTag->SetVertexX(vertexIn->GetXv());
       evTag->SetVertexY(vertexIn->GetYv());
index 506e584..f500086 100644 (file)
@@ -28,7 +28,11 @@ ClassImp(AliEventTag)
 //______________________________________________________________________________
   AliEventTag::AliEventTag() : 
     TObject(),
-    fAliceEventId(0),
+    fPeriodNumber(0),
+    fOrbitNumber(0),
+    fBunchCrossNumber(0),
+    fFiredTriggerClasses(),
+    fEventType(0),
     fGUID(0),
     fPath(0),
     fsize(0),
@@ -91,18 +95,26 @@ ClassImp(AliEventTag)
     fMeanNeutralPt(-10.0),
     fMaxNeutralPt(-10.0),
     fEventPlaneAngle(-10.0),
-    fHBTRadii(-10.0)
+    fHBTRadii(-10.0),
+    fNumberOfFiredChipsLayer1(0),
+    fNumberOfFiredChipsLayer2(0),
+    fNumberOfSPDTracklets(0)
 {
   // AliEventTag default constructor
   for(Int_t i=0; i<2; i++)     fZDCEMEnergy[i] = -10.0;
-
+  for(Int_t i1 = 0; i1 < 64; i1++) fVZEROADC[i1] = 0;
+  for(Int_t i2 = 0; i2 < 64; i2++) fVZEROTime[i2] = kFALSE;
 }
 
 
 //___________________________________________________________________________
 AliEventTag::AliEventTag(const AliEventTag & evTag) :
   TObject(evTag),
-  fAliceEventId(evTag.fAliceEventId),
+  fPeriodNumber(evTag.fPeriodNumber),
+  fOrbitNumber(evTag.fOrbitNumber),
+  fBunchCrossNumber(evTag.fBunchCrossNumber),
+  fFiredTriggerClasses(evTag.fFiredTriggerClasses),
+  fEventType(evTag.fEventType),
   fGUID(evTag.fGUID),
   fPath(evTag.fPath),
   fsize(evTag.fsize),
@@ -165,10 +177,15 @@ AliEventTag::AliEventTag(const AliEventTag & evTag) :
   fMeanNeutralPt(evTag.fMeanNeutralPt),
   fMaxNeutralPt(evTag.fMaxNeutralPt),
   fEventPlaneAngle(evTag.fEventPlaneAngle),
-  fHBTRadii(evTag.fHBTRadii)
+  fHBTRadii(evTag.fHBTRadii),
+  fNumberOfFiredChipsLayer1(evTag.fNumberOfFiredChipsLayer1),
+  fNumberOfFiredChipsLayer2(evTag.fNumberOfFiredChipsLayer2),
+  fNumberOfSPDTracklets(evTag.fNumberOfSPDTracklets)
  {
   // EventTag copy constructor
   for(Int_t i=0; i<2; i++)     fZDCEMEnergy[i] = evTag.fZDCEMEnergy[i];
+  for(Int_t i1 = 0; i1 < 64; i1++) fVZEROADC[i1] = 0;
+  for(Int_t i2 = 0; i2 < 64; i2++) fVZEROTime[i2] = kFALSE;
 }
 
 //___________________________________________________________________________
@@ -177,7 +194,11 @@ AliEventTag & AliEventTag::operator=(const AliEventTag &evTag) {
   if (this != &evTag) {
     TObject::operator=(evTag);
     
-    SetEventId(evTag.GetEventId());
+    SetPeriodNumber(evTag.GetPeriodNumber());
+    SetOrbitNumber(evTag.GetOrbitNumber());
+    SetBunchCrossNumber(evTag.GetBunchCrossNumber());
+    SetFiredTriggerClasses(evTag.GetFiredTriggerClasses());
+    SetEventType(evTag.GetEventType());
     SetGUID(evTag.GetGUID());
     SetPath(evTag.GetPath());
     SetMD5(evTag.GetMD5());
@@ -241,6 +262,13 @@ AliEventTag & AliEventTag::operator=(const AliEventTag &evTag) {
     SetNeutralMaxPt(evTag.GetNeutralMaxPt());
     SetEventPlaneAngle(evTag.GetEventPlaneAngle());
     SetHBTRadii(evTag.GetHBTRadii());
+    SetNumberOfFiredChipsLayer1(evTag.GetNumberOfFiredChipsLayer1());
+    SetNumberOfFiredChipsLayer2(evTag.GetNumberOfFiredChipsLayer2());
+    SetNumberOfSPDTracklets(evTag.GetNumberOfSPDTracklets());
+    for(Int_t i1 = 0; i1 < 64; i1++) 
+      SetVZEROADC(i1,evTag.GetVZEROADC(i1));
+    for(Int_t i2 = 0; i2 < 64; i2++) 
+      SetVZEROTime(i2,evTag.GetVZEROTime(i2));
   }
   return *this;
 }
index 2c756bd..678a359 100644 (file)
@@ -26,7 +26,13 @@ class AliEventTag : public TObject {
   AliEventTag &operator=(const AliEventTag &rhs);
   
   //____________________________________________________//
-  void SetEventId(Int_t Pid) {fAliceEventId = Pid;}
+  void SetPeriodNumber(UInt_t n) {fPeriodNumber = n;}
+  void SetOrbitNumber(UInt_t n) {fOrbitNumber = n;}
+  void SetBunchCrossNumber(UShort_t n) {fBunchCrossNumber = n;}
+
+  void SetFiredTriggerClasses(TString names) {fFiredTriggerClasses = names;}
+  void SetEventType(UInt_t ntype) {fEventType = ntype;}
+
   void SetGUID(TString Pid) {fGUID = Pid;}
   void SetPath(TString Pid) {fPath = Pid;}
   void SetMD5(TString Pid) {fmd5 = Pid;}
@@ -93,8 +99,22 @@ class AliEventTag : public TObject {
   void SetEventPlaneAngle(Float_t f) {fEventPlaneAngle = f;}
   void SetHBTRadii(Float_t f) {fHBTRadii = f;}
 
+  //First physics
+  void SetNumberOfFiredChipsLayer1(Int_t n) {fNumberOfFiredChipsLayer1 = n;}
+  void SetNumberOfFiredChipsLayer2(Int_t n) {fNumberOfFiredChipsLayer2 = n;}
+  void SetNumberOfSPDTracklets(Int_t n) {fNumberOfSPDTracklets = n;}
+
+  void SetVZEROADC(Int_t n, UShort_t adc) {fVZEROADC[n] = adc;}
+  void SetVZEROTime(Int_t n, Bool_t time) {fVZEROTime[n] = time;}
+
   //____________________________________________________//
-  Int_t       GetEventId() const {return fAliceEventId;}
+  UInt_t GetPeriodNumber() const {return fPeriodNumber;}
+  UInt_t GetOrbitNumber() const {return fOrbitNumber;}
+  UShort_t GetBunchCrossNumber() const {return fBunchCrossNumber;}
+
+  TString GetFiredTriggerClasses() const {return fFiredTriggerClasses;}
+  UInt_t GetEventType() const {return fEventType;}
+
   const char *GetGUID() const {return fGUID.Data();}
   const char *GetPath() const {return fPath.Data();}
   const char *GetMD5() const {return fmd5.Data();}
@@ -160,9 +180,22 @@ class AliEventTag : public TObject {
   Float_t     GetEventPlaneAngle() const {return fEventPlaneAngle;}
   Float_t     GetHBTRadii() const {return fHBTRadii;}
 
+  //First physics
+  Int_t GetNumberOfFiredChipsLayer1() const {return fNumberOfFiredChipsLayer1;}
+  Int_t GetNumberOfFiredChipsLayer2() const {return fNumberOfFiredChipsLayer2;}
+  Int_t GetNumberOfSPDTracklets() const {return fNumberOfSPDTracklets;}
+
+  UShort_t GetVZEROADC(Int_t n) const {return fVZEROADC[n];}
+  UShort_t GetVZEROTime(Int_t n) const {return fVZEROTime[n];}
+
   //____________________________________________________//
  private:
-  Int_t     fAliceEventId;                  //The event id
+  UInt_t    fPeriodNumber;                  //The period number
+  UInt_t    fOrbitNumber;                   //The orbit number
+  UShort_t  fBunchCrossNumber;              //The BC number
+  TString   fFiredTriggerClasses;           //List of the fired trigger class names
+  UInt_t    fEventType;                     //event type == 7 ==> PHYSICS_EVENT
+
   TString   fGUID;                         //The unique identifier of the file
   TString   fPath;                         //The file's path (local storage)
   Long64_t  fsize;                          //the size of the file
@@ -228,7 +261,15 @@ class AliEventTag : public TObject {
   Float_t   fEventPlaneAngle;              //event plane info
   Float_t   fHBTRadii;                      //HBT info
   
-  ClassDef(AliEventTag,10)  //(ClassName, ClassVersion)
+  //First physics
+  Int_t     fNumberOfFiredChipsLayer1;      //number of fired chips - layer 1
+  Int_t     fNumberOfFiredChipsLayer2;      //number of fired chips - layer 2
+  Int_t     fNumberOfSPDTracklets;          //number of SPD tracklets
+
+  UShort_t  fVZEROADC[64];                  //V0 raw adc values
+  Bool_t    fVZEROTime[64];                 //Flag if V0 TDC time measured
+
+  ClassDef(AliEventTag,11)  //(ClassName, ClassVersion)
     };
 //___________________________________________________________________________
 
index fb66682..48029e5 100644 (file)
@@ -31,7 +31,12 @@ ClassImp(AliEventTagCuts)
 //___________________________________________________________________________
 AliEventTagCuts::AliEventTagCuts() :
   TObject(),
-  
+  fPeriodNumberMin(0), fPeriodNumberMax(0xFFFFFFFF), fPeriodNumberFlag(kFALSE),
+  fOrbitNumberMin(0), fOrbitNumberMax(0xFFFFFFFF), fOrbitNumberFlag(kFALSE),
+  fBunchCrossNumberMin(0), fBunchCrossNumberMax(0xFFFFFFFF), 
+  fBunchCrossNumberFlag(kFALSE),
+  fEventType(7), fEventTypeFlag(kFALSE),
+
   fNParticipantsMin(-1), fNParticipantsMax(10000),
   fNParticipantsFlag(kFALSE),
   fImpactParamMin(-1.0), fImpactParamMax(1000.0),
@@ -152,7 +157,14 @@ AliEventTagCuts::AliEventTagCuts() :
   fEventPlaneAngleMin(-10000000.0), fEventPlaneAngleMax(10000000.0), 
   fEventPlaneAngleFlag(kFALSE),
   fHBTRadiiMin(-1.0), fHBTRadiiMax(100000.0), 
-  fHBTRadiiFlag(kFALSE)
+  fHBTRadiiFlag(kFALSE),
+
+  fNumberOfFiredChipsLayer1Min(0), fNumberOfFiredChipsLayer1Max(100000),
+  fNumberOfFiredChipsLayer1Flag(kFALSE),
+  fNumberOfFiredChipsLayer2Min(0), fNumberOfFiredChipsLayer2Max(100000),
+  fNumberOfFiredChipsLayer2Flag(kFALSE),
+  fNumberOfSPDTrackletsMin(0), fNumberOfSPDTrackletsMax(100000),
+  fNumberOfSPDTrackletsFlag(kFALSE)
 {
   //Default constructor which calls the Reset method.
   Reset();
@@ -166,6 +178,12 @@ AliEventTagCuts::~AliEventTagCuts() {
 //___________________________________________________________________________
 void AliEventTagCuts::Reset() {
   //Sets dummy values to every private member.
+  fPeriodNumberFlag = kFALSE;
+  fOrbitNumberFlag = kFALSE;
+  fBunchCrossNumberFlag = kFALSE;
+  
+  fEventTypeFlag = kFALSE;
+
   fNParticipantsFlag = kFALSE;
   fImpactParamFlag = kFALSE;
 
@@ -229,7 +247,17 @@ void AliEventTagCuts::Reset() {
   fTopNeutralPtMinFlag = kFALSE;
   fEventPlaneAngleFlag = kFALSE;
   fHBTRadiiFlag = kFALSE;
-  
+
+  fNumberOfFiredChipsLayer1Flag = kFALSE;
+  fNumberOfFiredChipsLayer2Flag = kFALSE;
+  fNumberOfSPDTrackletsFlag = kFALSE;
+
+  fPeriodNumberMin = 0, fPeriodNumberMax = 0xFFFFFFFF;
+  fOrbitNumberMin = 0, fOrbitNumberMax = 0xFFFFFFFF;
+  fBunchCrossNumberMin = 0, fBunchCrossNumberMax = 0xFFFFFFFF;
+
+  fEventType = 7;
+
   fVxMin = -1000.0; fVxMax = 1000.0; 
   fVyMin = -1000.0; fVyMax = 1000.0;  
   fVzMin = -1000.0; fVzMax = 1000.0;
@@ -292,6 +320,72 @@ void AliEventTagCuts::Reset() {
   fTopNeutralPtMin = -1.0; 
   fEventPlaneAngleMin = -10000000.0; fEventPlaneAngleMax = 10000000.0; 
   fHBTRadiiMin = -1.0; fHBTRadiiMax = 100000.0; 
+
+  fNumberOfFiredChipsLayer1Min = 0, fNumberOfFiredChipsLayer1Max = 100000;
+  fNumberOfFiredChipsLayer2Min = 0, fNumberOfFiredChipsLayer2Max = 100000;
+  fNumberOfSPDTrackletsMin = 0, fNumberOfSPDTrackletsMax = 100000;
+}
+
+//___________________________________________________________________________
+void AliEventTagCuts::SetEventType(UInt_t ntype) {
+  //Sets the event type
+  //and the corresponding flag to kTRUE if the cut is used.
+  fEventType = ntype;
+  fEventTypeFlag = kTRUE;
+}
+
+//___________________________________________________________________________
+void AliEventTagCuts::SetNumberOfFiredChipsLayer1Range(Int_t low, Int_t high) {
+  //Sets the range for the number of fired chips of layer 1
+  //and the corresponding flag to kTRUE if the cut is used.
+  fNumberOfFiredChipsLayer1Min = low;
+  fNumberOfFiredChipsLayer1Max = high;
+  fNumberOfFiredChipsLayer1Flag = kTRUE;
+}
+
+//___________________________________________________________________________
+void AliEventTagCuts::SetNumberOfFiredChipsLayer2Range(Int_t low, Int_t high) {
+  //Sets the range for the number of fired chips of layer 2
+  //and the corresponding flag to kTRUE if the cut is used.
+  fNumberOfFiredChipsLayer2Min = low;
+  fNumberOfFiredChipsLayer2Max = high;
+  fNumberOfFiredChipsLayer2Flag = kTRUE;
+}
+
+//___________________________________________________________________________
+void AliEventTagCuts::SetNumberOfSPDTrackletsRange(Int_t low, Int_t high) {
+  //Sets the range for the number of fired chips of layer 1
+  //and the corresponding flag to kTRUE if the cut is used.
+  fNumberOfSPDTrackletsMin = low;
+  fNumberOfSPDTrackletsMax = high;
+  fNumberOfSPDTrackletsFlag = kTRUE;
+}
+
+//___________________________________________________________________________
+void AliEventTagCuts::SetPeriodNumberRange(UInt_t low, UInt_t high) {
+  //Sets the period number range
+  //and the corresponding flag to kTRUE if the cut is used.
+  fPeriodNumberMin = low;
+  fPeriodNumberMax = high; 
+  fPeriodNumberFlag = kTRUE;
+}
+
+//___________________________________________________________________________
+void AliEventTagCuts::SetOrbitNumberRange(UInt_t low, UInt_t high) {
+  //Sets the orbit number range
+  //and the corresponding flag to kTRUE if the cut is used.
+  fOrbitNumberMin = low;
+  fOrbitNumberMax = high; 
+  fOrbitNumberFlag = kTRUE;
+}
+
+//___________________________________________________________________________
+void AliEventTagCuts::SetBunchCrossNumberRange(UShort_t low, UShort_t high) {
+  //Sets the BC number range
+  //and the corresponding flag to kTRUE if the cut is used.
+  fBunchCrossNumberMin = low;
+  fBunchCrossNumberMax = high; 
+  fBunchCrossNumberFlag = kTRUE;
 }
 
 //___________________________________________________________________________
@@ -808,6 +902,35 @@ void AliEventTagCuts::SetHBTRadiiRange(Float_t low, Float_t high) {
 //___________________________________________________________________________
 Bool_t AliEventTagCuts::IsAccepted(AliEventTag *EvTag) const {
   //Returns true if the event is accepted otherwise false.
+  if(fEventTypeFlag)
+    if(EvTag->GetEventType() != fEventType)
+      return kFALSE;
+  
+  if(fNumberOfFiredChipsLayer1Flag)
+    if((EvTag->GetNumberOfFiredChipsLayer1() < fNumberOfFiredChipsLayer1Min) || (EvTag->GetNumberOfFiredChipsLayer1() > fNumberOfFiredChipsLayer1Max))
+      return kFALSE;
+
+  if(fNumberOfFiredChipsLayer2Flag)
+    if((EvTag->GetNumberOfFiredChipsLayer2() < fNumberOfFiredChipsLayer2Min) || (EvTag->GetNumberOfFiredChipsLayer2() > fNumberOfFiredChipsLayer2Max))
+      return kFALSE;
+
+  if(fNumberOfSPDTrackletsFlag)
+    if((EvTag->GetNumberOfSPDTracklets() < fNumberOfSPDTrackletsMin) || (EvTag->GetNumberOfSPDTracklets() > fNumberOfSPDTrackletsMax))
+      return kFALSE;
+
+  if(fPeriodNumberFlag)
+    if((EvTag->GetPeriodNumber() < fPeriodNumberMin) || (EvTag->GetPeriodNumber() > fPeriodNumberMax))
+      return kFALSE;
+
+  if(fOrbitNumberFlag)
+    if((EvTag->GetOrbitNumber() < fOrbitNumberMin) || (EvTag->GetOrbitNumber() > fOrbitNumberMax))
+      return kFALSE;
+
+  if(fBunchCrossNumberFlag)
+    if((EvTag->GetBunchCrossNumber() < fBunchCrossNumberMin) || (EvTag->GetBunchCrossNumber() > fBunchCrossNumberMax))
+      return kFALSE;
+
+
   if(fVzFlag)
     if((EvTag->GetVertexZ() < fVzMin) || (EvTag->GetVertexZ() > fVzMax))
       return kFALSE;
@@ -836,10 +959,10 @@ Bool_t AliEventTagCuts::IsAccepted(AliEventTag *EvTag) const {
     if((EvTag->GetVertexZError() < fPrimaryVertexZErrorMin) || (EvTag->GetVertexZError() > fPrimaryVertexZErrorMax))
       return kFALSE; 
   if(fTriggerMaskFlag)
-    if((EvTag->GetTriggerMask() != fTriggerMask))
+    if((EvTag->GetTriggerMask() & fTriggerMask) != fTriggerMask)
       return kFALSE; 
   if(fTriggerClusterFlag)
-    if((EvTag->GetTriggerMask() != fTriggerMask))
+    if((EvTag->GetTriggerCluster() != fTriggerCluster))
       return kFALSE; 
 
   if(fZDCNeutron1EnergyFlag)
index e2f9ff7..f2f2fc3 100644 (file)
@@ -23,7 +23,13 @@ class AliEventTagCuts : public TObject {
   ~AliEventTagCuts();
   void Reset();
   
- //____________________________________________________//
+  //____________________________________________________//
+  void SetPeriodNumberRange(UInt_t n1, UInt_t n2);
+  void SetOrbitNumberRange(UInt_t n1, UInt_t n2);
+  void SetBunchCrossNumberRange(UShort_t n1, UShort_t n2);
+
+  void SetEventType(UInt_t ntype);
+
   void SetNParticipantsRange(Int_t low, Int_t high);
   void SetImpactParamRange(Float_t low, Float_t high);
 
@@ -89,10 +95,27 @@ class AliEventTagCuts : public TObject {
   void SetEventPlaneAngleRange(Float_t low, Float_t high);
   void SetHBTRadiiRange(Float_t low, Float_t high);
  
+  //First physics
+  void SetNumberOfFiredChipsLayer1Range(Int_t low, Int_t high);
+  void SetNumberOfFiredChipsLayer2Range(Int_t low, Int_t high);
+  void SetNumberOfSPDTrackletsRange(Int_t low, Int_t high);
+
   Bool_t IsAccepted(AliEventTag *EvTag) const;
 
   //____________________________________________________//
  private:
+  UInt_t fPeriodNumberMin, fPeriodNumberMax;                    //min/max value of the period number
+  Bool_t fPeriodNumberFlag;                                   // Shows whether this cut is used or not
+
+  UInt_t fOrbitNumberMin, fOrbitNumberMax;                    //min/max value of the orbit number
+  Bool_t fOrbitNumberFlag;                                   // Shows whether this cut is used or not
+
+  UShort_t fBunchCrossNumberMin, fBunchCrossNumberMax;                    //min/max value of the bunch crossing number
+  Bool_t fBunchCrossNumberFlag;                                   // Shows whether this cut is used or not
+
+  UInt_t fEventType;                                          //event type == 7 ==> PHYSICS_EVENT
+  Bool_t fEventTypeFlag;                                      // Shows whether this cut is used or not
+
   Int_t fNParticipantsMin, fNParticipantsMax;                 // # participants range
   Bool_t fNParticipantsFlag;                                  // Shows whether this cut is used or not
   Float_t fImpactParamMin, fImpactParamMax;                   // Impact parameter range
@@ -217,7 +240,15 @@ class AliEventTagCuts : public TObject {
   Float_t fHBTRadiiMin, fHBTRadiiMax;                         // HBT info
   Bool_t fHBTRadiiFlag;                                       // Shows whether this cut is used or not
 
-  ClassDef(AliEventTagCuts, 2)
+  Int_t fNumberOfFiredChipsLayer1Min, fNumberOfFiredChipsLayer1Max; //min/max number of fired chips - layer 1
+  Bool_t fNumberOfFiredChipsLayer1Flag;                       // Shows whether this cut is used or not
+  Int_t fNumberOfFiredChipsLayer2Min, fNumberOfFiredChipsLayer2Max; //min/max number of fired chips - layer 2
+  Bool_t fNumberOfFiredChipsLayer2Flag;                       // Shows whether this cut is used or not
+  Int_t fNumberOfSPDTrackletsMin, fNumberOfSPDTrackletsMax;   //min/max number of SPD tracklets
+  Bool_t fNumberOfSPDTrackletsFlag;                          // Shows whether this cut is used or not
+
+
+  ClassDef(AliEventTagCuts, 3)
 };
 
 #endif