rewrite of cut classes
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Aug 2010 09:51:47 +0000 (09:51 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Aug 2010 09:51:47 +0000 (09:51 +0000)
14 files changed:
PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx
PWG2/FLOW/AliFlowCommon/AliFlowEventStar.cxx
PWG2/FLOW/AliFlowCommon/AliFlowEventStar.h
PWG2/FLOW/AliFlowCommon/AliFlowTrackSimple.h
PWG2/FLOW/AliFlowCommon/AliFlowTrackSimpleCuts.cxx
PWG2/FLOW/AliFlowCommon/AliFlowTrackSimpleCuts.h
PWG2/FLOW/AliFlowCommon/AliStarEventCuts.cxx [new file with mode: 0644]
PWG2/FLOW/AliFlowCommon/AliStarEventCuts.h [new file with mode: 0644]
PWG2/FLOW/AliFlowCommon/AliStarTrack.h
PWG2/FLOW/AliFlowCommon/AliStarTrackCuts.cxx [new file with mode: 0644]
PWG2/FLOW/AliFlowCommon/AliStarTrackCuts.h [new file with mode: 0644]
PWG2/FLOW/macros/readStarEventsSimple.C
PWG2/PWG2flowCommonLinkDef.h
PWG2/libPWG2flowCommon.pkg

index 8d956fc..30d7c03 100644 (file)
@@ -436,6 +436,8 @@ void AliFlowEventSimple::Print(Option_t *option) const
   printf( "Class.Print Name = %s, #tracks= %d, Number of RPs= %d, MC EventPlaneAngle= %f\n",
           GetName(),fNumberOfTracks, fNumberOfRPs, fMCReactionPlaneAngle );
 
+  TString optionstr(option);
+  if (!optionstr.Contains("all")) return;
   if (fTrackCollection)
   {
     fTrackCollection->Print(option);
index b3536d0..1886a87 100644 (file)
@@ -23,6 +23,7 @@
 #include "AliFlowEventSimple.h"
 #include "AliFlowTrackSimple.h"
 #include "AliStarTrack.h"
+#include "AliStarTrackCuts.h"
 #include "AliStarEvent.h"
 #include "AliFlowEventStar.h"
 
@@ -45,14 +46,17 @@ AliFlowEventStar::AliFlowEventStar(const AliFlowEventStar& event):
 }
 
 //-----------------------------------------------------------------------
-AliFlowEventStar& AliFlowEventStar::operator=(const AliFlowEventStar& event)
+AliFlowEventStar& AliFlowEventStar::operator=( const AliFlowEventStar& event )
 {
   //assignment operator
   AliFlowEventSimple::operator=(event);
   return *this;
 }
 
-AliFlowEventStar::AliFlowEventStar( const AliStarEvent* starevent ):
+//-----------------------------------------------------------------------
+AliFlowEventStar::AliFlowEventStar( const AliStarEvent* starevent,
+                                    const AliStarTrackCuts* rpCuts,
+                                    const AliStarTrackCuts* poiCuts ):
   AliFlowEventSimple(starevent->GetNumberOfTracks())
 {
   //construct from a star event
@@ -66,6 +70,16 @@ AliFlowEventStar::AliFlowEventStar( const AliStarEvent* starevent ):
     flowtrack->SetEta(startrack->GetEta());
     flowtrack->SetPt(startrack->GetPt());
     flowtrack->SetCharge(startrack->GetCharge());
+    if (rpCuts)
+    {
+      Bool_t pass = rpCuts->PassesCuts(startrack);
+      flowtrack->TagRP(pass); //tag RPs
+      if (pass) fNumberOfRPs++;
+    }
+    if (poiCuts)
+    {
+      flowtrack->TagPOI(poiCuts->PassesCuts(startrack)); //tag POIs
+    }
     AddTrack(flowtrack);
   }
 }
index 98acd46..9478513 100644 (file)
 #include "AliFlowEventSimple.h"
 
 class AliStarEvent;
