]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding V0 femtoscopy analysis
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 5 Apr 2012 10:35:27 +0000 (10:35 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 5 Apr 2012 10:35:27 +0000 (10:35 +0000)
49 files changed:
PWGCF/CMakelibPWGCFfemtoscopy.pkg
PWGCF/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitor.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitor.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorCollections.cxx [new file with mode: 0644]
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorCollections.h [new file with mode: 0644]
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventMult.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventMult.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventVertex.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorHandler.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorHandler.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticlePID.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticleVertPos.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorParticleYPt.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorV0.cxx [new file with mode: 0644]
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorV0.h [new file with mode: 0644]
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEvent.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEvent.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderAOD.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderAOD.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderKinematicsChain.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderKinematicsChain.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoPair.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoParticle.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSimpleAnalysis.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoTrack.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoTrack.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0PairCut.cxx [new file with mode: 0644]
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0PairCut.h [new file with mode: 0644]
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0TrackCut.cxx [new file with mode: 0644]
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0TrackCut.h [new file with mode: 0644]
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0TrackPairCut.cxx [new file with mode: 0644]
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0TrackPairCut.h [new file with mode: 0644]
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoCorrFctnDEtaDPhi.cxx
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoCorrFctnDEtaDPhi.h
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoCutMonitorParticleEtCorr.h
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoCutMonitorParticleMomRes.h
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoCutMonitorParticlePtPDG.h
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoCutMonitorTrackTPCchiNdof.h
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoCutMonitorTrackTPCncls.h
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoPairCutAntiGamma.cxx
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoPairCutAntiGamma.h
PWGCF/PWGCFfemtoscopyLinkDef.h

index a3bdf7f41013aa7773212cfbe52232b2e285d567..637db8c21fd424953181cc2ce6eead97ec635090 100644 (file)
@@ -86,6 +86,11 @@ set ( SRCS
     FEMTOSCOPY/AliFemto/AliTwoTrackRes.cxx
     FEMTOSCOPY/AliFemto/AliFemtoMCTrackCut.cxx
     FEMTOSCOPY/AliFemto/AliFemtoEventReaderKinematicsChain.cxx
+    FEMTOSCOPY/AliFemto/AliFemtoV0PairCut.cxx 
+    FEMTOSCOPY/AliFemto/AliFemtoV0TrackCut.cxx 
+    FEMTOSCOPY/AliFemto/AliFemtoCutMonitorV0.cxx 
+    FEMTOSCOPY/AliFemto/AliFemtoV0TrackPairCut.cxx
+    FEMTOSCOPY/AliFemto/AliFemtoCutMonitorCollections.cxx 
     )
 
 string ( REPLACE ".cxx" ".h" HDRS "${SRCS}" )
@@ -131,6 +136,8 @@ set ( HDRS ${HDRS}
     FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollectionVector.h 
     FEMTOSCOPY/AliFemto/AliFemtoEventWriter.h 
     FEMTOSCOPY/AliFemto/AliFemtoEventWriterCollection.h 
+    FEMTOSCOPY/AliFemto/AliFemtoMCTrackCut.h
+    FEMTOSCOPY/AliFemto/AliFemtoEventReaderKinematicsChain.h
     )
 
 set ( FSRCS  FEMTOSCOPY/AliFemto/AliFemtoFsiTools.F FEMTOSCOPY/AliFemto/AliFemtoFsiWeightLednicky.F)
index fe3e52b4ade534acfc31c36a83c59d52b131c965..dfcb588101d23e5ad44cb25e801ecce22767d6dc 100644 (file)
@@ -13,7 +13,8 @@
 #include "TFile.h"
 #include "TInterpreter.h"
 
-#include "AliAnalysisTask.h"
+//#include "AliAnalysisTask.h"
+#include "AliAnalysisTaskSE.h"
 
 #include "AliESDEvent.h"
 
@@ -32,7 +33,7 @@ ClassImp(AliAnalysisTaskFemto)
 
 //________________________________________________________________________
 AliAnalysisTaskFemto::AliAnalysisTaskFemto(const char *name, const char *aConfigMacro, const char *aConfigParams):
-    AliAnalysisTask(name,""), 
+    AliAnalysisTaskSE(name), //AliAnalysisTask(name,""), 
     fESD(0), 
     fESDpid(0),
     fAOD(0),
@@ -57,7 +58,7 @@ AliAnalysisTaskFemto::AliAnalysisTaskFemto(const char *name, const char *aConfig
 }
 //________________________________________________________________________
 AliAnalysisTaskFemto::AliAnalysisTaskFemto(const char *name, const char *aConfigMacro="ConfigFemtoAnalysis.C"): 
-    AliAnalysisTask(name,""), 
+    AliAnalysisTaskSE(name), //AliAnalysisTask(name,""), 
     fESD(0), 
     fESDpid(0),
     fAOD(0),
@@ -82,7 +83,7 @@ AliAnalysisTaskFemto::AliAnalysisTaskFemto(const char *name, const char *aConfig
 }
 
 AliAnalysisTaskFemto::AliAnalysisTaskFemto(const AliAnalysisTaskFemto& aFemtoTask):
-    AliAnalysisTask(aFemtoTask), 
+    AliAnalysisTaskSE(aFemtoTask), //AliAnalysisTask(aFemtoTask), 
     fESD(0), 
     fESDpid(0),
     fAOD(0),
index 711f450717d0d149a56fc2baf18beddacb1e1358..266987c4f49d2df875f4df0e8cc952384d0c1cd0 100644 (file)
@@ -18,7 +18,8 @@
 #include "AliAODEvent.h"
 #include "AliMCEvent.h"
 
-#include "AliAnalysisTask.h"
+//#include "AliAnalysisTask.h"
+#include "AliAnalysisTaskSE.h"
 #include "AliAnalysisManager.h"
 #include "AliAnalysisDataContainer.h"
 
@@ -33,9 +34,9 @@
 #include "AliAODpidUtil.h"
 
 
-class AliAnalysisTaskFemto : public AliAnalysisTask {
+class AliAnalysisTaskFemto : public AliAnalysisTaskSE { //AliAnalysisTask
  public:
-  AliAnalysisTaskFemto() : AliAnalysisTask(), fESD(0), fESDpid(0), fAOD(0), fAODpidUtil(0), fStack(0), fOutputList(0), fReader(0x0), fManager(0x0), fAnalysisType(0), fConfigMacro(0), fConfigParams(0) {}
+  AliAnalysisTaskFemto() : AliAnalysisTaskSE(), fESD(0), fESDpid(0), fAOD(0), fAODpidUtil(0), fStack(0), fOutputList(0), fReader(0x0), fManager(0x0), fAnalysisType(0), fConfigMacro(0), fConfigParams(0) {}
   AliAnalysisTaskFemto(const char *name, const char *aConfigMacro, const char *aConfigParams);
   AliAnalysisTaskFemto(const char *name, const char *aConfigMacro);
   AliAnalysisTaskFemto(const AliAnalysisTaskFemto& aFemtoTask);
index 149a99ceb2368c650bcb15b6a74abf474e13223b..2c32aed9d4b57e505984b9d3542a807229c84d29 100644 (file)
@@ -33,7 +33,7 @@ AliFemtoBasicEventCut::~AliFemtoBasicEventCut(){
   // Default destructor
 }
 //------------------------------
-bool AliFemtoBasicEventCut::Pass(const AliFemtoEvent* event){
+bool AliFemtoBasicEventCut::Pass(const AliFemtoEvent* event){  
   // Pass events if they fall within the multiplicity and z-vertex
   // position range. Fail otherwise
   //  int mult =  event->NumberOfTracks();
index 24abd406daa8a89e514354521f179e914aa2ecaa..a0bc04331da6b078c5695e4c2eacde8f771b1a28 100644 (file)
@@ -60,4 +60,9 @@ inline void AliFemtoCutMonitor::Fill(const AliFemtoEvent* /* aEvent */,const Ali
   cout << " *** no user defined Fill(const AliFemtoEvent*,const AliFemtoParticleCollection*), take from base class" << endl;
 #endif
 }
-
+inline void AliFemtoCutMonitor::Fill(const AliFemtoParticleCollection* /* aCollection */,const AliFemtoParticleCollection* /* aCollection */) {
+  // cut event and particle collection
+  #ifdef STHBTDEBUG
+  cout << " *** no user defined Fill(const AliFemtoParticleCollection*,const AliFemtoParticleCollection*), take from base class" << endl;
+  #endif
+}
index e6c0bd7f0928433ed44d6829fb6c10b6c60d3258..6729d5f0f6d918996d53b9664beaf03c30b3c49f 100644 (file)
@@ -34,6 +34,7 @@ public:
   virtual void Fill(const AliFemtoPair* aPair);
   virtual void Fill(const AliFemtoParticleCollection* aCollection);
   virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection);
+  virtual void Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2);
   virtual void Finish() { 
 #ifdef STHBTDEBUG
     cout << " *** no user defined Finish(), take from base class" << endl;
diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorCollections.cxx b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorCollections.cxx
new file mode 100644 (file)
index 0000000..778db95
--- /dev/null
@@ -0,0 +1,104 @@
+////////////////////////////////////////////////////////////////////////////////
+//                                                                            //
+// AliFemtoCutMonitorCollections - the cut monitor for particles to study    //
+// the difference between reconstructed and true momentum                     //
+//                                                                            //
+////////////////////////////////////////////////////////////////////////////////
+#include "AliFemtoCutMonitorCollections.h"
+#include "AliFemtoModelHiddenInfo.h"
+#include "AliFemtoEvent.h"
+#include <TH1D.h>
+#include <TH2D.h>
+#include <TList.h>
+
+AliFemtoCutMonitorCollections::AliFemtoCutMonitorCollections():
+  fCollection1Mult(0),
+  fCollection2Mult(0)
+{
+  // Default constructor
+  fCollection1Mult = new TH1D("Coll1Mult", "Collection 1 Multiplicity", 5001, -0.5, 5000.5);
+  fCollection2Mult = new TH1D("Coll2Mult","Collection 2 Multiplicity",5001,-0.5,5000.5);
+}
+
+AliFemtoCutMonitorCollections::AliFemtoCutMonitorCollections(const char *aName):
+  fCollection1Mult(0),
+  fCollection2Mult(0)
+{
+  // Normal constructor
+  char name[200];
+  snprintf(name, 200, "Coll1Mult%s", aName);
+  fCollection1Mult = new TH1D(name, "Collection 1 Multiplicity", 5001, -0.5, 5000.5);
+
+  snprintf(name, 200, "Coll2Mult%s", aName);
+  fCollection2Mult = new TH1D(name, "Collection 2 Multiplicity", 5001, -0.5, 5000.5);
+}
+
+AliFemtoCutMonitorCollections::AliFemtoCutMonitorCollections(const AliFemtoCutMonitorCollections &aCut):
+  fCollection1Mult(0),
+  fCollection2Mult(0)
+{
+  // copy constructor
+  if (fCollection1Mult) delete fCollection1Mult;
+  fCollection1Mult = new TH1D(*aCut.fCollection1Mult);
+
+  if (fCollection2Mult) delete fCollection2Mult;
+  fCollection2Mult = new TH1D(*aCut.fCollection2Mult);
+}
+
+AliFemtoCutMonitorCollections::~AliFemtoCutMonitorCollections()
+{
+  // Destructor
+  delete fCollection1Mult;
+  delete fCollection2Mult;
+}
+
+AliFemtoCutMonitorCollections& AliFemtoCutMonitorCollections::operator=(const AliFemtoCutMonitorCollections& aCut)
+{
+  // assignment operator
+  if (this == &aCut) 
+    return *this;
+
+  if (fCollection1Mult) delete fCollection1Mult;
+  fCollection1Mult = new TH1D(*aCut.fCollection1Mult);
+
+  if (fCollection2Mult) delete fCollection2Mult;
+  fCollection2Mult = new TH1D(*aCut.fCollection2Mult);
+
+  return *this;
+}
+
+AliFemtoString AliFemtoCutMonitorCollections::Report(){ 
+  // Prepare report from the execution
+  string stemp = "*** AliFemtoCutMonitorCollections report"; 
+  AliFemtoString returnThis = stemp;
+  return returnThis; 
+}
+
+void AliFemtoCutMonitorCollections::Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2)
+{
+  // Fill in the monitor histograms with the values from the current event
+  //cout<<"Monitor collection sizes: "<<aCollection1->size()<<" "<<aCollection2->size()<<endl;
+  fCollection1Mult->Fill(aCollection1->size());
+  fCollection2Mult->Fill(aCollection2->size()); 
+
+
+}
+
+void AliFemtoCutMonitorCollections::Write()
+{
+  // Write out the relevant histograms
+  fCollection1Mult->Write();
+  fCollection2Mult->Write();
+
+}
+
+TList *AliFemtoCutMonitorCollections::GetOutputList()
+{
+  TList *tOutputList = new TList();
+  tOutputList->Add(fCollection1Mult);
+  tOutputList->Add(fCollection2Mult);  
+
+  return tOutputList;
+}
+
+
diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorCollections.h b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorCollections.h
new file mode 100644 (file)
index 0000000..0b58ba2
--- /dev/null
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+///                                                                          ///
+/// AliFemtoCutMonitorCollections - the cut monitor for events to study        ///
+/// the multiplicity distribution of events                                  ///
+///                                                                          ///
+////////////////////////////////////////////////////////////////////////////////
+#ifndef AliFemtoCutMonitorCollections_hh
+#define AliFemtoCutMonitorCollections_hh
+
+class AliFemtoEvent;
+class AliFemtoTrack;
+class AliFemtoV0;
+class AliFemtoKink;
+class AliFemtoPair; 
+class TH1D;
+class TList;
+#include "AliFemtoString.h"
+#include "AliFemtoParticleCollection.h"
+#include "AliFemtoCutMonitor.h"
+
+class AliFemtoCutMonitorCollections : public AliFemtoCutMonitor{
+  
+ public:
+  AliFemtoCutMonitorCollections();
+  AliFemtoCutMonitorCollections(const char *aName);
+  AliFemtoCutMonitorCollections(const AliFemtoCutMonitorCollections &aCut);
+  virtual ~AliFemtoCutMonitorCollections();
+
+  AliFemtoCutMonitorCollections& operator=(const AliFemtoCutMonitorCollections& aCut);
+
+  virtual AliFemtoString Report();
+  virtual void Fill(const AliFemtoEvent* aEvent) {AliFemtoCutMonitor::Fill(aEvent);}
+  virtual void Fill(const AliFemtoTrack* aTrack) {AliFemtoCutMonitor::Fill(aTrack);}
+  virtual void Fill(const AliFemtoV0* aV0) {AliFemtoCutMonitor::Fill(aV0);}
+  virtual void Fill(const AliFemtoKink* aKink) {AliFemtoCutMonitor::Fill(aKink);}
+  virtual void Fill(const AliFemtoPair* aPair) {AliFemtoCutMonitor::Fill(aPair);}
+  virtual void Fill(const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aCollection);}
+  virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection){AliFemtoCutMonitor::Fill(aEvent, aCollection);}
+  virtual void Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2);
+
+  void Write();
+
+  virtual TList *GetOutputList();
+
+ private:
+  TH1D *fCollection1Mult;     // Collection 1 multiplicity distribution
+  TH1D *fCollection2Mult; // Collection 2 multiplicity distribution
+
+
+};
+
+#endif
index 830010d4fb719a5b6e9c9c0486029ddb8f74bb87..750caff38a02d1ddb430c33bd8d50949080fcae7 100644 (file)
@@ -67,6 +67,8 @@ AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(const char *aName):
   snprintf(name, 200, "EvMultTotPt%s", aName);
   fMultSumPt = new TH2D(name,"Event Multiplicity vs Total pT",501,-0.5,500.5,1000,0.0,100.0);
 
+
+
   if(faddhists)
     {
       snprintf(name, 200, "EvMultEstITSTPC%s", aName);
@@ -163,6 +165,7 @@ AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(const AliFemtoCutMonito
       if (fEst3Norm) delete fEst3Norm;
       fEst3Norm = new TH2D(*aCut.fEst3Norm);
     }
+
 }
 
 AliFemtoCutMonitorEventMult::~AliFemtoCutMonitorEventMult()
@@ -186,7 +189,7 @@ AliFemtoCutMonitorEventMult::~AliFemtoCutMonitorEventMult()
       delete fEst1Norm;
       delete fEst2Norm;
       delete fEst3Norm;
-    }      
+    }   
 }
 
 AliFemtoCutMonitorEventMult& AliFemtoCutMonitorEventMult::operator=(const AliFemtoCutMonitorEventMult& aCut)
@@ -320,7 +323,6 @@ TList *AliFemtoCutMonitorEventMult::GetOutputList()
       tOutputList->Add(fEst2Norm);
       tOutputList->Add(fEst3Norm);
     }
-  
   return tOutputList;
 }
 
index 143109ddb412b61563ff9432b9c7b88b8c20ffc3..06673436f8c73ec715e2a8b998697159ea0aa433 100644 (file)
@@ -36,8 +36,8 @@ class AliFemtoCutMonitorEventMult : public AliFemtoCutMonitor{
   virtual void Fill(const AliFemtoKink* aKink) {AliFemtoCutMonitor::Fill(aKink);}
   virtual void Fill(const AliFemtoPair* aPair) {AliFemtoCutMonitor::Fill(aPair);}
   virtual void Fill(const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aCollection);}
-  virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection)
-  {AliFemtoCutMonitor::Fill(aEvent, aCollection);}
+  virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aEvent, aCollection);}
+  virtual void Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2) {AliFemtoCutMonitor::Fill(aCollection1, aCollection2);}
 
   void SetReadMC(Bool_t mc);
   void AdditionalMultHistsOn(Bool_t addhists);
index 7d0640a75598dcfd08993f0327c7b03aae60f177..4ba8c0801dad1b2e7811cd3e81403b0b283ef373 100644 (file)
@@ -38,6 +38,7 @@ public:
   virtual void Fill(const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aCollection);}
   virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection)
   {AliFemtoCutMonitor::Fill(aEvent, aCollection);}
+  virtual void Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2) {AliFemtoCutMonitor::Fill(aCollection1, aCollection2);}
 
   void Write();
 
index efdb4b74c2596b0a09d06334b07af6069943db1c..807c9fab59d00bb3118df092eb264a2c18d3a4c4 100644 (file)
@@ -180,7 +180,7 @@ void AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoParticleCollection*
 // ------------------------------------Gael/19/06/02-------------------------
 void AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoEvent* event,const AliFemtoParticleCollection* partColl) {
   // Fill event particle collection
-  cout<<"In AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoEvent* event, AliFemtoPicoEvent* picoEvent)"<<endl;
+  //cout<<"In AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoEvent* event, AliFemtoPicoEvent* picoEvent)"<<endl;
   if (fCollectionsEmpty) return;
   AliFemtoCutMonitorIterator iter;
   AliFemtoCutMonitor* tCM;
@@ -190,6 +190,20 @@ void AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoEvent* event,const
     tCM->Fill(event,partColl);
   }
 }
+
+void AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoParticleCollection* partColl1, const AliFemtoParticleCollection* partColl2) {
+  // Fill event particle collection
+  //cout<<"***In AliFemtoCutMonitorHandler::FillCutMonitor(const AliFemtoEvent* event, AliFemtoPicoEvent* picoEvent)"<<endl;
+  if (fCollectionsEmpty) return;
+  AliFemtoCutMonitorIterator iter;
+  AliFemtoCutMonitor* tCM;
+  
+  for (iter=fPassColl->begin(); iter!=fPassColl->end(); iter++){
+    tCM = *iter;
+    tCM->Fill(partColl1,partColl2);
+  }
+}
+
 // ---------------------------------------------------------------------------
 void AliFemtoCutMonitorHandler::Finish() { 
   // Perform finish operations on cut monitors
index 78d912b72be0a38f104499370e13f9087c2b8928..d35b26cf93e58158ad5844c9ad1034b36eff2fa7 100644 (file)
@@ -41,6 +41,7 @@ class AliFemtoCutMonitorHandler{
   void FillCutMonitor(const AliFemtoPair* pair, bool pass);//Gael 11/04/02
   void FillCutMonitor(const AliFemtoParticleCollection* partColl);// Gael 19/06/02
   void FillCutMonitor(const AliFemtoEvent* event, const AliFemtoParticleCollection* partColl);// Gael 19/06/02
+  void FillCutMonitor(const AliFemtoParticleCollection* partColl1, const AliFemtoParticleCollection* partColl2);
   void Finish();
 
   virtual TList *GetOutputList();
index 920de21bac890101f3807fea854684e40a632dee..573da10123eed0bc46bfe3c92a357cd7f8265170 100644 (file)
@@ -38,7 +38,7 @@ public:
   virtual void Fill(const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aCollection);}
   virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection)
   {AliFemtoCutMonitor::Fill(aEvent, aCollection);}
-
+  virtual void Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2) {AliFemtoCutMonitor::Fill(aCollection1, aCollection2);}
   void SetTOFParticle(Int_t ipart);
 
   void Write();
index 806a4271304b6f3047d4ab48c7380be165da442c..21adfccaa20c27758e4dcb75d53672fb9c1b9062 100644 (file)
@@ -38,6 +38,7 @@ public:
   virtual void Fill(const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aCollection);}
   virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection)
   {AliFemtoCutMonitor::Fill(aEvent, aCollection);}
+  virtual void Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2) {AliFemtoCutMonitor::Fill(aCollection1, aCollection2);}
 
 
   void Write();
index c7501d5f308afa0972730db28f11b339c7c81440..0a3400d5915033f5cd10fa4b8a9135a672c0321d 100644 (file)
@@ -38,7 +38,7 @@ public:
   virtual void Fill(const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aCollection);}
   virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection)
   {AliFemtoCutMonitor::Fill(aEvent, aCollection);}
-
+  virtual void Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2) {AliFemtoCutMonitor::Fill(aCollection1, aCollection2);}
 
   void Write();
 
diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorV0.cxx b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorV0.cxx
new file mode 100644 (file)
index 0000000..aaa44c7
--- /dev/null
@@ -0,0 +1,251 @@
+////////////////////////////////////////////////////////////////////////////////
+//                                                                            //
+// AliFemtoCutMonitorV0                                                       //
+//                                                                            //
+////////////////////////////////////////////////////////////////////////////////
+#include "AliFemtoCutMonitorV0.h"
+#include <TH1D.h>
+#include <TH2D.h>
+#include <TH3D.h>
+#include <TList.h>
+#include "AliFemtoModelHiddenInfo.h"
+
+AliFemtoCutMonitorV0::AliFemtoCutMonitorV0():
+  fLambdaMass(0),
+  fAntiLambdaMass(0),
+  fK0ShortMass(0),
+  fDcaDaughters(0), 
+  fDcaV0ToPrimVertex(0),
+  fCosPointingAngle(0),
+  fEtaV0(0),
+  fPtV0(0),
+  fPtPosDaughter(0),
+  fPtNegDaughter(0)
+{
+  // Default constructor
+  fLambdaMass = new TH1F("LambdaMass", "Mass Assuming Lambda Hypothesis", 10000, 0, 5);
+  fAntiLambdaMass = new TH1F("AntiLambdaMass", "Mass Assuming AntiLambda Hypothesis", 10000, 0, 5);
+  fK0ShortMass= new TH1F("K0ShortMass", "Mass Assuming K0 short Hypothesis", 500, 0, 5);
+  fDcaDaughters = new TH1F("DcaDaughters", "DCA Daughters", 500, 0, 2);
+  fDcaV0ToPrimVertex = new TH1F("DcaV0ToPrimVertex", "DCA V0 to primary vertex", 500, 0, 3);
+  fCosPointingAngle = new TH1F("CosPointingAngle","Cosinus Pointing Angle",500,0,1);
+  fEtaV0 = new TH1F("EtaV0", "|Eta| distribution of V0s", 500, 0.0, 8.);
+  fPtV0 = new TH1F("PtV0", "Pt distribution of V0s", 500, 0.0, 8.);
+  fPtPosDaughter = new TH1F("PtPosDaughter", "Pt distribution of positive daughters", 500, 0.0, 5.);
+  fPtNegDaughter = new TH1F("PtNegDaughter", "Pt distribution of negative daughters", 500, 0.0, 5.);
+
+
+  fLambdaMass->Sumw2();
+  fAntiLambdaMass->Sumw2();
+  fK0ShortMass->Sumw2();
+  fDcaDaughters->Sumw2();
+  fDcaV0ToPrimVertex->Sumw2();
+  fCosPointingAngle->Sumw2();
+  fEtaV0->Sumw2();
+  fPtPosDaughter->Sumw2();
+  fPtNegDaughter->Sumw2();
+
+}
+
+AliFemtoCutMonitorV0::AliFemtoCutMonitorV0(const char *aName):
+  AliFemtoCutMonitor(),
+  fLambdaMass(0),
+  fAntiLambdaMass(0),
+  fK0ShortMass(0),
+  fDcaDaughters(0), 
+  fDcaV0ToPrimVertex(0),
+  fCosPointingAngle(0),
+  fEtaV0(0),
+  fPtV0(0),
+  fPtPosDaughter(0),
+  fPtNegDaughter(0)
+{
+  // Normal constructor
+  char name[200];
+  snprintf(name, 200, "LambdaMass%s", aName);
+  fLambdaMass = new TH1F(name, "Mass Assuming Lambda Hypothesis", 10000, 0, 5);
+  snprintf(name, 200, "AntiLambdaMass%s", aName);
+  fAntiLambdaMass = new TH1F(name, "Mass Assuming AntiLambda Hypothesis", 10000, 0, 5);
+  snprintf(name, 200, "K0ShortMass%s", aName);
+  fK0ShortMass = new TH1F(name, "Mass Assuming K0 short Hypothesis", 500, 0, 5);
+  snprintf(name, 200, "DcaDaughters%s", aName);
+  fDcaDaughters = new TH1F(name, "DCA Daughters", 500, 0, 2);
+  snprintf(name, 200, "DcaV0ToPrimVertex%s", aName);
+  fDcaV0ToPrimVertex = new TH1F(name, "DCA V0 to primary vertex", 500, 0, 3);
+  snprintf(name, 200, "CosPointingAngle%s", aName);
+  fCosPointingAngle = new TH1F(name,"Cosinus Pointing Angle",500,0,1);
+  snprintf(name, 200, "EtaV0%s", aName);
+  fEtaV0 = new TH1F(name, "|Eta| distribution of V0s", 500, 0.0, 1.); 
+  snprintf(name, 200, "PtV0%s", aName);
+  fPtV0 = new TH1F(name, "Pt distribution of V0s", 500, 0.0, 8.); 
+  snprintf(name, 200, "fPtPosDaughter%s", aName);
+  fPtPosDaughter = new TH1F(name, "Pt distribution of positive daughters", 500, 0.0, 5.);
+  snprintf(name, 200, "fPtNegDaughter%s", aName);
+  fPtNegDaughter = new TH1F(name, "Pt distribution of negative daughters", 500, 0.0, 5.);
+
+  fLambdaMass->Sumw2();
+  fAntiLambdaMass->Sumw2();
+  fK0ShortMass->Sumw2();
+  fDcaDaughters->Sumw2();
+  fDcaV0ToPrimVertex->Sumw2();
+  fCosPointingAngle->Sumw2();
+  fEtaV0->Sumw2();
+  fPtPosDaughter->Sumw2();
+  fPtNegDaughter->Sumw2();
+}
+
+AliFemtoCutMonitorV0::AliFemtoCutMonitorV0(const AliFemtoCutMonitorV0 &aCut):
+  AliFemtoCutMonitor(),
+  fLambdaMass(0),
+  fAntiLambdaMass(0),
+  fK0ShortMass(0),
+  fDcaDaughters(0), 
+  fDcaV0ToPrimVertex(0),
+  fCosPointingAngle(0),
+  fEtaV0(0),
+  fPtV0(0),
+  fPtPosDaughter(0),
+  fPtNegDaughter(0)
+{
+  // copy constructor
+  if (fLambdaMass) delete fLambdaMass;
+  fLambdaMass = new TH1F(*aCut.fLambdaMass);
+  if (fAntiLambdaMass) delete fAntiLambdaMass;
+  fAntiLambdaMass = new TH1F(*aCut.fAntiLambdaMass);
+  if (fK0ShortMass) delete fK0ShortMass;
+  fK0ShortMass = new TH1F(*aCut.fK0ShortMass);
+  if (fDcaDaughters) delete fDcaDaughters;
+  fDcaDaughters = new TH1F(*aCut.fDcaDaughters);
+  if (fDcaV0ToPrimVertex) delete fDcaV0ToPrimVertex;
+  fDcaV0ToPrimVertex = new TH1F(*aCut.fDcaV0ToPrimVertex);
+  if(fCosPointingAngle) delete fCosPointingAngle;
+  fCosPointingAngle = new TH1F(*aCut.fCosPointingAngle);
+  if(fEtaV0) delete fEtaV0;
+  fEtaV0 = new TH1F(*aCut.fEtaV0);
+  if(fPtV0) delete fPtV0;
+  fPtV0 = new TH1F(*aCut.fPtV0);
+  if(fPtPosDaughter) delete fPtPosDaughter;
+  fPtPosDaughter = new TH1F(*aCut.fPtPosDaughter);
+  if(fPtNegDaughter) delete fPtNegDaughter;
+  fPtNegDaughter = new TH1F(*aCut.fPtNegDaughter);
+
+  fLambdaMass->Sumw2();
+  fAntiLambdaMass->Sumw2();
+  fK0ShortMass->Sumw2();
+  fDcaDaughters->Sumw2();
+  fDcaV0ToPrimVertex->Sumw2();
+  fCosPointingAngle->Sumw2();
+  fEtaV0->Sumw2();
+  fPtPosDaughter->Sumw2();
+  fPtNegDaughter->Sumw2();
+}
+
+AliFemtoCutMonitorV0::~AliFemtoCutMonitorV0()
+{
+  // Destructor
+  delete fLambdaMass;
+  delete fAntiLambdaMass;
+  delete fK0ShortMass;
+  delete fDcaDaughters; 
+  delete fDcaV0ToPrimVertex;
+  delete fCosPointingAngle;
+  delete fEtaV0;
+  delete fPtV0;
+  delete fPtPosDaughter;
+  delete fPtNegDaughter;
+}
+
+AliFemtoCutMonitorV0& AliFemtoCutMonitorV0::operator=(const AliFemtoCutMonitorV0& aCut)
+{
+  // assignment operator
+  if (this == &aCut) 
+    return *this;
+
+  if (fLambdaMass) delete fLambdaMass;
+  fLambdaMass = new TH1F(*aCut.fLambdaMass);
+  if (fAntiLambdaMass) delete fAntiLambdaMass;
+  fAntiLambdaMass = new TH1F(*aCut.fAntiLambdaMass);
+  if (fK0ShortMass) delete fK0ShortMass;
+  fK0ShortMass = new TH1F(*aCut.fK0ShortMass);
+  if (fDcaDaughters) delete fDcaDaughters;
+  fDcaDaughters = new TH1F(*aCut.fDcaDaughters);
+  if (fDcaV0ToPrimVertex) delete fDcaV0ToPrimVertex;
+  fDcaV0ToPrimVertex = new TH1F(*aCut.fDcaV0ToPrimVertex);
+  if(fCosPointingAngle) delete fCosPointingAngle;
+  fCosPointingAngle = new TH1F(*aCut.fCosPointingAngle);
+  if(fEtaV0) delete fEtaV0;
+  fEtaV0 = new TH1F(*aCut.fEtaV0);
+  if(fPtV0) delete fPtV0;
+  fPtV0 = new TH1F(*aCut.fPtV0);
+  if(fPtPosDaughter) delete fPtPosDaughter;
+  fPtPosDaughter = new TH1F(*aCut.fPtPosDaughter);
+  if(fPtNegDaughter) delete fPtNegDaughter;
+  fPtNegDaughter = new TH1F(*aCut.fPtNegDaughter);
+
+  fLambdaMass->Sumw2();
+  fAntiLambdaMass->Sumw2();
+  fK0ShortMass->Sumw2();
+  fDcaDaughters->Sumw2();
+  fDcaV0ToPrimVertex->Sumw2();
+  fCosPointingAngle->Sumw2();
+  fEtaV0->Sumw2();
+  fPtPosDaughter->Sumw2();
+  fPtNegDaughter->Sumw2();
+
+  return *this;
+}
+
+AliFemtoString AliFemtoCutMonitorV0::Report(){ 
+  // Prepare report from the execution
+  string stemp = "*** AliFemtoCutMonitorV0 report"; 
+  AliFemtoString returnThis = stemp;
+  return returnThis; 
+}
+
+void AliFemtoCutMonitorV0::Fill(const AliFemtoV0* aV0)
+{
+  // Fill momentum resolution histograms for the particle
+  fLambdaMass->Fill(aV0->MassLambda());
+  fAntiLambdaMass->Fill(aV0->MassAntiLambda());
+  fK0ShortMass->Fill(aV0->MassK0Short());
+  fDcaDaughters->Fill(aV0->DcaV0Daughters()); 
+  fDcaV0ToPrimVertex->Fill(aV0->DcaV0ToPrimVertex());
+  fCosPointingAngle->Fill(aV0->CosPointingAngle());
+  fEtaV0->Fill(aV0->EtaV0());
+  fPtV0->Fill(aV0->PtV0());
+  fPtPosDaughter->Fill(aV0->PtPos());
+  fPtNegDaughter->Fill(aV0->PtNeg());
+}
+
+void AliFemtoCutMonitorV0::Write()
+{
+  // Write out the relevant histograms
+  fLambdaMass->Write();
+  fAntiLambdaMass->Write();
+  fK0ShortMass->Write();
+  fDcaDaughters->Write();
+  fDcaV0ToPrimVertex->Write();
+  fCosPointingAngle->Write();
+  fEtaV0->Write();
+  fPtV0->Write();
+  fPtPosDaughter->Write();
+  fPtNegDaughter->Write();
+}
+
+TList *AliFemtoCutMonitorV0::GetOutputList()
+{
+  // Get the list of histograms to write
+  TList *tOutputList = new TList();
+  tOutputList->Add(fLambdaMass);
+  tOutputList->Add(fAntiLambdaMass);
+  tOutputList->Add(fK0ShortMass);
+  tOutputList->Add(fDcaDaughters);
+  tOutputList->Add(fDcaV0ToPrimVertex);
+  tOutputList->Add(fCosPointingAngle);
+  tOutputList->Add(fEtaV0);
+  tOutputList->Add(fPtV0);
+  tOutputList->Add(fPtPosDaughter);
+  tOutputList->Add(fPtNegDaughter);
+
+  return tOutputList;
+}
diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorV0.h b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorV0.h
new file mode 100644 (file)
index 0000000..153fac1
--- /dev/null
@@ -0,0 +1,57 @@
+////////////////////////////////////////////////////////////////////////////////
+//                                                                            //
+// AliFemtoCutMonitorV0 -                                                     //
+//                                                                            //
+////////////////////////////////////////////////////////////////////////////////
+#ifndef AliFemtoCutMonitorV0_H
+#define AliFemtoCutMonitorV0_H
+
+class AliFemtoEvent;
+class AliFemtoTrack;
+class AliFemtoV0;
+class AliFemtoKink;
+class AliFemtoPair; // Gael 12/04/02
+class TH1F;
+class TList;
+#include "AliFemtoString.h"
+#include "AliFemtoParticleCollection.h"
+#include "AliFemtoCutMonitor.h"
+
+class AliFemtoCutMonitorV0 : public AliFemtoCutMonitor{
+  
+public:
+  AliFemtoCutMonitorV0();
+  AliFemtoCutMonitorV0(const char *aName);
+  AliFemtoCutMonitorV0(const AliFemtoCutMonitorV0 &aCut);
+  virtual ~AliFemtoCutMonitorV0();
+
+  AliFemtoCutMonitorV0& operator=(const AliFemtoCutMonitorV0& aCut);
+
+  virtual AliFemtoString Report();
+  virtual void Fill(const AliFemtoEvent* aEvent) {AliFemtoCutMonitor::Fill(aEvent);}
+  virtual void Fill(const AliFemtoTrack* aTrack){AliFemtoCutMonitor::Fill(aTrack);}
+  virtual void Fill(const AliFemtoV0* aV0);
+  virtual void Fill(const AliFemtoKink* aKink) {AliFemtoCutMonitor::Fill(aKink);}
+  virtual void Fill(const AliFemtoPair* aPair) {AliFemtoCutMonitor::Fill(aPair);}
+  virtual void Fill(const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aCollection);}
+  virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection)
+  {AliFemtoCutMonitor::Fill(aEvent, aCollection);}
+  virtual void Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2) {AliFemtoCutMonitor::Fill(aCollection1, aCollection2);}
+  void Write();
+
+  virtual TList *GetOutputList();
+
+private:
+  TH1F *fLambdaMass;     // Mass assuming lambda hypothesis    
+  TH1F *fAntiLambdaMass; // Mass assuming antilambda hypothesis
+  TH1F *fK0ShortMass;    // Mass assuming k-short hypothesis   
+  TH1F *fDcaDaughters;   // DCA of v0 daughters at Decay vertex
+  TH1F *fDcaV0ToPrimVertex;// DCA of v0 to primary vertex
+  TH1F *fCosPointingAngle; 
+  TH1F *fEtaV0;
+  TH1F *fPtV0;
+  TH1F *fPtPosDaughter;
+  TH1F *fPtNegDaughter;
+};
+
+#endif
index f09b0a884a3d4cdc09d37141b7d137aaf6552b2a..041f86c6963bb5dd96cd59667b14fe8b888ef062 100644 (file)
@@ -445,7 +445,7 @@ void AliFemtoEvent::SetReactionPlaneAngle(const float& a) { fReactionPlaneAngle
 float AliFemtoEvent::ReactionPlaneAngle() const { return fReactionPlaneAngle; }
 void AliFemtoEvent::SetEP(AliEventplane* ep) { fEP = ep;}
 AliEventplane* AliFemtoEvent::EP() const {return fEP; }
-
+ //fV0perEvent->Sumw2();
 //----------------------------- below here is only for star
 
 int AliFemtoEvent::UncorrectedNumberOfNegativePrimaries() const
@@ -458,6 +458,11 @@ int AliFemtoEvent::SPDMultiplicity() const
   return fSPDMult;
 }
 
