From 5e2038a953dc7f4819e0398001fa68720a95544f Mon Sep 17 00:00:00 2001 From: akisiel Date: Thu, 31 Jan 2013 11:26:17 +0000 Subject: [PATCH] Reaction Plane analysis updates --- .../AliFemto/AliAnalysisTaskFemto.cxx | 43 +++--- .../AliFemto/AliAnalysisTaskFemto.h | 5 +- .../AliFemto/AliFemtoBasicEventCut.cxx | 22 ++- .../AliFemto/AliFemtoBasicEventCut.h | 8 ++ .../AliFemto/AliFemtoCutMonitorEventMult.cxx | 136 +++++++++++------- .../AliFemto/AliFemtoCutMonitorEventMult.h | 2 + .../AliFemto/AliFemtoEventReaderAOD.cxx | 23 ++- .../AliFemto/AliFemtoEventReaderAOD.h | 2 + .../AliFemto/AliFemtoEventReaderAODChain.cxx | 2 +- .../AliFemto/AliFemtoQinvCorrFctn.cxx | 2 +- .../AliFemto/AliFemtoSimpleAnalysis.cxx | 10 +- .../AliFemtoPairCutRadialDistance.cxx | 26 ++++ .../AliFemtoPairCutRadialDistance.h | 3 + 13 files changed, 187 insertions(+), 97 deletions(-) diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.cxx b/PWGCF/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.cxx index fffab83550c..124e5513e56 100644 --- a/PWGCF/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.cxx +++ b/PWGCF/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.cxx @@ -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) { diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.h b/PWGCF/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.h index b87a2a4fd5c..17cac7e7d99 100644 --- a/PWGCF/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.h +++ b/PWGCF/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.h @@ -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 diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx index f9937d81527..8f575bd2ed9 100644 --- a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx +++ b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx @@ -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" <PrimVertCov()[4] > -1000.0)) && diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.h b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.h index f991459ac09..1b2a6fed8ce 100644 --- a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.h +++ b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.h @@ -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; diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventMult.cxx b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventMult.cxx index 750caff38a0..3770bfe9443 100644 --- a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventMult.cxx +++ b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventMult.cxx @@ -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; } diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventMult.h b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventMult.h index 06673436f8c..f9b04266c4e 100644 --- a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventMult.h +++ b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoCutMonitorEventMult.h @@ -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 diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderAOD.cxx b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderAOD.cxx index 67f21c49063..9e6ed1701dc 100644 --- a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderAOD.cxx +++ b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderAOD.cxx @@ -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"<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 "<SetDirectory(0); diff --git a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSimpleAnalysis.cxx b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSimpleAnalysis.cxx index 3d2849c00a1..efbea9382c6 100644 --- a/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSimpleAnalysis.cxx +++ b/PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSimpleAnalysis.cxx @@ -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 ---------// diff --git a/PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoPairCutRadialDistance.cxx b/PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoPairCutRadialDistance.cxx index d17db0985eb..6d79abb93b7 100644 --- a/PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoPairCutRadialDistance.cxx +++ b/PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoPairCutRadialDistance.cxx @@ -80,12 +80,38 @@ bool AliFemtoPairCutRadialDistance::Pass(const AliFemtoPair* pair){ double eta2 = pair->Track2()->Track()->P().PseudoRapidity(); + AliAODInputHandler *aodH = dynamic_cast (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)