From 71f2897136077c65f9826b5b6d074bf55962ebfe Mon Sep 17 00:00:00 2001 From: akisiel Date: Wed, 8 Sep 2010 15:29:46 +0000 Subject: [PATCH] Add ReactionPlane dependent analysis classes --- .../AliFemto/AliFemtoAnalysisAzimuthal.cxx | 410 ++++++++++++++++++ .../AliFemto/AliFemtoAnalysisAzimuthal.h | 68 +++ .../FEMTOSCOPY/AliFemto/AliFemtoKTPairCut.cxx | 41 +- PWG2/FEMTOSCOPY/AliFemto/AliFemtoKTPairCut.h | 5 +- PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.cxx | 8 + PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.h | 6 + PWG2/PWG2femtoscopyLinkDef.h | 1 + PWG2/libPWG2femtoscopy.pkg | 1 + 8 files changed, 523 insertions(+), 17 deletions(-) create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysisAzimuthal.cxx create mode 100644 PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysisAzimuthal.h diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysisAzimuthal.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysisAzimuthal.cxx new file mode 100644 index 00000000000..f18b4ac4a25 --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysisAzimuthal.cxx @@ -0,0 +1,410 @@ +//////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoAnalysisReactionPlane - Femtoscopic analysis which mixes event // +// with respect to the z position of the primary vertex and event total // +// multiplicity and uses only events in certain reaction plane angle bin // +// // +//////////////////////////////////////////////////////////////////////////// + +#include "AliFemtoAnalysisAzimuthal.h" +#include +#include +#include +#include "AliFemtoParticleCollection.h" +#include "AliFemtoTrackCut.h" +#include "AliFemtoV0Cut.h" +#include "AliFemtoPairCut.h" +#include "TVector2.h" +#include "AliFemtoKinkCut.h" +#include "AliFemtoPicoEventCollectionVector.h" +#include "AliFemtoPicoEventCollectionVectorHideAway.h" + +#ifdef __ROOT__ +ClassImp(AliFemtoAnalysisAzimuthal) +#endif + +extern void FillHbtParticleCollection(AliFemtoParticleCut* partCut, + AliFemtoEvent* hbtEvent, + AliFemtoParticleCollection* partCollection); + + +//____________________________ +AliFemtoAnalysisAzimuthal::AliFemtoAnalysisAzimuthal(unsigned int binsVertex, double minVertex, double maxVertex, + unsigned int binsMult, double minMult, double maxMult, unsigned short binsRP) + : + fFemtoParticleCut(0), + fFlowParticleCut(0), + fPairCut(0), + fEventCut(0), + fVertexZBins(binsVertex), + fOverFlowVertexZ(0), + fUnderFlowVertexZ(0), + fMultBins(binsMult) , + fOverFlowMult(0), + fUnderFlowMult(0), + fRPBins(binsRP), + fPsi(0) +{ + // mControlSwitch = 0; + fCorrFctnCollection= 0; + fCorrFctnCollection = new AliFemtoCorrFctnCollection; + fVertexZ[0] = minVertex; + fVertexZ[1] = maxVertex; + fMult[0] = minMult; + fMult[1] = maxMult; + if (fMixingBuffer) delete fMixingBuffer; + fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1], + fMultBins,fMult[0],fMult[1], + fRPBins,0.0,TMath::Pi()); +} + +//____________________________ + +AliFemtoAnalysisAzimuthal::AliFemtoAnalysisAzimuthal(const AliFemtoAnalysisAzimuthal& a) : + AliFemtoSimpleAnalysis(), + fFemtoParticleCut(0), + fFlowParticleCut(0), + fPairCut(0), + fEventCut(0), + fVertexZBins(a.fVertexZBins), + fOverFlowVertexZ(0), + fUnderFlowVertexZ(0), + fMultBins(a.fMultBins) , + fOverFlowMult(0), + fUnderFlowMult(0), + fRPBins(a.fRPBins), + fPsi(0) + +{ + fCorrFctnCollection= 0; + fCorrFctnCollection = new AliFemtoCorrFctnCollection; + fVertexZ[0] = a.fVertexZ[0]; + fVertexZ[1] = a.fVertexZ[1]; + fMult[0] = a.fMult[0]; + fMult[1] = a.fMult[1]; + if (fMixingBuffer) delete fMixingBuffer; + fPicoEventCollectionVectorHideAway = new AliFemtoPicoEventCollectionVectorHideAway(fVertexZBins,fVertexZ[0],fVertexZ[1], + fMultBins,fMult[0],fMult[1], + fRPBins,0.0,TMath::Pi()); + // find the right event cut + fEventCut = a.fEventCut->Clone(); + // find the right femto particle cut + fFemtoParticleCut = a.fFemtoParticleCut->Clone(); + // find the right flow particle cut + fFlowParticleCut = a.fFlowParticleCut->Clone(); + // find the right pair cut + fPairCut = a.fPairCut->Clone(); + + if ( fEventCut ) { + SetEventCut(fEventCut); // this will set the myAnalysis pointer inside the cut + cout << " AliFemtoAnalysisAzimuthal::AliFemtoAnalysisAzimuthal(const AliFemtoAnalysisAzimuthal& a) - event cut set " << endl; + } + if ( fFemtoParticleCut ) { + SetFirstParticleCut(fFemtoParticleCut); // this will set the myAnalysis pointer inside the cut + cout << " AliFemtoAnalysisAzimuthal::AliFemtoAnalysisAzimuthal(const AliFemtoAnalysisAzimuthal& a) - femto particle cut set " << endl; + } + if ( fFlowParticleCut ) { + SetSecondParticleCut(fFlowParticleCut); // this will set the myAnalysis pointer inside the cut + cout << " AliFemtoAnalysisAzimuthal::AliFemtoAnalysisAzimuthal(const AliFemtoAnalysisAzimuthal& a) - flow particle cut set " << endl; + } + if ( fPairCut ) { + SetPairCut(fPairCut); // this will set the myAnalysis pointer inside the cut + cout << " AliFemtoAnalysisAzimuthal::AliFemtoAnalysisAzimuthal(const AliFemtoAnalysisAzimuthal& a) - pair cut set " << endl; + } + + AliFemtoCorrFctnIterator iter; + for (iter=a.fCorrFctnCollection->begin(); iter!=a.fCorrFctnCollection->end();iter++){ + cout << " AliFemtoAnalysisAzimuthal::AliFemtoAnalysisAzimuthal(const AliFemtoAnalysisAzimuthal& a) - looking for correlation functions " << endl; + AliFemtoCorrFctn* fctn = (*iter)->Clone(); + if (fctn) AddCorrFctn(fctn); + else cout << " AliFemtoAnalysisAzimuthal::AliFemtoAnalysisAzimuthal(const AliFemtoAnalysisAzimuthal& a) - correlation function not found " << endl; + } + fNumEventsToMix = a.fNumEventsToMix; + cout << " AliFemtoAnalysisAzimuthal::AliFemtoAnalysisAzimuthal(const AliFemtoAnalysisAzimuthal& a) - analysis copied " << endl; +} + +//____________________________ +AliFemtoAnalysisAzimuthal::~AliFemtoAnalysisAzimuthal(){ + // now delete every PicoEvent in the EventMixingBuffer and then the Buffer itself + delete fPicoEventCollectionVectorHideAway; +} + +//_________________________ +void AliFemtoAnalysisAzimuthal::ProcessEvent(const AliFemtoEvent* hbtEvent) { + // Perform event processing in bins of z vertex, multiplicity and Reaction Plane angle + // cout << " AliFemtoAnalysisAzimuthal::ProcessEvent(const AliFemtoEvent* hbtEvent) " << endl; + + // get right mixing buffer + double vertexZ = hbtEvent->PrimVertPos().z(); + double mult = hbtEvent->UncorrectedNumberOfPrimaries(); + //double rpangle = GetQVector() // Not possible at the moment to get rpangle for mixing wrt RP + + fMixingBuffer = fPicoEventCollectionVectorHideAway->PicoEventCollection(vertexZ,mult,fPsi); + if (!fMixingBuffer) { + if ( vertexZ < fVertexZ[0] ) fUnderFlowVertexZ++; + if ( vertexZ > fVertexZ[1] ) fOverFlowVertexZ++; + if ( mult < fMult[0] ) fUnderFlowMult++; + if ( mult > fMult[1] ) fOverFlowMult++; + return; + } + + //****from AliFemtoSimpleAnalysis**** + + fPicoEvent=0; // we will get a new pico event, if not prevent corr. fctn to access old pico event + fNeventsProcessed++; + + // startup for EbyE + fFemtoParticleCut->EventBegin(hbtEvent); + fFlowParticleCut->EventBegin(hbtEvent); + fPairCut->EventBegin(hbtEvent); + + for (AliFemtoCorrFctnIterator iter=fCorrFctnCollection->begin(); iter!=fCorrFctnCollection->end();iter++){ + (*iter)->EventBegin(hbtEvent); + } + + // event cut and event cut monitor + bool tmpPassEvent = fEventCut->Pass(hbtEvent); + if (!tmpPassEvent) + fEventCut->FillCutMonitor(hbtEvent, tmpPassEvent); + if (tmpPassEvent) { + fPicoEvent = new AliFemtoPicoEvent; // this is what we will make pairs from and put in Mixing Buffer, no memory leak. we will delete picoevents when they come out of the mixing buffer + FillHbtParticleCollection(fFemtoParticleCut,(AliFemtoEvent*)hbtEvent,fPicoEvent->FirstParticleCollection()); + FillHbtParticleCollection(fFlowParticleCut,(AliFemtoEvent*)hbtEvent,fPicoEvent->SecondParticleCollection()); + + cout << "#particles in Collection: " << fPicoEvent->FirstParticleCollection()->size() << endl; + + //switch which allows only using events with ParticleCollections containing a minimum number of entries + if (fPicoEvent->FirstParticleCollection()->size() >= fMinSizePartCollection ) { + fEventCut->FillCutMonitor(hbtEvent, tmpPassEvent); + } + + //------ Make real pairs (assume identical) ------// + MakePairs("real", fPicoEvent->FirstParticleCollection() ); + cout << "AliFemtoAnalysisAzimuthal::ProcessEvent() - reals done "; + + //---- Make pairs for mixed events, looping over events in mixingBuffer ----// + AliFemtoPicoEvent* storedEvent; + AliFemtoPicoEventIterator fPicoEventIter; + for (fPicoEventIter=MixingBuffer()->begin();fPicoEventIter!=MixingBuffer()->end();fPicoEventIter++){ + storedEvent = *fPicoEventIter; + MakePairs("mixed",fPicoEvent->FirstParticleCollection(), + storedEvent->FirstParticleCollection() ); + } + cout << " - mixed done " << endl; + + //--------- If mixing buffer is full, delete oldest event ---------// + if ( MixingBufferFull() ) { + delete MixingBuffer()->back(); + MixingBuffer()->pop_back(); + } + + //-------- Add current event (fPicoEvent) to mixing buffer --------// + MixingBuffer()->push_front(fPicoEvent); + + } // if ParticleCollections are big enough (mal jun2002) + else{ + fEventCut->FillCutMonitor(hbtEvent, !tmpPassEvent); + delete fPicoEvent; + } + + // if currentEvent is accepted by currentAnalysis cleanup for EbyE + fFemtoParticleCut->EventEnd(hbtEvent); + fFlowParticleCut->EventEnd(hbtEvent); + fPairCut->EventEnd(hbtEvent); + for (AliFemtoCorrFctnIterator iter=fCorrFctnCollection->begin(); iter!=fCorrFctnCollection->end();iter++){ + (*iter)->EventEnd(hbtEvent); + } +} + +//_______________________________________________________________________________ +void AliFemtoAnalysisAzimuthal::MakePairs(const char* typeIn, AliFemtoParticleCollection *partCollection1, + AliFemtoParticleCollection *partCollection2){ +// Build pairs, check pair cuts, and call CFs' AddRealPair() or AddMixedPair() methods. +// If no second particle collection is specfied, make pairs within first particle collection. + + string type = typeIn; + + // int swpart = ((long int) partCollection1) % 2; + int swpart = fNeventsProcessed % 2; + + AliFemtoPair* tPair = new AliFemtoPair; + AliFemtoCorrFctnIterator tCorrFctnIter; + AliFemtoParticleIterator tPartIter1, tPartIter2; + + AliFemtoParticleIterator tStartOuterLoop = partCollection1->begin(); // always + AliFemtoParticleIterator tEndOuterLoop = partCollection1->end(); // will be one less if identical + AliFemtoParticleIterator tStartInnerLoop; + AliFemtoParticleIterator tEndInnerLoop; + if (partCollection2) { // Two collections: + tStartInnerLoop = partCollection2->begin(); // Full inner & outer loops + tEndInnerLoop = partCollection2->end(); + } + else { // One collection: + tEndOuterLoop--; // Outer loop goes to next-to-last particle + tEndInnerLoop = partCollection1->end() ; // Inner loop goes to last particle + } + for (tPartIter1=tStartOuterLoop;tPartIter1!=tEndOuterLoop;tPartIter1++) { + if (!partCollection2){ + tStartInnerLoop = tPartIter1; + tStartInnerLoop++; + } + tPair->SetTrack1(*tPartIter1); + for (tPartIter2 = tStartInnerLoop; tPartIter2!=tEndInnerLoop;tPartIter2++) { + tPair->SetTrack2(*tPartIter2); + +//For getting the pair angle wrt EP + if (type == "real"){ + TVector2 Q, QVector; + float Psi=0, mQx=0, mQy=0, PairAngleEP=0; + Q = GetQVector(partCollection1); + + mQx = Q.X() - cos(2*(tPair->Track1()->FourMomentum().Phi()))*(tPair->Track1()->Track()->Pt()) - cos(2*(tPair->Track2()->FourMomentum().Phi()))*(tPair->Track2()->Track()->Pt()); + mQy = Q.Y() - sin(2*(tPair->Track1()->FourMomentum().Phi()))*(tPair->Track1()->Track()->Pt()) - sin(2*(tPair->Track2()->FourMomentum().Phi()))*(tPair->Track2()->Track()->Pt()); + + QVector.Set(mQx,mQy); + + Psi=QVector.Phi()/2.; + if (Psi > TMath::Pi()) Psi -= TMath::Pi(); + + PairAngleEP = (tPair->EmissionAngle() - Psi); + tPair->SetPairAngleEP(PairAngleEP); + } + + if (type == "mixed"){ + float Psi1=0, Psi2=0, mQx1=0, mQx2=0,mQy1=0, mQy2=0, px1=0, px2=0, py1=0, py2=0, PairAngleEP=0; + TVector2 Q1, Q2, QVector1, QVector2, P; + + Q1 = GetQVector(partCollection1); + Q2 = GetQVector(partCollection2); + + mQx1 = Q1.X() - cos(2*(tPair->Track1()->FourMomentum().Phi()))*(tPair->Track1()->Track()->Pt()); + mQx2 = Q2.X() - cos(2*(tPair->Track2()->FourMomentum().Phi()))*(tPair->Track2()->Track()->Pt()); + mQy1 = Q1.Y() - sin(2*(tPair->Track1()->FourMomentum().Phi()))*(tPair->Track1()->Track()->Pt()); + mQy2 = Q2.Y() - sin(2*(tPair->Track2()->FourMomentum().Phi()))*(tPair->Track2()->Track()->Pt()); + + QVector1.Set(mQx1,mQy1); + QVector2.Set(mQx2,mQy2); + + Psi1=QVector1.Phi()/2.; + if (Psi1 > TMath::Pi()) Psi1 -= TMath::Pi(); + + Psi2=QVector2.Phi()/2.; + if (Psi2 > TMath::Pi()) Psi2 -= TMath::Pi(); + + px1 = (tPair->Track1()->Track()->Pt())*cos(tPair->Track1()->FourMomentum().Phi() - Psi1); + px2 = (tPair->Track2()->Track()->Pt())*cos(tPair->Track2()->FourMomentum().Phi() - Psi2); + py1 = (tPair->Track1()->Track()->Pt())*sin(tPair->Track1()->FourMomentum().Phi() - Psi1); + py2 = (tPair->Track2()->Track()->Pt())*sin(tPair->Track2()->FourMomentum().Phi() - Psi2); + + P.Set(px1+px2, py1+py2); + PairAngleEP = P.Phi(); + + tPair->SetPairAngleEP(PairAngleEP); + } + + // The following lines have to be uncommented if you want pairCutMonitors + // they are not in for speed reasons + // bool tmpPassPair = fPairCut->Pass(tPair); + // fPairCut->FillCutMonitor(tPair, tmpPassPair); + // if ( tmpPassPair ) + + //---- If pair passes cut, loop over CF's and add pair to real/mixed ----// + + if (!partCollection2) { + if (swpart) { + tPair->SetTrack1(*tPartIter2); + tPair->SetTrack2(*tPartIter1); + swpart = 0; + } + else { + tPair->SetTrack1(*tPartIter1); + tPair->SetTrack2(*tPartIter2); + swpart = 1; + } + } + + + if (fPairCut->Pass(tPair)){ + for (tCorrFctnIter=fCorrFctnCollection->begin(); + tCorrFctnIter!=fCorrFctnCollection->end();tCorrFctnIter++){ + AliFemtoCorrFctn* tCorrFctn = *tCorrFctnIter; + if(type == "real") + tCorrFctn->AddRealPair(tPair); + else if(type == "mixed") + tCorrFctn->AddMixedPair(tPair); + else + cout << "Problem with pair type, type = " << type.c_str() << endl; + } + } + } // loop over second particle + } // loop over first particle + + delete tPair; +} + +//_____________________________________________ +TVector2 AliFemtoAnalysisAzimuthal::GetQVector(AliFemtoParticleCollection* particlecollection){ + + TVector2 mQ; + float mQx=0, mQy=0; + + AliFemtoParticle* flowparticle; + AliFemtoParticleIterator pIter; + AliFemtoParticleIterator startLoop = particlecollection->begin(); + AliFemtoParticleIterator endLoop = particlecollection->end(); + for (pIter=startLoop;pIter!=endLoop;pIter++){ + flowparticle = *pIter; + mQx += (cos(2*flowparticle->FourMomentum().Phi()))*(flowparticle->Track()->Pt()); + mQy += (sin(2*flowparticle->FourMomentum().Phi()))*(flowparticle->Track()->Pt()); + } + + mQ.Set(mQx,mQy); + return mQ; +} + +//__________________________________________________ +double AliFemtoAnalysisAzimuthal::GetCurrentReactionPlane() +{ + return fPsi; +} + +//_________________________ +TList* AliFemtoAnalysisAzimuthal::GetOutputList() +{ + // Collect the list of output objects to be written + + TList *tOutputList = new TList(); + TList *p1Cut = fFemtoParticleCut->GetOutputList(); + + TListIter nextp1(p1Cut); + while (TObject *obj = nextp1.Next()) { + tOutputList->Add(obj); + } + + TList *pairCut = fPairCut->GetOutputList(); + + TIter nextpair(pairCut); + while (TObject *obj = nextpair()) { + tOutputList->Add(obj); + } + + TList *eventCut = fEventCut->GetOutputList(); + + TIter nextevent(eventCut); + while (TObject *obj = nextevent()) { + tOutputList->Add(obj); + } + + AliFemtoCorrFctnIterator iter; + for (iter=fCorrFctnCollection->begin(); iter!=fCorrFctnCollection->end();iter++){ + TList *tListCf = (*iter)->GetOutputList(); + + TIter nextListCf(tListCf); + while (TObject *obj = nextListCf()) { + tOutputList->Add(obj); + } + } + + return tOutputList; + +} diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysisAzimuthal.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysisAzimuthal.h new file mode 100644 index 00000000000..9edc2fcfd0b --- /dev/null +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoAnalysisAzimuthal.h @@ -0,0 +1,68 @@ +//////////////////////////////////////////////////////////////////////////// +// // +// AliFemtoAnalysisReactionPlane - Femtoscopic analysis which mixes event // +// with respect to the z position of the primary vertex and event total // +// multiplicity and uses only events in certain reaction plane angle bin // +// // +//////////////////////////////////////////////////////////////////////////// + +#ifndef ALIFEMTOANALYSISAZIMUTHAL_H +#define ALIFEMTOANALYSISAZIMUTHAL_H + +#include "AliFemtoSimpleAnalysis.h" // base analysis class + +class TVector2; + +class AliFemtoAnalysisAzimuthal : public AliFemtoSimpleAnalysis { + +public: + + AliFemtoAnalysisAzimuthal(unsigned int binsVertex=10, double minVertex=-100., double maxVertex=+100., unsigned int binsMult=10, double minMult=-1.e9, double maxMult=+1.e9, unsigned short binsRP=10); + AliFemtoAnalysisAzimuthal(const AliFemtoAnalysisAzimuthal& TheOriginalAnalysis); // copy constructor + + virtual void ProcessEvent(const AliFemtoEvent* ProcessThisEvent); + virtual ~AliFemtoAnalysisAzimuthal(); + virtual unsigned int OverflowVertexZ() const { return fOverFlowVertexZ;} + virtual unsigned int UnderflowVertexZ() const { return fUnderFlowVertexZ;} + virtual unsigned int OverflowMult() const { return fOverFlowMult;} + virtual unsigned int UnderflowMult() const { return fUnderFlowMult;} + double GetCurrentReactionPlane(); + TVector2 GetQVector(AliFemtoParticleCollection* particlecollection); + virtual void MakePairs(const char* typeIn, AliFemtoParticleCollection *partCollection1, AliFemtoParticleCollection *partCollection2=0); + virtual TList* GetOutputList(); + + // Get the particle cuts + virtual AliFemtoParticleCut* FemtoParticleCut() {return fFemtoParticleCut;} + virtual AliFemtoParticleCut* FlowParticleCut() {return fFlowParticleCut;} + // Set the cuts + void SetFemtoParticleCut(AliFemtoParticleCut* x) {fFemtoParticleCut = x; x->SetAnalysis((AliFemtoAnalysis*)this);} + void SetFlowParticleCut(AliFemtoParticleCut* x) {fFlowParticleCut = x; x->SetAnalysis((AliFemtoAnalysis*)this);} + void SetEventCut(AliFemtoEventCut* x) {fEventCut = x; x->SetAnalysis((AliFemtoAnalysis*)this);} + void SetPairCut(AliFemtoPairCut* x) {fPairCut = x; x->SetAnalysis((AliFemtoAnalysis*)this);} + +protected: + + AliFemtoParticleCut* fFemtoParticleCut; // select particles of type #1 + AliFemtoParticleCut* fFlowParticleCut; // select particles of type #2 + AliFemtoPairCut* fPairCut; + AliFemtoEventCut* fEventCut; + + double fVertexZ[2]; /* min/max z-vertex position allowed to be processed */ + unsigned int fVertexZBins; /* number of VERTEX mixing bins in z-vertex in EventMixing Buffer */ + unsigned int fOverFlowVertexZ; /* number of events encountered which had too large z-vertex */ + unsigned int fUnderFlowVertexZ; /* number of events encountered which had too small z-vertex */ + double fMult[2]; /* min/max multiplicity allowed for event to be processed */ + unsigned int fMultBins; /* number of MULTIPLICITY mixing bins in z-vertex in EventMixing Buffer */ + unsigned int fOverFlowMult; /* number of events encountered which had too large multiplicity */ + unsigned int fUnderFlowMult; /* number of events encountered which had too small multiplicity */ + unsigned short fRPBins; // Number of reaction plane angle orientation bins + double fPsi; // Reaction plane angle of the current event + TList* tOutputList; + +#ifdef __ROOT__ + ClassDef(AliFemtoAnalysisAzimuthal, 0) +#endif + +}; + +#endif diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKTPairCut.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKTPairCut.cxx index 5db33bac761..aeddd555e37 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKTPairCut.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKTPairCut.cxx @@ -18,7 +18,6 @@ * * **************************************************************************/ - #include "AliFemtoKTPairCut.h" #include #include @@ -67,7 +66,7 @@ AliFemtoKTPairCut::~AliFemtoKTPairCut(){ /* no-op */ } //__________________ -bool AliFemtoKTPairCut::Pass(const AliFemtoPair* pair){ +/*bool AliFemtoKTPairCut::Pass(const AliFemtoPair* pair){ bool temp = true; if (pair->KT() < fKTMin) @@ -77,7 +76,7 @@ bool AliFemtoKTPairCut::Pass(const AliFemtoPair* pair){ temp = false; return temp; -} +}*/ //__________________ AliFemtoString AliFemtoKTPairCut::Report(){ // Prepare a report from the execution @@ -118,21 +117,24 @@ void AliFemtoKTPairCut::SetPhiRange(double phimin, double phimax) fPhiMax = phimax; } -bool AliFemtoKTPairCut::Pass(const AliFemtoPair* pair, double aRPAngle) +//______________________________________________________ +bool AliFemtoKTPairCut::Pass(const AliFemtoPair* pair) { - if (!(Pass(pair))) return false; + bool temp = true; - // cout << "Got pair angle RP " << pair->EmissionAngle() << " " << aRPAngle << endl; +//Taking care of the Kt cut + if (pair->KT() < fKTMin) + temp = false; + + if (pair->KT() > fKTMax) + temp = false; + +//Taking care of the Phi cut + double rpangle = (pair->GetPairAngleEP())*180/TMath::Pi(); - bool temp = true; - double rpangle = pair->EmissionAngle(); - if (rpangle > 180.0) rpangle -= 180.0; - rpangle -= aRPAngle*180/TMath::Pi(); if (rpangle > 180.0) rpangle -= 180.0; if (rpangle < 0.0) rpangle += 180.0; - // cout << "Got difference " << rpangle << endl; - if (fPhiMin < 0) { if ((rpangle > fPhiMax) && (rpangle < 180.0+fPhiMin)) temp = false; @@ -141,8 +143,19 @@ bool AliFemtoKTPairCut::Pass(const AliFemtoPair* pair, double aRPAngle) if ((rpangle < fPhiMin) || (rpangle > fPhiMax)) temp = false; } - - // if (temp) cout << "Accepted !" << endl; + return temp; +} + +//_____________________________________ +bool AliFemtoKTPairCut::Pass(const AliFemtoPair* pair, double aRPAngle) +{ +//The same as above, but it is defined with RP Angle as input in all the Correlatin function classes. + + bool temp = (aRPAngle > 0.); + aRPAngle = true; + + if (!Pass(pair)) + temp = false; return temp; } diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKTPairCut.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKTPairCut.h index d6aed9aa826..8bd2b57c963 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKTPairCut.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoKTPairCut.h @@ -19,7 +19,6 @@ * **************************************************************************/ - #ifndef ALIFEMTOKTPAIRCUT_H #define ALIFEMTOKTPAIRCUT_H @@ -37,13 +36,13 @@ public: AliFemtoKTPairCut(const AliFemtoKTPairCut& c); virtual ~AliFemtoKTPairCut(); - virtual bool Pass(const AliFemtoPair* pair); virtual AliFemtoString Report(); virtual TList *ListSettings(); AliFemtoPairCut* Clone(); void SetKTRange(double ktmin, double ktmax); void SetPhiRange(double phimin, double phimax); - bool Pass(const AliFemtoPair* pair, double aRPAngle); + virtual bool Pass(const AliFemtoPair* pair); + virtual bool Pass(const AliFemtoPair* pair, double aRPAngle); protected: Double_t fKTMin; // Minimum allowed pair transverse momentum diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.cxx index 7bce5a6dd0e..4481ae00499 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.cxx @@ -18,6 +18,7 @@ double AliFemtoPair::fgMaxDzOuter = 3.2; AliFemtoPair::AliFemtoPair() : fTrack1(0), fTrack2(0), + fPairAngleEP(0), fNonIdParNotCalculated(0), fDKSide(0), fDKOut(0), @@ -56,6 +57,7 @@ AliFemtoPair::AliFemtoPair() : AliFemtoPair::AliFemtoPair(AliFemtoParticle* a, AliFemtoParticle* b) : fTrack1(a), fTrack2(b), + fPairAngleEP(0), fNonIdParNotCalculated(0), fDKSide(0), fDKOut(0), @@ -120,6 +122,7 @@ AliFemtoPair::~AliFemtoPair() { AliFemtoPair::AliFemtoPair(const AliFemtoPair &aPair): fTrack1(0), fTrack2(0), + fPairAngleEP(0), fNonIdParNotCalculated(0), fDKSide(0), fDKOut(0), @@ -243,6 +246,11 @@ AliFemtoPair& AliFemtoPair::operator=(const AliFemtoPair &aPair) return *this; } +//________________________ +double AliFemtoPair::GetPairAngleEP() const +{ + return fPairAngleEP; +} //_________________ double AliFemtoPair::MInv() const { diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.h b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.h index 424ab09f8b5..2fad9c7e179 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.h +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoPair.h @@ -153,10 +153,16 @@ public: /* double GetFracOfMergedRowV0PosV0Pos() const; */ /* double GetFracOfMergedRowV0NegV0Neg() const; */ +//Setting and getting emission angle wrt EP + double GetPairAngleEP() const; + void SetPairAngleEP(double x) {fPairAngleEP = x;} + private: AliFemtoParticle* fTrack1; // Link to the first track in the pair AliFemtoParticle* fTrack2; // Link to the second track in the pair + double fPairAngleEP; //Pair emission angle wrt EP + mutable short fNonIdParNotCalculated; // Set to 1 when NonId variables (kstar) have been already calculated for this pair mutable double fDKSide; // momemntum of first particle in PRF - k* side component mutable double fDKOut; // momemntum of first particle in PRF - k* out component diff --git a/PWG2/PWG2femtoscopyLinkDef.h b/PWG2/PWG2femtoscopyLinkDef.h index 30a00d2ca03..16a4c086a24 100644 --- a/PWG2/PWG2femtoscopyLinkDef.h +++ b/PWG2/PWG2femtoscopyLinkDef.h @@ -8,6 +8,7 @@ #pragma link C++ class AliFemtoLikeSignAnalysis+; #pragma link C++ class AliFemtoVertexAnalysis+; #pragma link C++ class AliFemtoVertexMultAnalysis+; +#pragma link C++ class AliFemtoAnalysisAzimuthal+; #pragma link C++ class AliFemtoSimpleAnalysis+; #pragma link C++ class AliFemtoAnalysisReactionPlane+; #pragma link C++ class AliFemtoEventCut+; diff --git a/PWG2/libPWG2femtoscopy.pkg b/PWG2/libPWG2femtoscopy.pkg index bf1355a7ff7..4e2e8bd4727 100644 --- a/PWG2/libPWG2femtoscopy.pkg +++ b/PWG2/libPWG2femtoscopy.pkg @@ -4,6 +4,7 @@ SRCS= FEMTOSCOPY/AliFemto/AliFemtoSimpleAnalysis.cxx \ FEMTOSCOPY/AliFemto/AliFemtoLikeSignAnalysis.cxx \ FEMTOSCOPY/AliFemto/AliFemtoVertexAnalysis.cxx \ FEMTOSCOPY/AliFemto/AliFemtoVertexMultAnalysis.cxx \ + FEMTOSCOPY/AliFemto/AliFemtoAnalysisAzimuthal.cxx \ FEMTOSCOPY/AliFemto/AliFemtoAnalysisReactionPlane.cxx \ FEMTOSCOPY/AliFemto/AliFemtoBPLCMS3DCorrFctn.cxx \ FEMTOSCOPY/AliFemto/AliFemtoQinvCorrFctn.cxx \ -- 2.43.0