Adding Sphericity/Spherocity cuts for femtoscopy analyses (Goran Simatovic, goran...
authormiweber <m.weber@cern.ch>
Tue, 11 Nov 2014 15:49:10 +0000 (16:49 +0100)
committermiweber <m.weber@cern.ch>
Tue, 11 Nov 2014 15:49:10 +0000 (16:49 +0100)
PWGCF/CMakelibPWGCFfemtoscopy.pkg
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSphericityEventCut.cxx [new file with mode: 0644]
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSphericityEventCut.h [new file with mode: 0644]
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSpherocityEventCut.cxx [new file with mode: 0644]
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSpherocityEventCut.h [new file with mode: 0644]
PWGCF/PWGCFfemtoscopyLinkDef.h

index bb2b548..7b8e10b 100644 (file)
@@ -126,6 +126,8 @@ set ( HDRS ${HDRS}
     FEMTOSCOPY/AliFemto/SystemOfUnits.h
     FEMTOSCOPY/AliFemto/AliFemtoPairCut.h
     FEMTOSCOPY/AliFemto/AliFemtoEventCut.h
+    FEMTOSCOPY/AliFemto/AliFemtoSphericityEventCut.cxx
+    FEMTOSCOPY/AliFemto/AliFemtoSpherocityEventCut.cxx
     FEMTOSCOPY/AliFemto/AliFemtoParticleCut.h
     FEMTOSCOPY/AliFemto/AliFemtoTrackCollection.h
     FEMTOSCOPY/AliFemto/AliFemtoV0Collection.h
diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSphericityEventCut.cxx b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSphericityEventCut.cxx
new file mode 100644 (file)
index 0000000..c0dd436
--- /dev/null
@@ -0,0 +1,167 @@
+////////////////////////////////////////////////////////////////////////////////
+//                                                                            //
+// AliFemtoSphericityEventCut - the basic cut for events.                     //
+// Only cuts on event multiplicity, z-vertex position and                     //
+// transverse sphericity are accepted.                                        //
+//                                                                            //
+////////////////////////////////////////////////////////////////////////////////
+
+#include "AliFemtoSphericityEventCut.h"
+//#include <cstdio>
+
+#ifdef __ROOT__
+ClassImp(AliFemtoSphericityEventCut)
+#endif
+
+AliFemtoSphericityEventCut::AliFemtoSphericityEventCut() :
+  AliFemtoEventCut(),
+  fEventMult(),
+  fVertZPos(),
+  fAcceptBadVertex(false), 
+  fNEventsPassed(0), 
+  fNEventsFailed(0),
+  fAcceptOnlyPhysics(0),
+  fStCutMin(0.0),
+  fStCutMax(1.0),
+  fSelectTrigger(0)
+{
+  // Default constructor
+  fEventMult[0] = 0;
+  fEventMult[1] = 100000;
+  fVertZPos[0] = -100.0;
+  fVertZPos[1] = 100.0;
+  fPsiEP[0] = -100.0;
+  fPsiEP[1] = 100.0;
+  fStCutMin = 0.0;
+  fStCutMax = 1.0;
+} 
+//------------------------------
+AliFemtoSphericityEventCut::~AliFemtoSphericityEventCut(){
+  // Default destructor
+}
+//------------------------------
+bool AliFemtoSphericityEventCut::Pass(const AliFemtoEvent* event){  
+
+  // Pass events if they fall within the multiplicity, z-vertex position range
+  // and transverse sphericity. Fail otherwise
+  //  int mult =  event->NumberOfTracks();
+  int mult = (int) event->UncorrectedNumberOfPrimaries();
+  double vertexZPos = event->PrimVertPos().z();
+
+  // Double_t qxEPVZERO = 0, qyEPVZERO = 0;
+  // Double_t qVZERO = -999;
+  double epvzero = event->ReactionPlaneAngle();
+
+  // cout << "AliFemtoSphericityEventCut:: epvzero:       " << fPsiEP[0] << " < " << epvzero << " < " << fPsiEP[1] << endl;
+//   cout << "AliFemtoSphericityEventCut:: mult:       " << fEventMult[0] << " < " << mult << " < " << fEventMult[1] << endl;
+//   cout << "AliFemtoSphericityEventCut:: VertexZPos: " << fVertZPos[0] << " < " << vertexZPos << " < " << fVertZPos[1] << endl;
+//   cout << "AliFemtoSphericityEventCut:: VertexZErr: " << event->PrimVertCov()[4] << endl;
+
+  // cout << "AliFemtoSphericityEventCut:: MagneticField: " << event->MagneticField() << endl;
+  // cout << "AliFemtoSphericityEventCut:: IsCollisionCandidate: " << event->IsCollisionCandidate() << endl;
+  // cout << "AliFemtoSphericityEventCut:: TriggerCluster: " << event->TriggerCluster() << endl;
+  // cout << "AliFemtoSphericityEventCut:: fSelectTrigger: " << fSelectTrigger << endl;
+  // cout << "AliFemtoSphericityEventCut:: " << endl;
+
+
+  Int_t ParticleNumber = 0;
+  Double_t SumPt = 0;
+  Double_t S00=0; 
+  Double_t S11=0;
+  Double_t S10=0;
+  Double_t Lambda1 = 0;
+  Double_t Lambda2 = 0;
+  Double_t St = 0;      
+
+   AliFemtoTrackCollection * tracks = event->TrackCollection(); 
+   
+   
+  for (AliFemtoTrackIterator iter=tracks->begin();iter!=tracks->end();iter++){
+  
+  
+    Double_t NewPhi = (*iter)->P().Phi();
+    Double_t NewPt =  (*iter)->Pt();
+    Double_t NewEta = (*iter)->P().PseudoRapidity();
+   
+    
+    if(TMath::Abs(NewEta)>0.8 || NewPt<0.5){continue;}
+    
+    Double_t Px;
+    Double_t Py;
+    
+    Px= NewPt * TMath::Cos(NewPhi);
+    Py= NewPt * TMath::Sin(NewPhi);
+    
+    S00 = S00 + Px*Px/(NewPt);  // matrix elements of the transverse shpericity matrix S(i,j)
+    S11 = S11 + Py*Py/(NewPt);  // i,j /in [0,1]
+    S10 = S10 + Px*Py/(NewPt);
+    SumPt = SumPt + NewPt;
+    ParticleNumber++;
+    
+  }    // end of track loop
+
+    if(SumPt==0){return kFALSE;}
+      
+  S00 = S00/SumPt; // normalize
+  S11 = S11/SumPt;
+  S10 = S10/SumPt;
+  
+  Lambda1 = (S00 + S11 + TMath::Sqrt((S00+S11)*(S00+S11)-4.0*(S00*S11-S10*S10)))/2.0;
+  Lambda2 = (S00 + S11 - TMath::Sqrt((S00+S11)*(S00+S11)-4.0*(S00*S11-S10*S10)))/2.0;
+  
+     if(Lambda1+Lambda2!=0 && ParticleNumber>2)
+       {
+               St = 2*Lambda2/(Lambda1+Lambda2);
+       }
+     else{return kFALSE;};
+  
+  
+  //cout<<"St  = "<<St<<endl;
+  
+  if(St>fStCutMax || St<fStCutMin){
+       //cout<<"Event kicked out !"<<"StCutMax= "<<fStCutMax<<"  StCutMin= "<<fStCutMin<<endl;
+       //cout<<"St = "<<St<<endl;                
+  return kFALSE;}  
+
+  bool goodEvent =
+    ((mult >= fEventMult[0]) && 
+     (mult <= fEventMult[1]) && 
+     (vertexZPos > fVertZPos[0]) &&
+     (vertexZPos < fVertZPos[1]) &&
+     (epvzero > fPsiEP[0]) &&
+     (epvzero < fPsiEP[1]) &&
+     ((!fAcceptBadVertex) || (event->ZDCParticipants() > 1.0)) &&
+      ((!fSelectTrigger) || (event->TriggerCluster() == fSelectTrigger))
+);
+
+  // cout << "AliFemtoSphericityEventCut:: goodEvent" <<goodEvent << endl;
+
+  goodEvent ? fNEventsPassed++ : fNEventsFailed++ ;
+  //  cout << "AliFemtoSphericityEventCut:: return : " << goodEvent << endl;
+//     (fAcceptBadVertex || (event->PrimVertCov()[4] > -1000.0)) &&
+
+  return (goodEvent);
+}
+//------------------------------
+AliFemtoString AliFemtoSphericityEventCut::Report(){
+  // Prepare report
+  string stemp;
+  char ctemp[100];
+  snprintf(ctemp , 100, "\nMultiplicity:\t %d-%d",fEventMult[0],fEventMult[1]);
+  stemp = ctemp;
+  snprintf(ctemp , 100, "\nVertex Z-position:\t %E-%E",fVertZPos[0],fVertZPos[1]);
+  stemp += ctemp;
+  snprintf(ctemp , 100, "\nNumber of events which passed:\t%ld  Number which failed:\t%ld",fNEventsPassed,fNEventsFailed);
+  stemp += ctemp;
+  AliFemtoString returnThis = stemp;
+  return returnThis;
+}
+void AliFemtoSphericityEventCut::SetAcceptBadVertex(bool b)
+{
+  fAcceptBadVertex = b;
+}
+bool AliFemtoSphericityEventCut::GetAcceptBadVertex()
+{
+  return fAcceptBadVertex;
+}
+
diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSphericityEventCut.h b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSphericityEventCut.h
new file mode 100644 (file)
index 0000000..271ac4c
--- /dev/null
@@ -0,0 +1,96 @@
+////////////////////////////////////////////////////////////////////////////////
+//                                                                            //
+// AliFemtoSphericityEventCut - the basic cut for events.                     //
+//                                                                            //
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef AliFemtoSphericityEventCUT_H
+#define AliFemtoSphericityEventCUT_H
+
+#include "AliFemtoEventCut.h"
+
+class AliFemtoSphericityEventCut : public AliFemtoEventCut {
+
+public:
+
+  AliFemtoSphericityEventCut();
+  AliFemtoSphericityEventCut(AliFemtoSphericityEventCut& c);
+  virtual ~AliFemtoSphericityEventCut();
+  AliFemtoSphericityEventCut& operator=(AliFemtoSphericityEventCut& c);
+
+  void SetEventMult(const int& lo,const int& hi);
+  void SetVertZPos(const float& lo, const float& hi);
+  void SetAcceptBadVertex(bool b);
+  int NEventsPassed() const;
+  int NEventsFailed() const;
+  bool GetAcceptBadVertex();
+  bool GetAcceptOnlyPhysics();
+  void SetStMin(double stMin );
+  void SetStMax(double stMax );
+  void SetTriggerSelection(int trig);
+
+  void SetEPVZERO(const float& lo, const float& hi);
+
+  virtual AliFemtoString Report();
+  virtual bool Pass(const AliFemtoEvent* event);
+
+  AliFemtoSphericityEventCut* Clone();
+
+private:   // here are the quantities I want to cut on...
+
+  int fEventMult[2];      // range of multiplicity
+  float fVertZPos[2];     // range of z-position of vertex
+  float fPsiEP[2];        // range of vzero ep angle
+  bool fAcceptBadVertex;  // Set to true to accept events with bad vertex
+  long fNEventsPassed;    // Number of events checked by this cut that passed
+  long fNEventsFailed;    // Number of events checked by this cut that failed
+  bool fAcceptOnlyPhysics;// Accept only physics events
+  double fStCutMin;       // transverse sphericity minimum
+  double fStCutMax;       // transverse sphericity maximum
+  int  fSelectTrigger;    // If set, only given trigger will be selected
+
+#ifdef __ROOT__
+  ClassDef(AliFemtoSphericityEventCut, 1)
+#endif
+
+};
+
+inline void AliFemtoSphericityEventCut::SetEventMult(const int& lo, const int& hi){fEventMult[0]=lo; fEventMult[1]=hi;}
+inline void AliFemtoSphericityEventCut::SetVertZPos(const float& lo, const float& hi){fVertZPos[0]=lo; fVertZPos[1]=hi;}
+inline void AliFemtoSphericityEventCut::SetEPVZERO(const float& lo, const float& hi){fPsiEP[0]=lo; fPsiEP[1]=hi;}
+inline int  AliFemtoSphericityEventCut::NEventsPassed() const {return fNEventsPassed;}
+inline int  AliFemtoSphericityEventCut::NEventsFailed() const {return fNEventsFailed;}
+inline void  AliFemtoSphericityEventCut::SetStMin(double stMin ) {fStCutMin=stMin;}
+inline void  AliFemtoSphericityEventCut::SetStMax(double stMax ) {fStCutMax=stMax;}
+inline void AliFemtoSphericityEventCut::SetTriggerSelection(int trig) { fSelectTrigger = trig; }
+inline AliFemtoSphericityEventCut* AliFemtoSphericityEventCut::Clone() { AliFemtoSphericityEventCut* c = new AliFemtoSphericityEventCut(*this); return c;}
+inline AliFemtoSphericityEventCut::AliFemtoSphericityEventCut(AliFemtoSphericityEventCut& c) : AliFemtoEventCut(c), fAcceptBadVertex(false), fNEventsPassed(0), fNEventsFailed(0), fAcceptOnlyPhysics(false),fStCutMin(0),fStCutMax(1),  fSelectTrigger(0) {
+  fEventMult[0] = c.fEventMult[0];
+  fEventMult[1] = c.fEventMult[1];
+  fVertZPos[0] = c.fVertZPos[0];
+  fVertZPos[1] = c.fVertZPos[1];
+  fPsiEP[0] = c.fPsiEP[0];
+  fPsiEP[1] = c.fPsiEP[1];
+  fStCutMin = c.fStCutMin;
+  fStCutMax = c.fStCutMax;
+
+}
+
+inline AliFemtoSphericityEventCut& AliFemtoSphericityEventCut::operator=(AliFemtoSphericityEventCut& c) {   
+  if (this != &c) {
+    AliFemtoEventCut::operator=(c);
+    fEventMult[0] = c.fEventMult[0];
+    fEventMult[1] = c.fEventMult[1];
+    fVertZPos[0] = c.fVertZPos[0];
+    fVertZPos[1] = c.fVertZPos[1];
+    fPsiEP[0] = c.fPsiEP[0];
+    fPsiEP[1] = c.fPsiEP[1];
+    fStCutMin = c.fStCutMin;
+    fStCutMax = c.fStCutMax;
+  }
+
+  return *this;
+}
+
+
+#endif
diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSpherocityEventCut.cxx b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSpherocityEventCut.cxx
new file mode 100644 (file)
index 0000000..80512f9
--- /dev/null
@@ -0,0 +1,179 @@
+////////////////////////////////////////////////////////////////////////////////
+//                                                                            //
+// AliFemtoSpherocityEventCut - the basic cut for events.                     //
+// Only cuts on event multiplicity, z-vertex position and                     //
+// transverse spherocity are accepted.                                        //
+//                                                                            //
+////////////////////////////////////////////////////////////////////////////////
+
+#include "AliFemtoSpherocityEventCut.h"
+//#include <cstdio>
+
+#ifdef __ROOT__
+ClassImp(AliFemtoSpherocityEventCut)
+#endif
+
+AliFemtoSpherocityEventCut::AliFemtoSpherocityEventCut() :
+  AliFemtoEventCut(),
+  fEventMult(),
+  fVertZPos(),
+  fAcceptBadVertex(false), 
+  fNEventsPassed(0), 
+  fNEventsFailed(0),
+  fAcceptOnlyPhysics(0),
+  fSoCutMin(0.0),
+  fSoCutMax(1.0),
+  fSelectTrigger(0)
+{
+  // Default constructor
+  fEventMult[0] = 0;
+  fEventMult[1] = 100000;
+  fVertZPos[0] = -100.0;
+  fVertZPos[1] = 100.0;
+  fPsiEP[0] = -1000.0;
+  fPsiEP[1] = 1000.0;
+} 
+//------------------------------
+AliFemtoSpherocityEventCut::~AliFemtoSpherocityEventCut(){
+  // Default destructor
+}
+//------------------------------
+bool AliFemtoSpherocityEventCut::Pass(const AliFemtoEvent* event){  
+
+  // Pass events if they fall within the multiplicity and z-vertex
+  // position range. Fail otherwise
+  //  int mult =  event->NumberOfTracks();
+  int mult = (int) event->UncorrectedNumberOfPrimaries();
+  double vertexZPos = event->PrimVertPos().z();
+  double spherocity=-10;
+  int MULT=0;
+
+   AliFemtoTrackCollection * tracks = event->TrackCollection(); 
+  for (AliFemtoTrackIterator iter=tracks->begin();iter!=tracks->end();iter++){
+  
+    Double_t NewPt =  (*iter)->Pt();
+    Double_t NewEta = (*iter)->P().PseudoRapidity();    
+    if(TMath::Abs(NewEta)>0.8 || NewPt<0.5){continue;}
+    
+     MULT++;
+  
+  }    
+    //if(SumPt==0){return kFALSE;}
+      if(MULT<3){return kFALSE;}
+       Double_t *pxA=new Double_t[MULT];
+       Double_t *pyA=new Double_t[MULT];
+       Double_t sumapt=0;
+       Int_t counter=0;
+  
+   AliFemtoTrackCollection * tracks2 = event->TrackCollection(); 
+  for (AliFemtoTrackIterator iter2=tracks2->begin();iter2!=tracks2->end();iter2++){
+  
+    Double_t NewPt2 =  (*iter2)->Pt();
+    Double_t NewPhi2 = (*iter2)->P().Phi();
+    Double_t NewEta2 = (*iter2)->P().PseudoRapidity();
+    if(TMath::Abs(NewEta2)>0.8 || NewPt2<0.5){continue;}
+    
+    Double_t Px;
+    Double_t Py;
+    
+    Px= NewPt2 * TMath::Cos(NewPhi2);
+    Py= NewPt2 * TMath::Sin(NewPhi2);
+    
+    
+    pxA[counter]=Px;
+    pyA[counter]=Py;
+    sumapt+=NewPt2;
+    counter++;
+  
+  } 
+  
+  Double_t pFull = 0;
+  Double_t Spherocity = 2;
+  //Getting thrust
+  for(Int_t i = 0; i < 360; ++i){
+    Double_t numerador = 0;
+    Double_t phiparam  = 0;
+    Double_t nx = 0;
+    Double_t ny = 0;
+    phiparam=((TMath::Pi()) * i) / 180;   // parametrization of the angle
+    nx = TMath::Cos(phiparam);            // x component of an unitary vector n
+    ny = TMath::Sin(phiparam);            // y component of an unitary vector n
+    for(Int_t i1 = 0; i1 < MULT; ++i1){
+      numerador += TMath::Abs(ny * pxA[i1] - nx * pyA[i1]);//product between momentum proyection in XY plane and the unitari vector.
+    }
+    pFull=TMath::Power( (numerador / sumapt),2 );
+    if(pFull < Spherocity)//maximization of pFull
+      {Spherocity = pFull;}
+  }
+
+  
+    spherocity=((Spherocity)*TMath::Pi()*TMath::Pi())/4.0;
+
+  if(pxA){// clean up array memory used for TMath::Sort
+    delete[] pxA;
+    pxA=0;
+  }
+  if(pyA){// clean up array memory used for TMath::Sort
+    delete[] pyA;
+    pyA=0;
+  }
+
+  if(spherocity>fSoCutMax || spherocity<fSoCutMin){
+         //cout<<" Event kicked out !"<<"SoCutMax= "<<fSoCutMax<<"  SoCutMin= "<<fSoCutMin<<endl;
+         return kFALSE;}  
+  
+  double epvzero = event->ReactionPlaneAngle();
+
+  // cout << "AliFemtoSpherocityEventCut:: epvzero:       " << fPsiEP[0] << " < " << epvzero << " < " << fPsiEP[1] << endl;
+//   cout << "AliFemtoSpherocityEventCut:: mult:       " << fEventMult[0] << " < " << mult << " < " << fEventMult[1] << endl;
+//   cout << "AliFemtoSpherocityEventCut:: VertexZPos: " << fVertZPos[0] << " < " << vertexZPos << " < " << fVertZPos[1] << endl;
+//   cout << "AliFemtoSpherocityEventCut:: VertexZErr: " << event->PrimVertCov()[4] << endl;
+
+  // cout << "AliFemtoSpherocityEventCut:: MagneticField: " << event->MagneticField() << endl;
+  // cout << "AliFemtoSpherocityEventCut:: IsCollisionCandidate: " << event->IsCollisionCandidate() << endl;
+  // cout << "AliFemtoSpherocityEventCut:: TriggerCluster: " << event->TriggerCluster() << endl;
+  // cout << "AliFemtoSpherocityEventCut:: fSelectTrigger: " << fSelectTrigger << endl;
+  // cout << "AliFemtoSpherocityEventCut:: " << endl;
+  bool goodEvent =
+    ((mult >= fEventMult[0]) && 
+     (mult <= fEventMult[1]) && 
+     (vertexZPos > fVertZPos[0]) &&
+     (vertexZPos < fVertZPos[1]) &&
+     (epvzero > fPsiEP[0]) &&
+     (epvzero < fPsiEP[1]) &&
+     ((!fAcceptBadVertex) || (event->ZDCParticipants() > 1.0)) &&
+      ((!fSelectTrigger) || (event->TriggerCluster() == fSelectTrigger))
+);
+
+  // cout << "AliFemtoSpherocityEventCut:: goodEvent" <<goodEvent << endl;
+
+  goodEvent ? fNEventsPassed++ : fNEventsFailed++ ;
+  // cout << "AliFemtoSpherocityEventCut:: return : " << goodEvent << endl;
+//     (fAcceptBadVertex || (event->PrimVertCov()[4] > -1000.0)) &&
+
+  return (goodEvent);
+}
+//------------------------------
+AliFemtoString AliFemtoSpherocityEventCut::Report(){
+  // Prepare report
+  string stemp;
+  char ctemp[100];
+  snprintf(ctemp , 100, "\nMultiplicity:\t %d-%d",fEventMult[0],fEventMult[1]);
+  stemp = ctemp;
+  snprintf(ctemp , 100, "\nVertex Z-position:\t %E-%E",fVertZPos[0],fVertZPos[1]);
+  stemp += ctemp;
+  snprintf(ctemp , 100, "\nNumber of events which passed:\t%ld  Number which failed:\t%ld",fNEventsPassed,fNEventsFailed);
+  stemp += ctemp;
+  AliFemtoString returnThis = stemp;
+  return returnThis;
+}
+void AliFemtoSpherocityEventCut::SetAcceptBadVertex(bool b)
+{
+  fAcceptBadVertex = b;
+}
+bool AliFemtoSpherocityEventCut::GetAcceptBadVertex()
+{
+  return fAcceptBadVertex;
+}
diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSpherocityEventCut.h b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSpherocityEventCut.h
new file mode 100644 (file)
index 0000000..b9a6683
--- /dev/null
@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////////
+//                                                                            //
+// AliFemtoSpherocityEventCut - the basic cut for events.                     //
+//                                                                            //
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef AliFemtoSpherocityEventCUT_H
+#define AliFemtoSpherocityEventCUT_H
+
+#include "AliFemtoEventCut.h"
+
+class AliFemtoSpherocityEventCut : public AliFemtoEventCut {
+
+public:
+
+  AliFemtoSpherocityEventCut();
+  AliFemtoSpherocityEventCut(AliFemtoSpherocityEventCut& c);
+  virtual ~AliFemtoSpherocityEventCut();
+  AliFemtoSpherocityEventCut& operator=(AliFemtoSpherocityEventCut& c);
+
+  void SetEventMult(const int& lo,const int& hi);
+  void SetVertZPos(const float& lo, const float& hi);
+  void SetAcceptBadVertex(bool b);
+  int NEventsPassed() const;
+  int NEventsFailed() const;
+  bool GetAcceptBadVertex();
+  bool GetAcceptOnlyPhysics();
+  void SetSoMin(double soMin );
+  void SetSoMax(double soMax );
+  void SetTriggerSelection(int trig);
+
+  void SetEPVZERO(const float& lo, const float& hi);
+
+  virtual AliFemtoString Report();
+  virtual bool Pass(const AliFemtoEvent* event);
+
+  AliFemtoSpherocityEventCut* Clone();
+
+private:   // here are the quantities I want to cut on...
+
+  int fEventMult[2];      // range of multiplicity
+  float fVertZPos[2];     // range of z-position of vertex
+  float fPsiEP[2];     // range of vzero ep angle
+  bool fAcceptBadVertex;  // Set to true to accept events with bad vertex
+  long fNEventsPassed;    // Number of events checked by this cut that passed
+  long fNEventsFailed;    // Number of events checked by this cut that failed
+  bool fAcceptOnlyPhysics;// Accept only physics events
+  double fSoCutMin;       // transverse sphericity minimum
+  double fSoCutMax;       // transverse sphericity maximum
+  int  fSelectTrigger;    // If set, only given trigger will be selected
+
+#ifdef __ROOT__
+  ClassDef(AliFemtoSpherocityEventCut, 1)
+#endif
+
+};
+
+inline void AliFemtoSpherocityEventCut::SetEventMult(const int& lo, const int& hi){fEventMult[0]=lo; fEventMult[1]=hi;}
+inline void AliFemtoSpherocityEventCut::SetVertZPos(const float& lo, const float& hi){fVertZPos[0]=lo; fVertZPos[1]=hi;}
+inline void AliFemtoSpherocityEventCut::SetEPVZERO(const float& lo, const float& hi){fPsiEP[0]=lo; fPsiEP[1]=hi;}
+inline int  AliFemtoSpherocityEventCut::NEventsPassed() const {return fNEventsPassed;}
+inline int  AliFemtoSpherocityEventCut::NEventsFailed() const {return fNEventsFailed;}
+inline void  AliFemtoSpherocityEventCut::SetSoMin(double soMin ) {fSoCutMin=soMin;}
+inline void  AliFemtoSpherocityEventCut::SetSoMax(double soMax ) {fSoCutMax=soMax;}
+inline void AliFemtoSpherocityEventCut::SetTriggerSelection(int trig) { fSelectTrigger = trig; }
+inline AliFemtoSpherocityEventCut* AliFemtoSpherocityEventCut::Clone() { AliFemtoSpherocityEventCut* c = new AliFemtoSpherocityEventCut(*this); return c;}
+inline AliFemtoSpherocityEventCut::AliFemtoSpherocityEventCut(AliFemtoSpherocityEventCut& c) : AliFemtoEventCut(c), fAcceptBadVertex(false), fNEventsPassed(0), fNEventsFailed(0), fAcceptOnlyPhysics(false), fSoCutMin(0), fSoCutMax(1), fSelectTrigger(0) {
+  fEventMult[0] = c.fEventMult[0];
+  fEventMult[1] = c.fEventMult[1];
+  fVertZPos[0] = c.fVertZPos[0];
+  fVertZPos[1] = c.fVertZPos[1];
+  fPsiEP[0] = c.fPsiEP[0];
+  fPsiEP[1] = c.fPsiEP[1];
+}
+
+inline AliFemtoSpherocityEventCut& AliFemtoSpherocityEventCut::operator=(AliFemtoSpherocityEventCut& c) {
+  if (this != &c) {
+    AliFemtoEventCut::operator=(c);
+    fEventMult[0] = c.fEventMult[0];
+    fEventMult[1] = c.fEventMult[1];
+    fVertZPos[0] = c.fVertZPos[0];
+    fVertZPos[1] = c.fVertZPos[1];
+    fPsiEP[0] = c.fPsiEP[0];
+    fPsiEP[1] = c.fPsiEP[1];
+  }
+
+  return *this;
+}
+
+
+#endif
index 14a3c39..5ae6bc8 100644 (file)
@@ -12,6 +12,8 @@
 #pragma link C++ class AliFemtoSimpleAnalysis+;
 #pragma link C++ class AliFemtoAnalysisReactionPlane+;
 #pragma link C++ class AliFemtoEventCut+;
+#pragma link C++ class AliFemtoSphericityEventCut+;
+#pragma link C++ class AliFemtoSpherocityEventCut+;
 #pragma link C++ class AliFemtoEventReader+;
 #pragma link C++ class AliFemtoEventReaderStandard+;
 #pragma link C++ class AliFemtoKinkCut+;