]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Reaction Plane analysis updates
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Jan 2013 11:26:17 +0000 (11:26 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Jan 2013 11:26:17 +0000 (11:26 +0000)
13 files changed:
PWGCF/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventMult.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventMult.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderAOD.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderAOD.h
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderAODChain.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoQinvCorrFctn.cxx
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSimpleAnalysis.cxx
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoPairCutRadialDistance.cxx
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoPairCutRadialDistance.h

index fffab83550ca007d832c2c8c14d1060de048f3fd..124e5513e5694e0a4fb587fd21d79962037d0fdd 100644 (file)
@@ -44,18 +44,15 @@ AliAnalysisTaskSE(name), //AliAnalysisTask(name,""),
   fReader(0x0),
   fManager(0x0),
   fAnalysisType(0),
-  fConfigMacro(0),
-  fConfigParams(0)
+    fConfigMacro(aConfigMacro),
+    fConfigParams(aConfigParams)
 {
   // Constructor.
   // Input slot #0 works with an Ntuple
   DefineInput(0, TChain::Class());
   // Output slot #0 writes into a TH1 container
   DefineOutput(0, TList::Class());
-  fConfigMacro = (char *) malloc(sizeof(char) * strlen(aConfigMacro));
-  strcpy(fConfigMacro, aConfigMacro);
-  fConfigParams = (char *) malloc(sizeof(char) * strlen(aConfigParams));
-  strcpy(fConfigParams, aConfigParams);
+
 }
 //________________________________________________________________________
 AliAnalysisTaskFemto::AliAnalysisTaskFemto(const char *name, const char *aConfigMacro="ConfigFemtoAnalysis.C"): 
@@ -70,18 +67,15 @@ AliAnalysisTaskFemto::AliAnalysisTaskFemto(const char *name, const char *aConfig
     fReader(0x0),
     fManager(0x0),
     fAnalysisType(0),
-    fConfigMacro(0),
-    fConfigParams(0)
+    fConfigMacro(aConfigMacro),
+    fConfigParams("")
 {
   // Constructor.
   // Input slot #0 works with an Ntuple
   DefineInput(0, TChain::Class());
   // Output slot #0 writes into a TH1 container
   DefineOutput(0, TList::Class());
-  fConfigMacro = (char *) malloc(sizeof(char) * strlen(aConfigMacro));
-  strcpy(fConfigMacro, aConfigMacro);
-  fConfigParams = (char *) malloc(sizeof(char) * 2);
-  strcpy(fConfigParams, "");
+
 }
 
 AliAnalysisTaskFemto::AliAnalysisTaskFemto(const AliAnalysisTaskFemto& aFemtoTask):
@@ -110,10 +104,10 @@ AliAnalysisTaskFemto::AliAnalysisTaskFemto(const AliAnalysisTaskFemto& aFemtoTas
   fReader = aFemtoTask.fReader;       
   fManager = aFemtoTask.fManager;      
   fAnalysisType = aFemtoTask.fAnalysisType; 
-  fConfigMacro = (char *) malloc(sizeof(char) * strlen(aFemtoTask.fConfigMacro));
-  strcpy(fConfigMacro, aFemtoTask.fConfigMacro);
-  fConfigParams = (char *) malloc(sizeof(char) * strlen(aFemtoTask.fConfigParams));
-  strcpy(fConfigParams, aFemtoTask.fConfigParams);
+
+  fConfigMacro = aFemtoTask.fConfigMacro;
+  fConfigParams = aFemtoTask.fConfigParams;
+
 }
 
 
@@ -132,20 +126,15 @@ AliAnalysisTaskFemto& AliAnalysisTaskFemto::operator=(const AliAnalysisTaskFemto
   fReader = aFemtoTask.fReader;       
   fManager = aFemtoTask.fManager;      
   fAnalysisType = aFemtoTask.fAnalysisType; 
-  if (fConfigMacro) free(fConfigMacro);
-  fConfigMacro = (char *) malloc(sizeof(char) * strlen(aFemtoTask.fConfigMacro));
-  strcpy(fConfigMacro, aFemtoTask.fConfigMacro);
-  if (fConfigParams) free(fConfigParams);
-  fConfigParams = (char *) malloc(sizeof(char) * strlen(aFemtoTask.fConfigParams));
-  strcpy(fConfigParams, aFemtoTask.fConfigParams);
+
+  fConfigMacro = aFemtoTask.fConfigMacro;
+  fConfigParams = aFemtoTask.fConfigParams;
 
   return *this;
 }
 
 AliAnalysisTaskFemto::~AliAnalysisTaskFemto() 
 {
-  if (fConfigMacro) free(fConfigMacro);
-  if (fConfigParams) free(fConfigParams);
 }
 
 
@@ -294,7 +283,7 @@ void AliAnalysisTaskFemto::CreateOutputObjects() {
   if (!fConfigParams)
     SetFemtoManager((AliFemtoManager *) gInterpreter->ProcessLine("ConfigFemtoAnalysis()"));
   else
-    SetFemtoManager((AliFemtoManager *) gInterpreter->ProcessLine(Form("ConfigFemtoAnalysis(%s)", fConfigParams)));
+      SetFemtoManager((AliFemtoManager *) gInterpreter->ProcessLine(Form("ConfigFemtoAnalysis(%s)", fConfigParams.Data())));
 
   TList *tOL;
   fOutputList = fManager->Analysis(0)->GetOutputList();
@@ -434,14 +423,14 @@ void AliAnalysisTaskFemto::Exec(Option_t *) {
 
 
 
-  Bool_t isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & (AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral));
+    Bool_t isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & fOfflineTriggerMask);
   if(!isSelected) {//cout << "AliAnalysisTaskFemto: is not selected" << endl; 
     return;}
 
 
 
 
-    AliInfo(Form("Tracks in AOD: %d \n",fAOD->GetNumberOfTracks()));
+    // AliInfo(Form("Tracks in AOD: %d \n",fAOD->GetNumberOfTracks()));
     
     if (fAOD->GetNumberOfTracks() > 0) {
       if (!fReader) {
index b87a2a4fd5cc763a6dcf230af8909813c1266476..17cac7e7d993361b1f4d4e8537c4f51cdebf7012 100644 (file)
@@ -9,6 +9,7 @@
 #define ALIANALYSISTASKFEMTO_H
 
 #include "TH1.h"
+#include "TString.h"
 
 #include "AliESDInputHandler.h"
 #include "AliAODHandler.h"
@@ -70,8 +71,8 @@ class AliAnalysisTaskFemto : public AliAnalysisTaskSE { //AliAnalysisTask
   AliFemtoEventReader         *fReader;       //! Reference to the reader
   AliFemtoManager             *fManager;      //! AliFemto top-level manager 
   int                          fAnalysisType; //  Mark ESD of AOD analysis
-  char                        *fConfigMacro;  //  Config macro location
-  char                        *fConfigParams; //  Config macro parameters
+    TString                      fConfigMacro;  //  Config macro location
+    TString                      fConfigParams; //  Config macro parameters
 
 
   ClassDef(AliAnalysisTaskFemto, 3); // example of analysis
index f9937d81527082a5e80fbd33a5dc9dcc7257558f..8f575bd2ed9f3b64bdfc0bbb296df551744db8b8 100644 (file)
@@ -27,6 +27,8 @@ AliFemtoBasicEventCut::AliFemtoBasicEventCut() :
   fEventMult[1] = 100000;
   fVertZPos[0] = -100.0;
   fVertZPos[1] = 100.0;
+  fPsiEP[0] = -100.0;
+  fPsiEP[1] = 100.0;
 } 
 //------------------------------
 AliFemtoBasicEventCut::~AliFemtoBasicEventCut(){
@@ -40,17 +42,35 @@ bool AliFemtoBasicEventCut::Pass(const AliFemtoEvent* event){
   //  int mult =  event->NumberOfTracks();
   int mult = (int) event->UncorrectedNumberOfPrimaries();
   double vertexZPos = event->PrimVertPos().z();
+
+
+  // Double_t qxEPVZERO = 0, qyEPVZERO = 0;
+  // Double_t qVZERO = -999;
+  double epvzero = event->ReactionPlaneAngle();
+
+  // cout << "AliFemtoBasicEventCut:: epvzero:       " << fPsiEP[0] << " < " << epvzero << " < " << fPsiEP[1] << endl;
 //   cout << "AliFemtoBasicEventCut:: mult:       " << fEventMult[0] << " < " << mult << " < " << fEventMult[1] << endl;
 //   cout << "AliFemtoBasicEventCut:: VertexZPos: " << fVertZPos[0] << " < " << vertexZPos << " < " << fVertZPos[1] << endl;
 //   cout << "AliFemtoBasicEventCut:: VertexZErr: " << event->PrimVertCov()[4] << endl;
+  // cout << "AliFemtoBasicEventCut:: MagneticField: " << event->MagneticField() << endl;
+  // cout << "AliFemtoBasicEventCut:: IsCollisionCandidate: " << event->IsCollisionCandidate() << endl;
+  // cout << "AliFemtoBasicEventCut:: TriggerCluster: " << event->TriggerCluster() << endl;
+  // cout << "AliFemtoBasicEventCut:: fSelectTrigger: " << fSelectTrigger << endl;
+  // cout << "AliFemtoBasicEventCut:: " << endl;
   bool goodEvent =
     ((mult >= fEventMult[0]) && 
      (mult <= fEventMult[1]) && 
      (vertexZPos > fVertZPos[0]) &&
      (vertexZPos < fVertZPos[1]) &&
+     (epvzero > fPsiEP[0]) &&
+     (epvzero < fPsiEP[1]) &&
      ((!fAcceptBadVertex) || (event->ZDCParticipants() > 1.0)) &&
      ((!fAcceptOnlyPhysics) || (event->IsCollisionCandidate())) &&
-     ((!fSelectTrigger) || (event->TriggerCluster() == fSelectTrigger)));
+      ((!fSelectTrigger) || (event->TriggerCluster() == fSelectTrigger))
+);
+
+  // cout << "AliFemtoBasicEventCut:: goodEvent" <<goodEvent << endl;
+
   goodEvent ? fNEventsPassed++ : fNEventsFailed++ ;
 //   cout << "AliFemtoBasicEventCut:: return : " << goodEvent << endl;
 //     (fAcceptBadVertex || (event->PrimVertCov()[4] > -1000.0)) &&
index f991459ac09c70344d2eca62ef6155f93044c579..1b2a6fed8ce4b9fc8c272862f865ff78a72c1590 100644 (file)
@@ -34,6 +34,8 @@ public:
   bool GetAcceptOnlyPhysics();
   void SetTriggerSelection(int trig);
 
+  void SetEPVZERO(const float& lo, const float& hi);
+
   virtual AliFemtoString Report();
   virtual bool Pass(const AliFemtoEvent* event);
 
@@ -43,6 +45,7 @@ private:   // here are the quantities I want to cut on...
 
   int fEventMult[2];      // range of multiplicity
   float fVertZPos[2];     // range of z-position of vertex
+  float fPsiEP[2];     // range of vzero ep angle
   bool fAcceptBadVertex;  // Set to true to accept events with bad vertex
   long fNEventsPassed;    // Number of events checked by this cut that passed
   long fNEventsFailed;    // Number of events checked by this cut that failed
@@ -57,6 +60,7 @@ private:   // here are the quantities I want to cut on...
 
 inline void AliFemtoBasicEventCut::SetEventMult(const int& lo, const int& hi){fEventMult[0]=lo; fEventMult[1]=hi;}
 inline void AliFemtoBasicEventCut::SetVertZPos(const float& lo, const float& hi){fVertZPos[0]=lo; fVertZPos[1]=hi;}
+inline void AliFemtoBasicEventCut::SetEPVZERO(const float& lo, const float& hi){fPsiEP[0]=lo; fPsiEP[1]=hi;}
 inline int  AliFemtoBasicEventCut::NEventsPassed() const {return fNEventsPassed;}
 inline int  AliFemtoBasicEventCut::NEventsFailed() const {return fNEventsFailed;}
 inline void AliFemtoBasicEventCut::SetTriggerSelection(int trig) { fSelectTrigger = trig; }
@@ -66,6 +70,8 @@ inline AliFemtoBasicEventCut::AliFemtoBasicEventCut(AliFemtoBasicEventCut& c) :
   fEventMult[1] = c.fEventMult[1];
   fVertZPos[0] = c.fVertZPos[0];
   fVertZPos[1] = c.fVertZPos[1];
+  fPsiEP[0] = c.fPsiEP[0];
+  fPsiEP[1] = c.fPsiEP[1];
 }
 
 inline AliFemtoBasicEventCut& AliFemtoBasicEventCut::operator=(AliFemtoBasicEventCut& c) {   
@@ -75,6 +81,8 @@ inline AliFemtoBasicEventCut& AliFemtoBasicEventCut::operator=(AliFemtoBasicEven
     fEventMult[1] = c.fEventMult[1];
     fVertZPos[0] = c.fVertZPos[0];
     fVertZPos[1] = c.fVertZPos[1];
+    fPsiEP[0] = c.fPsiEP[0];
+    fPsiEP[1] = c.fPsiEP[1];
   }
 
   return *this;
index 750caff38a02d1ddb430c33bd8d50949080fcae7..3770bfe944325e099742f097e88ea79e7252d3fa 100644 (file)
@@ -26,7 +26,8 @@ AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult():
   fEst2Est3(0),
   fEst1Norm(0),
   fEst2Norm(0),
-  fEst3Norm(0)
+  fEst3Norm(0),
+  fPsiVZERO(0)
 {
   // Default constructor
   fEvMult = new TH1D("EvMult", "Event Multiplicity", 5001, -0.5, 5000.5);
@@ -49,7 +50,9 @@ AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(const char *aName):
   fEst2Est3(0),
   fEst1Norm(0),
   fEst2Norm(0),
-  fEst3Norm(0)
+  fEst3Norm(0),
+  fPsiVZERO(0)
+
 {
   // Normal constructor
   char name[200];
@@ -59,6 +62,8 @@ AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(const char *aName):
   snprintf(name, 200, "NormEvMult%s", aName);
   fNormEvMult = new TH1D(name, "Normalized Event Multiplicity", 5001, -0.5, 5000.5);
 
+
+
   if(!freadMC) {
     snprintf(name, 200, "SPDEvMult%s", aName);
     fSPDMult = new TH1D(name, "SPD Tracklet Multiplicity", 5001, -0.5, 5000.5);
@@ -99,6 +104,8 @@ AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(const char *aName):
       fEst3Norm = new TH2D(name,"ITS Pure vs Normalized Mult",501,-0.5,5000.5,501,-0.5,5000.5);
     }
 
+  snprintf(name, 200, "PsiEPVZERO%s", aName);
+  fPsiVZERO = new TH1D(name, "event plane angle from vzero", 157, -1.575, 1.565);
 }
 
 AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(const AliFemtoCutMonitorEventMult &aCut):
@@ -117,7 +124,9 @@ AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(const AliFemtoCutMonito
   fEst2Est3(0),
   fEst1Norm(0),
   fEst2Norm(0),
-  fEst3Norm(0)
+  fEst3Norm(0),
+  fPsiVZERO(0)
+
 {
   // copy constructor
   if (fEvMult) delete fEvMult;
@@ -127,6 +136,7 @@ AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(const AliFemtoCutMonito
   fNormEvMult = new TH1D(*aCut.fNormEvMult);
 
   
+  
   if(!freadMC){
     if (fSPDMult) delete fSPDMult;
     fSPDMult = new TH1D(*aCut.fSPDMult);
@@ -166,6 +176,9 @@ AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(const AliFemtoCutMonito
       fEst3Norm = new TH2D(*aCut.fEst3Norm);
     }
 
+  if (fPsiVZERO) delete fPsiVZERO;
+  fPsiVZERO = new TH1D(*aCut.fPsiVZERO);
+
 }
 
 AliFemtoCutMonitorEventMult::~AliFemtoCutMonitorEventMult()
@@ -173,6 +186,7 @@ AliFemtoCutMonitorEventMult::~AliFemtoCutMonitorEventMult()
   // Destructor
   delete fEvMult;
   delete fNormEvMult;
+
   if(!freadMC){
     delete fSPDMult;
   }
@@ -190,6 +204,9 @@ AliFemtoCutMonitorEventMult::~AliFemtoCutMonitorEventMult()
       delete fEst2Norm;
       delete fEst3Norm;
     }   
+
+  delete fPsiVZERO;
+
 }
 
 AliFemtoCutMonitorEventMult& AliFemtoCutMonitorEventMult::operator=(const AliFemtoCutMonitorEventMult& aCut)
@@ -204,6 +221,10 @@ AliFemtoCutMonitorEventMult& AliFemtoCutMonitorEventMult::operator=(const AliFem
   if (fNormEvMult) delete fNormEvMult;
   fNormEvMult = new TH1D(*aCut.fNormEvMult);
   
+  
+  if (fPsiVZERO) delete fPsiVZERO;
+  fPsiVZERO = new TH1D(*aCut.fPsiVZERO);
+  
   if(!freadMC){
     if (fSPDMult) delete fSPDMult;
     fSPDMult = new TH1D(*aCut.fSPDMult);
@@ -258,71 +279,80 @@ void AliFemtoCutMonitorEventMult::Fill(const AliFemtoEvent* aEvent)
   // Fill in the monitor histograms with the values from the current track
   fEvMult->Fill(aEvent->NumberOfTracks());
   fNormEvMult->Fill(aEvent->UncorrectedNumberOfPrimaries());
-  if(!freadMC){
-    fSPDMult->Fill(aEvent->SPDMultiplicity());
-  }
-  fMultSumPt->Fill(aEvent->UncorrectedNumberOfPrimaries(), aEvent->ZDCEMEnergy());
 
-  if(faddhists)
-    {
-      fEstimateITSTPC->Fill(aEvent->MultiplicityEstimateITSTPC());
-      fEstimateTracklets->Fill(aEvent->MultiplicityEstimateTracklets());
-      fEstimateITSPure->Fill(aEvent->MultiplicityEstimateITSPure());
-      fEst1Est2->Fill(aEvent->MultiplicityEstimateITSTPC(),aEvent->MultiplicityEstimateTracklets());
-      fEst1Est3->Fill(aEvent->MultiplicityEstimateITSTPC(),aEvent->MultiplicityEstimateITSPure());
-      fEst2Est3->Fill(aEvent->MultiplicityEstimateTracklets(),aEvent->MultiplicityEstimateITSPure());
-      fEst1Norm->Fill(aEvent->MultiplicityEstimateITSTPC(),aEvent->UncorrectedNumberOfPrimaries());
-      fEst2Norm->Fill(aEvent->MultiplicityEstimateTracklets(),aEvent->UncorrectedNumberOfPrimaries());
-      fEst3Norm->Fill(aEvent->MultiplicityEstimateITSPure(),aEvent->UncorrectedNumberOfPrimaries());
-    }
+  double epvzero = aEvent->ReactionPlaneAngle();
+
+  fPsiVZERO->Fill(epvzero);
+
+
+  // if(!freadMC){
+  //   fSPDMult->Fill(aEvent->SPDMultiplicity());
+  // }
+  // fMultSumPt->Fill(aEvent->UncorrectedNumberOfPrimaries(), aEvent->ZDCEMEnergy());
+
+  // if(faddhists)
+  //   {
+  //     fEstimateITSTPC->Fill(aEvent->MultiplicityEstimateITSTPC());
+  //     fEstimateTracklets->Fill(aEvent->MultiplicityEstimateTracklets());
+  //     fEstimateITSPure->Fill(aEvent->MultiplicityEstimateITSPure());
+  //     fEst1Est2->Fill(aEvent->MultiplicityEstimateITSTPC(),aEvent->MultiplicityEstimateTracklets());
+  //     fEst1Est3->Fill(aEvent->MultiplicityEstimateITSTPC(),aEvent->MultiplicityEstimateITSPure());
+  //     fEst2Est3->Fill(aEvent->MultiplicityEstimateTracklets(),aEvent->MultiplicityEstimateITSPure());
+  //     fEst1Norm->Fill(aEvent->MultiplicityEstimateITSTPC(),aEvent->UncorrectedNumberOfPrimaries());
+  //     fEst2Norm->Fill(aEvent->MultiplicityEstimateTracklets(),aEvent->UncorrectedNumberOfPrimaries());
+  //     fEst3Norm->Fill(aEvent->MultiplicityEstimateITSPure(),aEvent->UncorrectedNumberOfPrimaries());
+  //   }
 
 }
 
 void AliFemtoCutMonitorEventMult::Write()
 {
   // Write out the relevant histograms
-  fEvMult->Write();
+  // fEvMult->Write();
   fNormEvMult->Write();
-  if(!freadMC){
-    fSPDMult->Write();
-  }
-  fMultSumPt->Write();
-
-  if(faddhists)
-    {
-      fEstimateITSTPC->Write();
-      fEstimateTracklets->Write();
-      fEstimateITSPure->Write();
-      fEst1Est2->Write();
-      fEst1Est3->Write();
-      fEst2Est3->Write();
-      fEst1Norm->Write();
-      fEst2Norm->Write();
-      fEst3Norm->Write();
-    }
+  fPsiVZERO->Write();
+
+  // if(!freadMC){
+  //   fSPDMult->Write();
+  // }
+  // fMultSumPt->Write();
+
+  // if(faddhists)
+  //   {
+  //     fEstimateITSTPC->Write();
+  //     fEstimateTracklets->Write();
+  //     fEstimateITSPure->Write();
+  //     fEst1Est2->Write();
+  //     fEst1Est3->Write();
+  //     fEst2Est3->Write();
+  //     fEst1Norm->Write();
+  //     fEst2Norm->Write();
+  //     fEst3Norm->Write();
+  //   }
 
 }
 
 TList *AliFemtoCutMonitorEventMult::GetOutputList()
 {
   TList *tOutputList = new TList();
-  tOutputList->Add(fEvMult);
+  // tOutputList->Add(fEvMult);
   tOutputList->Add(fNormEvMult);
-  tOutputList->Add(fSPDMult);
-  tOutputList->Add(fMultSumPt);
-
-  if(faddhists)
-    {
-      tOutputList->Add(fEstimateITSTPC);
-      tOutputList->Add(fEstimateTracklets);
-      tOutputList->Add(fEstimateITSPure);
-      tOutputList->Add(fEst1Est2);
-      tOutputList->Add(fEst1Est3);
-      tOutputList->Add(fEst2Est3);
-      tOutputList->Add(fEst1Norm);
-      tOutputList->Add(fEst2Norm);
-      tOutputList->Add(fEst3Norm);
-    }
+  tOutputList->Add(fPsiVZERO);
+  // tOutputList->Add(fSPDMult);
+  // tOutputList->Add(fMultSumPt);
+
+  // if(faddhists)
+  //   {
+  //     tOutputList->Add(fEstimateITSTPC);
+  //     tOutputList->Add(fEstimateTracklets);
+  //     tOutputList->Add(fEstimateITSPure);
+  //     tOutputList->Add(fEst1Est2);
+  //     tOutputList->Add(fEst1Est3);
+  //     tOutputList->Add(fEst2Est3);
+  //     tOutputList->Add(fEst1Norm);
+  //     tOutputList->Add(fEst2Norm);
+  //     tOutputList->Add(fEst3Norm);
+  //   }
   return tOutputList;
 }
 
index 06673436f8c73ec715e2a8b998697159ea0aa433..f9b04266c4e2c98f2c59651e08c5f9548dc52170 100644 (file)
@@ -65,6 +65,8 @@ class AliFemtoCutMonitorEventMult : public AliFemtoCutMonitor{
   TH2D *fEst2Norm;           // Tracklets vs Normalized
   TH2D *fEst3Norm;           // ITS Pure vs Normalized
 
+  TH1D *fPsiVZERO;    // psi from vzero
+
 };
 
 #endif
index 67f21c49063b1b8c587b72e562c08b8e2f649ec3..9e6ed1701dc4750384303edad23f0ed32408f9a0 100644 (file)
@@ -59,7 +59,8 @@ AliFemtoEventReaderAOD::AliFemtoEventReaderAOD():
   fFileName(" "),
   fTree(0x0),
   fAodFile(0x0),
-  fMagFieldSign(1)
+    fMagFieldSign(1),
+    fisEPVZ(kTRUE)
 {
   // default constructor
   fAllTrue.ResetAllBits(kTRUE);
@@ -87,7 +88,8 @@ AliFemtoEventReaderAOD::AliFemtoEventReaderAOD(const AliFemtoEventReaderAOD &aRe
   fFileName(" "),
   fTree(0x0),
   fAodFile(0x0),
-  fMagFieldSign(1)
+    fMagFieldSign(1),
+    fisEPVZ(kTRUE)
 {
   // copy constructor
   fReadMC = aReader.fReadMC;
@@ -200,7 +202,7 @@ AliFemtoEvent* AliFemtoEventReaderAOD::ReturnHbtEvent()
   // convert it to AliFemtoEvent and return
   // for further analysis
   AliFemtoEvent *hbtEvent = 0;
-  cout<<"reader"<<endl;
+    // cout<<"reader"<<endl;
   if (fCurEvent==fNumberofEvent)//open next file  
     {
       if(fNumberofEvent==0)    
@@ -222,13 +224,13 @@ AliFemtoEvent* AliFemtoEventReaderAOD::ReturnHbtEvent()
        }
       else //no more data to read
        {
-         cout<<"no more files "<<hbtEvent<<endl;
+            // cout<<"no more files "<<hbtEvent<<endl;
          fReaderStatus=1;
          return hbtEvent; 
        }
     }          
 
-  cout<<"starting to read event "<<fCurEvent<<endl;
+    // cout<<"starting to read event "<<fCurEvent<<endl;
   fTree->GetEvent(fCurEvent);//getting next event
   //  cout << "Read event " << fEvent << " from file " << fTree << endl;
        
@@ -312,6 +314,9 @@ void AliFemtoEventReaderAOD::CopyAODtoFemtoEvent(AliFemtoEvent *tEvent)
   AliEventplane *ep = fEvent->GetEventplane();
   if (ep) {
     tEvent->SetEP(ep);
+        if (fisEPVZ)
+            tEvent->SetReactionPlaneAngle(ep->GetEventplane("V0",fEvent,2));
+        else
     tEvent->SetReactionPlaneAngle(ep->GetEventplane("Q"));
   }
 
@@ -321,7 +326,7 @@ void AliFemtoEventReaderAOD::CopyAODtoFemtoEvent(AliFemtoEvent *tEvent)
     if ((cent->GetCentralityPercentile("V0M")*10 < fCentRange[0]) ||
        (cent->GetCentralityPercentile("V0M")*10 > fCentRange[1]))
       {
-       cout << "Centrality " << cent->GetCentralityPercentile("V0M") << " outside of preselection range " << fCentRange[0] << " - " << fCentRange[1] << endl;
+            // cout << "Centrality " << cent->GetCentralityPercentile("V0M") << " outside of preselection range " << fCentRange[0] << " - " << fCentRange[1] << endl;
        
        return;
       }
@@ -660,7 +665,7 @@ void AliFemtoEventReaderAOD::CopyAODtoFemtoEvent(AliFemtoEvent *tEvent)
 
   if (mcP) delete [] motherids;
 
-  cout<<"end of reading nt "<<nofTracks<<" real number "<<realnofTracks<<endl;
+    // cout<<"end of reading nt "<<nofTracks<<" real number "<<realnofTracks<<endl;
 
   if(fReadV0)
     {
@@ -1215,6 +1220,10 @@ void AliFemtoEventReaderAOD::SetMagneticFieldSign(int s)
     fMagFieldSign = 0;
 }
 
+void AliFemtoEventReaderAOD::SetEPVZERO(Bool_t iepvz)
+{
+    fisEPVZ = iepvz;
+}
 
 void AliFemtoEventReaderAOD::GetGlobalPositionAtGlobalRadiiThroughTPC(AliAODTrack *track, Float_t bfield, Float_t globalPositionsAtRadii[9][3])
 {
index e21d4a4722eb4da2806e213d6aa02d92acf96fab..e50eb540abc283201a8916f20936a7312971fc24 100644 (file)
@@ -50,6 +50,7 @@ class AliFemtoEventReaderAOD : public AliFemtoEventReader
   void SetAODpidUtil(AliAODpidUtil *aAODpidUtil);
   void SetAODheader(AliAODHeader *aAODheader);
   void SetMagneticFieldSign(int s);
+  void SetEPVZERO(Bool_t);
   void GetGlobalPositionAtGlobalRadiiThroughTPC(AliAODTrack *track, Float_t bfield, Float_t globalPositionsAtRadii[9][3]);
   void SetUseMultiplicity(EstEventMult aType);
 
@@ -88,6 +89,7 @@ class AliFemtoEventReaderAOD : public AliFemtoEventReader
   TChain*        fTree;             // AOD tree
   TFile*         fAodFile;          // AOD file 
   int            fMagFieldSign;     // Magnetic field sign
+  Bool_t fisEPVZ; // to get event plane angle from VZERO
 
 
 #ifdef __ROOT__
index 202d0a2a07b10a380b5eac9a55342059c82a71dc..8d6f01834385da5732ed5ccd1573fec35820ea9a 100644 (file)
@@ -85,7 +85,7 @@ AliFemtoEvent* AliFemtoEventReaderAODChain::ReturnHbtEvent()
 //     cout << "Reading only tracks with the additional information" << endl;
 //   }
 
-  cout<<"starting to read event "<<fCurEvent<<endl;
+  // cout<<"starting to read event "<<fCurEvent<<endl;
        
   hbtEvent = new AliFemtoEvent;
 
index af14d2a2269aff6c7fad767204d51a145e623891..a7301a6dc44a1380b2b5dbb998208cfce0c98f3c 100644 (file)
@@ -37,7 +37,7 @@ AliFemtoQinvCorrFctn::AliFemtoQinvCorrFctn(char* title, const int& nbins, const
   fRatio = new TH1D(tTitRat,title,nbins,QinvLo,QinvHi);
   char tTitkT[101] = "kTDep";
   strncat(tTitkT,title, 100);
-  fkTMonitor = new TH1D(tTitkT,title,200,0.0,2.0);
+  fkTMonitor = new TH1D(tTitkT,title,250,0.0,5.0);
   // this next bit is unfortunately needed so that we can have many histos of same "title"
   // it is neccessary if we typedef TH1D to TH1d (which we do)
   //fNumerator->SetDirectory(0);
index 3d2849c00a1b703c42ed1862df65f6afcb6a4c99..efbea9382c636255f4348c3685674e59d4edae11 100644 (file)
@@ -339,9 +339,9 @@ void AliFemtoSimpleAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
 //       fPicoEvent->FirstParticleCollection()->size() << " " <<
 //       fPicoEvent->SecondParticleCollection()->size() << endl;
     
-    cout << "#particles in Collection 1, 2: " <<
-      fPicoEvent->FirstParticleCollection()->size() << " " <<
-      fPicoEvent->SecondParticleCollection()->size() << endl;
+    // cout << "#particles in Collection 1, 2: " <<
+    //   fPicoEvent->FirstParticleCollection()->size() << " " <<
+    //   fPicoEvent->SecondParticleCollection()->size() << endl;
 
     fEventCut->FillCutMonitor(fPicoEvent->FirstParticleCollection(),fPicoEvent->SecondParticleCollection()); //MJ!
     
@@ -370,7 +370,7 @@ void AliFemtoSimpleAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
         MakePairs("real", fPicoEvent->FirstParticleCollection(),
                           fPicoEvent->SecondParticleCollection() );
       }
-      cout << "AliFemtoSimpleAnalysis::ProcessEvent() - reals done ";
+      // cout << "AliFemtoSimpleAnalysis::ProcessEvent() - reals done ";
 
       //---- Make pairs for mixed events, looping over events in mixingBuffer ----//
 
@@ -390,7 +390,7 @@ void AliFemtoSimpleAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
                             fPicoEvent->SecondParticleCollection() );
         }
       }
-      cout << " - mixed done   " << endl;
+      // cout << " - mixed done   " << endl;
 
       //--------- If mixing buffer is full, delete oldest event ---------//
 
index d17db0985ebf00cfc8cb87cd96be99da96d934f3..6d79abb93b7a1532b69a49f1d76d0563ff52a312 100644 (file)
@@ -80,12 +80,38 @@ bool AliFemtoPairCutRadialDistance::Pass(const AliFemtoPair* pair){
   double eta2 = pair->Track2()->Track()->P().PseudoRapidity();
 
 
+    AliAODInputHandler *aodH = dynamic_cast<AliAODInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
+
+
+    AliAODEvent *fAOD;
+
+    if (!aodH) {
+        // AliWarning("Could not get AODInputHandler");
+        return false;
+    }
+    else {
+
+        fAOD = aodH->GetEvent();
+    }
+
+    Int_t magsign = fAOD->GetMagneticField();
+    if (magsign > 1)
+        fMagSign = 1;
+    else if ( magsign < 1)
+        fMagSign = -1;
+    else
+        fMagSign = magsign;
+
+
+     // cout << "mag sign = " << fMagSign << endl;
+
   Double_t rad;
   Bool_t pass5 = kTRUE;
 
     rad = fMinRad;
     for (Double_t iter=fMinRad*10; iter<251; iter+=1.0) {
       Double_t dps = (phi1-phi2+(TMath::ASin(-0.075*chg1*fMagSign*rad/ptv1))-(TMath::ASin(-0.075*chg2*fMagSign*rad/ptv2)));
+        dps = TVector2::Phi_mpi_pi(dps);
       double etad = eta2 - eta1;
       if (fabs(etad)<fEtaMin && fabs(dps)<fDPhiStarMin) {
        //       cout << "5% cut is not passed - returning" << endl;
index d725f4689ff67c9f10791a0cd9baac0f10b65560..cbe99734ca89b0a76f1e47abc241e0bf6c88f23e 100644 (file)
@@ -28,6 +28,9 @@
 #include "AliFemtoShareQualityPairCut.h"
 #include "AliFemtoPairCutAntiGamma.h"
 
+#include "AliAODInputHandler.h"
+#include "AliAnalysisManager.h"
+
 class AliFemtoPairCutRadialDistance : public AliFemtoPairCutAntiGamma {
 public:
   AliFemtoPairCutRadialDistance();