+class AliStarTrackCuts;
 
 class AliFlowEventStar: public AliFlowEventSimple {
 
  public:
   AliFlowEventStar();
   AliFlowEventStar( const AliFlowEventStar& event );
-  AliFlowEventStar( const AliStarEvent* event );
-  AliFlowEventStar& operator=(const AliFlowEventStar& event);
+  AliFlowEventStar( const AliStarEvent* event,
+                    const AliStarTrackCuts* rpCuts=NULL,
+                    const AliStarTrackCuts* poiCuts=NULL);
+  AliFlowEventStar& operator=( const AliFlowEventStar& event );
   virtual  ~AliFlowEventStar() {}
 
   ClassDef(AliFlowEventStar,1)
index a954b0d..0c8d1f8 100644 (file)
@@ -33,6 +33,7 @@ public:
   Double_t Phi() const;
   Double_t Weight() const; 
   Int_t Charge() const;
+  Int_t PID() const {return 0;}
   
 
   Bool_t InRPSelection() const; 
@@ -47,6 +48,8 @@ public:
   void SetCharge(Int_t charge);
   void SetForRPSelection(Bool_t b=kTRUE); 
   void SetForPOISelection(Bool_t b=kTRUE); 
+  void TagRP(Bool_t b=kTRUE) {SetForRPSelection(b);} 
+  void TagPOI(Bool_t b=kTRUE) {SetForPOISelection(b);} 
   void SetForSubevent(Int_t i); 
   void ResetFlowTags() {fFlowBits.ResetAllBits();}
   void ResetSubEventTags() {fSubEventBits.ResetAllBits();}
index fd6ce88..6251012 100644 (file)
@@ -22,6 +22,8 @@
 // author: N. van der Kolk (kolk@nikhef.nl)
 // mods: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
 
+#include <limits.h>
+#include <float.h>
 #include "TNamed.h"
 #include "TParticle.h"
 #include "TParticlePDG.h"
@@ -32,85 +34,93 @@ ClassImp(AliFlowTrackSimpleCuts)
 
 //-----------------------------------------------------------------------
 AliFlowTrackSimpleCuts::AliFlowTrackSimpleCuts():
-  fPtMax(0.),
-  fPtMin(0.),
-  fEtaMax(0.),
-  fEtaMin(0.),
-  fPhiMax(0.),
-  fPhiMin(0.),
+  TNamed(),
+  fCutPt(kFALSE),
+  fPtMax(FLT_MAX),
+  fPtMin(FLT_MIN),
+  fCutEta(kFALSE),
+  fEtaMax(FLT_MAX),
+  fEtaMin(FLT_MIN),
+  fCutPhi(kFALSE),
+  fPhiMax(FLT_MAX),
+  fPhiMin(FLT_MIN),
+  fCutPID(kFALSE),
   fPID(0),
-  fCharge(fgkIgnoreCharge)
+  fCutCharge(kFALSE),
+  fCharge(0)
 {
   //constructor 
-  
 }
 
-//-----------------------------------------------------------------------
-AliFlowTrackSimpleCuts::AliFlowTrackSimpleCuts(const AliFlowTrackSimpleCuts& someCuts):
-  TNamed(),
-  fPtMax(someCuts.fPtMax),
-  fPtMin(someCuts.fPtMin),
-  fEtaMax(someCuts.fEtaMax),
-  fEtaMin(someCuts.fEtaMin),
-  fPhiMax(someCuts.fPhiMax),
-  fPhiMin(someCuts.fPhiMin),
-  fPID(someCuts.fPID),
-  fCharge(someCuts.fCharge)
-{
-  //copy constructor 
-}
-
-//-----------------------------------------------------------------------
-AliFlowTrackSimpleCuts& AliFlowTrackSimpleCuts::operator=(const AliFlowTrackSimpleCuts& someCuts)
-{
-  fPtMax  = someCuts.fPtMax;
-  fPtMin  = someCuts.fPtMin;
-  fEtaMax = someCuts.fEtaMax;
-  fEtaMin = someCuts.fEtaMin;
-  fPhiMax = someCuts.fPhiMax;
-  fPhiMin = someCuts.fPhiMin;
-  fPID    = someCuts.fPID;
-  fCharge = someCuts.fCharge;
-
-  return *this;
-
-}
-
-//----------------------------------------------------------------------- 
-AliFlowTrackSimpleCuts::~AliFlowTrackSimpleCuts()
-{
-  //destructor
-  
-}
+////-----------------------------------------------------------------------
+//AliFlowTrackSimpleCuts::AliFlowTrackSimpleCuts(const AliFlowTrackSimpleCuts& someCuts):
+//  TNamed(),
+//  fCutPt(someCuts.fCutPt),
+//  fPtMax(someCuts.fPtMax),
+//  fPtMin(someCuts.fPtMin),
+//  fCutEta(someCuts.fCutEta),
+//  fEtaMax(someCuts.fEtaMax),
+//  fEtaMin(someCuts.fEtaMin),
+//  fCutPhi(someCuts.fCutPhi),
+//  fPhiMax(someCuts.fPhiMax),
+//  fPhiMin(someCuts.fPhiMin),
+//  fCutPID(someCuts.fCutPID),
+//  fPID(someCuts.fPID),
+//  fCutCharge(someCuts.fCutCharge),
+//  fCharge(someCuts.fCharge)
+//{
+//  //copy constructor 
+//}
+//
+////-----------------------------------------------------------------------
+//AliFlowTrackSimpleCuts& AliFlowTrackSimpleCuts::operator=(const AliFlowTrackSimpleCuts& someCuts)
+//{
+//  TNamed::operator=(someCuts);
+//  fCutPt  = someCuts.fCutPt;
+//  fPtMax  = someCuts.fPtMax;
+//  fPtMin  = someCuts.fPtMin;
+//  fCutEta = someCuts.fCutEta;
+//  fEtaMax = someCuts.fEtaMax;
+//  fEtaMin = someCuts.fEtaMin;
+//  fCutPhi = someCuts.fCutPhi;
+//  fPhiMax = someCuts.fPhiMax;
+//  fPhiMin = someCuts.fPhiMin;
+//  fCutPID = someCuts.fCutPID;
+//  fPID    = someCuts.fPID;
+//  fCutCharge = someCuts.fCutCharge;
+//  fCharge = someCuts.fCharge;
+//
+//  return *this;
+//}
 
 //----------------------------------------------------------------------- 
 Bool_t AliFlowTrackSimpleCuts::PassesCuts(const AliFlowTrackSimple *track) const
 {
   //simple method to check if the simple track passes the simple cuts
-  if(track->Pt() >= fPtMin && track->Pt() < fPtMax &&
-     track->Eta() >= fEtaMin && track->Eta() < fEtaMax &&
-     track->Phi() >= fPhiMin && track->Phi() < fPhiMax &&
-     (track->Charge()==fCharge || fCharge==fgkIgnoreCharge))
-    { return kTRUE; } 
-  else
-    { return kFALSE; }  
+  if(fCutPt) if (track->Pt() < fPtMin || track->Pt() >= fPtMax ) return kFALSE;
+  if(fCutEta) if (track->Eta() < fEtaMin || track->Eta() >= fEtaMax ) return kFALSE;
+  if(fCutPhi) if (track->Phi() < fPhiMin || track->Phi() >= fPhiMax ) return kFALSE;
+  if(fCutPID) if (track->PID() != fPID) return kFALSE;
+  if(fCutCharge) if (track->Charge() != fCharge) return kFALSE;
+  return kTRUE;
 }
 
 //----------------------------------------------------------------------- 
 Bool_t AliFlowTrackSimpleCuts::PassesCuts(TParticle* track) const
 {
   //simple method to check if the simple track passes the simple cuts
-  Bool_t result = (track->Pt() >= fPtMin && track->Pt() < fPtMax &&
-                   track->Eta() >= fEtaMin && track->Eta() < fEtaMax &&
-                   track->Phi() >= fPhiMin && track->Phi() < fPhiMax);
+  if(fCutPt) if (track->Pt() < fPtMin || track->Pt() >= fPtMax ) return kFALSE;
+  if(fCutEta) if (track->Eta() < fEtaMin || track->Eta() >= fEtaMax ) return kFALSE;
+  if(fCutPhi) if (track->Phi() < fPhiMin || track->Phi() >= fPhiMax ) return kFALSE;
+  if(fCutPID) if (track->GetPdgCode() != fPID) return kFALSE;
 
   //getting the charge from a tparticle is expensive
   //only do it if neccesary
-  if (fCharge!=fgkIgnoreCharge) 
+  if (fCutCharge) 
   {
     TParticlePDG* ppdg = track->GetPDG();
     Int_t charge = TMath::Nint(ppdg->Charge()/3.0);
-    result = (charge==fCharge) && result;
+    return (charge==fCharge);
   }
-  return result;
+  return kTRUE;
 }
index e66068b..b022a1e 100644 (file)
@@ -20,19 +20,19 @@ class AliFlowTrackSimpleCuts : public TNamed {
 
  public:
   AliFlowTrackSimpleCuts();
-  AliFlowTrackSimpleCuts(const AliFlowTrackSimpleCuts& someCuts);
-  AliFlowTrackSimpleCuts& operator=(const AliFlowTrackSimpleCuts& someCuts);
-  virtual  ~AliFlowTrackSimpleCuts();
+  //AliFlowTrackSimpleCuts(const AliFlowTrackSimpleCuts& someCuts);
+  //AliFlowTrackSimpleCuts& operator=(const AliFlowTrackSimpleCuts& someCuts);
+  virtual  ~AliFlowTrackSimpleCuts() {}
   
   //setters
-  void SetPtMax(Double_t max)   {this->fPtMax = max; }
-  void SetPtMin(Double_t min)   {this->fPtMin = min; }
-  void SetEtaMax(Double_t max)  {this->fEtaMax = max; }
-  void SetEtaMin(Double_t min)  {this->fEtaMin = min; }
-  void SetPhiMax(Double_t max)  {this->fPhiMax = max; }
-  void SetPhiMin(Double_t min)  {this->fPhiMin = min; }
-  void SetPID(Int_t pid)        {this->fPID = pid; }
-  void SetCharge(Int_t c)       {this->fCharge = c; }
+  void SetPtMax(Double_t max)   {this->fPtMax = max; fCutPt=kTRUE; }
+  void SetPtMin(Double_t min)   {this->fPtMin = min; fCutPt=kTRUE;  }
+  void SetEtaMax(Double_t max)  {this->fEtaMax = max; fCutEta=kTRUE; }
+  void SetEtaMin(Double_t min)  {this->fEtaMin = min; fCutEta=kTRUE; }
+  void SetPhiMax(Double_t max)  {this->fPhiMax = max; fCutPhi=kTRUE; }
+  void SetPhiMin(Double_t min)  {this->fPhiMin = min; fCutPhi=kTRUE; }
+  void SetPID(Int_t pid)        {this->fPID = pid; fCutPID=kTRUE; }
+  void SetCharge(Int_t c)       {this->fCharge = c; fCutCharge=kTRUE; }
   
   //getters
   Double_t GetPtMax() const     {return this->fPtMax; }
@@ -49,17 +49,20 @@ class AliFlowTrackSimpleCuts : public TNamed {
   Bool_t PassesCuts(TParticle* p) const;
 
  private:
+  Bool_t   fCutPt;
   Double_t fPtMax;
   Double_t fPtMin;
+  Bool_t   fCutEta;
   Double_t fEtaMax;
   Double_t fEtaMin;
+  Bool_t   fCutPhi;
   Double_t fPhiMax;
   Double_t fPhiMin;
+  Bool_t   fCutPID;
   Int_t    fPID;
+  Bool_t   fCutCharge;
   Int_t    fCharge;
 
-  static const Int_t fgkIgnoreCharge=999;
-
   ClassDef(AliFlowTrackSimpleCuts,1)
 };
 
diff --git a/PWG2/FLOW/AliFlowCommon/AliStarEventCuts.cxx b/PWG2/FLOW/AliFlowCommon/AliStarEventCuts.cxx
new file mode 100644 (file)
index 0000000..d560392
--- /dev/null
@@ -0,0 +1,120 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * 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$ */ 
+
+// AliStarEventCuts:
+// An event cut class for the AliStarEvent
+//
+// origin: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
+
+#include "TNamed.h"
+#include "AliStarEvent.h"
+#include "AliStarEventCuts.h"
+
+ClassImp(AliStarEventCuts)
+
+//-----------------------------------------------------------------------
+AliStarEventCuts::AliStarEventCuts():
+  TNamed(),
+  fCutRunID(kFALSE),
+  fRunIDMax(INT_MAX),
+  fRunIDMin(INT_MIN),
+  fCutEventNumber(kFALSE),
+  fEventNumberMax(INT_MAX),
+  fEventNumberMin(INT_MIN),
+  fCutVtxX(kFALSE),
+  fVtxXMax(FLT_MAX),
+  fVtxXMin(FLT_MIN),
+  fCutVtxY(kFALSE),
+  fVtxYMax(FLT_MAX),
+  fVtxYMin(FLT_MIN),
+  fCutVtxZ(kFALSE),
+  fVtxZMax(FLT_MAX),
+  fVtxZMin(FLT_MIN),
+  fCutBField(kFALSE),
+  fBFieldMax(FLT_MAX),
+  fBFieldMin(FLT_MIN),
+  fCutRefMult(kFALSE),
+  fRefMultMax(INT_MAX),
+  fRefMultMin(INT_MIN),
+  fCutCentralityID(kFALSE),
+  fCentralityIDMax(INT_MAX),
+  fCentralityIDMin(INT_MIN),
+  fCutNumberOfPrimaryTracks(kFALSE),
+  fNumberOfPrimaryTracksMax(INT_MAX),
+  fNumberOfPrimaryTracksMin(INT_MIN),
+  fCutNumberOfTracks(kFALSE),
+  fNumberOfTracksMax(INT_MAX),
+  fNumberOfTracksMin(INT_MIN)
+{
+  //constructor 
+}
+
+////-----------------------------------------------------------------------
+//AliStarEventCuts::AliStarEventCuts(const AliStarEventCuts& someCuts):
+//  TNamed(),
+//  fCutID(that.fCutID),
+//  fIDMax(that.fIDMax),
+//  fIDMin(that.fIDMin),
+//{
+//  //copy constructor 
+//}
+//
+////-----------------------------------------------------------------------
+//AliStarEventCuts& AliStarEventCuts::operator=(const AliStarEventCuts& someCuts)
+//{
+//  //assignment
+//  fCutID=that.fCutID;
+//  fIDMax=that.fIDMax;
+//  fIDMin=that.fIDMin;
+//
+//  return *this;
+//}
+
+//----------------------------------------------------------------------- 
+Bool_t AliStarEventCuts::PassesCuts(const AliStarEvent *event) const
+{
+  ///check if event passes cuts
+  if(fCutRunID) if (event->GetRunID() < fRunIDMin || event->GetRunID() >= fRunIDMax ) return kFALSE;
+  if(fCutEventNumber) if (event->GetEventNumber() < fEventNumberMin || event->GetEventNumber() >= fEventNumberMax ) return kFALSE;
+  if(fCutVtxX) if (event->GetVtxX() < fVtxXMin || event->GetVtxX() >= fVtxXMax ) return kFALSE;
+  if(fCutVtxY) if (event->GetVtxY() < fVtxYMin || event->GetVtxY() >= fVtxYMax ) return kFALSE;
+  if(fCutVtxZ) if (event->GetVtxZ() < fVtxZMin || event->GetVtxZ() >= fVtxZMax ) return kFALSE;
+  if(fCutBField) if (event->GetBField() < fBFieldMin || event->GetBField() >= fBFieldMax ) return kFALSE;
+  if(fCutRefMult) if (event->GetRefMult() < fRefMultMin || event->GetRefMult() >= fRefMultMax ) return kFALSE;
+  if(fCutCentralityID) if (event->GetCentralityID() < fCentralityIDMin || event->GetCentralityID() >= fCentralityIDMax ) return kFALSE;
+  if(fCutNumberOfPrimaryTracks) if (event->GetNumberOfPrimaryTracks() < fNumberOfPrimaryTracksMin || event->GetNumberOfPrimaryTracks() >= fNumberOfPrimaryTracksMax ) return kFALSE;
+  if(fCutNumberOfTracks) if (event->GetNumberOfTracks() < fNumberOfTracksMin || event->GetNumberOfTracks() >= fNumberOfTracksMax ) return kFALSE;
+  return kTRUE;
+}
+
+//----------------------------------------------------------------------- 
+AliStarEventCuts* AliStarEventCuts::StandardCuts()
+{
+  //make a set of standard event cuts, caller becomes owner
+  AliStarEventCuts* cuts = new AliStarEventCuts();
+  cuts->SetVtxXMin(-1.0);
+  cuts->SetVtxXMax(1.0);
+  cuts->SetVtxYMin(-1.0);
+  cuts->SetVtxYMax(1.0);
+  cuts->SetVtxZMin(-30.0);
+  cuts->SetVtxZMax(30.0);
+  cuts->SetRefMultMin(10);
+  cuts->SetRefMultMax(1000);
+  cuts->SetNumberOfPrimaryTracksMin(0);
+  cuts->SetNumberOfPrimaryTracksMax(3000);
+  return cuts;
+}
diff --git a/PWG2/FLOW/AliFlowCommon/AliStarEventCuts.h b/PWG2/FLOW/AliFlowCommon/AliStarEventCuts.h
new file mode 100644 (file)
index 0000000..59dd7f7
--- /dev/null
@@ -0,0 +1,107 @@
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. */
+/* See cxx source for full Copyright notice */
+/* $Id$ */
+
+// AliStarEventCuts:
+// An event cut class for AliStarEvent
+// origin: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
+
+#ifndef ALISTAREVENTCUTS_H
+#define ALISTAREVENTCUTS_H
+
+#include <float.h>
+#include "TNamed.h"
+
+class AliStarTrack;
+
+class AliStarEventCuts : public TNamed {
+
+ public:
+  AliStarEventCuts();
+  //AliStarEventCuts(const AliStarEventCuts& someCuts);
+  //AliStarEventCuts& operator=(const AliStarEventCuts& someCuts);
+  virtual  ~AliStarEventCuts() {}
+  
+  Bool_t PassesCuts(const AliStarEvent* event) const;
+  static AliStarEventCuts* StandardCuts();
+  
+  void SetRunIDMax(const Int_t value) {fRunIDMax=value;fCutRunID=kTRUE;}
+  void SetRunIDMin(const Int_t value) {fRunIDMin=value;fCutRunID=kTRUE;}
+  void SetEventNumberMax(const Int_t value) {fEventNumberMax=value;fCutEventNumber=kTRUE;}
+  void SetEventNumberMin(const Int_t value) {fEventNumberMin=value;fCutEventNumber=kTRUE;}
+  void SetVtxXMax(const Float_t value) {fVtxXMax=value;fCutVtxX=kTRUE;}
+  void SetVtxXMin(const Float_t value) {fVtxXMin=value;fCutVtxX=kTRUE;}
+  void SetVtxYMax(const Float_t value) {fVtxYMax=value;fCutVtxY=kTRUE;}
+  void SetVtxYMin(const Float_t value) {fVtxYMin=value;fCutVtxY=kTRUE;}
+  void SetVtxZMax(const Float_t value) {fVtxZMax=value;fCutVtxZ=kTRUE;}
+  void SetVtxZMin(const Float_t value) {fVtxZMin=value;fCutVtxZ=kTRUE;}
+  void SetBFieldMax(const Float_t value) {fBFieldMax=value;fCutBField=kTRUE;}
+  void SetBFieldMin(const Float_t value) {fBFieldMin=value;fCutBField=kTRUE;}
+  void SetRefMultMax(const Int_t value) {fRefMultMax=value;fCutRefMult=kTRUE;}
+  void SetRefMultMin(const Int_t value) {fRefMultMin=value;fCutRefMult=kTRUE;}
+  void SetCentralityIDMax(const Int_t value) {fCentralityIDMax=value;fCutCentralityID=kTRUE;}
+  void SetCentralityIDMin(const Int_t value) {fCentralityIDMin=value;fCutCentralityID=kTRUE;}
+  void SetNumberOfPrimaryTracksMax(const Int_t value) {fNumberOfPrimaryTracksMax=value;fCutNumberOfPrimaryTracks=kTRUE;}
+  void SetNumberOfPrimaryTracksMin(const Int_t value) {fNumberOfPrimaryTracksMin=value;fCutNumberOfPrimaryTracks=kTRUE;}
+  void SetNumberOfTracksMax(const Int_t value) {fNumberOfTracksMax=value;fCutNumberOfTracks=kTRUE;}
+  void SetNumberOfTracksMin(const Int_t value) {fNumberOfTracksMin=value;fCutNumberOfTracks=kTRUE;}
+
+  const Int_t GetRunIDMax() const {return fRunIDMax;}
+  const Int_t GetRunIDMin() const {return fRunIDMin;}
+  const Int_t GetEventNumberMax() const {return fEventNumberMax;}
+  const Int_t GetEventNumberMin() const {return fEventNumberMin;}
+  const Float_t GetVtxXMax() const {return fVtxXMax;}
+  const Float_t GetVtxXMin() const {return fVtxXMin;}
+  const Float_t GetVtxYMax() const {return fVtxYMax;}
+  const Float_t GetVtxYMin() const {return fVtxYMin;}
+  const Float_t GetVtxZMax() const {return fVtxZMax;}
+  const Float_t GetVtxZMin() const {return fVtxZMin;}
+  const Float_t GetBFieldMax() const {return fBFieldMax;}
+  const Float_t GetBFieldMin() const {return fBFieldMin;}
+  const Int_t GetRefMultMax() const {return fRefMultMax;}
+  const Int_t GetRefMultMin() const {return fRefMultMin;}
+  const Int_t GetCentralityIDMax() const {return fCentralityIDMax;}
+  const Int_t GetCentralityIDMin() const {return fCentralityIDMin;}
+  const Int_t GetNumberOfPrimaryTracksMax() const {return fNumberOfPrimaryTracksMax;}
+  const Int_t GetNumberOfPrimaryTracksMin() const {return fNumberOfPrimaryTracksMin;}
+  const Int_t GetNumberOfTracksMax() const {return fNumberOfTracksMax;}
+  const Int_t GetNumberOfTracksMin() const {return fNumberOfTracksMin;}
+
+ private:
+  Bool_t   fCutRunID; //cut on run id
+  Int_t fRunIDMax;  //limits
+  Int_t fRunIDMin;  //limits
+  Bool_t   fCutEventNumber; //cut on event number
+  Int_t fEventNumberMax;  //limits
+  Int_t fEventNumberMin;  //limits
+  Bool_t   fCutVtxX;//cut on vertex
+  Float_t fVtxXMax;  //limits
+  Float_t fVtxXMin;  //limits
+  Bool_t   fCutVtxY;//cut on vertex
+  Float_t fVtxYMax;  //limits
+  Float_t fVtxYMin;  //limits
+  Bool_t   fCutVtxZ;//cut on vertex
+  Float_t fVtxZMax;  //limits
+  Float_t fVtxZMin;  //limits
+  Bool_t   fCutBField;//cut on bfield
+  Float_t fBFieldMax;  //limits
+  Float_t fBFieldMin;  //limits
+  Bool_t   fCutRefMult;//cut on reference multiplicity
+  Int_t fRefMultMax;  //limits
+  Int_t fRefMultMin;  //limits
+  Bool_t   fCutCentralityID;//cut on centrality id
+  Int_t fCentralityIDMax;  //limits
+  Int_t fCentralityIDMin;  //limits
+  Bool_t   fCutNumberOfPrimaryTracks;//cut on # prim tracks
+  Int_t fNumberOfPrimaryTracksMax;  //limits
+  Int_t fNumberOfPrimaryTracksMin;  //limits
+  Bool_t   fCutNumberOfTracks;//cut on # of tracks
+  Int_t fNumberOfTracksMax;  //limits
+  Int_t fNumberOfTracksMin;  //limits
+
+  ClassDef(AliStarEventCuts,1)
+};
+
+#endif
+
+
index c9f7c4c..f4ab345 100644 (file)
@@ -33,6 +33,10 @@ class AliStarTrack : public TObject {
   const Float_t GetEta() const {return fParams[2];}
   const Float_t GetPhi() const {return fParams[3];}
   const Float_t GetPt() const {return fParams[4];}
+  const Int_t Charge() const {return (Int_t)fParams[1];}
+  const Float_t Eta() const {return fParams[2];}
+  const Float_t Phi() const {return fParams[3];}
+  const Float_t Pt() const {return fParams[4];}
   const Float_t GetDCA() const {return fParams[5];}
   const Int_t GetNHits() const {return (Int_t)fParams[6];}
   const Int_t GetNHitsFit() const {return (Int_t)fParams[7];}
diff --git a/PWG2/FLOW/AliFlowCommon/AliStarTrackCuts.cxx b/PWG2/FLOW/AliFlowCommon/AliStarTrackCuts.cxx
new file mode 100644 (file)
index 0000000..48ad947
--- /dev/null
@@ -0,0 +1,243 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * 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$ */ 
+
+// AliStarTrackCuts:
+// A track cut class for the AliStarTrack
+//
+// origin: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
+
+#include "TNamed.h"
+#include "AliStarTrack.h"
+#include "AliStarTrackCuts.h"
+
+ClassImp(AliStarTrackCuts)
+
+//-----------------------------------------------------------------------
+AliStarTrackCuts::AliStarTrackCuts():
+  TNamed(),
+  fCutID(kFALSE),
+  fIDMax(INT_MAX),
+  fIDMin(INT_MIN),
+  fCutCharge(kFALSE),
+  fChargeMax(INT_MAX),
+  fChargeMin(INT_MIN),
+  fCutEta(kFALSE),
+  fEtaMax(FLT_MAX),
+  fEtaMin(FLT_MIN),
+  fCutPhi(kFALSE),
+  fPhiMax(FLT_MAX),
+  fPhiMin(FLT_MIN),
+  fCutPt(kFALSE),
+  fPtMax(FLT_MAX),
+  fPtMin(FLT_MIN),
+  fCutDCA(kFALSE),
+  fDCAMax(FLT_MAX),
+  fDCAMin(FLT_MIN),
+  fCutNHits(kFALSE),
+  fNHitsMax(INT_MAX),
+  fNHitsMin(INT_MIN),
+  fCutNHitsFit(kFALSE),
+  fNHitsFitMax(INT_MAX),
+  fNHitsFitMin(INT_MIN),
+  fCutNHitsPoss(kFALSE),
+  fNHitsPossMax(INT_MAX),
+  fNHitsPossMin(INT_MIN),
+  fCutNHitsDedx(kFALSE),
+  fNHitsDedxMax(INT_MAX),
+  fNHitsDedxMin(INT_MIN),
+  fCutdEdx(kFALSE),
+  fdEdxMax(FLT_MAX),
+  fdEdxMin(FLT_MIN),
+  fCutNSigElect(kFALSE),
+  fNSigElectMax(FLT_MAX),
+  fNSigElectMin(FLT_MIN),
+  fCutNSigPi(kFALSE),
+  fNSigPiMax(FLT_MAX),
+  fNSigPiMin(FLT_MIN),
+  fCutNSigK(kFALSE),
+  fNSigKMax(FLT_MAX),
+  fNSigKMin(FLT_MIN),
+  fCutNSigProton(kFALSE),
+  fNSigProtonMax(FLT_MAX),
+  fNSigProtonMin(FLT_MIN),
+  fCutFitRatio(kFALSE),
+  fFitRatioMax(FLT_MAX),
+  fFitRatioMin(FLT_MIN)
+{
+  //ctor 
+}
+
+////-----------------------------------------------------------------------
+//AliStarTrackCuts::AliStarTrackCuts(const AliStarTrackCuts& that):
+//  TNamed(),
+//  fCutID(that.fCutID),
+//  fIDMax(that.fIDMax),
+//  fIDMin(that.fIDMin),
+//  fCutCharge(that.fCutCharge),
+//  fChargeMax(that.fChargeMax),
+//  fChargeMin(that.fChargeMin),
+//  fCutEta(that.fCutEta),
+//  fEtaMax(that.fEtaMax),
+//  fEtaMin(that.fEtaMin),
+//  fCutPhi(that.fCutPhi),
+//  fPhiMax(that.fPhiMax),
+//  fPhiMin(that.fPhiMin),
+//  fCutPt(that.fCutPt),
+//  fPtMax(that.fPtMax),
+//  fPtMin(that.fPtMin),
+//  fCutDCA(that.fCutDCA),
+//  fDCAMax(that.fDCAMax),
+//  fDCAMin(that.fDCAMin),
+//  fCutNHits(that.fCutNHits),
+//  fNHitsMax(that.fNHitsMax),
+//  fNHitsMin(that.fNHitsMin),
+//  fCutNHitsFit(that.fCutNHitsFit),
+//  fNHitsFitMax(that.fNHitsFitMax),
+//  fNHitsFitMin(that.fNHitsFitMin),
+//  fCutNHitsPoss(that.fCutNHitsPoss),
+//  fNHitsPossMax(that.fNHitsPossMax),
+//  fNHitsPossMin(that.fNHitsPossMin),
+//  fCutNHitsDedx(that.fCutNHitsDedx),
+//  fNHitsDedxMax(that.fNHitsDedxMax),
+//  fNHitsDedxMin(that.fNHitsDedxMin),
+//  fCutdEdx(that.fCutdEdx),
+//  fdEdxMax(that.fdEdxMax),
+//  fdEdxMin(that.fdEdxMin),
+//  fCutNSigElect(that.fCutNSigElect),
+//  fNSigElectMax(that.fNSigElectMax),
+//  fNSigElectMin(that.fNSigElectMin),
+//  fCutNSigPi(that.fCutNSigPi),
+//  fNSigPiMax(that.fNSigPiMax),
+//  fNSigPiMin(that.fNSigPiMin),
+//  fCutNSigK(that.fCutNSigK),
+//  fNSigKMax(that.fNSigKMax),
+//  fNSigKMin(that.fNSigKMin),
+//  fCutNSigProton(that.fCutNSigProton),
+//  fNSigProtonMax(that.fNSigProtonMax),
+//  fNSigProtonMin(that.fNSigProtonMin),
+//  fCutFitRatio(that.fCutFitRatio),
+//  fFitRatioMax(that.fFitRatioMax),
+//  fFitRatioMin(that.fFitRatioMin)
+//{
+//  //copy ctor 
+//}
+//
+////-----------------------------------------------------------------------
+//AliStarTrackCuts& AliStarTrackCuts::operator=(const AliStarTrackCuts& that)
+//{
+//  //assignment
+//  fCutID=that.fCutID;
+//  fIDMax=that.fIDMax;
+//  fIDMin=that.fIDMin;
+//  fCutCharge=that.fCutCharge;
+//  fChargeMax=that.fChargeMax;
+//  fChargeMin=that.fChargeMin;
+//  fCutEta=that.fCutEta;
+//  fEtaMax=that.fEtaMax;
+//  fEtaMin=that.fEtaMin;
+//  fCutPhi=that.fCutPhi;
+//  fPhiMax=that.fPhiMax;
+//  fPhiMin=that.fPhiMin;
+//  fCutPt=that.fCutPt;
+//  fPtMax=that.fPtMax;
+//  fPtMin=that.fPtMin;
+//  fCutDCA=that.fCutDCA;
+//  fDCAMax=that.fDCAMax;
+//  fDCAMin=that.fDCAMin;
+//  fCutNHits=that.fCutNHits;
+//  fNHitsMax=that.fNHitsMax;
+//  fNHitsMin=that.fNHitsMin;
+//  fCutNHitsFit=that.fCutNHitsFit;
+//  fNHitsFitMax=that.fNHitsFitMax;
+//  fNHitsFitMin=that.fNHitsFitMin;
+//  fCutNHitsPoss=that.fCutNHitsPoss;
+//  fNHitsPossMax=that.fNHitsPossMax;
+//  fNHitsPossMin=that.fNHitsPossMin;
+//  fCutNHitsDedx=that.fCutNHitsDedx;
+//  fNHitsDedxMax=that.fNHitsDedxMax;
+//  fNHitsDedxMin=that.fNHitsDedxMin;
+//  fCutdEdx=that.fCutdEdx;
+//  fdEdxMax=that.fdEdxMax;
+//  fdEdxMin=that.fdEdxMin;
+//  fCutNSigElect=that.fCutNSigElect;
+//  fNSigElectMax=that.fNSigElectMax;
+//  fNSigElectMin=that.fNSigElectMin;
+//  fCutNSigPi=that.fCutNSigPi;
+//  fNSigPiMax=that.fNSigPiMax;
+//  fNSigPiMin=that.fNSigPiMin;
+//  fCutNSigK=that.fCutNSigK;
+//  fNSigKMax=that.fNSigKMax;
+//  fNSigKMin=that.fNSigKMin;
+//  fCutNSigProton=that.fCutNSigProton;
+//  fNSigProtonMax=that.fNSigProtonMax;
+//  fNSigProtonMin=that.fNSigProtonMin;
+//  fCutFitRatio=that.fCutFitRatio;
+//  fFitRatioMax=that.fFitRatioMax;
+//  fFitRatioMin=that.fFitRatioMin;
+//  
+//  return *this;
+//}
+
+//----------------------------------------------------------------------- 
+Bool_t AliStarTrackCuts::PassesCuts(const AliStarTrack *track) const
+{
+  //check is track passes cuts
+  if(fCutID) if (track->GetID() < fIDMin || track->GetID() >= fIDMax ) return kFALSE;
+  if(fCutCharge) if (track->GetCharge() < fChargeMin || track->GetCharge() > fChargeMax ) return kFALSE;
+  if(fCutEta) if (track->GetEta() < fEtaMin || track->GetEta() > fEtaMax ) return kFALSE;
+  if(fCutPhi) if (track->GetPhi() < fPhiMin || track->GetPhi() > fPhiMax ) return kFALSE;
+  if(fCutPt) if (track->GetPt() < fPtMin || track->GetPt() > fPtMax ) return kFALSE;
+  if(fCutDCA) if (track->GetDCA() < fDCAMin || track->GetDCA() > fDCAMax ) return kFALSE;
+  if(fCutNHits) if (track->GetNHits() < fNHitsMin || track->GetNHits() > fNHitsMax ) return kFALSE;
+  if(fCutNHitsFit) if (track->GetNHitsFit() < fNHitsFitMin || track->GetNHitsFit() > fNHitsFitMax ) return kFALSE;
+  if(fCutNHitsPoss) if (track->GetNHitsPoss() < fNHitsPossMin || track->GetNHitsPoss() > fNHitsPossMax ) return kFALSE;
+  if(fCutNHitsDedx) if (track->GetNHitsDedx() < fNHitsDedxMin || track->GetNHitsDedx() > fNHitsDedxMax ) return kFALSE;
+  if(fCutdEdx) if (track->GetdEdx() < fdEdxMin || track->GetdEdx() > fdEdxMax ) return kFALSE;
+  if(fCutNSigElect) if (track->GetNSigElect() < fNSigElectMin || track->GetNSigElect() > fNSigElectMax ) return kFALSE;
+  if(fCutNSigPi) if (track->GetNSigPi() < fNSigPiMin || track->GetNSigPi() > fNSigPiMax ) return kFALSE;
+  if(fCutNSigK) if (track->GetNSigK() < fNSigKMin || track->GetNSigK() > fNSigKMax ) return kFALSE;
+  if(fCutNSigProton) if (track->GetNSigProton() < fNSigProtonMin || track->GetNSigProton() > fNSigProtonMax ) return kFALSE;
+  if(fCutFitRatio)
+  {
+    Int_t nhitsposs =  track->GetNHitsPoss();
+    if (nhitsposs==0) return kFALSE;
+    Float_t ratio = Float_t(track->GetNHitsFit()) / nhitsposs;
+    if ( ratio < fFitRatioMin && ratio >= fFitRatioMax ) return kFALSE;
+  }
+
+  return kTRUE;
+}
+
+//----------------------------------------------------------------------- 
+AliStarTrackCuts* AliStarTrackCuts::StandardCuts()
+{
+  //return a set of standard cuts, caller becomes owner
+  AliStarTrackCuts* cuts = new AliStarTrackCuts();
+  cuts->SetDCAMin(0.0);     // cm
+  cuts->SetDCAMax(3.0);      
+  cuts->SetPtMin(0.15);      // GeV
+  cuts->SetPtMax(2.0);
+  cuts->SetEtaMin(-1.1);
+  cuts->SetEtaMax(1.1);
+  cuts->SetFitRatioMin(0.52);  // Number of hits over number of hits possible
+  cuts->SetFitRatioMax(2.0);      //should not exceed 1.0 but who knows...
+  cuts->SetNHitsPossMin(5);    // Don't bother to fit tracks if # possible hits is too low
+  cuts->SetNHitsPossMax(100);
+  cuts->SetNHitsFitMin(15);    // 15 is typical but sometimes goes as high as 25
+  cuts->SetNHitsFitMax(100);   // 45 pad rows in the TPC and so anything bigger than 45+Silicon is infinite
+  return cuts;
+}
diff --git a/PWG2/FLOW/AliFlowCommon/AliStarTrackCuts.h b/PWG2/FLOW/AliFlowCommon/AliStarTrackCuts.h
new file mode 100644 (file)
index 0000000..3993c99
--- /dev/null
@@ -0,0 +1,149 @@
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. */
+/* See cxx source for full Copyright notice */
+/* $Id$ */
+
+// AliStarTrackCuts:
+// A track cut class for AliStarTrack
+// origin: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
+
+#ifndef ALISTARTRACKCUTS_H
+#define ALISTARTRACKCUTS_H
+
+#include <float.h>
+#include "TNamed.h"
+
+class AliStarTrack;
+
+class AliStarTrackCuts : public TNamed {
+
+ public:
+  AliStarTrackCuts();
+  //AliStarTrackCuts(const AliStarTrackCuts& someCuts);
+  //AliStarTrackCuts& operator=(const AliStarTrackCuts& someCuts);
+  virtual  ~AliStarTrackCuts() {}
+  
+  Bool_t PassesCuts(const AliStarTrack* track) const;
+  static AliStarTrackCuts* StandardCuts();
+
+  void SetIDMax(const Int_t value) {fIDMax=value;fCutID=kTRUE;};
+  void SetIDMin(const Int_t value) {fIDMin=value;fCutID=kTRUE;};
+  void SetChargeMax(const Int_t value) {fChargeMax=value;fCutCharge=kTRUE;};
+  void SetChargeMin(const Int_t value) {fChargeMin=value;fCutCharge=kTRUE;};
+  void SetEtaMax(const Float_t value) {fEtaMax=value;fCutEta=kTRUE;};
+  void SetEtaMin(const Float_t value) {fEtaMin=value;fCutEta=kTRUE;};
+  void SetPhiMax(const Float_t value) {fPhiMax=value;fCutPhi=kTRUE;};
+  void SetPhiMin(const Float_t value) {fPhiMin=value;fCutPhi=kTRUE;};
+  void SetPtMax(const Float_t value) {fPtMax=value;fCutPt=kTRUE;};
+  void SetPtMin(const Float_t value) {fPtMin=value;fCutPt=kTRUE;};
+  void SetDCAMax(const Float_t value) {fDCAMax=value;fCutDCA=kTRUE;};
+  void SetDCAMin(const Float_t value) {fDCAMin=value;fCutDCA=kTRUE;};
+  void SetNHitsMax(const Int_t value) {fNHitsMax=value;fCutNHits=kTRUE;};
+  void SetNHitsMin(const Int_t value) {fNHitsMin=value;fCutNHits=kTRUE;};
+  void SetNHitsFitMax(const Int_t value) {fNHitsFitMax=value;fCutNHitsFit=kTRUE;};
+  void SetNHitsFitMin(const Int_t value) {fNHitsFitMin=value;fCutNHitsFit=kTRUE;};
+  void SetNHitsPossMax(const Int_t value) {fNHitsPossMax=value;fCutNHitsPoss=kTRUE;};
+  void SetNHitsPossMin(const Int_t value) {fNHitsPossMin=value;fCutNHitsPoss=kTRUE;};
+  void SetNHitsDedxMax(const Int_t value) {fNHitsDedxMax=value;fCutNHitsDedx=kTRUE;};
+  void SetNHitsDedxMin(const Int_t value) {fNHitsDedxMin=value;fCutNHitsDedx=kTRUE;};
+  void SetdEdxMax(const Float_t value) {fdEdxMax=value;fCutdEdx=kTRUE;};
+  void SetdEdxMin(const Float_t value) {fdEdxMin=value;fCutdEdx=kTRUE;};
+  void SetNSigElectMax(const Float_t value) {fNSigElectMax=value;fCutNSigElect=kTRUE;};
+  void SetNSigElectMin(const Float_t value) {fNSigElectMin=value;fCutNSigElect=kTRUE;};
+  void SetNSigPiMax(const Float_t value) {fNSigPiMax=value;fCutNSigPi=kTRUE;};
+  void SetNSigPiMin(const Float_t value) {fNSigPiMin=value;fCutNSigPi=kTRUE;};
+  void SetNSigKMax(const Float_t value) {fNSigKMax=value;fCutNSigK=kTRUE;};
+  void SetNSigKMin(const Float_t value) {fNSigKMin=value;fCutNSigK=kTRUE;};
+  void SetNSigProtonMax(const Float_t value) {fNSigProtonMax=value;fCutNSigProton=kTRUE;};
+  void SetNSigProtonMin(const Float_t value) {fNSigProtonMin=value;fCutNSigProton=kTRUE;};
+  void SetFitRatioMax(const Float_t value) {fFitRatioMax=value;fCutFitRatio=kTRUE;};
+  void SetFitRatioMin(const Float_t value) {fFitRatioMin=value;fCutFitRatio=kTRUE;};
+
+  const Int_t GetIDMax() const {return fIDMax;}
+  const Int_t GetIDMin() const {return fIDMin;}
+  const Int_t GetChargeMax() const {return fChargeMax;}
+  const Int_t GetChargeMin() const {return fChargeMin;}
+  const Float_t GetEtaMax() const {return fEtaMax;}
+  const Float_t GetEtaMin() const {return fEtaMin;}
+  const Float_t GetPhiMax() const {return fPhiMax;}
+  const Float_t GetPhiMin() const {return fPhiMin;}
+  const Float_t GetPtMax() const {return fPtMax;}
+  const Float_t GetPtMin() const {return fPtMin;}
+  const Float_t GetDCAMax() const {return fDCAMax;}
+  const Float_t GetDCAMin() const {return fDCAMin;}
+  const Int_t GetNHitsMax() const {return fNHitsMax;}
+  const Int_t GetNHitsMin() const {return fNHitsMin;}
+  const Int_t GetNHitsFitMax() const {return fNHitsFitMax;}
+  const Int_t GetNHitsFitMin() const {return fNHitsFitMin;}
+  const Int_t GetNHitsPossMax() const {return fNHitsPossMax;}
+  const Int_t GetNHitsPossMin() const {return fNHitsPossMin;}
+  const Int_t GetNHitsDedxMax() const {return fNHitsDedxMax;}
+  const Int_t GetNHitsDedxMin() const {return fNHitsDedxMin;}
+  const Float_t GetdEdxMax() const {return fdEdxMax;}
+  const Float_t GetdEdxMin() const {return fdEdxMin;}
+  const Float_t GetNSigElectMax() const {return fNSigElectMax;}
+  const Float_t GetNSigElectMin() const {return fNSigElectMin;}
+  const Float_t GetNSigPiMax() const {return fNSigPiMax;}
+  const Float_t GetNSigPiMin() const {return fNSigPiMin;}
+  const Float_t GetNSigKMax() const {return fNSigKMax;}
+  const Float_t GetNSigKMin() const {return fNSigKMin;}
+  const Float_t GetNSigProtonMax() const {return fNSigProtonMax;}
+  const Float_t GetNSigProtonMin() const {return fNSigProtonMin;}
+  const Float_t GetFitRatioMax() const {return fFitRatioMax;};
+  const Float_t GetFitRatioMin() const {return fFitRatioMin;};
+
+ private:
+  Bool_t   fCutID;
+  Int_t fIDMax;
+  Int_t fIDMin;
+  Bool_t   fCutCharge;
+  Int_t fChargeMax;
+  Int_t fChargeMin;
+  Bool_t   fCutEta;
+  Float_t fEtaMax;
+  Float_t fEtaMin;
+  Bool_t   fCutPhi;
+  Float_t fPhiMax;
+  Float_t fPhiMin;
+  Bool_t   fCutPt;
+  Float_t fPtMax;
+  Float_t fPtMin;
+  Bool_t   fCutDCA;
+  Float_t fDCAMax;
+  Float_t fDCAMin;
+  Bool_t   fCutNHits;
+  Int_t fNHitsMax;
+  Int_t fNHitsMin;
+  Bool_t   fCutNHitsFit;
+  Int_t fNHitsFitMax;
+  Int_t fNHitsFitMin;
+  Bool_t   fCutNHitsPoss;
+  Int_t fNHitsPossMax;
+  Int_t fNHitsPossMin;
+  Bool_t   fCutNHitsDedx;
+  Int_t fNHitsDedxMax;
+  Int_t fNHitsDedxMin;
+  Bool_t   fCutdEdx;
+  Float_t fdEdxMax;
+  Float_t fdEdxMin;
+  Bool_t   fCutNSigElect;
+  Float_t fNSigElectMax;
+  Float_t fNSigElectMin;
+  Bool_t   fCutNSigPi;
+  Float_t fNSigPiMax;
+  Float_t fNSigPiMin;
+  Bool_t   fCutNSigK;
+  Float_t fNSigKMax;
+  Float_t fNSigKMin;
+  Bool_t   fCutNSigProton;
+  Float_t fNSigProtonMax;
+  Float_t fNSigProtonMin;
+  Bool_t  fCutFitRatio;
+  Float_t fFitRatioMax;
+  Float_t fFitRatioMin;
+
+  ClassDef(AliStarTrackCuts,1)
+};
+
+#endif
+
+
index 496e96f..b0ac50c 100644 (file)
@@ -9,14 +9,26 @@ void  readStarEventsSimple()
   gSystem->Load("libPhysics.so");
   gSystem->Load("libPWG2flowCommon");
 
-  AliStarEventReader*  starReader = new AliStarEventReader( "/data/alice3/jthomas/testData/") ;
+  Int_t maxNumberOfEvents = 1000;
 
-  while ( starReader->GetNextEvent() )                                // Get next event
+  //define reference particles
+  AliStarTrackCuts* rpCuts = AliStarTrackCuts::StandardCuts();
+
+  //define particles of interest
+  AliStarTrackCuts* poiCuts = AliStarTrackCuts::StandardCuts();
+  poiCuts->SetPtMin(1.0);
+
+  //define event cuts
+  AliStarEventCuts* starEventCuts = AliStarEventCuts::StandardCuts();
+
+  Int_t i=0;
+  AliStarEventReader starReader("/data/alice3/jthomas/testData/") ;
+  while ( starReader.GetNextEvent() )                                // Get next event
   {
-    AliStarEvent* starEvent = starReader->GetEvent();
-    if ( !starReader->AcceptEvent(starEvent) ) continue;              // Test if the event is good
+    AliStarEvent* starEvent = starReader.GetEvent();
+    if ( !starEventCuts->PassesCuts(starEvent) ) continue;              // Test if the event is good
 
-    AliFlowEventSimple* flowEvent = new AliFlowEventStar(starEvent);  // make a flow event from a star event (aka "the magic")
+    AliFlowEventSimple* flowEvent = new AliFlowEventStar(starEvent,rpCuts,poiCuts);  // make a flow event from a star event (aka "the magic")
 
     /////analysis here////////////////
 
@@ -24,12 +36,15 @@ void  readStarEventsSimple()
 
     //////////////////////////////////
 
-    starEvent->Print("all");
-    flowEvent->Print("all");
+    //starEvent->Print("all");
+    flowEvent->Print();
 
     delete flowEvent;
-    break;
-  }
 
-  delete starReader ;
+    i++;
+    if (i>maxNumberOfEvents) break;
+  }
+  delete rpCuts;
+  delete poiCuts;
+  delete starEventCuts;
 }
index 6db9480..925739a 100644 (file)
@@ -13,6 +13,8 @@
 
 #pragma link C++ class AliStarTrack+;
 #pragma link C++ class AliStarEvent+;
+#pragma link C++ class AliStarTrackCuts+;
+#pragma link C++ class AliStarEventCuts+;
 #pragma link C++ class AliStarEventReader+;
 #pragma link C++ class AliFlowEventStar+;
 
index 3008841..610a710 100644 (file)
@@ -4,6 +4,8 @@ SRCS= FLOW/AliFlowCommon/AliFlowEventSimple.cxx \
       FLOW/AliFlowCommon/AliFlowTrackSimple.cxx \
       FLOW/AliFlowCommon/AliStarTrack.cxx \
       FLOW/AliFlowCommon/AliStarEvent.cxx \
+      FLOW/AliFlowCommon/AliStarTrackCuts.cxx \
+      FLOW/AliFlowCommon/AliStarEventCuts.cxx \
       FLOW/AliFlowCommon/AliFlowEventStar.cxx \
       FLOW/AliFlowCommon/AliStarEventReader.cxx \
       FLOW/AliFlowCommon/AliFlowTrackSimpleCuts.cxx \