+int AliFemtoEvent::NumberOfV0s() const
+{
+  return V0Collection()->size();
+}
+
 int AliFemtoEvent::UncorrectedNumberOfPrimaries() const
 {
   if (fNormalizedMult < -1) {
index 1b5611468c7ac50bab7393bfe4b48ca0db6ba373..2e7be6fe512cb9be4f1aa4a8b41835f0a503d3e2 100644 (file)
@@ -104,6 +104,7 @@ public:
   int UncorrectedNumberOfNegativePrimaries() const;
   int UncorrectedNumberOfPrimaries() const;
   int SPDMultiplicity() const;
+  int NumberOfV0s() const;
 
   unsigned short MultiplicityEstimateITSTPC() const;
   unsigned short MultiplicityEstimateTracklets() const;
index 0b0e4f5b9bc7337b4f1043ed3ef2711defd99345..27f28921c002c1a0be684f99637013a59074478f 100644 (file)
@@ -36,6 +36,9 @@ ClassImp(AliFemtoEventReaderAOD)
 #endif
 
 using namespace std;
+
+double fV1[3];
+
 //____________________________
 //constructor with 0 parameters , look at default settings 
 AliFemtoEventReaderAOD::AliFemtoEventReaderAOD():
@@ -47,7 +50,9 @@ AliFemtoEventReaderAOD::AliFemtoEventReaderAOD():
   fFilterBit(0),
   //  fPWG2AODTracks(0x0),
   fReadMC(0),
+  fReadV0(0),
   fUsePreCent(0),
+  fNoCentrality(0),
   fAODpidUtil(0),
   fInputFile(" "),
   fFileName(" "),
@@ -71,7 +76,9 @@ AliFemtoEventReaderAOD::AliFemtoEventReaderAOD(const AliFemtoEventReaderAOD &aRe
   fFilterBit(0),
   //  fPWG2AODTracks(0x0),
   fReadMC(0),
+  fReadV0(0),
   fUsePreCent(0),
+  fNoCentrality(0),
   fAODpidUtil(0),
   fInputFile(" "),
   fFileName(" "),
@@ -79,6 +86,8 @@ AliFemtoEventReaderAOD::AliFemtoEventReaderAOD(const AliFemtoEventReaderAOD &aRe
   fAodFile(0x0)
 {
   // copy constructor
+  fReadMC = aReader.fReadMC;
+  fReadV0 = aReader.fReadV0;
   fInputFile = aReader.fInputFile;
   fFileName  = aReader.fFileName;
   fNumberofEvent = aReader.fNumberofEvent;
@@ -92,6 +101,8 @@ AliFemtoEventReaderAOD::AliFemtoEventReaderAOD(const AliFemtoEventReaderAOD &aRe
   fAODpidUtil = aReader.fAODpidUtil;
   fCentRange[0] = aReader.fCentRange[0];
   fCentRange[1] = aReader.fCentRange[1];
+  fNoCentrality = aReader.fNoCentrality;
+  fUsePreCent = aReader.fUsePreCent;
 }
 //__________________
 //Destructor
@@ -130,6 +141,8 @@ AliFemtoEventReaderAOD& AliFemtoEventReaderAOD::operator=(const AliFemtoEventRea
   fAODpidUtil = aReader.fAODpidUtil;
   fCentRange[0] = aReader.fCentRange[0];
   fCentRange[1] = aReader.fCentRange[1];
+  fUsePreCent = aReader.fUsePreCent;
+  fNoCentrality = aReader.fNoCentrality;
 
   return *this;
 }
@@ -275,7 +288,7 @@ void AliFemtoEventReaderAOD::CopyAODtoFemtoEvent(AliFemtoEvent *tEvent)
   }
 
   // Primary Vertex position
-  double fV1[3];
+  //  double fV1[3];
   fEvent->GetPrimaryVertex()->GetPosition(fV1);
 
   AliFmThreeVectorF vertex(fV1[0],fV1[1],fV1[2]);
@@ -291,9 +304,10 @@ void AliFemtoEventReaderAOD::CopyAODtoFemtoEvent(AliFemtoEvent *tEvent)
     nofTracks=fEvent->GetNumberOfTracks();
   cout<<"nofTracks: "<<nofTracks<<endl;
 
-  AliCentrality *cent = fEvent->GetCentrality();
+  if (!fNoCentrality)
+    AliCentrality *cent = fEvent->GetCentrality();
  
-  if (cent && fUsePreCent) {
+  if (!fNoCentrality && cent && fUsePreCent) {
     if ((cent->GetCentralityPercentile("V0M")*10 < fCentRange[0]) ||
        (cent->GetCentralityPercentile("V0M")*10 > fCentRange[1]))
       {
@@ -313,6 +327,7 @@ void AliFemtoEventReaderAOD::CopyAODtoFemtoEvent(AliFemtoEvent *tEvent)
   for (int i=0;i<nofTracks;i++) {
     const AliAODTrack *aodtrack=fEvent->GetTrack(i);
     if (!aodtrack->TestFilterBit(fFilterBit)) {
+      if(aodtrack->GetID() < 0) continue;
       labels[aodtrack->GetID()] = i;
     }
   }
@@ -456,14 +471,14 @@ void AliFemtoEventReaderAOD::CopyAODtoFemtoEvent(AliFemtoEvent *tEvent)
          delete trackCopy;
          continue;
        }
-
+       
        CopyAODtoFemtoTrack(aodtrack, trackCopy);
 
        // copying PID information from the correspondent track
        //      const AliAODTrack *aodtrackpid = fEvent->GetTrack(labels[-1-fEvent->GetTrack(i)->GetID()]);
        AliAODTrack *aodtrackpid = fEvent->GetTrack(labels[-1-fEvent->GetTrack(i)->GetID()]);
        CopyPIDtoFemtoTrack(aodtrackpid, trackCopy);
-               
+       
        if (mcP) {
          // Fill the hidden information with the simulated data
          //      Int_t pLabel = aodtrack->GetLabel();
@@ -584,21 +599,40 @@ void AliFemtoEventReaderAOD::CopyAODtoFemtoEvent(AliFemtoEvent *tEvent)
   tEvent->SetNumberOfTracks(realnofTracks);//setting number of track which we read in event    
   tEvent->SetNormalizedMult(tracksPrim);
 
-  //  AliCentrality *cent = fEvent->GetCentrality();
-  if (cent) tEvent->SetNormalizedMult(lrint(10*cent->GetCentralityPercentile("V0M")));
-  //  if (cent) tEvent->SetNormalizedMult((int) cent->GetCentralityPercentile("V0M"));
-
-  if (cent) {
-    tEvent->SetCentralityV0(cent->GetCentralityPercentile("V0M"));
-    //    tEvent->SetCentralityFMD(cent->GetCentralityPercentile("FMD"));
-    tEvent->SetCentralitySPD1(cent->GetCentralityPercentile("CL1"));
-    //    tEvent->SetCentralityTrk(cent->GetCentralityPercentile("TRK"));
+  if (!fNoCentrality) {
+    //  AliCentrality *cent = fEvent->GetCentrality();
+    if (cent) tEvent->SetNormalizedMult(lrint(10*cent->GetCentralityPercentile("V0M")));
+    //  if (cent) tEvent->SetNormalizedMult((int) cent->GetCentralityPercentile("V0M"));
+    
+    if (cent) {
+      tEvent->SetCentralityV0(cent->GetCentralityPercentile("V0M"));
+      //    tEvent->SetCentralityFMD(cent->GetCentralityPercentile("FMD"));
+      tEvent->SetCentralitySPD1(cent->GetCentralityPercentile("CL1"));
+      //    tEvent->SetCentralityTrk(cent->GetCentralityPercentile("TRK"));
+    }
   }
-  
 
   if (mcP) delete [] motherids;
 
   cout<<"end of reading nt "<<nofTracks<<" real number "<<realnofTracks<<endl;
+
+  if(fReadV0)
+    {
+
+      for (Int_t i = 0; i < fEvent->GetNumberOfV0s(); i++) {
+       AliAODv0* aodv0 = fEvent->GetV0(i);
+       if (!aodv0) continue;
+       if(aodv0->GetNDaughters()>2) continue;
+       if(aodv0->GetNProngs()>2) continue;
+       if(aodv0->GetCharge()!=0) continue;
+       if(aodv0->ChargeProng(0)==aodv0->ChargeProng(1)) continue;
+       AliFemtoV0* trackCopyV0 = new AliFemtoV0();
+       CopyAODtoFemtoV0(aodv0, trackCopyV0);
+       tEvent->V0Collection()->push_back(trackCopyV0);
+       //cout<<"Pushback v0 to v0collection"<<endl;
+      }
+    }
+
 }
 
 void AliFemtoEventReaderAOD::CopyAODtoFemtoTrack(AliAODTrack *tAodTrack, 
@@ -610,7 +644,7 @@ void AliFemtoEventReaderAOD::CopyAODtoFemtoTrack(AliAODTrack *tAodTrack,
   // If it exists, use the additional information from the PWG2 AOD
 
   // Primary Vertex position
-  double fV1[3];
+  
   fEvent->GetPrimaryVertex()->GetPosition(fV1);
   //  fEvent->GetPrimaryVertex()->GetXYZ(fV1);
 
@@ -647,7 +681,7 @@ void AliFemtoEventReaderAOD::CopyAODtoFemtoTrack(AliAODTrack *tAodTrack,
   } 
   else {
     tFemtoTrack->SetImpactD(impact[0]);
-    tFemtoTrack->SetImpactZ(impact[1]);
+    tFemtoTrack->SetImpactZ(impact[1]+fV1[2]);
   }
 
   //   if (TMath::Abs(tAodTrack->Xv()) > 0.00000000001)
@@ -680,11 +714,11 @@ void AliFemtoEventReaderAOD::CopyAODtoFemtoTrack(AliAODTrack *tAodTrack,
   tFemtoTrack->SetCdd(covmat[0]);
   tFemtoTrack->SetCdz(covmat[1]);
   tFemtoTrack->SetCzz(covmat[2]);
-  tFemtoTrack->SetITSchi2(tAodTrack->Chi2perNDF());    
-  tFemtoTrack->SetITSncls(tAodTrack->GetITSNcls());     
-  tFemtoTrack->SetTPCchi2(tAodTrack->Chi2perNDF());       
-  tFemtoTrack->SetTPCncls(tAodTrack->GetTPCNcls());       
-  tFemtoTrack->SetTPCnclsF(tAodTrack->GetTPCNcls());      
+  tFemtoTrack->SetITSchi2(tAodTrack->Chi2perNDF());
+  tFemtoTrack->SetITSncls(tAodTrack->GetITSNcls());
+  tFemtoTrack->SetTPCchi2(tAodTrack->Chi2perNDF());
+  tFemtoTrack->SetTPCncls(tAodTrack->GetTPCNcls());
+  tFemtoTrack->SetTPCnclsF(tAodTrack->GetTPCNcls());
   tFemtoTrack->SetTPCsignalN(1); 
   tFemtoTrack->SetTPCsignalS(1); 
   tFemtoTrack->SetTPCsignal(tAodTrack->GetTPCsignal());
@@ -720,6 +754,139 @@ void AliFemtoEventReaderAOD::CopyAODtoFemtoTrack(AliAODTrack *tAodTrack,
   tFemtoTrack->SetKinkIndexes(indexes);
 }
 
+void AliFemtoEventReaderAOD::CopyAODtoFemtoV0(AliAODv0 *tAODv0, AliFemtoV0 *tFemtoV0)
+{
+  //tFemtoV0->SetdecayLengthV0(tAODv0->DecayLengthV0()); //wrocic do tego
+  tFemtoV0->SetdecayVertexV0X(tAODv0->DecayVertexV0X());
+  tFemtoV0->SetdecayVertexV0Y(tAODv0->DecayVertexV0Y());
+  tFemtoV0->SetdecayVertexV0Z(tAODv0->DecayVertexV0Z());
+  AliFemtoThreeVector decayvertex(tAODv0->DecayVertexV0X(),tAODv0->DecayVertexV0Y(),tAODv0->DecayVertexV0Z());
+  tFemtoV0->SetdecayVertexV0(decayvertex);
+  tFemtoV0->SetdcaV0Daughters(tAODv0->DcaV0Daughters());
+  tFemtoV0->SetdcaV0ToPrimVertex(tAODv0->DcaV0ToPrimVertex());
+  tFemtoV0->SetdcaPosToPrimVertex(tAODv0->DcaPosToPrimVertex());
+  tFemtoV0->SetdcaNegToPrimVertex(tAODv0->DcaNegToPrimVertex());
+  tFemtoV0->SetmomPosX(tAODv0->MomPosX());
+  tFemtoV0->SetmomPosY(tAODv0->MomPosY());
+  tFemtoV0->SetmomPosZ(tAODv0->MomPosZ());
+  AliFemtoThreeVector mompos(tAODv0->MomPosX(),tAODv0->MomPosY(),tAODv0->MomPosZ());
+  tFemtoV0->SetmomPos(mompos);
+  tFemtoV0->SetmomNegX(tAODv0->MomNegX());
+  tFemtoV0->SetmomNegY(tAODv0->MomNegY());
+  tFemtoV0->SetmomNegZ(tAODv0->MomNegZ());
+  AliFemtoThreeVector momneg(tAODv0->MomNegX(),tAODv0->MomNegY(),tAODv0->MomNegZ());
+  tFemtoV0->SetmomNeg(momneg);
+
+  //jest cos takiego w AliFemtoV0.h czego nie ma w AliAODv0.h
+  //void SettpcHitsPos(const int& i);      
+  //void SettpcHitsNeg(const int& i);      
+
+  //void SetTrackTopologyMapPos(unsigned int word, const unsigned long& m);
+  //void SetTrackTopologyMapNeg(unsigned int word, const unsigned long& m);
+
+  tFemtoV0->SetmomV0X(tAODv0->MomV0X());
+  tFemtoV0->SetmomV0Y(tAODv0->MomV0Y());
+  tFemtoV0->SetmomV0Z(tAODv0->MomV0Z());
+  AliFemtoThreeVector momv0(tAODv0->MomV0X(),tAODv0->MomV0Y(),tAODv0->MomV0Z());
+  tFemtoV0->SetmomV0(momv0);
+  tFemtoV0->SetalphaV0(tAODv0->AlphaV0());
+  tFemtoV0->SetptArmV0(tAODv0->PtArmV0());
+  tFemtoV0->SeteLambda(tAODv0->ELambda());
+  tFemtoV0->SeteK0Short(tAODv0->EK0Short());
+  tFemtoV0->SetePosProton(tAODv0->EPosProton());
+  tFemtoV0->SeteNegProton(tAODv0->ENegProton());
+  tFemtoV0->SetmassLambda(tAODv0->MassLambda());
+  tFemtoV0->SetmassAntiLambda(tAODv0->MassAntiLambda());
+  tFemtoV0->SetmassK0Short(tAODv0->MassK0Short());
+  tFemtoV0->SetrapLambda(tAODv0->RapLambda());
+  tFemtoV0->SetrapK0Short(tAODv0->RapK0Short());
+  
+  //void SetcTauLambda( float x);   
+  //void SetcTauK0Short( float x); 
+  
+  tFemtoV0->SetptV0(::sqrt(tAODv0->Pt2V0())); //!
+  tFemtoV0->SetptotV0(::sqrt(tAODv0->Ptot2V0()));
+  tFemtoV0->SetptPos(::sqrt(tAODv0->MomPosX()*tAODv0->MomPosX()+tAODv0->MomPosY()*tAODv0->MomPosY()));
+  tFemtoV0->SetptotPos(::sqrt(tAODv0->Ptot2Pos()));
+  tFemtoV0->SetptNeg(::sqrt(tAODv0->MomNegX()*tAODv0->MomNegX()+tAODv0->MomNegY()*tAODv0->MomNegY()));
+  tFemtoV0->SetptotNeg(::sqrt(tAODv0->Ptot2Neg()));
+  
+  tFemtoV0->SetidNeg(tAODv0->GetNegID());
+  //cout<<"tAODv0->GetNegID(): "<<tAODv0->GetNegID()<<endl;
+  //cout<<"tFemtoV0->IdNeg(): "<<tFemtoV0->IdNeg()<<endl;
+  tFemtoV0->SetidPos(tAODv0->GetPosID());
+
+  tFemtoV0->SetEtaV0(tAODv0->Eta());
+  tFemtoV0->SetPhiV0(tAODv0->Phi());
+  tFemtoV0->SetCosPointingAngle(tAODv0->CosPointingAngle(fV1));
+  //tFemtoV0->SetYV0(tAODv0->Y());
+
+  //void SetdedxNeg(float x);
+  //void SeterrdedxNeg(float x);//Gael 04Fev2002
+  //void SetlendedxNeg(float x);//Gael 04Fev2002
+  //void SetdedxPos(float x);
+  //void SeterrdedxPos(float x);//Gael 04Fev2002
+  //void SetlendedxPos(float x);//Gael 04Fev2002
+
+  tFemtoV0->SetEtaPos(tAODv0->PseudoRapPos());
+  tFemtoV0->SetEtaNeg(tAODv0->PseudoRapNeg());
+
+  AliAODTrack *trackpos = (AliAODTrack*)tAODv0->GetDaughter(0);
+  AliAODTrack *trackneg = (AliAODTrack*)tAODv0->GetDaughter(1);
+
+  if(trackpos && trackneg)
+    {
+      //tFemtoV0->SetEtaPos(trackpos->Eta()); //tAODv0->PseudoRapPos()
+      //tFemtoV0->SetEtaNeg(trackneg->Eta()); //tAODv0->PseudoRapNeg()
+      tFemtoV0->SetTPCNclsPos(trackpos->GetTPCNcls());
+      tFemtoV0->SetTPCNclsNeg(trackneg->GetTPCNcls());
+      tFemtoV0->SetTPCclustersPos(trackpos->GetTPCClusterMap());
+      tFemtoV0->SetTPCclustersNeg(trackneg->GetTPCClusterMap());
+      tFemtoV0->SetTPCsharingPos(trackpos->GetTPCSharedMap());
+      tFemtoV0->SetTPCsharingNeg(trackneg->GetTPCSharedMap());
+      tFemtoV0->SetNdofPos(trackpos->Chi2perNDF());
+      tFemtoV0->SetNdofNeg(trackneg->Chi2perNDF());
+      tFemtoV0->SetStatusPos(trackpos->GetStatus());
+      tFemtoV0->SetStatusNeg(trackneg->GetStatus());
+
+      tFemtoV0->SetPosNSigmaTPCK(fAODpidUtil->NumberOfSigmasTPC(trackpos,AliPID::kKaon));
+      tFemtoV0->SetNegNSigmaTPCK(fAODpidUtil->NumberOfSigmasTPC(trackneg,AliPID::kKaon));
+      tFemtoV0->SetPosNSigmaTPCP(fAODpidUtil->NumberOfSigmasTPC(trackpos,AliPID::kProton));
+      tFemtoV0->SetNegNSigmaTPCP(fAODpidUtil->NumberOfSigmasTPC(trackneg,AliPID::kProton));
+      tFemtoV0->SetPosNSigmaTPCPi(fAODpidUtil->NumberOfSigmasTPC(trackpos,AliPID::kPion));
+      tFemtoV0->SetNegNSigmaTPCPi(fAODpidUtil->NumberOfSigmasTPC(trackneg,AliPID::kPion));
+
+
+      if((tFemtoV0->StatusPos()&AliESDtrack::kTOFpid)==0 || (tFemtoV0->StatusPos()&AliESDtrack::kTIME)==0 || (tFemtoV0->StatusPos()&AliESDtrack::kTOFout)==0 || (tFemtoV0->StatusPos()&AliESDtrack::kTOFmismatch)>0)
+       {
+         if((tFemtoV0->StatusNeg()&AliESDtrack::kTOFpid)==0 || (tFemtoV0->StatusNeg()&AliESDtrack::kTIME)==0 || (tFemtoV0->StatusNeg()&AliESDtrack::kTOFout)==0 || (tFemtoV0->StatusNeg()&AliESDtrack::kTOFmismatch)>0)
+           {
+             tFemtoV0->SetPosNSigmaTOFK(-9999);
+             tFemtoV0->SetNegNSigmaTOFK(-9999);
+             tFemtoV0->SetPosNSigmaTOFP(-9999);
+             tFemtoV0->SetNegNSigmaTOFP(-9999);
+             tFemtoV0->SetPosNSigmaTOFPi(-9999);
+             tFemtoV0->SetNegNSigmaTOFPi(-9999);
+           }
+       }
+      else
+       {
+         tFemtoV0->SetPosNSigmaTOFK(fAODpidUtil->NumberOfSigmasTOF(trackpos,AliPID::kKaon));
+         tFemtoV0->SetNegNSigmaTOFK(fAODpidUtil->NumberOfSigmasTOF(trackneg,AliPID::kKaon));
+         tFemtoV0->SetPosNSigmaTOFP(fAODpidUtil->NumberOfSigmasTOF(trackpos,AliPID::kProton));
+         tFemtoV0->SetNegNSigmaTOFP(fAODpidUtil->NumberOfSigmasTOF(trackneg,AliPID::kProton));
+         tFemtoV0->SetPosNSigmaTOFPi(fAODpidUtil->NumberOfSigmasTOF(trackpos,AliPID::kPion));
+         tFemtoV0->SetNegNSigmaTOFPi(fAODpidUtil->NumberOfSigmasTOF(trackneg,AliPID::kPion));
+       }
+    }
+  else
+    {
+      tFemtoV0->SetStatusPos(999);
+      tFemtoV0->SetStatusNeg(999);
+    }
+  tFemtoV0->SetOnFlyStatusV0(tAODv0->GetOnFlyStatus());
+}
+
 void AliFemtoEventReaderAOD::SetFilterBit(UInt_t ibit)
 {
   fFilterBit = (1 << (ibit));
@@ -730,6 +897,12 @@ void AliFemtoEventReaderAOD::SetReadMC(unsigned char a)
   fReadMC = a;
 }
 
+
+void AliFemtoEventReaderAOD::SetReadV0(unsigned char a)
+{
+  fReadV0 = a;
+}
+
 AliAODMCParticle* AliFemtoEventReaderAOD::GetParticleWithLabel(TClonesArray *mcP, Int_t aLabel)
 {
   if (aLabel < 0) return 0;
@@ -851,8 +1024,14 @@ void AliFemtoEventReaderAOD::SetCentralityPreSelection(double min, double max)
 {
   fCentRange[0] = min; fCentRange[1] = max;
   fUsePreCent = 1; 
+  fNoCentrality = 0;
 }
 
+void AliFemtoEventReaderAOD::SetNoCentrality(bool anocent)
+{
+  fNoCentrality = anocent;
+  if (fNoCentrality) fUsePreCent = 0;
+}
 
 void AliFemtoEventReaderAOD::SetAODpidUtil(AliAODpidUtil *aAODpidUtil)
 {
index 0ab8727a64c141b2442565a677dfed49cca34746..752734b8048ed1105c9e90b5f14c3c7c05be3c67 100644 (file)
@@ -20,7 +20,7 @@
 #include <list>
 //#include "AliPWG2AODTrack.h"
 #include "AliAODMCParticle.h"
-
+#include "AliFemtoV0.h"
 #include "AliAODpidUtil.h"
 
 class AliFemtoEvent;
@@ -40,7 +40,9 @@ class AliFemtoEventReaderAOD : public AliFemtoEventReader
   void SetInputFile(const char* inputFile);
   void SetFilterBit(UInt_t ibit);
   void SetReadMC(unsigned char a);
+  void SetReadV0(unsigned char a);
   void SetCentralityPreSelection(double min, double max);
+  void SetNoCentrality(bool anocent);
   void SetAODpidUtil(AliAODpidUtil *aAODpidUtil);
 
  protected:
@@ -49,6 +51,7 @@ class AliFemtoEventReaderAOD : public AliFemtoEventReader
                                    AliFemtoTrack *tFemtoTrack
                                    //                              AliPWG2AODTrack *tPWG2AODTrack
                                    ); 
+  virtual void CopyAODtoFemtoV0(AliAODv0 *tAODv0, AliFemtoV0 *tFemtoV0);                           
   virtual void CopyPIDtoFemtoTrack( AliAODTrack *tAodTrack, 
                                   AliFemtoTrack *tFemtoTrack);
 
@@ -61,8 +64,10 @@ class AliFemtoEventReaderAOD : public AliFemtoEventReader
   //  TClonesArray*  fPWG2AODTracks;    // Link to PWG2 specific AOD information (if it exists)
   
   unsigned char  fReadMC;           // Attempt to read the MC information from the AOD
+  unsigned char  fReadV0;           // Read V0 information from the AOD and put it into V0Collection
   unsigned char  fUsePreCent;       // Use centrality pre-selection to speed up analysis
   double         fCentRange[2];     // Centrality pre-selection range
+  unsigned char  fNoCentrality;     // Do not use centrality determination (for pp)
   AliAODpidUtil* fAODpidUtil;
 
  private:
index 606d407da34685ff29220b5511b73d85d081d1a1..17109b474bf32ffc76837b4d0d9540ff358fd7a3 100644 (file)
@@ -31,6 +31,7 @@ ClassImp(AliFemtoEventReaderESDChain)
 #endif
 
 using namespace std;
+
 //____________________________
 AliFemtoEventReaderESDChain::AliFemtoEventReaderESDChain():
   fFileName(" "),
@@ -47,7 +48,8 @@ AliFemtoEventReaderESDChain::AliFemtoEventReaderESDChain():
   fEstEventMult(kITSTPC), 
   fEventTrig(AliVEvent::kMB), //trigger
   fESDpid(0),
-  fIsPidOwner(0)
+  fIsPidOwner(0),
+  fReadV0(0)
 {
   //constructor with 0 parameters , look at default settings 
   //   fClusterPerPadrow = (list<Int_t> **) malloc(sizeof(list<Int_t> *) * AliESDfriendTrack::kMaxTPCcluster);
@@ -77,7 +79,8 @@ AliFemtoEventReaderESDChain::AliFemtoEventReaderESDChain(const AliFemtoEventRead
   fEstEventMult(kITSTPC),
   fEventTrig(AliVEvent::kMB), //trigger
   fESDpid(0),
-  fIsPidOwner(0)
+  fIsPidOwner(0),
+  fReadV0(0)
 {
   // Copy constructor
   fConstrained = aReader.fConstrained;
@@ -151,6 +154,7 @@ AliFemtoEventReaderESDChain& AliFemtoEventReaderESDChain::operator=(const AliFem
   fEstEventMult = aReader.fEstEventMult;
 
   fUsePhysicsSel = aReader.fUsePhysicsSel;
+  fReadV0 = aReader.fReadV0;
   if (aReader.fUsePhysicsSel)
     fSelect = new AliPhysicsSelection();
   //  fEventFriend = aReader.fEventFriend;
@@ -747,6 +751,28 @@ AliFemtoEvent* AliFemtoEventReaderESDChain::ReturnHbtEvent()
     hbtEvent->SetReactionPlaneAngle(ep->GetEventplane("Q"));
   }
 
+  //V0
+  if(fReadV0)
+    {
+      for (Int_t i = 0; i < fEvent->GetNumberOfV0s(); i++) {
+       AliESDv0* esdv0 = fEvent->GetV0(i);
+       if (!esdv0) continue;
+       //if(esdv0->GetNDaughters()>2) continue;
+       //if(esdv0->GetNProngs()>2) continue;
+       if(esdv0->Charge()!=0) continue;
+       AliESDtrack *trackPos = fEvent->GetTrack(esdv0->GetPindex());
+       if(!trackPos) continue;
+       AliESDtrack *trackNeg = fEvent->GetTrack(esdv0->GetNindex());
+       if(!trackNeg) continue;
+       if(trackPos->Charge()==trackNeg->Charge()) continue;
+       AliFemtoV0* trackCopyV0 = new AliFemtoV0();
+       CopyESDtoFemtoV0(esdv0, trackCopyV0, fEvent);
+       hbtEvent->V0Collection()->push_back(trackCopyV0);
+       //cout<<"Pushback v0 to v0collection"<<endl;
+      }
+    }
+
+
   fCurEvent++; 
   if (Debug()>1) cout<<"end of reading nt "<<nofTracks<<" real number "<<realnofTracks<<endl;
 
@@ -810,6 +836,154 @@ Float_t AliFemtoEventReaderESDChain::GetSigmaToVertex(double *impact, double *co
   return d;
 }
 
+
+
+
+void AliFemtoEventReaderESDChain::CopyESDtoFemtoV0(AliESDv0 *tESDv0, AliFemtoV0 *tFemtoV0, AliESDEvent *tESDevent)
+{
+  AliESDtrack *pTrack = tESDevent->GetTrack(tESDv0->GetPindex());
+  AliESDtrack *nTrack = tESDevent->GetTrack(tESDv0->GetNindex());
+
+  //tFemtoV0->SetdecayLengthV0(tESDv0->DecayLengthV0()); //wrocic do tego
+  //tFemtoV0->SetdecayVertexV0X(tESDv0->DecayVertexV0X());
+  //tFemtoV0->SetdecayVertexV0Y(tESDv0->DecayVertexV0Y());
+  //tFemtoV0->SetdecayVertexV0Z(tESDv0->DecayVertexV0Z()); //nie ma w AliESDv0
+  //AliFemtoThreeVector decayvertex(tESDv0->DecayVertexV0X(),tESDv0->DecayVertexV0Y(),tESDv0->DecayVertexV0Z());
+  //tFemtoV0->SetdecayVertexV0(decayvertex);
+  tFemtoV0->SetdcaV0Daughters(tESDv0->GetDcaV0Daughters());
+  double fPrimaryVtxPosition[3];
+  tESDevent->GetPrimaryVertex()->GetXYZ(fPrimaryVtxPosition);
+  tFemtoV0->SetdcaV0ToPrimVertex(tESDv0->GetD(fPrimaryVtxPosition[0],fPrimaryVtxPosition[1],fPrimaryVtxPosition[2]));
+  tFemtoV0->SetdcaPosToPrimVertex(TMath::Abs(pTrack->GetD(fPrimaryVtxPosition[0],fPrimaryVtxPosition[1],tESDevent->GetMagneticField())));
+  tFemtoV0->SetdcaNegToPrimVertex(TMath::Abs(pTrack->GetD(fPrimaryVtxPosition[0],fPrimaryVtxPosition[1],tESDevent->GetMagneticField())));
+  double MomPos[3];
+  pTrack->PxPyPz(MomPos);
+  tFemtoV0->SetmomPosX(MomPos[0]);
+  tFemtoV0->SetmomPosY(MomPos[1]);
+  tFemtoV0->SetmomPosZ(MomPos[2]);
+  AliFemtoThreeVector mompos(MomPos[0],MomPos[1],MomPos[2]);
+  tFemtoV0->SetmomPos(mompos);
+  double MomNeg[3];
+  nTrack->PxPyPz(MomNeg);
+  tFemtoV0->SetmomNegX(MomNeg[0]);
+  tFemtoV0->SetmomNegY(MomNeg[1]);
+  tFemtoV0->SetmomNegZ(MomNeg[2]);
+  AliFemtoThreeVector momneg(MomNeg[0],MomNeg[1],MomNeg[2]);
+  tFemtoV0->SetmomNeg(momneg);
+
+  //jest cos takiego w AliFemtoV0.h czego nie ma w AliAODv0.h
+  //void SettpcHitsPos(const int& i);      
+  //void SettpcHitsNeg(const int& i);      
+
+  //void SetTrackTopologyMapPos(unsigned int word, const unsigned long& m);
+  //void SetTrackTopologyMapNeg(unsigned int word, const unsigned long& m);
+
+  tFemtoV0->SetmomV0X(tESDv0->Px());
+  tFemtoV0->SetmomV0Y(tESDv0->Py());
+  tFemtoV0->SetmomV0Z(tESDv0->Pz());
+  AliFemtoThreeVector momv0(tESDv0->Px(),tESDv0->Py(),tESDv0->Pz());
+  tFemtoV0->SetmomV0(momv0);
+  tFemtoV0->SetalphaV0(tESDv0->AlphaV0());
+  tFemtoV0->SetptArmV0(tESDv0->PtArmV0());
+  //tFemtoV0->SeteLambda(tESDv0->ELambda());
+  //tFemtoV0->SeteK0Short(tESDv0->EK0Short());
+  //tFemtoV0->SetePosProton(tESDv0->EPosProton());
+  //tFemtoV0->SeteNegProton(tESDv0->ENegProton());
+  tFemtoV0->SetmassLambda(tESDv0->GetEffMass(4,2));
+  tFemtoV0->SetmassAntiLambda(tESDv0->GetEffMass(2,4));
+  tFemtoV0->SetmassK0Short(tESDv0->GetEffMass(2,2));
+  //tFemtoV0->SetrapLambda(tESDv0->RapLambda());
+  //tFemtoV0->SetrapK0Short(tESDv0->RapK0Short());
+  
+  //void SetcTauLambda( float x);   
+  //void SetcTauK0Short( float x); 
+  
+  tFemtoV0->SetptV0(tESDv0->Pt());
+  tFemtoV0->SetptotV0(tESDv0->P());
+  tFemtoV0->SetptPos(pTrack->Pt());
+  tFemtoV0->SetptotPos(pTrack->P());
+  tFemtoV0->SetptNeg(nTrack->Pt());
+  tFemtoV0->SetptotNeg(nTrack->P());
+  
+  tFemtoV0->SetidNeg(nTrack->GetID());
+  //cout<<"tESDv0->GetNegID(): "<<tESDv0->GetNegID()<<endl;
+  //cout<<"tFemtoV0->IdNeg(): "<<tFemtoV0->IdNeg()<<endl;
+  tFemtoV0->SetidPos(pTrack->GetID());
+
+  tFemtoV0->SetEtaV0(tESDv0->Eta());
+  tFemtoV0->SetPhiV0(tESDv0->Phi());
+  tFemtoV0->SetCosPointingAngle(tESDv0->GetV0CosineOfPointingAngle(fPrimaryVtxPosition[0],fPrimaryVtxPosition[1], fPrimaryVtxPosition[2]));
+  //tFemtoV0->SetYV0(tESDv0->Y());
+
+  //void SetdedxNeg(float x);
+  //void SeterrdedxNeg(float x);//Gael 04Fev2002
+  //void SetlendedxNeg(float x);//Gael 04Fev2002
+  //void SetdedxPos(float x);
+  //void SeterrdedxPos(float x);//Gael 04Fev2002
+  //void SetlendedxPos(float x);//Gael 04Fev2002
+
+  tFemtoV0->SetEtaPos(pTrack->Eta());
+  tFemtoV0->SetEtaNeg(nTrack->Eta());
+
+  //AliAODTrack *trackpos = (AliAODTrack*)tESDv0->GetDaughter(0);
+  //AliAODTrack *trackneg = (AliAODTrack*)tESDv0->GetDaughter(1);
+
+  if(pTrack && nTrack)
+    {
+      tFemtoV0->SetEtaPos(pTrack->Eta()); //tESDv0->PseudoRapPos()
+      tFemtoV0->SetEtaNeg(nTrack->Eta()); //tESDv0->PseudoRapNeg()
+      tFemtoV0->SetTPCNclsPos(pTrack->GetTPCNcls());
+      tFemtoV0->SetTPCNclsNeg(nTrack->GetTPCNcls());
+      tFemtoV0->SetTPCclustersPos(pTrack->GetTPCClusterMap());
+      tFemtoV0->SetTPCclustersNeg(nTrack->GetTPCClusterMap());
+      tFemtoV0->SetTPCsharingPos(pTrack->GetTPCSharedMap());
+      tFemtoV0->SetTPCsharingNeg(nTrack->GetTPCSharedMap());
+      tFemtoV0->SetNdofPos(pTrack->GetTPCchi2()/pTrack->GetTPCNcls());
+      tFemtoV0->SetNdofNeg(nTrack->GetTPCchi2()/nTrack->GetTPCNcls());
+      tFemtoV0->SetStatusPos(pTrack->GetStatus());
+      tFemtoV0->SetStatusNeg(nTrack->GetStatus());
+
+      tFemtoV0->SetPosNSigmaTPCK(fESDpid->NumberOfSigmasTPC(pTrack,AliPID::kKaon));
+      tFemtoV0->SetNegNSigmaTPCK(fESDpid->NumberOfSigmasTPC(nTrack,AliPID::kKaon));
+      tFemtoV0->SetPosNSigmaTPCP(fESDpid->NumberOfSigmasTPC(pTrack,AliPID::kProton));
+      tFemtoV0->SetNegNSigmaTPCP(fESDpid->NumberOfSigmasTPC(nTrack,AliPID::kProton));
+      tFemtoV0->SetPosNSigmaTPCPi(fESDpid->NumberOfSigmasTPC(pTrack,AliPID::kPion));
+      tFemtoV0->SetNegNSigmaTPCPi(fESDpid->NumberOfSigmasTPC(nTrack,AliPID::kPion));
+
+
+      if((tFemtoV0->StatusPos()&AliESDtrack::kTOFpid)==0 || (tFemtoV0->StatusPos()&AliESDtrack::kTIME)==0 || (tFemtoV0->StatusPos()&AliESDtrack::kTOFout)==0 || (tFemtoV0->StatusPos()&AliESDtrack::kTOFmismatch)>0)
+       {
+         if((tFemtoV0->StatusNeg()&AliESDtrack::kTOFpid)==0 || (tFemtoV0->StatusNeg()&AliESDtrack::kTIME)==0 || (tFemtoV0->StatusNeg()&AliESDtrack::kTOFout)==0 || (tFemtoV0->StatusNeg()&AliESDtrack::kTOFmismatch)>0)
+           {
+             tFemtoV0->SetPosNSigmaTOFK(-9999);
+             tFemtoV0->SetNegNSigmaTOFK(-9999);
+             tFemtoV0->SetPosNSigmaTOFP(-9999);
+             tFemtoV0->SetNegNSigmaTOFP(-9999);
+             tFemtoV0->SetPosNSigmaTOFPi(-9999);
+             tFemtoV0->SetNegNSigmaTOFPi(-9999);
+           }
+       }
+      else
+       {
+         tFemtoV0->SetPosNSigmaTOFK(fESDpid->NumberOfSigmasTOF(pTrack,AliPID::kKaon));
+         tFemtoV0->SetNegNSigmaTOFK(fESDpid->NumberOfSigmasTOF(nTrack,AliPID::kKaon));
+         tFemtoV0->SetPosNSigmaTOFP(fESDpid->NumberOfSigmasTOF(pTrack,AliPID::kProton));
+         tFemtoV0->SetNegNSigmaTOFP(fESDpid->NumberOfSigmasTOF(nTrack,AliPID::kProton));
+         tFemtoV0->SetPosNSigmaTOFPi(fESDpid->NumberOfSigmasTOF(pTrack,AliPID::kPion));
+         tFemtoV0->SetNegNSigmaTOFPi(fESDpid->NumberOfSigmasTOF(nTrack,AliPID::kPion));
+       }
+    }
+  else
+    {
+      tFemtoV0->SetStatusPos(999);
+      tFemtoV0->SetStatusNeg(999);
+    }
+  tFemtoV0->SetOnFlyStatusV0(tESDv0->GetOnFlyStatus());
+}
+
+
+
+
 void AliFemtoEventReaderESDChain::SetReadTrackType(ReadTrackType aType)
 {
   fTrackType = aType;
@@ -821,6 +995,11 @@ void AliFemtoEventReaderESDChain::SetEventTrigger(UInt_t eventtrig)
   fEventTrig = eventtrig;
 }
 
+//V0 reading
+void AliFemtoEventReaderESDChain::SetReadV0(bool a)
+{
+  fReadV0 = a;
+}
 
 
 
index fb3b3a162f07975b6b4ce936f03b5e8c58f3c0c0..cf107eb596e874fa54b0db03fc3118f26060225d 100644 (file)
@@ -11,6 +11,8 @@
 
 #include "AliFemtoEventReader.h"
 #include "AliFemtoEnumeration.h"
+#include "AliFemtoV0.h"
+#include "AliESDv0.h"
 
 #include <string>
 #include <vector>
@@ -46,6 +48,9 @@ class AliFemtoEventReaderESDChain : public AliFemtoEventReader
   void SetReadTPCInner(const bool readinner);
   void SetUseTPCOnly(const bool usetpconly);
 
+  virtual void CopyESDtoFemtoV0(AliESDv0 *tESDv0, AliFemtoV0 *tFemtoV0, AliESDEvent *fESDevent);
+ void SetReadV0(bool a);
+
   void SetUsePhysicsSelection(const bool usephysics);
   void SetUseMultiplicity(EstEventMult aType);
   void SetEventTrigger(UInt_t eventtrig); //trigger
@@ -79,6 +84,7 @@ class AliFemtoEventReaderESDChain : public AliFemtoEventReader
   EstEventMult   fEstEventMult;  // Type of the event multiplicity estimator
   UInt_t         fEventTrig;     //event trigger
 
+
 /*   list<Int_t>  **fSharedList;       //! Table (one list per padrow) of clusters which are shared */
 /*   list<Int_t>  **fClusterPerPadrow; //! Table (one list per padrow) of clusters in each padrow */
                
@@ -87,6 +93,7 @@ class AliFemtoEventReaderESDChain : public AliFemtoEventReader
 
   AliESDpid *fESDpid;
   Bool_t fIsPidOwner;
+  bool           fReadV0;           // Read V0 information from the AOD and put it into V0Collection
 
 #ifdef __ROOT__
   ClassDef(AliFemtoEventReaderESDChain, 1)
index a53dea430b08235e6824906548ce2ddfd59a075e..004a548fe6b8e565c53938964d1772d74c68db12 100644 (file)
@@ -182,7 +182,6 @@ AliFemtoEvent* AliFemtoEventReaderKinematicsChain::ReturnHbtEvent()
   int tNormMult = 0;
   for (int i=0;i<nofTracks;i++)
     {
-
       //take only primaries
       if(!fStack->IsPhysicalPrimary(i)) {continue;}
                  
@@ -257,7 +256,7 @@ AliFemtoEvent* AliFemtoEventReaderKinematicsChain::ReturnHbtEvent()
 
        AliFemtoThreeVector v(pxyz[0],pxyz[1],pxyz[2]);
        if (v.Mag() < 0.0001) {
-         //      cout << "Found 0 momentum ???? "  << pxyz[0] << " " << pxyz[1] << " " << pxyz[2] << endl;
+         //cout << "Found 0 momentum ???? "  << pxyz[0] << " " << pxyz[1] << " " << pxyz[2] << endl;
          delete trackCopy;
          continue;
        }
@@ -268,11 +267,11 @@ AliFemtoEvent* AliFemtoEventReaderKinematicsChain::ReturnHbtEvent()
        const AliFmThreeVectorD kOrigin(fV1[0],fV1[1],fV1[2]);
 
        //label
-    trackCopy->SetLabel(i);
+       trackCopy->SetLabel(i);
 
 
        hbtEvent->TrackCollection()->push_back(trackCopy);//adding track to analysis
-       
+       //cout<<"Track added: "<<i<<endl;
                
     }
   
@@ -280,6 +279,42 @@ AliFemtoEvent* AliFemtoEventReaderKinematicsChain::ReturnHbtEvent()
   hbtEvent->SetNormalizedMult(tNormMult);
   fCurEvent++; 
 
+
+  //V0 analysis code - no V0 finder for Kinematics, we can only check if it is primary and if it has at least 2 daughters.
+
+  for (int i=0;i<nofTracks;i++)
+    {
+      //do not take primaries
+      if(!fStack->IsPhysicalPrimary(i)) {continue;}
+      //getting next track
+      TParticle *kinetrack= fStack->Particle(i);
+      if (!kinetrack) continue;
+      
+      if(kinetrack->GetPDG()->Charge()!=0) continue; //charge - neutral
+      //if(kinetrack->GetPDG()->Stable()==1) continue; //particle is not stable
+      if(kinetrack->GetDaughter(0)<1) continue; //has 1'st daughter
+      if(kinetrack->GetDaughter(1)<1) continue;  //has 2'nd daughter
+      //we want one positive, one negative particle. Or two neutral.
+      // if((fStack->Particle(kinetrack->GetDaughter(0)))->GetPDG()->Charge()>=0)
+      //       if((fStack->Particle(kinetrack->GetDaughter(1)))->GetPDG()->Charge()>0)
+      //         continue;
+      // if((fStack->Particle(kinetrack->GetDaughter(0)))->GetPDG()->Charge()<=0)
+      //       if((fStack->Particle(kinetrack->GetDaughter(0)))->GetPDG()->Charge()<0)
+      //         continue;
+      
+      if(kinetrack->Pt()<0.00001)
+       continue;
+      
+      AliFemtoV0* trackCopyV0 = new AliFemtoV0();
+      CopyAODtoFemtoV0(kinetrack, trackCopyV0);
+      hbtEvent->V0Collection()->push_back(trackCopyV0);
+    //cout<<"Pushback v0 to v0collection"<<endl;
+    }
+
+
+  cout<<"Number of tracks: "<<realnofTracks<<endl;
+
   return hbtEvent; 
 }
 
@@ -345,3 +380,120 @@ Float_t AliFemtoEventReaderKinematicsChain::GetSigmaToVertex(double *impact, dou
   d = TMath::ErfInverse(1 - TMath::Exp(-d * d / 2)) * TMath::Sqrt(2);
   return d;
 }
+
+
+
+ void AliFemtoEventReaderKinematicsChain::CopyAODtoFemtoV0(TParticle *tv0, AliFemtoV0 *tFemtoV0 )
+{
+  tFemtoV0->SetEtaV0(tv0->Eta());
+  tFemtoV0->SetEtaV0(tv0->Phi());
+  tFemtoV0->SetptV0(tv0->Pt()); 
+  tFemtoV0->SetptotV0(tv0->P());
+
+  tFemtoV0->SetmomV0X(tv0->Px());
+  tFemtoV0->SetmomV0Y(tv0->Py());
+  tFemtoV0->SetmomV0Z(tv0->Pz());
+  AliFemtoThreeVector momv0(tv0->Px(),tv0->Py(),tv0->Pz());
+  tFemtoV0->SetmomV0(momv0);
+
+
+  TParticle *trackpos;
+  TParticle *trackneg;
+
+  //daughters
+  if(fStack->Particle(tv0->GetDaughter(0))->GetPDG()->Charge()>=0) //first positive, second negative
+    {
+      trackpos = (TParticle*)(fStack->Particle(tv0->GetDaughter(0)));
+      trackneg = (TParticle*)(fStack->Particle(tv0->GetDaughter(1)));
+      tFemtoV0->SetidPos(tv0->GetDaughter(0));
+      tFemtoV0->SetidNeg(tv0->GetDaughter(1));
+    }
+  else //first negative, second positive
+    {
+      trackpos = (TParticle*)(fStack->Particle(tv0->GetDaughter(1)));
+      trackneg = (TParticle*)(fStack->Particle(tv0->GetDaughter(0)));
+      tFemtoV0->SetidPos(tv0->GetDaughter(1));
+      tFemtoV0->SetidNeg(tv0->GetDaughter(0));
+    }
+
+  tFemtoV0->SetEtaPos(trackpos->Eta());
+  tFemtoV0->SetEtaNeg(trackneg->Eta());
+  
+  tFemtoV0->SetptPos(trackpos->Pt());
+  tFemtoV0->SetptNeg(trackneg->Pt());
+   
+  tFemtoV0->SetptotPos(trackpos->P());
+  tFemtoV0->SetptotNeg(trackneg->P());
+
+  tFemtoV0->SetmomPosX(trackpos->Px());
+  tFemtoV0->SetmomPosY(trackpos->Py());
+  tFemtoV0->SetmomPosZ(trackpos->Pz());
+  AliFemtoThreeVector mompos(trackpos->Px(),trackpos->Py(),trackpos->Pz());
+  tFemtoV0->SetmomPos(mompos);
+
+  tFemtoV0->SetmomNegX(trackneg->Px());
+  tFemtoV0->SetmomNegY(trackneg->Py());
+  tFemtoV0->SetmomNegZ(trackneg->Pz());
+  AliFemtoThreeVector momneg(trackneg->Px(),trackneg->Py(),trackneg->Pz());
+  tFemtoV0->SetmomNeg(momneg);
+
+    
+  tFemtoV0->SetmassLambda(tv0->GetMass());
+  tFemtoV0->SetmassAntiLambda(tv0->GetMass());
+  tFemtoV0->SetmassK0Short(tv0->GetMass());
+
+  tFemtoV0->SetYV0(tv0->Y());
+
+  tFemtoV0->SetdecayVertexV0X(trackpos->Vx()); //vertex of the decay is set as the vertex of creation of daughters
+  tFemtoV0->SetdecayVertexV0Y(trackpos->Vy());
+  tFemtoV0->SetdecayVertexV0Z(trackpos->Vz());
+  AliFemtoThreeVector decayvertex(trackpos->Vx(),trackpos->Vy(),trackpos->Vz());
+  tFemtoV0->SetdecayVertexV0(decayvertex);
+
+  tFemtoV0->SetdcaV0Daughters(0);
+  tFemtoV0->SetCosPointingAngle(1);
+
+
+  tFemtoV0->SetStatusPos(1);
+  tFemtoV0->SetStatusNeg(1);
+
+  
+  if(trackpos->GetPdgCode()==2212) //proton
+    {
+      tFemtoV0->SetPosNSigmaTPCK(1000);
+      tFemtoV0->SetPosNSigmaTPCPi(1000);
+      tFemtoV0->SetPosNSigmaTPCP(0);
+    }
+  if(trackneg->GetPdgCode()==-2212) //antiproton
+    {
+      tFemtoV0->SetNegNSigmaTPCK(1000);
+      tFemtoV0->SetNegNSigmaTPCPi(1000);
+      tFemtoV0->SetNegNSigmaTPCP(0);
+    }
+  if(trackpos->GetPdgCode()==211) //pion plus
+    {
+      tFemtoV0->SetPosNSigmaTPCK(1000);
+      tFemtoV0->SetPosNSigmaTPCPi(0);
+      tFemtoV0->SetPosNSigmaTPCP(1000);
+    }
+  if(trackneg->GetPdgCode()==-211) //pion minus
+    {
+      tFemtoV0->SetNegNSigmaTPCK(1000);
+      tFemtoV0->SetNegNSigmaTPCPi(0);
+      tFemtoV0->SetNegNSigmaTPCP(1000);
+    }
+  if(trackpos->GetPdgCode()==321) //K+
+    {
+      tFemtoV0->SetPosNSigmaTPCK(0);
+      tFemtoV0->SetPosNSigmaTPCPi(1000);
+      tFemtoV0->SetPosNSigmaTPCP(1000);
+    }
+  if(trackneg->GetPdgCode()==-321) //K-
+    {
+      tFemtoV0->SetNegNSigmaTPCK(0);
+      tFemtoV0->SetNegNSigmaTPCPi(1000);
+      tFemtoV0->SetNegNSigmaTPCP(1000);
+    }
+
+  
+}
index 2b610455e4febaa9ed352036bb0e41408b7bcfc1..86fd9aaf6c5dfa05f7225a77feae5a3da6f8d17c 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "AliFemtoEventReader.h"
 #include "AliFemtoEnumeration.h"
+#include "AliFemtoV0.h"
 
 #include <string>
 #include <vector>
@@ -42,6 +43,7 @@ class AliFemtoEventReaderKinematicsChain : public AliFemtoEventReader
   void SetStackSource(AliStack *aStack);
   void SetGenEventHeader(AliGenEventHeader *aGenHeader);
   void SetRotateToEventPlane(short dorotate);
+  void CopyAODtoFemtoV0(TParticle *tv0, AliFemtoV0 *tFemtoV0 );
 
  protected:
 
index 4481ae0049962df33c8a858e7e868850c984d24c..ad0c139dc646797d17fd8248df70a48909512ec9 100644 (file)
@@ -732,6 +732,7 @@ void AliFemtoPair::CalcNonIdPar() const{ // fortran like function! faster?
   double pz1 = fTrack1->FourMomentum().vect().z();
   double pE1  = fTrack1->FourMomentum().e();
   double tParticle1Mass = ::sqrt(pE1*pE1 - px1*px1 - py1*py1 - pz1*pz1);
+
   double px2 = fTrack2->FourMomentum().vect().x();
   double py2 = fTrack2->FourMomentum().vect().y();
   double pz2 = fTrack2->FourMomentum().vect().z();
index 009aa88819a59a8287e9325568286db99fdd1d52..34eed6c1496622ea017dbf500685be07eb27fadc 100644 (file)
@@ -38,9 +38,9 @@ public:
   unsigned long TopologyMap(const int word) const;
   int NumberOfHits() const;
 
-  unsigned long TrackId() const;         // only for particles from tracks 
-  unsigned short   NegTrackId() const;   // only for particles from v0 
-  unsigned short   PosTrackId() const;   // only for particles from v0 
+  int TrackId() const;         // only for particles from tracks 
+  int   NegTrackId() const;   // only for particles from v0 
+  int   PosTrackId() const;   // only for particles from v0 
 
   AliFemtoTrack* Track() const;
   AliFemtoV0* V0() const;
@@ -131,7 +131,7 @@ private:
 };
 
 inline AliFemtoTrack* AliFemtoParticle::Track() const { return fTrack; }
-inline unsigned long  AliFemtoParticle::TrackId() const { return fTrack->TrackId(); }
+inline int  AliFemtoParticle::TrackId() const { return fTrack->TrackId(); }
 inline const AliFemtoLorentzVector& AliFemtoParticle::FourMomentum() const {return fFourMomentum;}
 inline AliFmPhysicalHelixD& AliFemtoParticle::Helix() {return fHelix;}
 //inline unsigned long AliFemtoParticle::TopologyMap(const int word) const {return fMap[word];}
@@ -142,8 +142,8 @@ inline unsigned long AliFemtoParticle::TopologyMap(const int /* word */) const {
 inline int AliFemtoParticle::NumberOfHits() const {return 1;}
 
 inline AliFemtoV0* AliFemtoParticle::V0() const { return fV0; }
-inline unsigned short AliFemtoParticle::NegTrackId() const { return fV0->IdNeg(); }
-inline unsigned short AliFemtoParticle::PosTrackId() const { return fV0->IdPos(); }
+inline int AliFemtoParticle::NegTrackId() const { return fV0->IdNeg(); }
+inline int AliFemtoParticle::PosTrackId() const { return fV0->IdPos(); }
 inline const AliFemtoThreeVector AliFemtoParticle::DecayVertexPosition() const {return fV0->DecayVertexV0(); }
 // ***
 inline AliFemtoHiddenInfo* AliFemtoParticle::GetHiddenInfo() const
index af3ffe66ded6c199d13c3cf3c9a13fee38ddacad..d10815e7fecacb82b39b8db6e6c7318a78e89158 100644 (file)
@@ -89,6 +89,7 @@ void FillHbtParticleCollection(AliFemtoParticleCut*         partCut,
        }
       }
       pCut->FillCutMonitor(hbtEvent,partCollection);// Gael 19/06/02
+      
       break;
     }
   case hbtKink:          // cut is cutting on Kinks  -- mal 25May2001
@@ -340,6 +341,9 @@ void AliFemtoSimpleAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
     cout << "#particles in Collection 1, 2: " <<
       fPicoEvent->FirstParticleCollection()->size() << " " <<
       fPicoEvent->SecondParticleCollection()->size() << endl;
+
+    fEventCut->FillCutMonitor(fPicoEvent->FirstParticleCollection(),fPicoEvent->SecondParticleCollection()); //MJ!
+    
     
     // mal - implement a switch which allows only using events with ParticleCollections containing a minimum
     // number of entries (jun2002)
index 013f2804968d81d0ce7ce32be221c6415732ef2a..3929cdaebb88456c63c835758fb8c0f2e4d90829 100644 (file)
@@ -63,6 +63,9 @@ AliFemtoTrack::AliFemtoTrack():
   fShared(159),
   fNominalTpcEntrancePoint(0,0,0),
   fNominalTpcExitPoint(0,0,0),
+  fXatDCA(0),
+  fYatDCA(0),
+  fZatDCA(0),
   fHiddenInfo(0)
 {
   // Default constructor
@@ -115,6 +118,9 @@ AliFemtoTrack::AliFemtoTrack(const AliFemtoTrack& t) :
   fShared(159),
   fNominalTpcEntrancePoint(0,0,0),
   fNominalTpcExitPoint(0,0,0),
+  fXatDCA(0),
+  fYatDCA(0),
+  fZatDCA(0),
   fHiddenInfo(0)
  { 
    // copy constructor
@@ -165,6 +171,11 @@ AliFemtoTrack::AliFemtoTrack(const AliFemtoTrack& t) :
   fKinkIndexes[0] = t.fKinkIndexes[0];
   fKinkIndexes[1] = t.fKinkIndexes[1];
   fKinkIndexes[2] = t.fKinkIndexes[2];
+
+  fXatDCA=t.fXatDCA;
+  fYatDCA=t.fYatDCA;
+  fZatDCA=t.fZatDCA;
+
   //  cout << "Created track " << this << endl;
 }
 
@@ -215,6 +226,11 @@ AliFemtoTrack& AliFemtoTrack::operator=(const AliFemtoTrack& aTrack)
   fKinkIndexes[0] = aTrack.fKinkIndexes[0];
   fKinkIndexes[1] = aTrack.fKinkIndexes[1];
   fKinkIndexes[2] = aTrack.fKinkIndexes[2];
+
+  fXatDCA=aTrack.fXatDCA;
+  fYatDCA=aTrack.fYatDCA;
+  fZatDCA=aTrack.fZatDCA;
+
   if (ValidHiddenInfo())
     delete fHiddenInfo;
   if (aTrack.ValidHiddenInfo())
@@ -237,7 +253,7 @@ void AliFemtoTrack::SetTofExpectedTimes(const float& tpi, const float& tkn, cons
 void AliFemtoTrack::SetP(const AliFemtoThreeVector& p){fP = p;}
 void AliFemtoTrack::SetPt(const float& pt){fPt = pt;} 
 void AliFemtoTrack::SetHelix(const AliFmPhysicalHelixD& h){fHelix = h;}
-void AliFemtoTrack::SetTrackId(const short & id) { fTrackId=id;}
+void AliFemtoTrack::SetTrackId(const int & id) { fTrackId=id;}
 void AliFemtoTrack::SetFlags(const long int &flags) {fFlags=flags;}
 void AliFemtoTrack::SetLabel(const int &label) {fLabel=label;}
 void AliFemtoTrack::SetImpactD(const float& aImpactD){fImpactD=aImpactD;}
@@ -262,12 +278,16 @@ void AliFemtoTrack::SetNSigmaTOFK(const float& aNSigmaTOFK){fNSigmaTOFK=aNSigmaT
 void AliFemtoTrack::SetNSigmaTOFP(const float& aNSigmaTOFP){fNSigmaTOFP=aNSigmaTOFP;}
 void AliFemtoTrack::SetSigmaToVertex(const float& aSigma){fSigmaToVertex=aSigma;} 
 
+void AliFemtoTrack::SetXatDCA(const double& x) {fXatDCA=x;}
+void AliFemtoTrack::SetYatDCA(const double& x) {fYatDCA=x;}
+void AliFemtoTrack::SetZatDCA(const double& x) {fZatDCA=x;}
+
 
 short AliFemtoTrack::Charge() const {return fCharge;}  
 AliFemtoThreeVector AliFemtoTrack::P() const {return fP;}
 float AliFemtoTrack::Pt() const {return fPt;}              
 const AliFmPhysicalHelixD& AliFemtoTrack::Helix() const {return fHelix;}
-short AliFemtoTrack::TrackId() const { return fTrackId; }
+int AliFemtoTrack::TrackId() const { return fTrackId; }
 long int AliFemtoTrack::Flags() const {return fFlags;}
 int AliFemtoTrack::Label()const {return fLabel;}
 float AliFemtoTrack::ImpactD()const{return fImpactD;}
@@ -295,6 +315,9 @@ float AliFemtoTrack::TOFpionTime() const{return fTofPionTime;}
 float AliFemtoTrack::TOFkaonTime() const{return fTofKaonTime;}
 float AliFemtoTrack::TOFprotonTime() const{return fTofProtonTime;}
 
+double AliFemtoTrack::XatDCA() const {return fXatDCA;}
+double AliFemtoTrack::YatDCA() const {return fYatDCA;}
+double AliFemtoTrack::ZatDCA() const {return fZatDCA;}
 
 void AliFemtoTrack::SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo) {fHiddenInfo=aHiddenInfo;}
 bool AliFemtoTrack::ValidHiddenInfo() const { if (fHiddenInfo) return true; else return false; }
index 2f930eb5f4e707304dad414a707dee52cff8950d..cf2dc607caa851be1a97790e8f9434bead96897a 100644 (file)
@@ -51,7 +51,7 @@ public:
   AliFemtoThreeVector P() const;
   float Pt() const;
   const AliFmPhysicalHelixD& Helix() const;
-  short TrackId() const;
+  int TrackId() const;
   long int Flags() const;
   int Label()const;
   float ImpactD()const;
@@ -83,6 +83,10 @@ public:
   float TOFkaonTime() const;
   float TOFprotonTime() const;
 
+  double XatDCA() const;
+  double YatDCA() const;
+  double ZatDCA() const;
+
   const TBits& TPCclusters() const;
   const TBits& TPCsharing()  const;
   
@@ -97,7 +101,7 @@ public:
   void SetP(const AliFemtoThreeVector& p);
   void SetPt(const float& x);
   void SetHelix(const AliFmPhysicalHelixD& h);
-  void SetTrackId(const short& s);
+  void SetTrackId(const int& s);
   void SetFlags(const long int& i);
   void SetLabel(const int& i);
   void SetImpactD(const float& x);
@@ -150,6 +154,10 @@ public:
   void SetNominalTPCExitPoint(double *aXTPC);
   void SetSigmaToVertex(const float& Sigma);
   float SigmaToVertex() const;
+
+  void SetXatDCA(const double& x);
+  void SetYatDCA(const double& x);
+  void SetZatDCA(const double& x);
  
   //Alice stuff
   enum {
@@ -171,7 +179,7 @@ public:
   float fPidProbKaon;     // kaon pid 
   float fPidProbProton;   // proton pid
   float fPidProbMuon;     // muon pid
-  unsigned int fTrackId;  // track unique id
+  int fTrackId;  // track unique id
   float fTofPionTime;     // TOF time - pion expected time
   float fTofKaonTime;     // TOF time - kaon expected time
   float fTofProtonTime;   // TOF time - proton expected time
@@ -210,7 +218,13 @@ public:
   AliFemtoThreeVector fNominalTpcEntrancePoint; // Nominal track entrance point into TPC
   AliFemtoThreeVector fNominalTpcExitPoint;     // Nominal track exit point from TPC
 
+
+
   int   fKinkIndexes[3]; // Kink Index list
+
+  double fXatDCA;
+  double fYatDCA;
+  double fZatDCA;
   /* Th stuff */
   // Fab private : add mutable
   //  mutable 
index e9d28344237acd183715c838aafba3431bf8afd2..c107b8f51b9898d8d766c1a898649285039287a8 100644 (file)
@@ -16,13 +16,13 @@ AliFemtoV0::AliFemtoV0():
   fDcaV0Daughters(0), fDcaV0ToPrimVertex(0),
   fDcaPosToPrimVertex(0), fDcaNegToPrimVertex(0),
   fMomPos(0), fMomNeg(0),
-  fTpcHitsPos(0), fTpcHitsNeg(0),
-  fChi2V0(0),  fClV0(0),  fChi2Pos(0),  fClPos(0),  fChi2Neg(0),  fClNeg(0),
+  fTpcHitsPos(0), fTpcHitsNeg(0), fOnFlyStatusV0(0),
+  fChi2V0(0),  fClV0(0),  fChi2Pos(0),  fClPos(0),  fChi2Neg(0),  fClNeg(0), fCosPointingAngle(0),
   fDedxPos(0),  fErrDedxPos(0),  fLenDedxPos(0),
   fDedxNeg(0),  fErrDedxNeg(0),  fLenDedxNeg(0),
   fNufDedxPos(0), fNufDedxNeg(0),
   fHelixPos(), fHelixNeg(), 
-  fMomV0(0),
+  fMomV0(0), fEtaV0(0), fPhiV0(0), fYV0(0),
   fAlphaV0(0),  fPtArmV0(0),
   fELambda(0),  fEK0Short(0),  
   fEPosProton(0),  fEPosPion(0),
@@ -33,7 +33,12 @@ AliFemtoV0::AliFemtoV0():
   fCTauK0Short(0),  fPtV0(0),  fPtotV0(0),
   fPtPos(0),  fPtotPos(0),
   fPtNeg(0),  fPtotNeg(0),
+  fEtaPos(0), fEtaNeg(0), fTPCNclsPos(0), fTPCNclsNeg(0), fClustersPos(0), fClustersNeg(0), fSharingPos(0), fSharingNeg(0), fNdofPos(0), fNdofNeg(0), fStatusPos(0), fStatusNeg(0),
+  fPosNSigmaTPCK(0), fPosNSigmaTPCPi(0), fPosNSigmaTPCP(0), fNegNSigmaTPCK(0), fNegNSigmaTPCPi(0), fNegNSigmaTPCP(0),
+  fPosNSigmaTOFK(0), fPosNSigmaTOFPi(0), fPosNSigmaTOFP(0), fNegNSigmaTOFK(0), fNegNSigmaTOFPi(0), fNegNSigmaTOFP(0),
   fKeyNeg(0),   fKeyPos(0),
+  fNominalTpcEntrancePointPos(0,0,0),fNominalTpcExitPointPos(0,0,0),
+  fNominalTpcEntrancePointNeg(0,0,0),fNominalTpcExitPointNeg(0,0,0),
   fHiddenInfo(0)  /***/
 { 
   // Default empty constructor
@@ -41,7 +46,6 @@ AliFemtoV0::AliFemtoV0():
   fTrackTopologyMapPos[1] = 0;
   fTrackTopologyMapNeg[0] = 0;
   fTrackTopologyMapNeg[1] = 0;
-
 }
 // -----------------------------------------------------------------------
 AliFemtoV0::AliFemtoV0(const AliFemtoV0& v) :
@@ -49,13 +53,13 @@ AliFemtoV0::AliFemtoV0(const AliFemtoV0& v) :
   fDcaV0Daughters(0), fDcaV0ToPrimVertex(0),
   fDcaPosToPrimVertex(0), fDcaNegToPrimVertex(0),
   fMomPos(0), fMomNeg(0),
-  fTpcHitsPos(0), fTpcHitsNeg(0),
-  fChi2V0(0),  fClV0(0),  fChi2Pos(0),  fClPos(0),  fChi2Neg(0),  fClNeg(0),
+  fTpcHitsPos(0), fTpcHitsNeg(0), fOnFlyStatusV0(0),
+  fChi2V0(0),  fClV0(0),  fChi2Pos(0),  fClPos(0),  fChi2Neg(0),  fClNeg(0), fCosPointingAngle(0),
   fDedxPos(0),  fErrDedxPos(0),  fLenDedxPos(0),
   fDedxNeg(0),  fErrDedxNeg(0),  fLenDedxNeg(0),
   fNufDedxPos(0), fNufDedxNeg(0),
   fHelixPos(), fHelixNeg(), 
-  fMomV0(0),
+  fMomV0(0), fEtaV0(0), fPhiV0(0), fYV0(0),
   fAlphaV0(0),  fPtArmV0(0),
   fELambda(0),  fEK0Short(0),  
   fEPosProton(0),  fEPosPion(0),
@@ -66,7 +70,12 @@ AliFemtoV0::AliFemtoV0(const AliFemtoV0& v) :
   fCTauK0Short(0),  fPtV0(0),  fPtotV0(0),
   fPtPos(0),  fPtotPos(0),
   fPtNeg(0),  fPtotNeg(0),
+  fEtaPos(0), fEtaNeg(0), fTPCNclsPos(0), fTPCNclsNeg(0), fClustersPos(0), fClustersNeg(0), fSharingPos(0), fSharingNeg(0), fNdofPos(0), fNdofNeg(0), fStatusPos(0), fStatusNeg(0),
+  fPosNSigmaTPCK(0), fPosNSigmaTPCPi(0), fPosNSigmaTPCP(0), fNegNSigmaTPCK(0), fNegNSigmaTPCPi(0), fNegNSigmaTPCP(0),
+  fPosNSigmaTOFK(0), fPosNSigmaTOFPi(0), fPosNSigmaTOFP(0), fNegNSigmaTOFK(0), fNegNSigmaTOFPi(0), fNegNSigmaTOFP(0),
   fKeyNeg(0),   fKeyPos(0),
+  fNominalTpcEntrancePointPos(0,0,0),fNominalTpcExitPointPos(0,0,0),
+  fNominalTpcEntrancePointNeg(0,0,0),fNominalTpcExitPointNeg(0,0,0),
   fHiddenInfo(0)  /***/
 { 
   // copy constructor
@@ -79,6 +88,11 @@ AliFemtoV0::AliFemtoV0(const AliFemtoV0& v) :
   fMomPos = v.fMomPos;
   fMomNeg = v.fMomNeg;
 
+  fEtaV0 = v.fEtaV0;
+  fPhiV0 = v.fPhiV0;
+  fYV0 = v.fYV0;
+  fCosPointingAngle = v.fCosPointingAngle;
+
   fTrackTopologyMapPos[0] = v.fTrackTopologyMapPos[0];
   fTrackTopologyMapPos[1] = v.fTrackTopologyMapPos[1];
   fTrackTopologyMapNeg[0] = v.fTrackTopologyMapNeg[0];
@@ -86,7 +100,34 @@ AliFemtoV0::AliFemtoV0(const AliFemtoV0& v) :
    
   fKeyPos = v.fKeyPos;
   fKeyNeg = v.fKeyNeg;
-     
+  fEtaPos = v.fEtaPos; 
+  fEtaNeg = v.fEtaNeg; 
+  fTPCNclsPos = v.fTPCNclsPos; 
+  fTPCNclsNeg = v.fTPCNclsNeg; 
+  fClustersPos = v.fClustersPos;
+  fClustersNeg = v.fClustersNeg;
+  fSharingPos = v.fSharingPos;
+  fSharingNeg = v.fSharingNeg;
+  fNdofPos = v.fNdofPos; 
+  fNdofNeg = v.fNdofNeg; 
+  fStatusPos = v.fStatusPos; 
+  fStatusNeg = v.fStatusNeg;
+  fOnFlyStatusV0 = v.fOnFlyStatusV0;
+
+  fPosNSigmaTPCK =  v.fPosNSigmaTPCK;
+  fPosNSigmaTPCPi = v.fPosNSigmaTPCPi ; 
+  fPosNSigmaTPCP = v.fPosNSigmaTPCP ; 
+  fNegNSigmaTPCK = v.fNegNSigmaTPCK ; 
+  fNegNSigmaTPCPi = v.fNegNSigmaTPCPi ; 
+  fNegNSigmaTPCP = v.fNegNSigmaTPCP ;
+  fPosNSigmaTOFK = v.fPosNSigmaTOFK ; 
+  fPosNSigmaTOFPi = v.fPosNSigmaTOFPi ; 
+  fPosNSigmaTOFP = v.fPosNSigmaTOFP ; 
+  fNegNSigmaTOFK = v.fNegNSigmaTOFK ; 
+  fNegNSigmaTOFPi = v.fNegNSigmaTOFPi ; 
+  fNegNSigmaTOFP = v.fNegNSigmaTOFP ;
+
+
   fTpcHitsPos = v.fTpcHitsPos;
   fTpcHitsNeg = v.fTpcHitsNeg;
 
@@ -108,6 +149,12 @@ AliFemtoV0::AliFemtoV0(const AliFemtoV0& v) :
 
   fHelixPos = v.fHelixPos;// Gael 12 Sept
   fHelixNeg = v.fHelixNeg;// Gael 12 Sept
+
+  fNominalTpcEntrancePointPos = v.fNominalTpcEntrancePointPos;
+  fNominalTpcExitPointPos = v.fNominalTpcExitPointPos;
+  fNominalTpcEntrancePointNeg = v.fNominalTpcEntrancePointNeg;
+  fNominalTpcExitPointNeg = v.fNominalTpcExitPointNeg;
+
   fHiddenInfo = v.fHiddenInfo? v.fHiddenInfo->Clone() : 0;// GR 11 DEC 02
   UpdateV0();
 }
@@ -132,6 +179,38 @@ AliFemtoV0& AliFemtoV0::operator=(const AliFemtoV0& aV0)
    
   fKeyPos = aV0.fKeyPos;
   fKeyNeg = aV0.fKeyNeg;
+
+  fEtaPos = aV0.fEtaPos; 
+  fEtaNeg = aV0.fEtaNeg; 
+  fTPCNclsPos = aV0.fTPCNclsPos; 
+  fTPCNclsNeg = aV0.fTPCNclsNeg;
+  fClustersPos = aV0.fClustersPos;
+  fClustersNeg = aV0.fClustersNeg;
+  fSharingPos = aV0.fSharingPos;
+  fSharingNeg = aV0.fSharingNeg;
+  fNdofPos = aV0.fNdofPos; 
+  fNdofNeg = aV0.fNdofNeg; 
+  fStatusPos = aV0.fStatusPos; 
+  fStatusNeg = aV0.fStatusNeg;
+  fOnFlyStatusV0 = aV0.fOnFlyStatusV0;
+
+  fPosNSigmaTPCK =  aV0.fPosNSigmaTPCK;
+  fPosNSigmaTPCPi = aV0.fPosNSigmaTPCPi ; 
+  fPosNSigmaTPCP = aV0.fPosNSigmaTPCP ; 
+  fNegNSigmaTPCK = aV0.fNegNSigmaTPCK ; 
+  fNegNSigmaTPCPi = aV0.fNegNSigmaTPCPi ; 
+  fNegNSigmaTPCP = aV0.fNegNSigmaTPCP ;
+  fPosNSigmaTOFK = aV0.fPosNSigmaTOFK ; 
+  fPosNSigmaTOFPi = aV0.fPosNSigmaTOFPi ; 
+  fPosNSigmaTOFP = aV0.fPosNSigmaTOFP ; 
+  fNegNSigmaTOFK = aV0.fNegNSigmaTOFK ; 
+  fNegNSigmaTOFPi = aV0.fNegNSigmaTOFPi ; 
+  fNegNSigmaTOFP = aV0.fNegNSigmaTOFP ;
+
+  fEtaV0 = aV0.fEtaV0;
+  fPhiV0 = aV0.fPhiV0;
+  fYV0 = aV0.fYV0;
+  fCosPointingAngle = aV0.fCosPointingAngle;
      
   fTpcHitsPos = aV0.fTpcHitsPos;
   fTpcHitsNeg = aV0.fTpcHitsNeg;
@@ -154,6 +233,14 @@ AliFemtoV0& AliFemtoV0::operator=(const AliFemtoV0& aV0)
 
   fHelixPos = aV0.fHelixPos;// Gael 12 Sept
   fHelixNeg = aV0.fHelixNeg;// Gael 12 Sept
+
+  fNominalTpcEntrancePointPos = aV0.fNominalTpcEntrancePointPos;
+  fNominalTpcExitPointPos = aV0.fNominalTpcExitPointPos;
+  fNominalTpcEntrancePointPos = aV0.fNominalTpcEntrancePointPos;
+  fNominalTpcExitPointPos = aV0.fNominalTpcExitPointPos;
+  fNominalTpcEntrancePointNeg = aV0.fNominalTpcEntrancePointNeg;
+  fNominalTpcExitPointNeg = aV0.fNominalTpcExitPointNeg;
+
   if (fHiddenInfo) delete fHiddenInfo;
   fHiddenInfo = aV0.fHiddenInfo? aV0.fHiddenInfo->Clone() : 0;// GR 11 DEC 02
   UpdateV0();
@@ -183,13 +270,21 @@ void AliFemtoV0::UpdateV0(){
    tMomNegAlongV0 =  fMomNeg*fMomV0 / ::sqrt(::pow(fPtotV0,2));
    tMomPosAlongV0 =  fMomPos*fMomV0 / ::sqrt(::pow(fPtotV0,2));
 
+   if(tMomPosAlongV0+tMomNegAlongV0!=0)
    fAlphaV0 = (tMomPosAlongV0-tMomNegAlongV0)/(tMomPosAlongV0+tMomNegAlongV0);
-   fPtArmV0 =  ::sqrt(fPtotPos*fPtotPos - tMomPosAlongV0*tMomPosAlongV0);
+
+   //printf("%1.15f\n",fPtotPos);
+   //printf("%1.15f\n",tMomPosAlongV0);   
+   
+   if(fPtotPos<tMomPosAlongV0) fPtArmV0=0; else
+     { 
+       fPtArmV0 =  ::sqrt(fPtotPos*fPtotPos - tMomPosAlongV0*tMomPosAlongV0);
+     }
    fMassLambda = ::sqrt(::pow(fEPosProton+fENegPion,2)-::pow(fPtotV0,2));
    fMassAntiLambda = ::sqrt(::pow(fENegProton+fEPosPion,2)-::pow(fPtotV0,2));
    fMassK0Short = ::sqrt(::pow(fENegPion+fEPosPion,2)-::pow(fPtotV0,2));
-
    fRapLambda = 0.5*::log( (fELambda+fMomV0.z()) / (fELambda-fMomV0.z()) );
+
    fCTauLambda = kMLAMBDA*(fDecayLengthV0) / ::sqrt( ::pow((double)fMomV0.Mag(),2.) );
    
    fRapK0Short = 0.5*::log( (fEK0Short+fMomV0.z()) / (fEK0Short-fMomV0.z()) );
index 3323032ba6edfe5b78effc7c58161c282c0f3e6b..2f423350c23fb8344e916a5e09ec8cb3a3d6ecf3 100644 (file)
@@ -9,6 +9,8 @@
 
 #include "AliFemtoTypes.h" //same as in AliFemtoTrack.h
 #include "AliFmPhysicalHelixD.h" // Gael 12 Sept 02
+#include "AliFemtoThreeVector.h"
+#include "TBits.h"
 #ifdef __ROOT__
 #ifndef __NO_STAR_DEPENDENCE_ALLOWED__
 #include "StStrangeMuDstMaker/StV0MuDst.h"
@@ -49,13 +51,31 @@ public:
   float MomNegX() const;   // Momentum components of neg. daughter                                      
   float MomNegY() const;   // Momentum components of neg. daughter                                      
   float MomNegZ() const;   // Momentum components of neg. daughter                                      
-                                                                                                        
+       
+  float EtaPos() const;//Pseudorapidity V0
+  float EtaNeg() const; //Pseudorapidity V0
+  int TPCNclsPos() const;
+  int TPCNclsNeg() const;
+  const TBits& TPCclustersPos() const;
+  const TBits& TPCclustersNeg() const;
+  const TBits& TPCsharingPos() const;
+  const TBits& TPCsharingNeg() const;
+  int NdofPos() const;
+  int NdofNeg() const;
+  ulong StatusPos() const;
+  ulong StatusNeg() const;
+  
+  
   int   TpcHitsPos() const;          // Number of TPC hits on pos. daughter                             
   int   TpcHitsNeg() const;          // Number of TPC hits on neg. daughter                             
   unsigned long TrackTopologyMapPos(unsigned int word) const;                                           
   unsigned long TrackTopologyMapNeg(unsigned int word) const;                                           
                                                                                                         
-  AliFemtoThreeVector MomV0() const ;    // Momentum components of V0                                   
+  AliFemtoThreeVector MomV0() const ;    // Momentum components of V0  
+  double EtaV0() const ;// Pseudorapidity V0
+  double PhiV0() const ;// Phi V0
+
+  double YV0() const;                   
   float MomV0X() const ;    // Momentum components of V0                                                
   float MomV0Y() const ;    // Momentum components of V0                                                
   float MomV0Z() const ;    // Momentum components of V0                                                
@@ -75,7 +95,8 @@ public:
   float CTauLambda() const ;          // Lifetime (ctau) const assuming (anti) constlambda              
   float CTauK0Short() const ;         // Lifetime (ctau) const assuming k-short                                 
   float PtV0() const ;                // Transverse momentum                                            
-  float PtotV0() const ;              // Total momentum                                                         
+  float PtotV0() const ;              // Total momentum                        
+  double CosPointingAngle() const;
   float PtPos() const ;               // Transverse momentum of pos. daughter                           
   float PtotPos() const ;             // Total momentum of pos. daughter                                
   float DedxPos() const;              // dedx of Positive track                                                 
@@ -100,13 +121,37 @@ public:
   float PseudoRapNeg() const;                                                                           
 // Length of dE/dX track of neg. daughter--Gael04Fev 2002                                               
                                                                                                         
-  unsigned short   IdNeg() const;               // Id of negative track                                         
-  unsigned short   IdPos() const;               // Id of positive track                                         
-  unsigned short   KeyNeg() const;               // Id of negative track                                
-  unsigned short   KeyPos() const;               // Id of positive track                                
+  int   IdNeg() const;               // Id of negative track                                    
+  int   IdPos() const;               // Id of positive track                                    
+  int   KeyNeg() const;               // Id of negative track                           
+  int   KeyPos() const;               // Id of positive track
+
+  float PosNSigmaTPCK() const ;
+  float PosNSigmaTPCPi() const ;
+  float PosNSigmaTPCP() const ;
+  float NegNSigmaTPCK() const ;
+  float NegNSigmaTPCPi() const ;
+  float NegNSigmaTPCP() const ;
+
+  float PosNSigmaTOFK() const ;
+  float PosNSigmaTOFPi() const ;
+  float PosNSigmaTOFP() const ;
+  float NegNSigmaTOFK() const ;
+  float NegNSigmaTOFPi() const ;
+  float NegNSigmaTOFP() const ;
+
+
+
+  bool OnFlyStatusV0() const;
                                                                                                         
   const AliFmPhysicalHelixD& HelixPos() const; // Gael 12 Sept 02                                       
-  const AliFmPhysicalHelixD& HelixNeg() const; // Gael 12 Sept 02                                        
+  const AliFmPhysicalHelixD& HelixNeg() const; // Gael 12 Sept 02
+
+
+  AliFemtoThreeVector NominalTpcEntrancePointPos() const;
+  AliFemtoThreeVector NominalTpcExitPointPos() const;
+  AliFemtoThreeVector NominalTpcEntrancePointNeg() const;
+  AliFemtoThreeVector NominalTpcExitPointNeg() const;                                   
 
   void UpdateV0(); // Fills derived info
   void SetdecayLengthV0(const float x);  
@@ -127,6 +172,19 @@ public:
   void SetmomNegY(const float x);  
   void SetmomNegZ(const float x);  
 
+  void SetEtaPos(const float x);
+  void SetEtaNeg(const float x); 
+  void SetTPCNclsPos(const int x);
+  void SetTPCNclsNeg(const int x);
+  void SetTPCclustersPos(const TBits& x);
+  void SetTPCclustersNeg(const TBits& x);
+  void SetTPCsharingPos(const TBits& x);
+  void SetTPCsharingNeg(const TBits& x);
+  void SetNdofPos(const int x);
+  void SetNdofNeg(const int x);
+  void SetStatusPos(const ulong x);
+  void SetStatusNeg(const ulong x);
+
   void SettpcHitsPos(const int& i);      
   void SettpcHitsNeg(const int& i);      
 
@@ -134,6 +192,9 @@ public:
   void SetTrackTopologyMapNeg(unsigned int word, const unsigned long& m);      
 
   void SetmomV0( AliFemtoThreeVector v);
+  void SetEtaV0 (double x);
+  void SetPhiV0 (double x);
+  void SetYV0(double x);
   void SetmomV0X( float x);
   void SetmomV0Y( float x);
   void SetmomV0Z( float x);
@@ -158,8 +219,8 @@ public:
   void SetptotPos( float x);      
   void SetptNeg( float x);        
   void SetptotNeg( float x);
-  void SetidNeg(const unsigned short& i);
-  void SetidPos(const unsigned short& i);
+  void SetidNeg(const int& i);
+  void SetidPos(const int& i);
   void SetdedxNeg(float x);
   void SeterrdedxNeg(float x);//Gael 04Fev2002
   void SetlendedxNeg(float x);//Gael 04Fev2002
@@ -168,12 +229,33 @@ public:
   void SeterrdedxPos(float x);//Gael 04Fev2002
   void SetlendedxPos(float x);//Gael 04Fev2002
   void SetpseudoRapPos(float x);//Gael 04Fev2002
-  void SetkeyNeg(const unsigned short& i);
-  void SetkeyPos(const unsigned short& i);
+  void SetkeyNeg(const int& i);
+  void SetkeyPos(const int& i);
+  void SetCosPointingAngle(double x);
      
+  void SetOnFlyStatusV0(bool x);
   void SetHelixPos(const AliFmPhysicalHelixD& h); // Gael 12 Sept 02
   void SetHelixNeg(const AliFmPhysicalHelixD& h); // Gael 12 Sept 02
 
+  void SetPosNSigmaTPCK(float x);
+  void SetPosNSigmaTPCPi(float x);
+  void SetPosNSigmaTPCP(float x);
+  void SetNegNSigmaTPCK(float x);
+  void SetNegNSigmaTPCPi(float x);
+  void SetNegNSigmaTPCP(float x);
+
+  void SetPosNSigmaTOFK(float x);
+  void SetPosNSigmaTOFPi(float x);
+  void SetPosNSigmaTOFP(float x);
+  void SetNegNSigmaTOFK(float x);
+  void SetNegNSigmaTOFPi(float x);
+  void SetNegNSigmaTOFP(float x);
+
+  void SetNominalTpcEntrancePointPos(AliFemtoThreeVector x);
+  void SetNominalTpcExitPointPos(AliFemtoThreeVector x);
+  void SetNominalTpcEntrancePointNeg(AliFemtoThreeVector x);
+  void SetNominalTpcExitPointNeg(AliFemtoThreeVector x);
+
   void SetprimaryVertex(const AliFemtoThreeVector v);//Gael 24 Sept 02
   /* Th stuff */
   void SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo);
@@ -183,7 +265,6 @@ public:
   /***/
 
 protected:
   float fDecayLengthV0;                     // 3-d decay distance                                               \\ V0 decay length                                                                  
   AliFemtoThreeVector fDecayVertexV0;      // Coordinates of decay vertex                               
   AliFemtoThreeVector fPrimaryVertex;      // Coordinates of primary vertex                             
@@ -200,12 +281,14 @@ protected:
   int   fTpcHitsPos;                       // Number of TPC hits for positive daughter
   int   fTpcHitsNeg;                       // Number of TPC hits for negative daughter
                                            
+  bool  fOnFlyStatusV0;
   float fChi2V0;                           // Fit quality for V0
   float fClV0;                             // Confidence level for V0
   float fChi2Pos;                          // Fit quality for positive daughter
   float fClPos;                                    // Confidence level for positive daughter
   float fChi2Neg;                          // Fit quality for negative daughter
   float fClNeg;                                    // Confidence level for negative daughter
+  double fCosPointingAngle;
                                            
   float fDedxPos;                          // dEdx positive daughter       
   float fErrDedxPos;                       // dEdx error positive daughter 
@@ -222,6 +305,9 @@ protected:
   AliFmPhysicalHelixD fHelixNeg;            // Helix for negative
                                            
   AliFemtoThreeVector fMomV0;              // Momentum of the V0
+  double fEtaV0;                           // Pseudorapidity of the V0
+  double fPhiV0;                           // Phi angle of the V0
+  double fYV0;                             // Rapidity of the V0;
   float fAlphaV0;                          // Armenteros-Podolanski variable                                    
   float fPtArmV0;                          // Armenteros-Podolanski variable                                    
   float fELambda;                          // Energy assuming lambda hypothesis                                 
@@ -242,10 +328,44 @@ protected:
   float fPtPos;                                    // Transverse momentum of pos. daughter                              
   float fPtotPos;                          // Total momentum of pos. daughter                           
   float fPtNeg;                                    // Transverse momentum of neg. daughter                              
-  float fPtotNeg;                          // Total momentum of neg. daughter                           
+  float fPtotNeg;                          // Total momentum of neg. daughter
+
+  float fEtaPos;                                   // Eta of positive daughter
+  float fEtaNeg;                                   // Eta of neg. daughter
+  int   fTPCNclsPos;                       // No. of cls of pos daughter
+  int   fTPCNclsNeg;                       // No. of cls of neg daughter
+  TBits fClustersPos;
+  TBits fClustersNeg;
+  TBits fSharingPos;
+  TBits fSharingNeg;
+  int   fNdofPos;                                  // No. of degrees of freedom of the pos. daughter track
+  int   fNdofNeg;                                  // No. of degrees of freedom of the neg. daughter track
+  unsigned long fStatusPos;                        // Status (tpc refit, its refit...)
+  unsigned long fStatusNeg;                        // Status (tpc refit, its refit...)
+
+  float fPosNSigmaTPCK;
+  float fPosNSigmaTPCPi;
+  float fPosNSigmaTPCP;
+  float fNegNSigmaTPCK;
+  float fNegNSigmaTPCPi;
+  float fNegNSigmaTPCP;
+
+  float fPosNSigmaTOFK;
+  float fPosNSigmaTOFPi;
+  float fPosNSigmaTOFP;
+  float fNegNSigmaTOFK;
+  float fNegNSigmaTOFPi;
+  float fNegNSigmaTOFP;
                                            
-  unsigned short   fKeyNeg;                // Unique key negative
-  unsigned short   fKeyPos;                // Unique key positive
+  int   fKeyNeg;                   // Unique key negative
+  int   fKeyPos;                   // Unique key positive
+
+  AliFemtoThreeVector fNominalTpcEntrancePointPos; // Nominal positive daugther track entrance point into TPC
+  AliFemtoThreeVector fNominalTpcExitPointPos;     // Nominal positive daughter track exit point from TPC
+  AliFemtoThreeVector fNominalTpcEntrancePointNeg; // Nominal positive daugther track entrance point into TPC
+  AliFemtoThreeVector fNominalTpcExitPointNeg;     // Nominal positive daughter track exit point from TPC
+
+
   /* Th stuff */                           
   // Fab private : add mutable             
   mutable AliFemtoHiddenInfo* fHiddenInfo; //! Hidden info
@@ -273,6 +393,10 @@ inline float AliFemtoV0::MomNegX() const { return fMomNeg.x(); }
 inline float AliFemtoV0::MomNegY() const { return fMomNeg.y(); }
 inline float AliFemtoV0::MomNegZ() const { return fMomNeg.z(); }
 inline AliFemtoThreeVector AliFemtoV0::MomV0() const { return fMomV0; }
+inline double AliFemtoV0::EtaV0() const {return fEtaV0;}
+inline double AliFemtoV0::PhiV0() const {return fPhiV0;}
+inline double AliFemtoV0::YV0() const {return fYV0;}
+inline double AliFemtoV0::CosPointingAngle() const {return fCosPointingAngle;}
 inline float AliFemtoV0::MomV0X() const { return fMomV0.x(); }
 inline float AliFemtoV0::MomV0Y() const { return fMomV0.y(); }
 inline float AliFemtoV0::MomV0Z() const { return fMomV0.z(); }
@@ -309,14 +433,44 @@ inline float AliFemtoV0::NumdedxPos() const {return fNufDedxPos;} //Gael 04Fev20
 inline float AliFemtoV0::ErrdedxPos() const {return fErrDedxPos;} //Gael 04Fev2002
 inline float AliFemtoV0::LendedxPos() const {return fLenDedxPos;} //Gael 04Fev2002
 inline float AliFemtoV0::PseudoRapPos() const {return fMomPos.PseudoRapidity();} //Gael 04Fev2002
-
+inline float AliFemtoV0::EtaPos() const {return fEtaPos;}
+inline float AliFemtoV0::EtaNeg() const {return fEtaNeg;}
+inline int   AliFemtoV0::TPCNclsPos() const {return fTPCNclsPos;}
+inline int   AliFemtoV0::TPCNclsNeg() const {return fTPCNclsNeg;}
+inline const TBits& AliFemtoV0::TPCclustersPos() const {return fClustersPos;}
+inline const TBits& AliFemtoV0::TPCclustersNeg() const {return fClustersNeg;}
+inline const TBits& AliFemtoV0::TPCsharingPos() const {return fSharingPos;}
+inline const TBits& AliFemtoV0::TPCsharingNeg() const {return fSharingNeg;}
+inline int   AliFemtoV0::NdofPos() const {return fNdofPos;}
+inline int   AliFemtoV0::NdofNeg() const {return fNdofNeg;}
+inline unsigned long AliFemtoV0::StatusPos() const {return fStatusPos;}
+inline unsigned long AliFemtoV0::StatusNeg() const {return fStatusNeg;}
 
 inline unsigned long   AliFemtoV0::TrackTopologyMapPos(unsigned int word) const { return fTrackTopologyMapPos[word]; }
 inline unsigned long   AliFemtoV0::TrackTopologyMapNeg(unsigned int word) const { return fTrackTopologyMapNeg[word]; }
-inline unsigned short   AliFemtoV0::IdNeg() const { return fKeyNeg; } 
-inline unsigned short   AliFemtoV0::KeyNeg() const { return fKeyNeg; }
-inline unsigned short   AliFemtoV0::IdPos() const { return fKeyPos; } 
-inline unsigned short   AliFemtoV0::KeyPos() const { return fKeyPos; }
+inline int   AliFemtoV0::IdNeg() const { return fKeyNeg; } 
+inline int   AliFemtoV0::KeyNeg() const { return fKeyNeg; }
+inline int   AliFemtoV0::IdPos() const { return fKeyPos; } 
+inline int   AliFemtoV0::KeyPos() const { return fKeyPos; }
+inline bool  AliFemtoV0::OnFlyStatusV0() const {return fOnFlyStatusV0;}
+inline float AliFemtoV0::PosNSigmaTPCK() const { return fPosNSigmaTPCK; }
+inline float AliFemtoV0::PosNSigmaTPCPi() const { return fPosNSigmaTPCPi;  }
+inline float AliFemtoV0::PosNSigmaTPCP() const { return fPosNSigmaTPCP;  }
+inline float AliFemtoV0::NegNSigmaTPCK() const { return fNegNSigmaTPCK;  }
+inline float AliFemtoV0::NegNSigmaTPCPi() const { return fNegNSigmaTPCPi;  }
+inline float AliFemtoV0::NegNSigmaTPCP() const { return fNegNSigmaTPCP;  }
+
+inline float AliFemtoV0::PosNSigmaTOFK() const { return fPosNSigmaTOFK;  }
+inline float AliFemtoV0::PosNSigmaTOFPi() const { return  fPosNSigmaTOFPi; }
+inline float AliFemtoV0::PosNSigmaTOFP() const { return  fPosNSigmaTOFP; }
+inline float AliFemtoV0::NegNSigmaTOFK() const { return fNegNSigmaTOFK;  }
+inline float AliFemtoV0::NegNSigmaTOFPi() const { return fNegNSigmaTOFPi;  }
+inline float AliFemtoV0::NegNSigmaTOFP() const { return fNegNSigmaTOFP;  }
+
+inline AliFemtoThreeVector AliFemtoV0::NominalTpcEntrancePointPos() const {return fNominalTpcEntrancePointPos;}
+inline AliFemtoThreeVector AliFemtoV0::NominalTpcExitPointPos() const {return fNominalTpcExitPointPos;}
+inline AliFemtoThreeVector AliFemtoV0::NominalTpcEntrancePointNeg() const  {return fNominalTpcEntrancePointNeg;}
+inline AliFemtoThreeVector AliFemtoV0::NominalTpcExitPointNeg() const  {return fNominalTpcExitPointNeg;}
 
 inline void AliFemtoV0::SetdecayLengthV0(const float x){ fDecayLengthV0= x;}   
 inline void AliFemtoV0::SetdecayVertexV0X(const float x){ fDecayVertexV0.SetX(x);}
@@ -328,6 +482,10 @@ inline void AliFemtoV0::SetdcaV0ToPrimVertex(const float x){fDcaV0ToPrimVertex=
 inline void AliFemtoV0::SetdcaPosToPrimVertex(const float x){fDcaPosToPrimVertex = x;} 
 inline void AliFemtoV0::SetdcaNegToPrimVertex(const float x){fDcaNegToPrimVertex = x;} 
 inline void AliFemtoV0::SetmomPos(const AliFemtoThreeVector v){fMomPos = v; }
+inline void AliFemtoV0::SetEtaV0(const double x){fEtaV0=x;}
+inline void AliFemtoV0::SetPhiV0(const double x){fPhiV0=x;}
+inline void AliFemtoV0::SetYV0(const double x){fYV0=x;}
+inline void AliFemtoV0::SetCosPointingAngle(const double x){fCosPointingAngle = x;}
 inline void AliFemtoV0::SetmomPosX(const float x){fMomPos.SetX(x);}
 inline void AliFemtoV0::SetmomPosY(const float x){fMomPos.SetY(x);}
 inline void AliFemtoV0::SetmomPosZ(const float x){fMomPos.SetZ(x);}
@@ -363,10 +521,10 @@ inline void AliFemtoV0::SetptPos( float x){fPtPos = x;}
 inline void AliFemtoV0::SetptotPos( float x){fPtotPos = x;}    
 inline void AliFemtoV0::SetptNeg( float x){ fPtNeg= x;}    
 inline void AliFemtoV0::SetptotNeg( float x){ fPtotNeg= x;}
-inline void AliFemtoV0::SetidNeg(const unsigned short& s){ fKeyNeg= s;}
-inline void AliFemtoV0::SetidPos(const unsigned short& s){ fKeyPos= s;}
-inline void AliFemtoV0::SetkeyNeg(const unsigned short& s){ fKeyNeg= s;}
-inline void AliFemtoV0::SetkeyPos(const unsigned short& s){ fKeyPos= s;}
+inline void AliFemtoV0::SetidNeg(const int& s){ fKeyNeg= s;}
+inline void AliFemtoV0::SetidPos(const int& s){ fKeyPos= s;}
+inline void AliFemtoV0::SetkeyNeg(const int& s){ fKeyNeg= s;}
+inline void AliFemtoV0::SetkeyPos(const int& s){ fKeyPos= s;}
 inline void AliFemtoV0::SettpcHitsPos(const int& i){fTpcHitsPos=i;} 
 inline void AliFemtoV0::SettpcHitsNeg(const int& i){fTpcHitsNeg=i;}
 inline void AliFemtoV0::SetdedxNeg(float x){fDedxNeg=x;}
@@ -376,6 +534,40 @@ inline void AliFemtoV0::SetdedxPos(float x){fDedxPos=x;}
 inline void AliFemtoV0::SeterrdedxPos(float x){fErrDedxPos=x;}//Gael 04Fev2002
 inline void AliFemtoV0::SetlendedxPos(float x){fLenDedxPos=x;}//Gael 04Fev2002
 inline void AliFemtoV0::SetprimaryVertex(const AliFemtoThreeVector v) { fPrimaryVertex = v; }//Gael 24 Sept 02
+         
+inline void AliFemtoV0::SetEtaPos(float x) {fEtaPos=x;}
+inline void AliFemtoV0::SetEtaNeg(float x) {fEtaNeg=x;}
+inline void AliFemtoV0::SetTPCNclsPos(int x) {fTPCNclsPos=x;}
+inline void AliFemtoV0::SetTPCNclsNeg(int x) {fTPCNclsNeg=x;}
+inline void AliFemtoV0::SetTPCclustersPos(const TBits& x) {fClustersPos=x;}
+inline void AliFemtoV0::SetTPCclustersNeg(const TBits& x) {fClustersNeg=x;}
+inline void AliFemtoV0::SetTPCsharingPos(const TBits& x) {fSharingPos=x;}
+inline void AliFemtoV0::SetTPCsharingNeg(const TBits& x) {fSharingNeg=x;}
+inline void AliFemtoV0::SetNdofPos(int x) {fNdofPos=x;}
+inline void AliFemtoV0::SetNdofNeg(int x) {fNdofNeg=x;}
+inline void AliFemtoV0::SetStatusPos(unsigned long x) {fStatusPos=x;}
+inline void AliFemtoV0::SetStatusNeg(unsigned long x) {fStatusNeg=x;}
+inline void AliFemtoV0::SetOnFlyStatusV0(bool x) {fOnFlyStatusV0=x;}
+            
+inline void AliFemtoV0::SetPosNSigmaTPCK(float x){ fPosNSigmaTPCK = x; }
+inline void AliFemtoV0::SetPosNSigmaTPCPi(float x){ fPosNSigmaTPCPi = x;  }
+inline void AliFemtoV0::SetPosNSigmaTPCP(float x) { fPosNSigmaTPCP = x;  }
+inline void AliFemtoV0::SetNegNSigmaTPCK(float x) { fNegNSigmaTPCK = x;  }
+inline void AliFemtoV0::SetNegNSigmaTPCPi(float x){ fNegNSigmaTPCPi = x;  }
+inline void AliFemtoV0::SetNegNSigmaTPCP(float x) { fNegNSigmaTPCP = x;  }
+
+inline void AliFemtoV0::SetPosNSigmaTOFK(float x) {  fPosNSigmaTOFK = x;  }
+inline void AliFemtoV0::SetPosNSigmaTOFPi(float x) { fPosNSigmaTOFPi = x; }
+inline void AliFemtoV0::SetPosNSigmaTOFP(float x) { fPosNSigmaTOFP = x; }
+inline void AliFemtoV0::SetNegNSigmaTOFK(float x)  { fNegNSigmaTOFK = x;  }
+inline void AliFemtoV0::SetNegNSigmaTOFPi(float x)  {fNegNSigmaTOFPi = x;  }
+inline void AliFemtoV0::SetNegNSigmaTOFP(float x) { fNegNSigmaTOFP = x;  }
+
+inline void AliFemtoV0::SetNominalTpcEntrancePointPos(AliFemtoThreeVector x) {fNominalTpcEntrancePointPos=x;}
+inline void AliFemtoV0::SetNominalTpcExitPointPos(AliFemtoThreeVector x) {fNominalTpcExitPointPos=x;}
+inline void AliFemtoV0::SetNominalTpcEntrancePointNeg(AliFemtoThreeVector x) {fNominalTpcEntrancePointNeg=x;}
+inline void AliFemtoV0::SetNominalTpcExitPointNeg(AliFemtoThreeVector x) {fNominalTpcExitPointNeg=x;}
+
 #endif
 
 
diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0PairCut.cxx b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0PairCut.cxx
new file mode 100644 (file)
index 0000000..3e60a06
--- /dev/null
@@ -0,0 +1,107 @@
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+// AliFemtoShareQualityPairCut - a pair cut which checks for some pair     //
+// qualities that attempt to identify slit/doubly reconstructed tracks     //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+/***************************************************************************
+ *
+ * $Id: AliFemtoShareQualityPairCut.cxx 50722 2011-07-21 15:18:38Z akisiel $
+ *
+ * Author: Adam Kisiel, Ohio State, kisiel@mps.ohio-state.edu
+ ***************************************************************************
+ *
+ * Description: part of STAR HBT Framework: AliFemtoMaker package
+ *   a cut to remove "shared" and "split" pairs
+ *
+ ***************************************************************************
+ *
+ *
+ **************************************************************************/
+
+#include "AliFemtoV0PairCut.h"
+#include <string>
+#include <cstdio>
+
+#ifdef __ROOT__
+ClassImp(AliFemtoV0PairCut)
+#endif
+
+//__________________
+AliFemtoV0PairCut::AliFemtoV0PairCut():
+  fNPairsPassed(0),
+  fNPairsFailed(0),
+  fV0Max(1.0),
+  fShareFractionMax(1.0),
+  fRemoveSameLabel(0)
+{
+  // Default constructor
+  // Nothing to do
+}
+//__________________
+AliFemtoV0PairCut::~AliFemtoV0PairCut(){
+  /* no-op */
+}
+//__________________
+bool AliFemtoV0PairCut::Pass(const AliFemtoPair* pair){
+  // Check for pairs that are possibly shared/double reconstruction
+
+  bool temp = true;
+
+  /*cout<<"pair->Track1(): "<<pair->Track1()<<endl;
+  cout<<"pair->Track2(): "<<pair->Track2()<<endl;
+  cout<<"pair->Track1()->V0(): "<<pair->Track1()->V0()<<endl;
+  cout<<"pair->Track2()->V0(): "<<pair->Track2()->V0()<<endl;
+  cout<<"pair->Track1()->V0()->IdNeg(): "<<pair->Track1()->V0()->IdNeg()<<endl;
+  cout<<"pair->Track2()->V0()->IdNeg(): "<<pair->Track2()->V0()->IdNeg()<<endl;
+  cout<<"pair->Track1()->V0()->IdPos(): "<<pair->Track1()->V0()->IdPos()<<endl;
+  cout<<"pair->Track2()->V0()->IdPos(): "<<pair->Track2()->V0()->IdPos()<<endl;*/
+
+  if(!(pair->Track1()->V0() && pair->Track2()->V0()))
+    {
+      return false;
+    }
+  if(pair->Track1()->V0()->IdNeg()==pair->Track2()->V0()->IdNeg() || pair->Track1()->V0()->IdPos()==pair->Track2()->V0()->IdPos())
+    {
+
+      return false;
+    }
+  
+
+  return temp;
+}
+//__________________
+AliFemtoString AliFemtoV0PairCut::Report(){
+  // Prepare the report from the execution
+  string stemp = "AliFemtoV0 Pair Cut - remove shared and split pairs\n";  char ctemp[100];
+  snprintf(ctemp , 100, "Number of pairs which passed:\t%ld  Number which failed:\t%ld\n",fNPairsPassed,fNPairsFailed);
+  stemp += ctemp;
+  AliFemtoString returnThis = stemp;
+  return returnThis;}
+//__________________
+
+void AliFemtoV0PairCut::SetV0Max(Double_t aV0Max) {
+  fV0Max = aV0Max;
+}
+
+Double_t AliFemtoV0PairCut::GetAliFemtoV0Max() const {
+  return fV0Max;
+}
+
+
+TList *AliFemtoV0PairCut::ListSettings()
+{
+  // return a list of settings in a writable form
+  TList *tListSetttings = new TList();
+  char buf[200];
+  snprintf(buf, 200, "AliFemtoV0PairCut.sharequalitymax=%f", fV0Max);
+  snprintf(buf, 200, "AliFemtoV0PairCut.sharefractionmax=%f", fShareFractionMax);
+  tListSetttings->AddLast(new TObjString(buf));
+
+  return tListSetttings;
+}
+
+void     AliFemtoV0PairCut::SetRemoveSameLabel(Bool_t aRemove)
+{
+  fRemoveSameLabel = aRemove;
+}
diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0PairCut.h b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0PairCut.h
new file mode 100644 (file)
index 0000000..1cf873e
--- /dev/null
@@ -0,0 +1,73 @@
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+// AliFemtoShareQualityPairCut - a pair cut which checks for some pair     //
+// qualities that attempt to identify slit/doubly reconstructed tracks     //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+/***************************************************************************
+ *
+ * $Id: AliFemtoShareQualityPairCut.h 24360 2008-03-10 09:48:27Z akisiel $
+ *
+ * Author: Adam Kisiel, Ohio State University, kisiel@mps.ohio-state.edu
+ ***************************************************************************
+ *
+ * Description: part of STAR HBT Framework: AliFemtoMaker package
+ *   a cut to remove "shared" and "split" pairs
+ *
+ ***************************************************************************
+ *
+ *
+ **************************************************************************/
+
+
+#ifndef ALIFEMTOV0PAIRCUT_H
+#define ALIFEMTOV0PAIRCUT_H
+
+// do I need these lines ?
+//#ifndef StMaker_H
+//#include "StMaker.h"
+//#endif
+
+#include "AliFemtoPairCut.h"
+
+class AliFemtoV0PairCut : public AliFemtoPairCut{
+public:
+  AliFemtoV0PairCut();
+  AliFemtoV0PairCut(const AliFemtoV0PairCut& cut);
+  virtual ~AliFemtoV0PairCut();
+  
+  virtual bool Pass(const AliFemtoPair* pair);
+  virtual AliFemtoString Report();
+  virtual TList *ListSettings();
+  virtual AliFemtoPairCut* Clone();
+  void SetV0Max(Double_t aAliFemtoV0Max);
+  Double_t GetAliFemtoV0Max() const;
+  void     SetRemoveSameLabel(Bool_t aRemove);
+  
+ protected:
+  long fNPairsPassed;          // Number of pairs consideered that passed the cut 
+  long fNPairsFailed;          // Number of pairs consideered that failed the cut
+
+ private:
+  Double_t fV0Max;   // Maximum allowed pair quality
+  Double_t fShareFractionMax;  // Maximum allowed share fraction
+  Bool_t   fRemoveSameLabel;   // If 1 pairs with two tracks with the same label will be removed 
+
+
+#ifdef __ROOT__
+  ClassDef(AliFemtoV0PairCut, 0)
+#endif
+};
+
+inline AliFemtoV0PairCut::AliFemtoV0PairCut(const AliFemtoV0PairCut& c) : 
+  AliFemtoPairCut(c),
+  fNPairsPassed(0),
+  fNPairsFailed(0),
+  fV0Max(1.0),
+  fShareFractionMax(1.0),
+  fRemoveSameLabel(0)// no cut
+{ /* no-op */ }
+
+inline AliFemtoPairCut* AliFemtoV0PairCut::Clone() { AliFemtoV0PairCut* c = new AliFemtoV0PairCut(*this); return c;}
+
+#endif
diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0TrackCut.cxx b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0TrackCut.cxx
new file mode 100644 (file)
index 0000000..3c4e299
--- /dev/null
@@ -0,0 +1,307 @@
+#include "AliFemtoV0TrackCut.h"
+#include "AliESDtrack.h"
+#include <cstdio>
+
+#ifdef __ROOT__ 
+ClassImp(AliFemtoV0TrackCut)
+#endif
+
+
+
+AliFemtoV0TrackCut::AliFemtoV0TrackCut() :
+fInvMassLambdaMin(0),fInvMassLambdaMax(99),fMinDcaDaughtersToVert(0),fMaxDcaV0Daughters(99),fMaxDcaV0(99), fMaxCosPointingAngle(0), fParticleType(99), fEta(0.8), fPtMin(0), fPtMax(100), fOnFlyStatus(kFALSE), fMaxEtaDaughters(100), fTPCNclsDaughters(0), fNdofDaughters(10), fStatusDaughters(0), fPtMinDaughters(0), fPtMaxDaughters(99)
+{
+  // Default constructor
+ }
+ //------------------------------
+AliFemtoV0TrackCut::~AliFemtoV0TrackCut(){
+  /* noop */
+}
+//------------------------------
+bool AliFemtoV0TrackCut::Pass(const AliFemtoV0* aV0)
+{
+  // test the particle and return 
+  // true if it meets all the criteria
+  // false if it doesn't meet at least one of the criteria
+
+    Float_t pt = aV0->PtV0();
+    Float_t eta = aV0->EtaV0();
+
+     //kinematic cuts
+    if(TMath::Abs(eta) > fEta) return false;  //put in kinematic cuts by hand
+    if(pt < fPtMin) return false;
+    if(pt > fPtMax) return false;
+    if(TMath::Abs(aV0->EtaPos()) > fMaxEtaDaughters) return false;
+    if(TMath::Abs(aV0->EtaNeg()) > fMaxEtaDaughters) return false;
+
+    if(aV0->PtPos()< fPtMinDaughters) return false;
+    if(aV0->PtNeg()< fPtMinDaughters) return false;
+    if(aV0->PtPos()> fPtMaxDaughters) return false;
+    if(aV0->PtNeg()> fPtMaxDaughters) return false;
+
+    //V0 from kinematics information
+    if (fParticleType == kLambdaMC ) {
+      if(!(aV0->MassLambda()>fInvMassLambdaMin && aV0->MassLambda()<fInvMassLambdaMax) || !(aV0->PosNSigmaTPCP()==0))
+       return false; 
+      else
+       {
+         return true;  
+       } 
+    }
+    else if (fParticleType == kAntiLambdaMC) {
+      if(!(aV0->MassLambda()>fInvMassLambdaMin &&aV0->MassLambda()<fInvMassLambdaMax) || !(aV0->NegNSigmaTPCP()==0))
+       return false; 
+      else
+       {
+         return true;   
+       }
+    }
+
+    //quality cuts
+    if(fOnFlyStatus) if(aV0->OnFlyStatusV0()) return false;
+    if(aV0->StatusNeg() == 999 || aV0->StatusPos() == 999) return false;
+    if(aV0->TPCNclsPos()<fTPCNclsDaughters) return false;
+    if(aV0->TPCNclsNeg()<fTPCNclsDaughters) return false;
+    if(aV0->NdofPos()>fNdofDaughters) return false;
+    if(aV0->NdofNeg()>fNdofDaughters) return false;
+    if(!(aV0->StatusNeg()&fStatusDaughters)) return false;
+    if(!(aV0->StatusPos()&fStatusDaughters)) return false;
+    
+  //DCA between daughter particles
+    if(TMath::Abs(aV0->DcaV0Daughters())>fMaxDcaV0Daughters)
+    return false;
+
+   //DCA of daughters to primary vertex
+    if(TMath::Abs(aV0->DcaPosToPrimVertex())<fMinDcaDaughtersToVert || TMath::Abs(aV0->DcaNegToPrimVertex())<fMinDcaDaughtersToVert)
+    return false;
+
+  //DCA V0 to prim vertex
+    if(TMath::Abs(aV0->DcaV0ToPrimVertex())>fMaxDcaV0)
+    return false;
+
+  //cos pointing angle
+  if(aV0->CosPointingAngle()<fMaxCosPointingAngle)
+    return false;
+
+  if(fParticleType == kAll)
+    return true;
+
+  bool pid_check=false;
+  // Looking for lambdas = proton + pim
+  if (fParticleType == 0 ) {
+    if (IsProtonNSigma(aV0->PtotPos(), aV0->PosNSigmaTPCP(), aV0->PosNSigmaTOFP())) //proton
+      if (IsPionNSigma(aV0->PtotNeg(), aV0->NegNSigmaTPCPi(), aV0->NegNSigmaTOFPi())) //pion
+       {
+         pid_check=true;
+         //invariant mass lambda
+         if(aV0->MassLambda()<fInvMassLambdaMin || aV0->MassLambda()>fInvMassLambdaMax)
+           return false;
+       }
+
+  }//Looking for antilambdas =  antiproton + pip
+  else if (fParticleType == 1) {
+    if (IsProtonNSigma(aV0->PtotNeg(), aV0->NegNSigmaTPCP(), aV0->NegNSigmaTOFP())) //proton
+      if (IsPionNSigma(aV0->PtotPos(), aV0->PosNSigmaTPCPi(), aV0->PosNSigmaTOFPi())) //pion
+       {
+         pid_check=true;
+         //invariant mass antilambda
+         if(aV0->MassAntiLambda()<fInvMassLambdaMin || aV0->MassAntiLambda()>fInvMassLambdaMax)
+           return false;
+       }
+  }
+
+
+  if(!pid_check) return false;
+
+  
+
+  return true;
+    
+    
+}
+//------------------------------
+AliFemtoString AliFemtoV0TrackCut::Report()
+{
+  // Prepare report from the execution
+  string tStemp;
+  char tCtemp[100];
+  snprintf(tCtemp , 100, "Minimum of Invariant Mass assuming Lambda:\t%lf\n",fInvMassLambdaMin);
+  tStemp+=tCtemp;
+  snprintf(tCtemp , 100, "Maximum of Invariant Mass assuming Lambda:\t%lf\n",fInvMassLambdaMax);
+  tStemp+=tCtemp;
+  snprintf(tCtemp , 100, "Minimum DCA of daughters to primary vertex:\t%lf\n",fMinDcaDaughtersToVert);
+  tStemp+=tCtemp;
+  snprintf(tCtemp , 100, "Max DCA of daughters:\t%lf\n",fMaxDcaV0Daughters);
+  tStemp+=tCtemp;
+
+
+
+  AliFemtoString returnThis = tStemp;
+  return returnThis;
+}
+TList *AliFemtoV0TrackCut::ListSettings()
+{
+  // return a list of settings in a writable form
+  TList *tListSetttings = new TList();
+  char buf[200];
+  snprintf(buf, 200, "AliFemtoV0TrackCut.InvMassLambdaMin=%lf", fInvMassLambdaMin);
+  tListSetttings->AddLast(new TObjString(buf));
+  return tListSetttings;
+}
+
+void AliFemtoV0TrackCut::SetMinDaughtersToPrimVertex(double min)
+{
+  fMinDcaDaughtersToVert=min;
+}
+
+void AliFemtoV0TrackCut::SetMaxDcaV0Daughters(double max)
+{
+  fMaxDcaV0Daughters=max;
+};
+
+void AliFemtoV0TrackCut::SetMaxDcaV0(double max)
+{
+  fMaxDcaV0=max;
+};
+
+void AliFemtoV0TrackCut::SetMaxCosPointingAngle(double max)
+{
+  fMaxCosPointingAngle = max;
+}
+
+void AliFemtoV0TrackCut::SetParticleType(short x)
+{
+  fParticleType = x;
+}
+
+void AliFemtoV0TrackCut::SetEta(double x){
+  fEta = x;
+}
+
+void AliFemtoV0TrackCut::SetPt(double min, double max){
+  fPtMin = min;
+  fPtMax = max;
+}
+
+void AliFemtoV0TrackCut::SetEtaDaughters(float x)
+{
+  fMaxEtaDaughters = x;
+}
+void AliFemtoV0TrackCut::SetTPCnclsDaughters(int x)
+{
+  fTPCNclsDaughters = x;
+}
+void AliFemtoV0TrackCut::SetNdofDaughters(int x)
+{
+  fNdofDaughters=x;
+}
+void AliFemtoV0TrackCut::SetStatusDaughters(unsigned long x)
+{
+  fStatusDaughters=x;
+}
+void AliFemtoV0TrackCut::SetPtDaughters(float min,float max)
+{
+  fPtMinDaughters = min;
+  fPtMaxDaughters = max;
+}
+
+void AliFemtoV0TrackCut::SetOnFlyStatus(bool x)
+{
+  fOnFlyStatus = x;
+}
+
+void AliFemtoV0TrackCut::SetInvariantMassLambda(double min, double max)
+{
+  fInvMassLambdaMin = min;
+  fInvMassLambdaMax = max;
+
+}
+
+//---------------------PID n Sigma ---------------------------------//
+bool AliFemtoV0TrackCut::IsKaonTPCdEdxNSigma(float mom, float nsigmaK)
+{
+  cout<<" AliFemtoV0TrackCut::IsKaonTPCdEdxNSigma "<<mom<<" "<<nsigmaK<<endl;
+
+
+  if(mom<0.35 && TMath::Abs(nsigmaK)<5.0)return true;
+  if(mom>=0.35 && mom<0.5 && TMath::Abs(nsigmaK)<3.0)return true; 
+  if(mom>=0.5 && mom<0.7 && TMath::Abs(nsigmaK)<2.0)return true;
+
+  return false;
+}
+
+
+bool AliFemtoV0TrackCut::IsKaonTOFNSigma(float mom, float nsigmaK)
+{
+  cout<<" AliFemtoV0TrackCut::IsKaonTPCdEdxNSigma "<<mom<<" "<<nsigmaK<<endl;
+  if(mom>=1.5 && TMath::Abs(nsigmaK)<2.0)return true; 
+  return false;
+}
+
+bool AliFemtoV0TrackCut::IsKaonNSigma(float mom, float nsigmaTPCK, float nsigmaTOFK)
+{
+
+      if(TMath::Abs(nsigmaTOFK)<3.0 && mom<=1.5 && TMath::Abs(nsigmaTPCK)<3.0)return true;
+      if(TMath::Abs(nsigmaTOFK)<2.0 && mom>1.5 && TMath::Abs(nsigmaTPCK)<3.0)return true;
+
+      //no TOF signal
+      if(nsigmaTOFK<=-9999){
+       //cout <<"/////////////// AliFemtoV0TrackCut::IsKaonNSigma  NO TOF SIGNAL ////////////" <<endl;
+       if(TMath::Abs(nsigmaTPCK)<2.0) return true;
+       /*if(mom<0.4 && TMath::Abs(nsigmaTPCK)<1.0)return true;
+       if(mom>=0.4 && mom<0.5 && TMath::Abs(nsigmaTPCK)<2.0)return true;
+       if(mom>=0.5 && mom<0.6 && TMath::Abs(nsigmaTPCK)<2.0)return true;*/
+      }
+  return false;
+}
+
+
+
+bool AliFemtoV0TrackCut::IsPionNSigma(float mom, float nsigmaTPCPi, float nsigmaTOFPi)
+{
+  mom = 1; //because of warning in the compilation
+  nsigmaTOFPi = 1;
+  // cout<<" AliFemtoV0TrackCut::IsKaonNSigma "<<mom<<" tpc "<<nsigmaTPCK<<" tof "<<nsigmaTOFK<<endl;
+
+  //TOF signal
+  // if(TMath::Abs(nsigmaTOFPi)<2.0 && mom<=1.5 && TMath::Abs(nsigmaTPCPi)<2.0)return true;
+  //  if(TMath::Abs(nsigmaTOFPi)<2.0 && mom>1.5 && TMath::Abs(nsigmaTPCPi)<2.0)return true;
+
+
+      //no TOF signal
+  //  if(nsigmaTOFPi<=-9999){
+  //   if(TMath::Abs(nsigmaTPCPi)<2.0) return true;
+       /*if(mom<0.35 && TMath::Abs(nsigmaTPCPi)<2.0)return true;
+       if(mom>=0.35 && mom<0.5 && TMath::Abs(nsigmaTPCPi)<2.0)return true;
+       if(mom>=0.5 && TMath::Abs(nsigmaTPCPi)<2.0)return true;*/
+  //      }
+
+  if( TMath::Abs(nsigmaTPCPi)<3.0) return true;
+
+  return false;
+}
+
+
+bool AliFemtoV0TrackCut::IsProtonNSigma(float mom, float nsigmaTPCP, float nsigmaTOFP)
+{
+  mom = 1; //because of warning in the compilation
+  nsigmaTOFP = 1;
+  // cout<<" AliFemtoV0TrackCut::IsKaonNSigma "<<mom<<" tpc "<<nsigmaTPCK<<" tof "<<nsigmaTOFK<<endl;
+
+      //TOF signal
+  //  if(TMath::Abs(nsigmaTOFP)<2.0 && mom<=1.5 && TMath::Abs(nsigmaTPCP)<2.0)return true;
+  //  if(TMath::Abs(nsigmaTOFP)<2.0 && mom>1.5 && TMath::Abs(nsigmaTPCP)<2.0)return true;
+
+      //no TOF signal
+  //  if(nsigmaTOFP<=-9999){
+  //   if(TMath::Abs(nsigmaTPCP)<2.0) return true;
+       /*if(mom<0.5 && TMath::Abs(nsigmaTPCP)<2.0)return true;
+         if(mom>=0.5 && mom<0.8 && TMath::Abs(nsigmaTPCP)<2.0)return true;*/
+  //  }
+
+  if( TMath::Abs(nsigmaTPCP)<3.0) return true;
+
+  return false;
+}
diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0TrackCut.h b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0TrackCut.h
new file mode 100644 (file)
index 0000000..73ecac2
--- /dev/null
@@ -0,0 +1,84 @@
+///////////////////////////////////////////////////////////////////////////
+//                                                                       //
+// AliFemtoESDTrackCut: A basic track cut that used information from     //
+// ALICE ESD to accept or reject the track.                              //  
+// Enables the selection on charge, transverse momentum, rapidity,       //
+// pid probabilities, number of ITS and TPC clusters                     //
+// Author: Marek Chojnacki (WUT), mchojnacki@knf.pw.edu.pl               //
+//                                                                       //
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef ALIFEMTOV0TRACKCUT_H
+#define ALIFEMTOV0TRACKCUT_H
+
+#include "AliFemtoTrackCut.h"
+
+class AliFemtoV0TrackCut : public AliFemtoParticleCut 
+{
+  public:
+  enum V0Type {kLambda = 0, kAntiLambda=1, kAll=99, kLambdaMC=101, kAntiLambdaMC=102};
+  typedef enum V0Type AliFemtoV0Type;
+
+
+  AliFemtoV0TrackCut();
+  virtual ~AliFemtoV0TrackCut();
+
+  virtual bool Pass(const AliFemtoV0* aV0);
+
+  virtual AliFemtoString Report();
+  virtual TList *ListSettings();
+  virtual AliFemtoParticleType Type(){return hbtV0;}
+  
+  void SetInvariantMassLambda(double,double);
+  void SetMinDaughtersToPrimVertex(double);
+  void SetMaxDcaV0Daughters(double);
+  void SetMaxDcaV0(double);
+  void SetMaxCosPointingAngle(double);
+  void SetParticleType(short);
+  void SetEta(double);
+  void SetPt(double,double);
+  void SetEtaDaughters(float);
+  void SetTPCnclsDaughters(int);
+  void SetNdofDaughters(int);
+  void SetStatusDaughters(unsigned long);
+  void SetPtDaughters(float,float);
+  void SetOnFlyStatus(bool);
+
+  //----n sigma----
+  bool IsKaonTPCdEdxNSigma(float mom, float nsigmaK);
+  bool IsKaonTOFNSigma(float mom, float nsigmaK);
+  bool IsKaonNSigma(float mom, float nsigmaTPCK, float nsigmaTOFK);
+  bool IsPionNSigma(float mom, float nsigmaTPCPi, float nsigmaTOFPi);
+  bool IsProtonNSigma(float mom, float nsigmaTPCP, float nsigmaTOFP);
+  
+ private:   // here are the quantities I want to cut on...
+
+  double            fInvMassLambdaMin;   //invariant mass lambda min
+  double            fInvMassLambdaMax;   //invariant mass lambda max
+  double            fMinDcaDaughtersToVert; //DCA of daughters to primary vertex
+  double            fMaxDcaV0Daughters;     //Max DCA of v0 daughters at Decay vertex
+  double            fMaxDcaV0;
+  
+  double            fMaxCosPointingAngle;
+  short             fParticleType; //0-lambda
+  double            fEta;
+  double            fPtMin;
+  double            fPtMax;
+  bool              fOnFlyStatus;
+
+  float fMaxEtaDaughters;                                  // Eta of positive daughter
+  int   fTPCNclsDaughters;                                 // No. of cls of pos daughter
+  int   fNdofDaughters;                                            // No. of degrees of freedom of the pos. daughter track
+  unsigned long fStatusDaughters;                          // Status (tpc refit, its refit...)
+  float fPtMinDaughters;
+  float fPtMaxDaughters;
+
+#ifdef __ROOT__ 
+  ClassDef(AliFemtoV0TrackCut, 1)
+#endif
+
+};
+
+
+#endif
+
diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0TrackPairCut.cxx b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0TrackPairCut.cxx
new file mode 100644 (file)
index 0000000..f153a3d
--- /dev/null
@@ -0,0 +1,264 @@
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+// AliFemtoShareQualityPairCut - a pair cut which checks for some pair     //
+// qualities that attempt to identify slit/doubly reconstructed tracks     //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+/***************************************************************************
+ *
+ * $Id: AliFemtoShareQualityPairCut.cxx 50722 2011-07-21 15:18:38Z akisiel $
+ *
+ * Author: Adam Kisiel, Ohio State, kisiel@mps.ohio-state.edu
+ ***************************************************************************
+ *
+ * Description: part of STAR HBT Framework: AliFemtoMaker package
+ *   a cut to remove "shared" and "split" pairs
+ *
+ ***************************************************************************
+ *
+ *
+ **************************************************************************/
+
+#include "AliFemtoV0TrackPairCut.h"
+#include <string>
+#include <cstdio>
+
+#ifdef __ROOT__
+ClassImp(AliFemtoV0TrackPairCut)
+#endif
+
+//__________________
+AliFemtoV0TrackPairCut::AliFemtoV0TrackPairCut():
+  fNPairsPassed(0),
+  fNPairsFailed(0),
+  fV0Max(1.0),
+  fShareQualityMax(1.0),
+  fShareFractionMax(1.0),
+  fRemoveSameLabel(0),
+  fTrackTPCOnly(0)
+{
+  // Default constructor
+  // Nothing to do
+}
+//__________________
+AliFemtoV0TrackPairCut::~AliFemtoV0TrackPairCut(){
+  /* no-op */
+}
+//__________________
+bool AliFemtoV0TrackPairCut::Pass(const AliFemtoPair* pair){
+  // Check for pairs that are possibly shared/double reconstruction
+
+  bool temp = true;
+  //Track1 - V0
+  //Track2 - track
+
+  //!!!!!USUN MNIE!!!!
+  /*if(pair->KStar()>0.15)
+    {
+      return false;
+      }*/
+  //!!!!!!!!
+
+
+  if(!(pair->Track1()->V0() && pair->Track2()->Track()))
+    {
+      return false;
+    }
+  if(fTrackTPCOnly)
+    {
+      if( (-(pair->Track1()->V0()->IdNeg()+1)) ==pair->Track2()->TrackId() || (-(pair->Track1()->V0()->IdPos()+1)) ==pair->Track2()->TrackId())
+       {
+         return false;
+       }
+    }
+  else
+    {
+      if(pair->Track1()->V0()->IdNeg()==pair->Track2()->TrackId() || pair->Track1()->V0()->IdPos()==pair->Track2()->TrackId())
+       {
+         return false;
+       }
+    }
+  
+
+
+  //reject merged trakcs in TPC
+  
+
+  //temp = dist > fDTPCMin;
+  //koniec kopii
+  //if(!temp)
+  //return false;
+
+  //kopia z AliFemtoShareQualityPairCut.cxx
+  Int_t nh = 0;
+  Int_t an = 0;
+  Int_t ns = 0;
+
+  
+  if ((fShareFractionMax < 1.0) && ( fShareQualityMax < 1.0)) {
+    for (unsigned int imap=0; imap<pair->Track1()->V0()->TPCclustersPos().GetNbits(); imap++) {
+      // If both have clusters in the same row
+      if (pair->Track1()->V0()->TPCclustersPos().TestBitNumber(imap) && 
+         pair->Track2()->Track()->TPCclusters().TestBitNumber(imap)) {
+       // Do they share it ?
+       if (pair->Track1()->V0()->TPCsharingPos().TestBitNumber(imap) &&
+           pair->Track2()->Track()->TPCsharing().TestBitNumber(imap))
+         {
+           //    cout << "A shared cluster !!!" << endl;
+           //  cout << "imap idx1 idx2 " 
+           //       << imap << " "
+           //       << tP1idx[imap] << " " << tP2idx[imap] << endl;
+           an++;
+           nh+=2;
+           ns+=2;
+         }
+       
+       // Different hits on the same padrow
+       else {
+         an--;
+         nh+=2;
+       }
+      }
+      else if (pair->Track1()->V0()->TPCclustersPos().TestBitNumber(imap) ||
+              pair->Track2()->Track()->TPCclusters().TestBitNumber(imap)) {
+       // One track has a hit, the other does not
+       an++;
+       nh++;
+      }
+    }
+    
+    Float_t hsmval = 0.0;
+    Float_t hsfval = 0.0;
+    
+    if (nh >0) {
+      hsmval = an*1.0/nh;
+      hsfval = ns*1.0/nh;
+    }
+    //  if (hsmval > -0.4) {
+    //   cout << "Pair quality: " << hsmval << " " << an << " " << nh << " " 
+    //        << (pair->Track1()->Track()) << " " 
+    //        << (pair->Track2()->Track()) << endl;
+    //   cout << "Bits: " << pair->Track1()->Track()->TPCclusters().GetNbits() << endl;
+    //  }
+    //   if (hsfval > 0.0) {
+    //     cout << "Pair sharity: " << hsfval << " " << ns << " " << nh << "    " << hsmval << " " << an << " " << nh << endl;
+    //   }
+    
+    temp = (hsmval < fShareQualityMax) && (hsfval < fShareFractionMax);
+    if(!temp) return false;
+
+    nh = 0;
+    an = 0;
+    ns = 0;
+
+    for (unsigned int imap=0; imap<pair->Track1()->V0()->TPCclustersNeg().GetNbits(); imap++) {
+      // If both have clusters in the same row
+      if (pair->Track1()->V0()->TPCclustersNeg().TestBitNumber(imap) && 
+         pair->Track2()->Track()->TPCclusters().TestBitNumber(imap)) {
+       // Do they share it ?
+       if (pair->Track1()->V0()->TPCsharingNeg().TestBitNumber(imap) &&
+           pair->Track2()->Track()->TPCsharing().TestBitNumber(imap))
+         {
+           //    cout << "A shared cluster !!!" << endl;
+           //  cout << "imap idx1 idx2 " 
+           //       << imap << " "
+           //       << tP1idx[imap] << " " << tP2idx[imap] << endl;
+           an++;
+           nh+=2;
+           ns+=2;
+         }
+       
+       // Different hits on the same padrow
+       else {
+         an--;
+         nh+=2;
+       }
+      }
+      else if (pair->Track1()->V0()->TPCclustersNeg().TestBitNumber(imap) ||
+              pair->Track2()->Track()->TPCclusters().TestBitNumber(imap)) {
+       // One track has a hit, the other does not
+       an++;
+       nh++;
+      }
+    }
+    
+    hsmval = 0.0;
+    hsfval = 0.0;
+    
+    if (nh >0) {
+      hsmval = an*1.0/nh;
+      hsfval = ns*1.0/nh;
+    }
+    //  if (hsmval > -0.4) {
+    //   cout << "Pair quality: " << hsmval << " " << an << " " << nh << " " 
+    //        << (pair->Track1()->Track()) << " " 
+    //        << (pair->Track2()->Track()) << endl;
+    //   cout << "Bits: " << pair->Track1()->Track()->TPCclusters().GetNbits() << endl;
+    //  }
+    //   if (hsfval > 0.0) {
+    //     cout << "Pair sharity: " << hsfval << " " << ns << " " << nh << "    " << hsmval << " " << an << " " << nh << endl;
+    //   }
+    
+    temp = (hsmval < fShareQualityMax) && (hsfval < fShareFractionMax);
+
+
+  }
+  else
+    temp = true;
+  //koniec kopii
+
+
+
+
+
+  return temp;
+}
+//__________________
+AliFemtoString AliFemtoV0TrackPairCut::Report(){
+  // Prepare the report from the execution
+  string stemp = "AliFemtoV0 Pair Cut - remove shared and split pairs\n";  char ctemp[100];
+  snprintf(ctemp , 100, "Number of pairs which passed:\t%ld  Number which failed:\t%ld\n",fNPairsPassed,fNPairsFailed);
+  stemp += ctemp;
+  AliFemtoString returnThis = stemp;
+  return returnThis;}
+//__________________
+
+void AliFemtoV0TrackPairCut::SetV0Max(Double_t aV0Max) {
+  fV0Max = aV0Max;
+}
+
+Double_t AliFemtoV0TrackPairCut::GetAliFemtoV0Max() const {
+  return fV0Max;
+}
+
+
+TList *AliFemtoV0TrackPairCut::ListSettings()
+{
+  // return a list of settings in a writable form
+  TList *tListSetttings = new TList();
+  char buf[200];
+  snprintf(buf, 200, "AliFemtoV0TrackPairCut.sharequalitymax=%f", fV0Max);
+  snprintf(buf, 200, "AliFemtoV0TrackPairCut.sharefractionmax=%f", fShareFractionMax);
+  tListSetttings->AddLast(new TObjString(buf));
+
+  return tListSetttings;
+}
+
+void     AliFemtoV0TrackPairCut::SetRemoveSameLabel(Bool_t aRemove)
+{
+  fRemoveSameLabel = aRemove;
+}
+
+void AliFemtoV0TrackPairCut::SetTPCOnly(Bool_t tpconly)
+{
+  fTrackTPCOnly = tpconly;
+}
+
+void AliFemtoV0TrackPairCut::SetShareQualityMax(Double_t aShareQualityMax) {
+  fShareQualityMax = aShareQualityMax;
+}
+
+void AliFemtoV0TrackPairCut::SetShareFractionMax(Double_t aShareFractionMax) {
+  fShareFractionMax = aShareFractionMax;
+}
diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0TrackPairCut.h b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0TrackPairCut.h
new file mode 100644 (file)
index 0000000..c802ad9
--- /dev/null
@@ -0,0 +1,80 @@
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+// AliFemtoShareQualityPairCut - a pair cut which checks for some pair     //
+// qualities that attempt to identify slit/doubly reconstructed tracks     //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+/***************************************************************************
+ *
+ * $Id: AliFemtoShareQualityPairCut.h 24360 2008-03-10 09:48:27Z akisiel $
+ *
+ * Author: Adam Kisiel, Ohio State University, kisiel@mps.ohio-state.edu
+ ***************************************************************************
+ *
+ * Description: part of STAR HBT Framework: AliFemtoMaker package
+ *   a cut to remove "shared" and "split" pairs
+ *
+ ***************************************************************************
+ *
+ *
+ **************************************************************************/
+
+
+#ifndef ALIFEMTOV0TRACKPAIRCUT_H
+#define ALIFEMTOV0TRACKPAIRCUT_H
+
+// do I need these lines ?
+//#ifndef StMaker_H
+//#include "StMaker.h"
+//#endif
+
+#include "AliFemtoPairCut.h"
+
+class AliFemtoV0TrackPairCut : public AliFemtoPairCut{
+public:
+  AliFemtoV0TrackPairCut();
+  AliFemtoV0TrackPairCut(const AliFemtoV0TrackPairCut& cut);
+  virtual ~AliFemtoV0TrackPairCut();
+  
+  virtual bool Pass(const AliFemtoPair* pair);
+  virtual AliFemtoString Report();
+  virtual TList *ListSettings();
+  virtual AliFemtoPairCut* Clone();
+  void SetV0Max(Double_t aAliFemtoV0Max);
+  Double_t GetAliFemtoV0Max() const;
+  void     SetRemoveSameLabel(Bool_t aRemove);
+  void SetTPCOnly(Bool_t tpconly);
+  void SetShareQualityMax(Double_t aShareQualityMax);
+  void SetShareFractionMax(Double_t aShareFractionMax);
+  
+ protected:
+  long fNPairsPassed;          // Number of pairs consideered that passed the cut 
+  long fNPairsFailed;          // Number of pairs consideered that failed the cut
+
+ private:
+  Double_t fV0Max;   // Maximum allowed pair quality
+  Double_t fShareQualityMax;
+  Double_t fShareFractionMax;  // Maximum allowed share fraction
+  Bool_t   fRemoveSameLabel;   // If 1 pairs with two tracks with the same label will be removed
+  Bool_t fTrackTPCOnly;
+
+
+#ifdef __ROOT__
+  ClassDef(AliFemtoV0TrackPairCut, 0)
+#endif
+};
+
+inline AliFemtoV0TrackPairCut::AliFemtoV0TrackPairCut(const AliFemtoV0TrackPairCut& c) : 
+  AliFemtoPairCut(c),
+  fNPairsPassed(0),
+  fNPairsFailed(0),
+  fV0Max(1.0),
+  fShareQualityMax(1.0),
+  fShareFractionMax(1.0),
+  fRemoveSameLabel(0),
+  fTrackTPCOnly(0)
+{ /* no-op */ }
+
+inline AliFemtoPairCut* AliFemtoV0TrackPairCut::Clone() { AliFemtoV0TrackPairCut* c = new AliFemtoV0TrackPairCut(*this); return c;}
+
+#endif
index a452e8575752b92549c756b840790e9de1e29685..9032fcca169f24ff34d15cbb5678d9be1c5bd8ca 100644 (file)
@@ -35,7 +35,9 @@ AliFemtoCorrFctnDEtaDPhi::AliFemtoCorrFctnDEtaDPhi(char* title, const int& aPhiB
   fDPhiPtNumerator(0),
   fDPhiPtDenominator(0),
   fDCosPtNumerator(0),
-  fDCosPtDenominator(0)
+  fDCosPtDenominator(0),
+  fPhi(0),
+  fEta(0)
 {
   // set up numerator
   char tTitNumD[101] = "NumDPhiDEta";
@@ -64,6 +66,15 @@ AliFemtoCorrFctnDEtaDPhi::AliFemtoCorrFctnDEtaDPhi(char* title, const int& aPhiB
   strncat(tTitDenDCos,title, 100);
   fDCosDenominator = new TH1D(tTitDenDCos,title,aPhiBins*2,-1.0,1.0);
 
+  char tTitPhi[101] = "Phi";
+  strncat(tTitPhi,title, 100);
+  fPhi = new TH1D(tTitPhi,title,90,-TMath::Pi(),TMath::Pi());
+
+  char tTitEta[101] = "Eta";
+  strncat(tTitEta,title, 100);
+  fEta = new TH1D(tTitEta,title,90,-1.2,1.2);
+  
+
   // to enable error bar calculation...
   fDPhiDEtaNumerator->Sumw2();
   fDPhiDEtaDenominator->Sumw2();
@@ -71,6 +82,8 @@ AliFemtoCorrFctnDEtaDPhi::AliFemtoCorrFctnDEtaDPhi(char* title, const int& aPhiB
   fDPhiDenominator->Sumw2();
   fDCosNumerator->Sumw2();
   fDCosDenominator->Sumw2();
+  fPhi->Sumw2();
+  fEta->Sumw2();
 }
 
 //____________________________
@@ -86,7 +99,9 @@ AliFemtoCorrFctnDEtaDPhi::AliFemtoCorrFctnDEtaDPhi(const AliFemtoCorrFctnDEtaDPh
   fDPhiPtNumerator(0),
   fDPhiPtDenominator(0),
   fDCosPtNumerator(0),
-  fDCosPtDenominator(0)
+  fDCosPtDenominator(0),
+  fPhi(0),
+  fEta(0)
 {
   // copy constructor
   if (aCorrFctn.fDPhiDEtaNumerator)
@@ -133,6 +148,14 @@ AliFemtoCorrFctnDEtaDPhi::AliFemtoCorrFctnDEtaDPhi(const AliFemtoCorrFctnDEtaDPh
     fDCosPtDenominator = new TH2D(*aCorrFctn.fDCosPtDenominator);
   else
     fDCosPtDenominator = 0;
+ if (aCorrFctn.fPhi)
+    fPhi = new TH1D(*aCorrFctn.fPhi);
+  else
+    fPhi = 0;
+ if (aCorrFctn.fEta)
+    fEta = new TH1D(*aCorrFctn.fEta);
+  else
+    fEta = 0;
 
 }
 //____________________________
@@ -150,6 +173,8 @@ AliFemtoCorrFctnDEtaDPhi::~AliFemtoCorrFctnDEtaDPhi(){
     delete fDCosPtNumerator;
     delete fDCosPtDenominator;
   }
+  delete fPhi;
+  delete fEta;
 }
 //_________________________
 AliFemtoCorrFctnDEtaDPhi& AliFemtoCorrFctnDEtaDPhi::operator=(const AliFemtoCorrFctnDEtaDPhi& aCorrFctn)
@@ -202,6 +227,14 @@ AliFemtoCorrFctnDEtaDPhi& AliFemtoCorrFctnDEtaDPhi::operator=(const AliFemtoCorr
     fDCosPtDenominator = new TH2D(*aCorrFctn.fDCosPtDenominator);
   else
     fDCosPtDenominator = 0;
+  if (aCorrFctn.fPhi)
+    fPhi = new TH1D(*aCorrFctn.fPhi);
+  else
+    fPhi = 0;
+  if (aCorrFctn.fEta)
+    fEta = new TH1D(*aCorrFctn.fEta);
+  else
+    fEta = 0;
 
   return *this;
 }
@@ -236,10 +269,15 @@ void AliFemtoCorrFctnDEtaDPhi::AddRealPair( AliFemtoPair* pair){
   if (fPairCut)
     if (!fPairCut->Pass(pair)) return;
 
-  double phi1 = pair->Track1()->Track()->P().Phi();
+  /*double phi1 = pair->Track1()->Track()->P().Phi();
   double phi2 = pair->Track2()->Track()->P().Phi();
   double eta1 = pair->Track1()->Track()->P().PseudoRapidity();
-  double eta2 = pair->Track2()->Track()->P().PseudoRapidity();
+  double eta2 = pair->Track2()->Track()->P().PseudoRapidity();*/
+
+  double phi1 = pair->Track1()->FourMomentum().Phi();
+  double phi2 = pair->Track2()->FourMomentum().Phi();
+  double eta1 = pair->Track1()->FourMomentum().PseudoRapidity();
+  double eta2 = pair->Track2()->FourMomentum().PseudoRapidity();
 
   double dphi = phi1 - phi2;
   while (dphi<-PIH) dphi+=PIT;
@@ -272,6 +310,9 @@ void AliFemtoCorrFctnDEtaDPhi::AddRealPair( AliFemtoPair* pair){
 //     fDCosPtNumerator->Fill(cosphi, ptmin);
   }
 
+  fPhi->Fill(phi1);
+  fEta->Fill(eta1);
+
 }
 //____________________________
 void AliFemtoCorrFctnDEtaDPhi::AddMixedPair( AliFemtoPair* pair){
@@ -279,10 +320,15 @@ void AliFemtoCorrFctnDEtaDPhi::AddMixedPair( AliFemtoPair* pair){
   if (fPairCut)
     if (!fPairCut->Pass(pair)) return;
 
-  double phi1 = pair->Track1()->Track()->P().Phi();
+  /*double phi1 = pair->Track1()->Track()->P().Phi();
   double phi2 = pair->Track2()->Track()->P().Phi();
   double eta1 = pair->Track1()->Track()->P().PseudoRapidity();
-  double eta2 = pair->Track2()->Track()->P().PseudoRapidity();
+  double eta2 = pair->Track2()->Track()->P().PseudoRapidity();*/
+
+  double phi1 = pair->Track1()->FourMomentum().Phi();
+  double phi2 = pair->Track2()->FourMomentum().Phi();
+  double eta1 = pair->Track1()->FourMomentum().PseudoRapidity();
+  double eta2 = pair->Track2()->FourMomentum().PseudoRapidity();
 
   double dphi = phi1 - phi2;
   while (dphi<-PIH) dphi+=PIT;
@@ -322,7 +368,7 @@ void AliFemtoCorrFctnDEtaDPhi::WriteHistos()
   // Write out result histograms
   fDPhiDEtaNumerator->Write();
   fDPhiDEtaDenominator->Write();
-  fDPhiNumerator->Write();
+  /*fDPhiNumerator->Write();
   fDPhiDenominator->Write();
   fDCosNumerator->Write();
   fDCosDenominator->Write();
@@ -331,7 +377,9 @@ void AliFemtoCorrFctnDEtaDPhi::WriteHistos()
     fDPhiPtDenominator->Write();
     fDCosPtNumerator->Write();
     fDCosPtDenominator->Write();
-  }
+    }*/
+  fPhi->Write();
+  fEta->Write();
 }
 
 TList* AliFemtoCorrFctnDEtaDPhi::GetOutputList()
@@ -341,7 +389,7 @@ TList* AliFemtoCorrFctnDEtaDPhi::GetOutputList()
 
   tOutputList->Add(fDPhiDEtaNumerator);
   tOutputList->Add(fDPhiDEtaDenominator);
-  tOutputList->Add(fDPhiNumerator);
+  /*tOutputList->Add(fDPhiNumerator);
   tOutputList->Add(fDPhiDenominator);
   tOutputList->Add(fDCosNumerator);
   tOutputList->Add(fDCosDenominator);
@@ -350,7 +398,9 @@ TList* AliFemtoCorrFctnDEtaDPhi::GetOutputList()
     tOutputList->Add(fDPhiPtDenominator);
     tOutputList->Add(fDCosPtNumerator);
     tOutputList->Add(fDCosPtDenominator);
-  }
+    }*/
+  tOutputList->Add(fPhi);
+  tOutputList->Add(fEta);
 
   return tOutputList;
 
index bff3e3deb9a5e3e01a49fbbd32f58709cab47da5..42e5eb538ab120a211a44c2d9b47cf44bed96a8f 100644 (file)
@@ -51,6 +51,9 @@ private:
   TH2D *fDCosPtNumerator;            // Numerator of colinearity correlation vs. Pt min
   TH2D *fDCosPtDenominator;          // Denominator of colinearity correlation vs. Pt min
 
+  TH1D *fPhi;
+  TH1D *fEta;
+
 #ifdef __ROOT__
   ClassDef(AliFemtoCorrFctnDEtaDPhi, 1)
 #endif
index 270ab1e34fa47f519d7dd7e4e8801d53c77ae931..37361281574df16818d560290f4e790fbe453237 100644 (file)
@@ -43,6 +43,7 @@ public:
   virtual void Fill(const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aCollection);}
   virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection)
   {AliFemtoCutMonitor::Fill(aEvent, aCollection);}
+  virtual void Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2) {AliFemtoCutMonitor::Fill(aCollection1, aCollection2);}
 
   void Write();
 
index 068e9312e852910a7d307c1beaf5312b44ff1590..fc342007d9be221df4d6e032bc0854f6fbfc1926 100644 (file)
@@ -39,6 +39,7 @@ public:
   virtual void Fill(const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aCollection);}
   virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection)
   {AliFemtoCutMonitor::Fill(aEvent, aCollection);}
+  virtual void Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2) {AliFemtoCutMonitor::Fill(aCollection1, aCollection2);}
   void Write();
 
   virtual TList *GetOutputList();
index 71502e512a0c8af9fdbdf639adedaef75fee44b0..08f67d9e7db25868921b37c9491affdc6a280c46 100644 (file)
@@ -38,6 +38,7 @@ public:
   virtual void Fill(const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aCollection);}
   virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection)
   {AliFemtoCutMonitor::Fill(aEvent, aCollection);}
+  virtual void Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2) {AliFemtoCutMonitor::Fill(aCollection1, aCollection2);}
 
 
   void Write();
index a4a1f85fd594d8ec06442d2009e32633be0cf676..6ded9f266f284d555742f99e1a3dcd5bbd364334 100644 (file)
@@ -38,6 +38,7 @@ public:
   virtual void Fill(const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aCollection);}
   virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection)
   {AliFemtoCutMonitor::Fill(aEvent, aCollection);}
+  virtual void Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2) {AliFemtoCutMonitor::Fill(aCollection1, aCollection2);}
 
   void Write();
 
index 1d4714b808e34af3a3ce6c018153b9dc73607c8a..d6c45d32a3d9895ce86672a9a802bca4a873fdbe 100755 (executable)
@@ -38,6 +38,7 @@ public:
   virtual void Fill(const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aCollection);}
   virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection)
   {AliFemtoCutMonitor::Fill(aEvent, aCollection);}
+  virtual void Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2) {AliFemtoCutMonitor::Fill(aCollection1, aCollection2);}
 
   void Write();
 
index 0e31e031edcc0bfee6fbec443c686a8b12dcd2b8..687eeaff8595eed53107f88e61d6e4faa4477e55 100644 (file)
@@ -36,7 +36,7 @@ AliFemtoPairCutAntiGamma::AliFemtoPairCutAntiGamma():
   fMaxEEMinv(0.0),
   fMaxDTheta(0.0),
   fDTPCMin(0),
-  fUseAOD(kFALSE)
+  fDataType(kESD)
 {
 }
 //__________________
@@ -45,12 +45,12 @@ AliFemtoPairCutAntiGamma::AliFemtoPairCutAntiGamma(const AliFemtoPairCutAntiGamm
   fMaxEEMinv(0.0),
   fMaxDTheta(0.0),
   fDTPCMin(0),
-  fUseAOD(kFALSE)
+  fDataType(kESD)
 { 
   fMaxEEMinv = c.fMaxEEMinv;
   fMaxDTheta = c.fMaxDTheta;
   fDTPCMin = c.fDTPCMin;
-  fUseAOD = c.fUseAOD;
+  fDataType = c.fDataType;
 }
 
 AliFemtoPairCutAntiGamma& AliFemtoPairCutAntiGamma::operator=(const AliFemtoPairCutAntiGamma& c)
@@ -59,7 +59,7 @@ AliFemtoPairCutAntiGamma& AliFemtoPairCutAntiGamma::operator=(const AliFemtoPair
     fMaxEEMinv = c.fMaxEEMinv;
     fMaxDTheta = c.fMaxDTheta;
     fDTPCMin = c.fDTPCMin;
-    fUseAOD = c.fUseAOD;
+    fDataType = c.fDataType;
   }
 
   return *this;
@@ -75,6 +75,9 @@ bool AliFemtoPairCutAntiGamma::Pass(const AliFemtoPair* pair){
   // quality and sharity
   bool temp = true;
 
+  if(fDataType==kKine)
+    return true;
+
   double me = 0.000511;
 
   if ((pair->Track1()->Track()->Charge() * pair->Track2()->Track()->Charge()) < 0.0) {
@@ -95,7 +98,7 @@ bool AliFemtoPairCutAntiGamma::Pass(const AliFemtoPair* pair){
 
   bool tempTPCEntrance = true;
  
-  if(!fUseAOD)
+  if(fDataType==kAOD)
     {
       double distx = pair->Track1()->Track()->NominalTpcEntrancePoint().x() - pair->Track2()->Track()->NominalTpcEntrancePoint().x();
       double disty = pair->Track1()->Track()->NominalTpcEntrancePoint().y() - pair->Track2()->Track()->NominalTpcEntrancePoint().y();
@@ -104,7 +107,7 @@ bool AliFemtoPairCutAntiGamma::Pass(const AliFemtoPair* pair){
 
       tempTPCEntrance = dist > fDTPCMin;
     }
-
 
   if (temp && tempTPCEntrance) {
     temp = AliFemtoShareQualityPairCut::Pass(pair);
@@ -159,7 +162,7 @@ void AliFemtoPairCutAntiGamma::SetTPCEntranceSepMinimum(double dtpc)
   fDTPCMin = dtpc;
 }
 
-void AliFemtoPairCutAntiGamma::SetUseAOD(Bool_t UseAOD)
+void AliFemtoPairCutAntiGamma::SetDataType(AliFemtoDataType type)
 {
-  fUseAOD = UseAOD;
+  fDataType = type;
 }
index 9114e5024a4bae3f78451960453e10d379990079..aa612ecaf5e71dc089b8c1dc01c4bd6fa45d2f47 100644 (file)
@@ -30,6 +30,9 @@
 
 class AliFemtoPairCutAntiGamma : public AliFemtoShareQualityPairCut{
 public:
+  enum DataType {kESD=0, kAOD=1, kKine=2};
+  typedef enum DataType AliFemtoDataType;
+
   AliFemtoPairCutAntiGamma();
   AliFemtoPairCutAntiGamma(const AliFemtoPairCutAntiGamma& c);
   virtual ~AliFemtoPairCutAntiGamma();
@@ -42,14 +45,13 @@ public:
   void SetMaxEEMinv(Double_t maxeeminv);
   void SetMaxThetaDiff(Double_t maxdtheta);
   void SetTPCEntranceSepMinimum(double dtpc);
-  void SetUseAOD(Bool_t UseAOD);
+  void SetDataType(AliFemtoDataType type);
   
  protected:
   Double_t fMaxEEMinv; // Maximum allowed ee Minv
   Double_t fMaxDTheta; // Maximum polar angle difference
   Double_t fDTPCMin;          // Minimum allowed pair nominal separation at the entrance to the TPC
-  Bool_t fUseAOD; // Use AODs
-
+  AliFemtoDataType fDataType; //Use ESD / AOD / Kinematics.
 
 #ifdef __ROOT__
   ClassDef(AliFemtoPairCutAntiGamma, 0)
index 49306d58d9253bb10d14fc8567d16d8fb1501af0..e27969927f46bc9ef9a7572b61d7e09c4bdcb704 100644 (file)
@@ -64,5 +64,9 @@
 #pragma link C++ class AliTwoTrackRes+;
 #pragma link C++ class AliFemtoMCTrackCut+;
 #pragma link C++ class AliFemtoEventReaderKinematicsChain+;
-
+#pragma link C++ class AliFemtoV0TrackCut+;
+#pragma link C++ class AliFemtoV0PairCut+;
+#pragma link C++ class AliFemtoCutMonitorV0+;
+#pragma link C++ class AliFemtoV0TrackPairCut+;
+#pragma link C++ class AliFemtoCutMonitorCollections+;
 #endif