From a296aa84e9287856f4be587b4ff1cebda565d4fc Mon Sep 17 00:00:00 2001 From: skowron Date: Tue, 25 Jan 2005 13:11:20 +0000 Subject: [PATCH] Retrifit last developements from 4.01.Release --- HBTAN/AliHBTAnalysis.cxx | 158 +++++++++++++++-------------- HBTAN/AliHBTCorrelFctn.cxx | 96 +++++++++++++++++- HBTAN/AliHBTCorrelFctn.h | 90 +++++++++++++++- HBTAN/AliHBTFunction.cxx | 10 +- HBTAN/AliHBTFunction.h | 3 + HBTAN/AliHBTMonSplitting.cxx | 57 +++++++++++ HBTAN/AliHBTMonSplitting.h | 51 ++++++++++ HBTAN/AliHBTPIDPurityFctns.cxx | 81 +++++++++++---- HBTAN/AliHBTPositionRandomizer.cxx | 131 +++++++++++++++++++----- HBTAN/AliHBTPositionRandomizer.h | 69 +++++++++---- HBTAN/AliHBTTwoTrackEffFctn.cxx | 27 +++-- HBTAN/AliHBTWeightFctn.cxx | 28 +++-- HBTAN/AliHBTWeightTheorFctn.cxx | 22 +++- HBTAN/AliHBTWeightTheorFctn.h | 3 +- HBTAN/HBTAnalysisLinkDef.h | 8 ++ HBTAN/libHBTAN.pkg | 3 +- 16 files changed, 666 insertions(+), 171 deletions(-) create mode 100644 HBTAN/AliHBTMonSplitting.cxx create mode 100644 HBTAN/AliHBTMonSplitting.h diff --git a/HBTAN/AliHBTAnalysis.cxx b/HBTAN/AliHBTAnalysis.cxx index c32c2092905..ef5c3099700 100644 --- a/HBTAN/AliHBTAnalysis.cxx +++ b/HBTAN/AliHBTAnalysis.cxx @@ -396,7 +396,7 @@ Int_t AliHBTAnalysis::ProcessRecAndSim(AliAOD* aodrec, AliAOD* aodsim) /****** filling numerators ********/ /***************************************/ if ( (j%fDisplayMixingInfo) == 0) - Info("ProcessTracksAndParticles", + Info("ProcessRecAndSim", "Mixing particle %d with particles from the same event",j); part1= partEvent->GetParticle(j); @@ -474,7 +474,7 @@ Int_t AliHBTAnalysis::ProcessRecAndSim(AliAOD* aodrec, AliAOD* aodsim) m++; if ( (j%fDisplayMixingInfo) == 0) - Info("ProcessTracksAndParticles", + Info("ProcessRecAndSim", "Mixing particle %d from current event with particles from event %d",j,-m); for(Int_t l = 0; lGetNumberOfParticles();l++) // ... on all particles @@ -543,102 +543,104 @@ Int_t AliHBTAnalysis::ProcessSim(AliAOD* /*aodrec*/, AliAOD* aodsim) if ( !partEvent ) { - Error("ProcessRecAndSim","Can not get event"); + Error("ProcessSim","Can not get event"); return 1; } for (Int_t j = 0; jGetNumberOfParticles() ; j++) { - /***************************************/ - /****** Looping same events ********/ - /****** filling numerators ********/ - /***************************************/ - if ( (j%fDisplayMixingInfo) == 0) - Info("ProcessTracksAndParticles", - "Mixing particle %d with particles from the same event",j); - - part1= partEvent->GetParticle(j); + /***************************************/ + /****** Looping same events ********/ + /****** filling numerators ********/ + /***************************************/ + if ( (j%fDisplayMixingInfo) == 0) + Info("ProcessSim", + "Mixing particle %d with particles from the same event",j); - Bool_t firstcut = fPairCut->GetFirstPartCut()->Rejected(part1); + part1= partEvent->GetParticle(j); - if (fBufferSize != 0) - if ( (firstcut == kFALSE) || ( fPairCut->GetSecondPartCut()->Rejected(part1) == kFALSE ) ) - { - //accepted by any cut - // we have to copy because reader keeps only one event + Bool_t firstcut = fPairCut->GetFirstPartCut()->Rejected(part1); - partEvent1->AddParticle(part1); - } + if (fBufferSize != 0) + if ( (firstcut == kFALSE) || ( fPairCut->GetSecondPartCut()->Rejected(part1) == kFALSE ) ) + { + //accepted by any cut + // we have to copy because reader keeps only one event - if (firstcut) continue; + partEvent1->AddParticle(part1); + } - for(ii = 0; iiProcess(part1); + if (firstcut) continue; - if ( fNParticleFunctions == 0 ) continue; + for(ii = 0; iiProcess(part1); - for (Int_t k =j+1; k < partEvent->GetNumberOfParticles() ; k++) - { - part2= partEvent->GetParticle(k); - if (part1->GetUID() == part2->GetUID()) continue; - partpair->SetParticles(part1,part2); + if ( fNParticleFunctions == 0 ) continue; - if(fPairCut->Rejected(partpair)) //check pair cut - { //do not meets crietria of the - if( fPairCut->Rejected((AliHBTPair*)partpair->GetSwappedPair()) ) continue; - else tmppartpair = (AliHBTPair*)partpair->GetSwappedPair(); - } - else - { - tmppartpair = partpair; - } + for (Int_t k =j+1; k < partEvent->GetNumberOfParticles() ; k++) + { + part2= partEvent->GetParticle(k); + if (part1->GetUID() == part2->GetUID()) continue; + partpair->SetParticles(part1,part2); + + if(fPairCut->Rejected(partpair)) //check pair cut + { //do not meets crietria of the + if( fPairCut->Rejected((AliHBTPair*)partpair->GetSwappedPair()) ) continue; + else tmppartpair = (AliHBTPair*)partpair->GetSwappedPair(); + } + else + { + tmppartpair = partpair; + } - for(ii = 0;iiProcessSameEventParticles(tmppartpair); + for(ii = 0;iiProcessSameEventParticles(tmppartpair); - //end of 2nd loop over particles from the same event - }//for (Int_t k =j+1; k < partEvent->GetNumberOfParticles() ; k++) + //end of 2nd loop over particles from the same event + }//for (Int_t k =j+1; k < partEvent->GetNumberOfParticles() ; k++) - /***************************************/ - /***** Filling denominators *********/ - /***************************************/ - if (fBufferSize == 0) continue; + /***************************************/ + /***** Filling denominators *********/ + /***************************************/ + if (fBufferSize == 0) continue; - fPartBuffer->ResetIter(); - Int_t m = 0; - while (( partEvent2 = fPartBuffer->Next() )) - { - m++; - if ( (j%fDisplayMixingInfo) == 0) - Info("ProcessParticles", - "Mixing particle %d from current event with particles from event %d",j,-m); - for(Int_t l = 0; lGetNumberOfParticles();l++) // ... on all particles - { + fPartBuffer->ResetIter(); + Int_t m = 0; + while (( partEvent2 = fPartBuffer->Next() )) + { + m++; + if ( (j%fDisplayMixingInfo) == 0) + Info("ProcessSim", + "Mixing particle %d from current event with particles from event %d",j,-m); + for(Int_t l = 0; lGetNumberOfParticles();l++) // ... on all particles + { - part2= partEvent2->GetParticle(l); - partpair->SetParticles(part1,part2); + part2= partEvent2->GetParticle(l); + partpair->SetParticles(part1,part2); + + if( fPairCut->Rejected(partpair) ) //check pair cut + { //do not meets crietria of the + if( fPairCut->Rejected((AliHBTPair*)partpair->GetSwappedPair()) ) + continue; + else + { + tmppartpair = (AliHBTPair*)partpair->GetSwappedPair(); + } + } + else + {//meets criteria of the pair cut + tmppartpair = partpair; + } + + for(ii = 0;iiProcessDiffEventParticles(tmppartpair); + + }//for(Int_t l = 0; lRejected(partpair) ) //check pair cut - { //do not meets crietria of the - if( fPairCut->Rejected((AliHBTPair*)partpair->GetSwappedPair()) ) - continue; - else - { - tmppartpair = (AliHBTPair*)partpair->GetSwappedPair(); - } - } - else - {//meets criteria of the pair cut - tmppartpair = partpair; - } - - for(ii = 0;iiProcessDiffEventParticles(tmppartpair); - - }//for(Int_t l = 0; lPush(partEvent1); //end of loop over events return 0; diff --git a/HBTAN/AliHBTCorrelFctn.cxx b/HBTAN/AliHBTCorrelFctn.cxx index b244336823c..f9b205d6e11 100644 --- a/HBTAN/AliHBTCorrelFctn.cxx +++ b/HBTAN/AliHBTCorrelFctn.cxx @@ -49,8 +49,7 @@ ClassImp(AliHBTOutSideLongFctn) AliHBTOutSideLongFctn::AliHBTOutSideLongFctn(Int_t nXbins, Double_t maxXval, Double_t minXval, Int_t nYbins, Double_t maxYval, Double_t minYval, Int_t nZbins, Double_t maxZval, Double_t minZval): - AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval), - fAbs(kTRUE) + AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval) { //ctor fWriteNumAndDen = kTRUE;//change default behaviour @@ -257,3 +256,96 @@ TH1* AliHBTAvSeparCorrelFctn::GetResult() } /*************************************************************************************/ + +ClassImp(AliHBTAvSeparVsQInvCorrelFctn) + +AliHBTAvSeparVsQInvCorrelFctn::AliHBTAvSeparVsQInvCorrelFctn(Int_t nXbins, Double_t maxXval, Double_t minXval, + Int_t nYbins, Double_t maxYval, Double_t minYval): + AliHBTOnePairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval) +{ + //ctor + fWriteNumAndDen = kTRUE;//change default behaviour + Rename("avsepvsqinv","Avarage Separation VS Q_{inv} Correlation Function"); +} + + +TH1* AliHBTAvSeparVsQInvCorrelFctn::GetResult() +{ + //returns the scaled ratio + delete fRatio; + fRatio = GetRatio(Scale()); + return fRatio; +} + +/**************************************************************/ +/**************************************************************/ +/**************************************************************/ + + +ClassImp(AliHBTQOutQSideFctn) + + +AliHBTQOutQSideFctn::AliHBTQOutQSideFctn(Int_t nxbins, Double_t maxXval, Double_t minXval, + Int_t nybins, Double_t maxYval, Double_t minYval): + AliHBTOnePairFctn2D(nxbins,maxXval,minXval,nybins,maxYval,minYval) +{ + //ctor + fWriteNumAndDen = kTRUE;//change default behaviour + Rename("qoutqsidecf","Q_{out} Q_{side} Correlation Function 2D"); +} +/**************************************************************/ + +TH1* AliHBTQOutQSideFctn::GetResult() +{ + //returns the scaled ratio + delete fRatio; + fRatio = GetRatio(Scale()); + return fRatio; +} +/**************************************************************/ +/**************************************************************/ + +ClassImp(AliHBTQOutQLongFctn) + +AliHBTQOutQLongFctn::AliHBTQOutQLongFctn(Int_t nxbins, Double_t maxXval, Double_t minXval, + Int_t nybins, Double_t maxYval, Double_t minYval): + AliHBTOnePairFctn2D(nxbins,maxXval,minXval,nybins,maxYval,minYval) +{ + //ctor + fWriteNumAndDen = kTRUE;//change default behaviour + Rename("qoutqlongcf","Q_{out} Q_{long} Correlation Function 2D"); +} + + +/**************************************************************/ + +TH1* AliHBTQOutQLongFctn::GetResult() +{ + //returns the scaled ratio + delete fRatio; + fRatio = GetRatio(Scale()); + return fRatio; +} +/**************************************************************/ +/**************************************************************/ +/**************************************************************/ + +ClassImp(AliHBTQSideQLongFctn) + +/**************************************************************/ +AliHBTQSideQLongFctn::AliHBTQSideQLongFctn(Int_t nxbins, Double_t maxXval, Double_t minXval, + Int_t nybins, Double_t maxYval, Double_t minYval): + AliHBTOnePairFctn2D(nxbins,maxXval,minXval,nybins,maxYval,minYval) +{ + //ctor + fWriteNumAndDen = kTRUE;//change default behaviour + Rename("qsideqlongcf","Q_{side} Q_{long} Correlation Function 2D"); +} + +TH1* AliHBTQSideQLongFctn::GetResult() +{ + //returns the scaled ratio + delete fRatio; + fRatio = GetRatio(Scale()); + return fRatio; +} diff --git a/HBTAN/AliHBTCorrelFctn.h b/HBTAN/AliHBTCorrelFctn.h index 80e80d9209c..fe2fb4c5767 100644 --- a/HBTAN/AliHBTCorrelFctn.h +++ b/HBTAN/AliHBTCorrelFctn.h @@ -49,12 +49,10 @@ class AliHBTOutSideLongFctn: public AliHBTOnePairFctn3D, public AliHBTCorrelFunc virtual ~AliHBTOutSideLongFctn(){} TH1* GetResult(); - void UseAbsoluteValues(Bool_t flag){fAbs = flag;} protected: void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const; - Bool_t fAbs;//flag indicating if absolute values of qout, qside and qlong should be histogrammed ClassDef(AliHBTOutSideLongFctn,1) }; @@ -178,4 +176,92 @@ class AliHBTAvSeparCorrelFctn: public AliHBTOnePairFctn1D, public AliHBTCorrelFu ClassDef(AliHBTAvSeparCorrelFctn,2) }; +/*************************************************************************************/ + +class AliHBTAvSeparVsQInvCorrelFctn: public AliHBTOnePairFctn2D, public AliHBTCorrelFunction +{ +// Correlation Function of 2*KStar + public: + AliHBTAvSeparVsQInvCorrelFctn(Int_t nXbins = 10, Double_t maxXval = 0.05, Double_t minXval = 0., + Int_t nYbins = 20, Double_t maxYval = 20, Double_t minYval = 0.0); + virtual ~AliHBTAvSeparVsQInvCorrelFctn(){}; + TH1* GetResult(); + protected: + void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y) const + { + y = pair->GetAvarageDistance(); + x = pair->GetQInv(); + } + private: + ClassDef(AliHBTAvSeparVsQInvCorrelFctn,1) +}; +/*************************************************************************************/ +/*************************************************************************************/ +/*************************************************************************************/ + +class AliHBTQOutQSideFctn: public AliHBTOnePairFctn2D, public AliHBTCorrelFunction +{ + + // friend class AliHBTOnePairFctn1D; + public: + AliHBTQOutQSideFctn(Int_t nxbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0, + Int_t nybins = 100, Double_t maxYval = 0.15, Double_t minYval = 0.0); + virtual ~AliHBTQOutQSideFctn(){}; + TH1* GetResult(); + + protected: + void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y) const + { + y = pair->GetQSideLCMS(); + x = pair->GetQOutLCMS(); + } + ClassDef(AliHBTQOutQSideFctn,1) + +}; +/*************************************************************************************/ + +class AliHBTQOutQLongFctn: public AliHBTOnePairFctn2D, public AliHBTCorrelFunction +{ + + // friend class AliHBTOnePairFctn1D; + public: + AliHBTQOutQLongFctn(Int_t nxbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0, + Int_t nybins = 100, Double_t maxYval = 0.15, Double_t minYval = 0.0); + virtual ~AliHBTQOutQLongFctn(){}; + TH1* GetResult(); + + protected: + void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y) const + { + y = pair->GetQLongLCMS(); + x = pair->GetQOutLCMS(); + } + ClassDef(AliHBTQOutQLongFctn,1) + +}; +/*************************************************************************************/ + +class AliHBTQSideQLongFctn: public AliHBTOnePairFctn2D, public AliHBTCorrelFunction +{ + + // friend class AliHBTOnePairFctn1D; + public: + AliHBTQSideQLongFctn(Int_t nxbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0, + Int_t nybins = 100, Double_t maxYval = 0.15, Double_t minYval = 0.0); + virtual ~AliHBTQSideQLongFctn(){}; + TH1* GetResult(); + + protected: + void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y) const + { + y = pair->GetQLongLCMS(); + x = pair->GetQSideLCMS(); + } + ClassDef(AliHBTQSideQLongFctn,1) + +}; + #endif + + + diff --git a/HBTAN/AliHBTFunction.cxx b/HBTAN/AliHBTFunction.cxx index adc49e3e410..ccd96e4e6a5 100644 --- a/HBTAN/AliHBTFunction.cxx +++ b/HBTAN/AliHBTFunction.cxx @@ -42,7 +42,8 @@ ClassImp( AliHBTFunction ) AliHBTFunction::AliHBTFunction(): fPairCut(new AliAODPairEmptyCut()), //dummy cut - fWriteNumAndDen(kFALSE) + fWriteNumAndDen(kFALSE), + fAbs(kFALSE) { //Default constructor } @@ -51,7 +52,8 @@ AliHBTFunction::AliHBTFunction(): AliHBTFunction::AliHBTFunction(const char* name,const char* title): TNamed(name,title), fPairCut(new AliAODPairEmptyCut()), //dummy cut - fWriteNumAndDen(kFALSE) + fWriteNumAndDen(kFALSE), + fAbs(kFALSE) { //Constructor } @@ -60,7 +62,8 @@ AliHBTFunction::AliHBTFunction(const char* name,const char* title): AliHBTFunction::AliHBTFunction(const AliHBTFunction & source): TNamed(source), fPairCut((AliAODPairCut*)source.fPairCut->Clone()), - fWriteNumAndDen(source.fWriteNumAndDen) + fWriteNumAndDen(source.fWriteNumAndDen), + fAbs(source.fAbs) { // Copy constructor needed by the coding conventions } @@ -81,6 +84,7 @@ AliHBTFunction & AliHBTFunction::operator= (const AliHBTFunction & source) // Assignment needed by the coding conventions delete fPairCut; fPairCut = (AliAODPairCut*)source.fPairCut->Clone(); + fAbs = source.fAbs; return * this; } diff --git a/HBTAN/AliHBTFunction.h b/HBTAN/AliHBTFunction.h index 5f3fb638fd4..04e2466643b 100644 --- a/HBTAN/AliHBTFunction.h +++ b/HBTAN/AliHBTFunction.h @@ -48,6 +48,7 @@ class AliHBTFunction: public TNamed void Rename(const Char_t * name, const Char_t * title); //renames and retitle the function and histograms void SetPairCut(AliAODPairCut* cut); + void UseAbsoluteValues(Bool_t flag){fAbs = flag;} virtual AliHBTPair* CheckPair(AliHBTPair* pair); void SetWriteNumAndDen(Bool_t flag = kFALSE){fWriteNumAndDen = flag;} @@ -55,6 +56,8 @@ class AliHBTFunction: public TNamed virtual void BuildHistos() = 0;//builds default histograms AliAODPairCut* fPairCut; //pair cut Bool_t fWriteNumAndDen; //flag indicating whether numerator and denominator should be writted together with a result + Bool_t fAbs;//flag indicating if absolute values of qout, qside and qlong should be histogrammed + ClassDef(AliHBTFunction,3) }; /******************************************************************/ diff --git a/HBTAN/AliHBTMonSplitting.cxx b/HBTAN/AliHBTMonSplitting.cxx new file mode 100644 index 00000000000..f287a14c121 --- /dev/null +++ b/HBTAN/AliHBTMonSplitting.cxx @@ -0,0 +1,57 @@ +#include "AliHBTMonSplitting.h" + +ClassImp(AliHBTMonSplittingQosl) + +AliHBTMonSplittingQosl::AliHBTMonSplittingQosl(Int_t nXbins, Double_t maxXval, Double_t minXval, + Int_t nYbins, Double_t maxYval, Double_t minYval, + Int_t nZbins, Double_t maxZval, Double_t minZval): + AliHBTTwoPairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval) +{ + //ctor + Rename("splitosl","Q_{out}-Q_{side}-Q_{long} Splitting Monitoring Function"); +} + +void AliHBTMonSplittingQosl::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) +{ + AliVAODParticle* p1 = partpair->Particle1(); + AliVAODParticle* p2 = partpair->Particle2(); + + if (p1->Px() != p2->Px()) return; + if (p1->Py() != p2->Py()) return; + if (p1->Pz() != p2->Pz()) return; + + Double_t out = trackpair->GetQOutLCMS(); + Double_t side = trackpair->GetQSideLCMS(); + Double_t lon = trackpair->GetQLongLCMS(); + + fNumerator->Fill(out,side,lon);//here we fill in q's corresponding to track pair + //weight calculated for the simulated one +} + +ClassImp(AliHBTMonSplittingDptDthetaDphi) + +AliHBTMonSplittingDptDthetaDphi::AliHBTMonSplittingDptDthetaDphi(Int_t nXbins, Double_t maxXval, Double_t minXval, + Int_t nYbins, Double_t maxYval, Double_t minYval, + Int_t nZbins, Double_t maxZval, Double_t minZval): + AliHBTTwoPairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval) +{ + //ctor + Rename("splitdpdthedphi","\\Deltap_{t}-\\Delta\\theta-\\Delta\\phi Splitting Monitoring Function"); +} + +void AliHBTMonSplittingDptDthetaDphi::ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair) +{ + AliVAODParticle* p1 = partpair->Particle1(); + AliVAODParticle* p2 = partpair->Particle2(); + + if (p1->Px() != p2->Px()) return; + if (p1->Py() != p2->Py()) return; + if (p1->Pz() != p2->Pz()) return; + + Double_t dpt = trackpair->GetDeltaPt(); + Double_t dphi = trackpair->GetDeltaPhi(); + Double_t dtheta = trackpair->GetDeltaTheta(); + + fNumerator->Fill(dpt, dphi, dtheta);//here we fill in q's corresponding to track pair + //weight calculated for the simulated one +} diff --git a/HBTAN/AliHBTMonSplitting.h b/HBTAN/AliHBTMonSplitting.h new file mode 100644 index 00000000000..1fb19aded92 --- /dev/null +++ b/HBTAN/AliHBTMonSplitting.h @@ -0,0 +1,51 @@ +#ifndef ALIHBTMONSPLITTING_H +#define ALIHBTMONSPLITTING_H + +#include "AliHBTFunction.h" + +class AliHBTMonSplittingQosl: public AliHBTTwoPairFctn3D, public AliHBTCorrelFunction +{ +//histograms qout-qside-qlong of splitted tracks - found more than ones + + public: + AliHBTMonSplittingQosl(Int_t nXbins = 50, Double_t maxXval = 0.05, Double_t minXval = -0.05, + Int_t nYbins = 50, Double_t maxYval = 0.05, Double_t minYval = -0.05, + Int_t nZbins = 50, Double_t maxZval = 0.05, Double_t minZval = -0.05 ); + virtual ~AliHBTMonSplittingQosl(){} + + TH1* GetResult() {return fNumerator;} + void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair); + void ProcessDiffEventParticles(AliHBTPair* /*trackpair*/, AliHBTPair* /*partpair*/) {} + + protected: + void GetValues(AliHBTPair* /*trackpair*/, AliHBTPair* /*partpair*/, + Double_t& /*x*/, Double_t& /*y*/, Double_t& /*z*/) const{ } + + ClassDef(AliHBTMonSplittingQosl,1) +}; + + +class AliHBTMonSplittingDptDthetaDphi: public AliHBTTwoPairFctn3D, public AliHBTCorrelFunction +{ +//histograms qout-qside-qlong of splitted tracks - found more than ones + + public: + AliHBTMonSplittingDptDthetaDphi(Int_t nXbins = 50, Double_t maxXval = 0.05, Double_t minXval = -0.05, + Int_t nYbins = 50, Double_t maxYval = 0.05, Double_t minYval = -0.05, + Int_t nZbins = 50, Double_t maxZval = 0.05, Double_t minZval = -0.05 ); + virtual ~AliHBTMonSplittingDptDthetaDphi(){} + + TH1* GetResult() {return fNumerator;} + void ProcessSameEventParticles(AliHBTPair* trackpair, AliHBTPair* partpair); + void ProcessDiffEventParticles(AliHBTPair* /*trackpair*/, AliHBTPair* /*partpair*/) {} + + protected: + void GetValues(AliHBTPair* /*trackpair*/, AliHBTPair* /*partpair*/, + Double_t& /*x*/, Double_t& /*y*/, Double_t& /*z*/) const{ } + + ClassDef(AliHBTMonSplittingDptDthetaDphi,1) +}; + + + +#endif diff --git a/HBTAN/AliHBTPIDPurityFctns.cxx b/HBTAN/AliHBTPIDPurityFctns.cxx index 2e8f2e47058..984d074ca2a 100644 --- a/HBTAN/AliHBTPIDPurityFctns.cxx +++ b/HBTAN/AliHBTPIDPurityFctns.cxx @@ -520,10 +520,18 @@ void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTP // partpair = CheckPair(partpair); if (partpair == 0x0) return; + Double_t weight = partpair->GetWeight(); - Double_t out = TMath::Abs(trackpair->GetQOutLCMS()); - Double_t side = TMath::Abs(trackpair->GetQSideLCMS()); - Double_t lon = TMath::Abs(trackpair->GetQLongLCMS()); + Double_t out = trackpair->GetQOutLCMS(); + Double_t side = trackpair->GetQSideLCMS(); + Double_t lon = trackpair->GetQLongLCMS(); + + if (fAbs) + { + out = TMath::Abs(out); + side = TMath::Abs(side); + lon = TMath::Abs(lon); + } fNumerator->Fill(out,side,lon,weight); } /*************************************************************/ @@ -539,9 +547,16 @@ void AliHBTWeightQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTP // partpair = CheckPair(partpair); if (partpair == 0x0) return; - Double_t out = TMath::Abs(trackpair->GetQOutLCMS()); - Double_t side = TMath::Abs(trackpair->GetQSideLCMS()); - Double_t lon = TMath::Abs(trackpair->GetQLongLCMS()); + Double_t out = trackpair->GetQOutLCMS(); + Double_t side = trackpair->GetQSideLCMS(); + Double_t lon = trackpair->GetQLongLCMS(); + + if (fAbs) + { + out = TMath::Abs(out); + side = TMath::Abs(side); + lon = TMath::Abs(lon); + } fDenominator->Fill(out,side,lon); } /******************************************************************/ @@ -584,9 +599,16 @@ void AliHBTQOutSQideQLongFctnPerfectPID::ProcessSameEventParticles(AliHBTPair* t // partpair = CheckPair(partpair); if (partpair == 0x0) return; - Double_t out = TMath::Abs(trackpair->GetQOutLCMS()); - Double_t side = TMath::Abs(trackpair->GetQSideLCMS()); - Double_t lon = TMath::Abs(trackpair->GetQLongLCMS()); + Double_t out = trackpair->GetQOutLCMS(); + Double_t side = trackpair->GetQSideLCMS(); + Double_t lon = trackpair->GetQLongLCMS(); + + if (fAbs) + { + out = TMath::Abs(out); + side = TMath::Abs(side); + lon = TMath::Abs(lon); + } fNumerator->Fill(out,side,lon); } /*************************************************************/ @@ -602,9 +624,16 @@ void AliHBTQOutSQideQLongFctnPerfectPID::ProcessDiffEventParticles(AliHBTPair* t // partpair = CheckPair(partpair); if (partpair == 0x0) return; - Double_t out = TMath::Abs(trackpair->GetQOutLCMS()); - Double_t side = TMath::Abs(trackpair->GetQSideLCMS()); - Double_t lon = TMath::Abs(trackpair->GetQLongLCMS()); + Double_t out = trackpair->GetQOutLCMS(); + Double_t side = trackpair->GetQSideLCMS(); + Double_t lon = trackpair->GetQLongLCMS(); + + if (fAbs) + { + out = TMath::Abs(out); + side = TMath::Abs(side); + lon = TMath::Abs(lon); + } fDenominator->Fill(out,side,lon); } /******************************************************************/ @@ -680,9 +709,17 @@ void AliHBTPairPIDProbVsQOutSQideQLongFctn::ProcessSameEventParticles(AliHBTPair pair = CheckPair(pair); if (pair == 0x0) return; Double_t weight = pair->GetPIDProb(); - Double_t out = TMath::Abs(pair->GetQOutLCMS()); - Double_t side = TMath::Abs(pair->GetQSideLCMS()); - Double_t lon = TMath::Abs(pair->GetQLongLCMS()); + Double_t out = pair->GetQOutLCMS(); + Double_t side = pair->GetQSideLCMS(); + Double_t lon = pair->GetQLongLCMS(); + + if (fAbs) + { + out = TMath::Abs(out); + side = TMath::Abs(side); + lon = TMath::Abs(lon); + } + fNumerator->Fill(out,side,lon,weight); } /*************************************************************/ @@ -693,9 +730,17 @@ void AliHBTPairPIDProbVsQOutSQideQLongFctn::ProcessDiffEventParticles(AliHBTPair pair = CheckPair(pair); if (pair == 0x0) return; Double_t weight = pair->GetPIDProb(); - Double_t out = TMath::Abs(pair->GetQOutLCMS()); - Double_t side = TMath::Abs(pair->GetQSideLCMS()); - Double_t lon = TMath::Abs(pair->GetQLongLCMS()); + Double_t out = pair->GetQOutLCMS(); + Double_t side = pair->GetQSideLCMS(); + Double_t lon = pair->GetQLongLCMS(); + + if (fAbs) + { + out = TMath::Abs(out); + side = TMath::Abs(side); + lon = TMath::Abs(lon); + } + fDenominator->Fill(out,side,lon,weight); } /*************************************************************/ diff --git a/HBTAN/AliHBTPositionRandomizer.cxx b/HBTAN/AliHBTPositionRandomizer.cxx index 2e6d6ad8131..3a271659bf0 100644 --- a/HBTAN/AliHBTPositionRandomizer.cxx +++ b/HBTAN/AliHBTPositionRandomizer.cxx @@ -16,12 +16,16 @@ ClassImp(AliHBTPositionRandomizer) +const Int_t AliHBTPositionRandomizer::fgkNumberOfPids = 10; + /*********************************************************************/ AliHBTPositionRandomizer::AliHBTPositionRandomizer(): fReader(0x0), - fRandomizer(0x0), - fModel(0), + fDefaultRandomizer(0x0), + fRandomizers(0x0), + fNPid(0), + fPids(0x0), fAddToExistingPos(kFALSE), fOnlyParticlesFromVertex(kFALSE), fRandomizeTracks(kFALSE), @@ -35,8 +39,9 @@ AliHBTPositionRandomizer::AliHBTPositionRandomizer(): AliHBTPositionRandomizer::AliHBTPositionRandomizer(AliReader* reader): fReader(reader), - fRandomizer(new AliHBTRndmGaussBall(8.0)), - fModel(0), + fRandomizers(new TObjArray(fgkNumberOfPids)), + fNPid(1), + fPids(new Int_t[fgkNumberOfPids]), fAddToExistingPos(kFALSE), fOnlyParticlesFromVertex(kFALSE), fRandomizeTracks(kFALSE), @@ -45,14 +50,16 @@ AliHBTPositionRandomizer::AliHBTPositionRandomizer(AliReader* reader): fVZ(0.0) { //constructor + fRandomizers->AddAt(new AliHBTRndmGaussBall(8.0,0.0,0.0),0); } /*********************************************************************/ AliHBTPositionRandomizer::AliHBTPositionRandomizer(const AliHBTPositionRandomizer& in): AliReader(in), fReader(), - fRandomizer(0x0), - fModel(0), + fRandomizers(0x0), + fNPid(0), + fPids(0x0), fAddToExistingPos(kFALSE), fOnlyParticlesFromVertex(kFALSE), fRandomizeTracks(kFALSE), @@ -68,7 +75,8 @@ AliHBTPositionRandomizer::~AliHBTPositionRandomizer() { //dtor delete fReader; - delete fRandomizer; + delete fRandomizers; + delete [] fPids; } /*********************************************************************/ AliHBTPositionRandomizer& AliHBTPositionRandomizer::operator=(const AliHBTPositionRandomizer& in) @@ -130,7 +138,8 @@ void AliHBTPositionRandomizer::Randomize(AliAOD* event) const { AliVAODParticle* p = event->GetParticle(i); Double_t x,y,z,t=0.0; - fRandomizer->Randomize(x,y,z,p); + AliHBTRndm* r = GetRandomizer(p->GetPdgCode()); + r->Randomize(x,y,z,t,p); Double_t nx = x*kfmtocm; Double_t ny = y*kfmtocm; @@ -150,26 +159,78 @@ void AliHBTPositionRandomizer::Randomize(AliAOD* event) const } /*********************************************************************/ -void AliHBTPositionRandomizer::SetGaussianBall(Double_t r) +AliHBTRndm* AliHBTPositionRandomizer::GetRandomizer(Int_t pdg) const +{ + //returns randomizer for a given pdg + Int_t idx = GetRandomizerIndex(pdg);//in most of cases + if (idx < 0) idx = 0;//if not found return a default one + return (AliHBTRndm*)fRandomizers->At(idx); +} +/*********************************************************************/ +Int_t AliHBTPositionRandomizer::GetRandomizerIndex(Int_t pdg) const +{ + //returns randomizer index for a given pdg + + if (pdg == 0) return 0; + + for (Int_t i=1; i < fNPid; i++) + { + if (fPids[i] == pdg) + return i; + } + + return -1; +} +/*********************************************************************/ + +void AliHBTPositionRandomizer::SetRandomizer(Int_t pid, AliHBTRndm* rndm) +{ + //sets the randomizer for a given particle type + if (rndm == 0x0) + { + Error("SetRandomizer","Randomizer is null"); + return; + } + + Int_t idx = GetRandomizerIndex(pid); + if (idx >= 0) + { + delete fRandomizers->At(idx); + fRandomizers->AddAt(rndm,idx); + } + + if (fNPid == fgkNumberOfPids) + { + Error("SetRandomizer","There is no more space in the array"); + return; + } + + fPids[fNPid] = pid; + fRandomizers->AddAt(rndm,fNPid); + fNPid++; +} +/*********************************************************************/ + +void AliHBTPositionRandomizer::SetGaussianBall(Int_t pid, Double_t r, Double_t meantime, Double_t sigmatime) { //Sets Gaussian Ball Model - SetGaussianBall(r,r,r); + SetGaussianBall(pid,r,r,r,meantime,sigmatime); } /*********************************************************************/ -void AliHBTPositionRandomizer::SetGaussianBall(Double_t rx, Double_t ry, Double_t rz) +void AliHBTPositionRandomizer::SetGaussianBall(Int_t pid, Double_t rx, Double_t ry, Double_t rz, Double_t meantime, Double_t sigmatime) { //Sets Gaussian Ball Model - delete fRandomizer; - fRandomizer = new AliHBTRndmGaussBall(rx,ry,rz); + AliHBTRndm* rndm = new AliHBTRndmGaussBall(rx,ry,rz,meantime,sigmatime); + SetRandomizer(pid,rndm); } /*********************************************************************/ -void AliHBTPositionRandomizer::SetCyllinderSurface(Double_t r, Double_t l) +void AliHBTPositionRandomizer::SetCyllinderSurface(Int_t pid, Double_t r, Double_t l) { //Sets Cylinder Surface Model - delete fRandomizer; - fRandomizer = new AliHBTRndmCyllSurf(r,l); + AliHBTRndm* rndm = new AliHBTRndmCyllSurf(r,l); + SetRandomizer(pid,rndm); } /*********************************************************************/ @@ -182,10 +243,11 @@ void AliHBTPositionRandomizer::SetEventVertex(Double_t x, Double_t y,Double_t z) } -void AliHBTPositionRandomizer::SetEllipse(Double_t rx, Double_t ryz) +void AliHBTPositionRandomizer::SetEllipse(Int_t pid, Double_t rx, Double_t ryz) { - delete fRandomizer; - fRandomizer = new AliHBTRndmEllipse(rx,ryz); +//sets the ellipse randomization for the given pid + AliHBTRndm* rndm = new AliHBTRndmEllipse(rx,ryz); + SetRandomizer(pid,rndm); } /*********************************************************************/ @@ -199,25 +261,31 @@ void AliHBTPositionRandomizer::SetEllipse(Double_t rx, Double_t ryz) AliHBTRndmGaussBall::AliHBTRndmGaussBall(): fRx(0.0), fRy(0.0), - fRz(0.0) + fRz(0.0), + fTmean(0.0), + fTsigma(0.0) { //constructor } /*********************************************************************/ -AliHBTRndmGaussBall::AliHBTRndmGaussBall(Float_t r): +AliHBTRndmGaussBall::AliHBTRndmGaussBall(Float_t r, Double_t meantime, Double_t sigmatime): fRx(r), fRy(r), - fRz(r) + fRz(r), + fTmean(meantime), + fTsigma(sigmatime) { //constructor } /*********************************************************************/ -AliHBTRndmGaussBall::AliHBTRndmGaussBall(Float_t rx, Float_t ry, Float_t rz): +AliHBTRndmGaussBall::AliHBTRndmGaussBall(Float_t rx, Float_t ry, Float_t rz, Double_t meantime, Double_t sigmatime): fRx(rx), fRy(ry), - fRz(rz) + fRz(rz), + fTmean(meantime), + fTsigma(sigmatime) { //constructor } @@ -233,12 +301,21 @@ AliHBTRndmEllipse::AliHBTRndmEllipse(Float_t rmin, Float_t rmax): /*********************************************************************/ -void AliHBTRndmGaussBall::Randomize(Double_t& x,Double_t& y,Double_t&z, AliVAODParticle*/*particle*/) const +void AliHBTRndmGaussBall::Randomize(Double_t& x,Double_t& y,Double_t&z,Double_t&t, AliVAODParticle*/*particle*/) const { //randomizez gauss for each coordinate separately x = gRandom->Gaus(0.0,fRx); y = gRandom->Gaus(0.0,fRy); z = gRandom->Gaus(0.0,fRz); + + if (fTsigma == 0.0) + { + t = 0.0; + return; + } + + t = gRandom->Gaus(fTmean,fTsigma); + } /*********************************************************************/ //_____________________________________________________________________ @@ -248,7 +325,7 @@ void AliHBTRndmGaussBall::Randomize(Double_t& x,Double_t& y,Double_t&z, AliVAODP // // /////////////////////////////////////////////////////////////////////// -void AliHBTRndmCyllSurf::Randomize(Double_t& x,Double_t& y,Double_t&z, AliVAODParticle* particle) const +void AliHBTRndmCyllSurf::Randomize(Double_t& x,Double_t& y,Double_t&z,Double_t&/*t*/, AliVAODParticle* particle) const { //Randomizes x,y,z Double_t r = fR + gRandom->Gaus(0.0, 1.0); @@ -262,7 +339,7 @@ void AliHBTRndmCyllSurf::Randomize(Double_t& x,Double_t& y,Double_t&z, AliVAODPa /*********************************************************************/ /*********************************************************************/ -void AliHBTRndmEllipse::Randomize(Double_t& x, Double_t& y, Double_t& z,AliVAODParticle*p) const +void AliHBTRndmEllipse::Randomize(Double_t& x, Double_t& y, Double_t& z,Double_t&/*t*/, AliVAODParticle*p) const { // p=0; //workaround - fix this damn little thingy double R; diff --git a/HBTAN/AliHBTPositionRandomizer.h b/HBTAN/AliHBTPositionRandomizer.h index 92b26ee5305..a5c1398e319 100644 --- a/HBTAN/AliHBTPositionRandomizer.h +++ b/HBTAN/AliHBTPositionRandomizer.h @@ -46,61 +46,82 @@ class AliHBTPositionRandomizer: public AliReader void Randomize(AliAOD* event) const; void SetEventVertex(Double_t x, Double_t y,Double_t z); - void SetGaussianBall(Double_t r); - void SetGaussianBall(Double_t rx, Double_t ry, Double_t rz); - void SetCyllinderSurface(Double_t r, Double_t l); - void SetEllipse(Double_t rmin, Double_t rmax); + void SetRandomizer(Int_t pid,AliHBTRndm* rndm); + + void SetGaussianBall(Int_t pid, Double_t r, Double_t meantime, Double_t sigmatime); + void SetGaussianBall(Int_t pid, Double_t rx, Double_t ry, Double_t rz, Double_t meantime, Double_t sigmatime); + void SetCyllinderSurface(Int_t pid, Double_t r, Double_t l); + void SetEllipse(Int_t pid, Double_t rmin, Double_t rmax); void AddToPosition(Bool_t flag){fAddToExistingPos = flag;} void RandomizeTracks(Bool_t flag){fRandomizeTracks = flag;} + AliHBTRndm* GetRandomizer(Int_t pdg) const; + Int_t GetRandomizerIndex(Int_t pdg) const; protected: void Randomize(Double_t& x,Double_t& y,Double_t&z,AliVAODParticle*p); Int_t ReadNext(){return (fReader)?fReader->Next():1;} private: - AliReader* fReader; // Pointer to reader - AliHBTRndm* fRandomizer; // Pointer to class that performs randomization according to some model - - Int_t fModel; //Defines what model is used - - Bool_t fAddToExistingPos; //Determines if randomized position should be added to previous one, or overwrite old one - Bool_t fOnlyParticlesFromVertex; //Determines if randomization should be performed for particles from vertex + AliReader* fReader; // Pointer to reader + AliHBTRndm* fDefaultRandomizer; // Pointer to class that performs randomization according to some model - default one + TObjArray* fRandomizers;//array with randomizers - each particle type can have different randomization parameters/model + Int_t fNPid;//number of randomizers defined in fPid and fRandomizers + Int_t* fPids;//[fgkNumberOfPids] + + Bool_t fAddToExistingPos; //Determines if randomized position should be added to previous one, or overwrite old one + Bool_t fOnlyParticlesFromVertex; //Determines if randomization should be performed for particles from vertex - Bool_t fRandomizeTracks; //Determines if tracks should also be randimized + Bool_t fRandomizeTracks; //Determines if tracks should also be randimized + + Double_t fVX; //vertex position + Double_t fVY; //vertex position + Double_t fVZ; //vertex position - Double_t fVX; //vertex position - Double_t fVY; //vertex position - Double_t fVZ; //vertex position + static const Int_t fgkNumberOfPids;//size of fPid array ClassDef(AliHBTPositionRandomizer,1) }; +/*********************************************************************/ +/*********************************************************************/ +/*********************************************************************/ + class AliHBTRndm: public TObject { public: AliHBTRndm(){} virtual ~AliHBTRndm(){} - virtual void Randomize(Double_t& x,Double_t& y,Double_t&z, AliVAODParticle*p) const = 0; + virtual void Randomize(Double_t& x, Double_t& y, Double_t& z, Double_t& t, AliVAODParticle*p) const = 0; ClassDef(AliHBTRndm,1) }; +/*********************************************************************/ +/*********************************************************************/ +/*********************************************************************/ + class AliHBTRndmGaussBall: public AliHBTRndm { public: AliHBTRndmGaussBall(); - AliHBTRndmGaussBall(Float_t r); - AliHBTRndmGaussBall(Float_t rx, Float_t ry, Float_t rz); + AliHBTRndmGaussBall(Float_t r, Double_t meantime, Double_t sigmatime); + AliHBTRndmGaussBall(Float_t rx, Float_t ry, Float_t rz, Double_t meantime, Double_t sigmatime); virtual ~AliHBTRndmGaussBall(){} - void Randomize(Double_t& x,Double_t& y,Double_t&z, AliVAODParticle*/*particle*/) const; + void Randomize(Double_t& x,Double_t& y,Double_t&z, Double_t& t, AliVAODParticle*/*particle*/) const; private: Float_t fRx; //Dispertion in x Float_t fRy; //Dispertion in y Float_t fRz; //Dispertion in z + Float_t fTmean; //Mean emision time in t + Float_t fTsigma; //Dispertion in t ClassDef(AliHBTRndmGaussBall,1) }; +/*********************************************************************/ +/*********************************************************************/ +/*********************************************************************/ + class AliHBTRndmCyllSurf: public AliHBTRndm { public: @@ -108,7 +129,7 @@ class AliHBTRndmCyllSurf: public AliHBTRndm AliHBTRndmCyllSurf(Float_t r, Float_t l):fR(r),fL(l){} virtual ~AliHBTRndmCyllSurf(){} - void Randomize(Double_t& x,Double_t& y,Double_t&z, AliVAODParticle* particle) const; + void Randomize(Double_t& x,Double_t& y,Double_t&z, Double_t& /*t*/t, AliVAODParticle* particle) const; private: Float_t fR; //Redius of cylinder Float_t fL; //Length of cylinder @@ -116,6 +137,10 @@ class AliHBTRndmCyllSurf: public AliHBTRndm ClassDef(AliHBTRndmCyllSurf,1) }; +/*********************************************************************/ +/*********************************************************************/ +/*********************************************************************/ + class AliHBTRndmEllipse: public AliHBTRndm { public: @@ -123,12 +148,12 @@ class AliHBTRndmEllipse: public AliHBTRndm AliHBTRndmEllipse(Float_t rmin, Float_t rmax); virtual ~AliHBTRndmEllipse(){} - void Randomize(Double_t& x,Double_t& y, Double_t& z, AliVAODParticle* particle) const; + void Randomize(Double_t& x,Double_t& y, Double_t& z, Double_t& , AliVAODParticle* particle) const; private: Float_t fRmin; //Radius in x direction Float_t fRmax; //Radius in y direction - ClassDef(AliHBTRndmEllipse,1) + ClassDef(AliHBTRndmEllipse,2) }; diff --git a/HBTAN/AliHBTTwoTrackEffFctn.cxx b/HBTAN/AliHBTTwoTrackEffFctn.cxx index 95f4b2a3f0b..6fd28d17244 100644 --- a/HBTAN/AliHBTTwoTrackEffFctn.cxx +++ b/HBTAN/AliHBTTwoTrackEffFctn.cxx @@ -82,9 +82,16 @@ void AliHBTTwoTrackEffFctnPxPyPz::GetValues(AliHBTPair* pair, Double_t& x, Doubl { //Returns values to be histogrammed //it does not - x = TMath::Abs(pair->GetDeltaPx()); - y = TMath::Abs(pair->GetDeltaPy()); - z = TMath::Abs(pair->GetDeltaPz()); + x = pair->GetDeltaPx(); + y = pair->GetDeltaPy(); + z = pair->GetDeltaPz(); + + if (fAbs) + { + x = TMath::Abs(x); + y = TMath::Abs(y); + z = TMath::Abs(z); + } } /******************************************************************/ @@ -130,9 +137,17 @@ void AliHBTTwoTrackEffFctnPtThetaPhi::GetValues(AliHBTPair* pair, Double_t& x, D { //Returns values to be histogrammed //it does not - x = TMath::Abs(pair->GetDeltaPt()); - y = TMath::Abs(pair->GetDeltaTheta()); - z = TMath::Abs(pair->GetDeltaPhi()); + x = pair->GetDeltaPt(); + y = pair->GetDeltaTheta(); + z = pair->GetDeltaPhi(); + + if (fAbs) + { + x = TMath::Abs(x); + y = TMath::Abs(y); + z = TMath::Abs(z); + } + } /******************************************************************/ diff --git a/HBTAN/AliHBTWeightFctn.cxx b/HBTAN/AliHBTWeightFctn.cxx index c1672add3be..23ac322f7e6 100644 --- a/HBTAN/AliHBTWeightFctn.cxx +++ b/HBTAN/AliHBTWeightFctn.cxx @@ -492,9 +492,16 @@ void AliHBTWeightQOutSQideQLongFctn::ProcessSameEventParticles(AliHBTPair* track weight=partpair->GetWeight();//here we take weight from the particle pair } // Double_t weight=weightHBT*weightPID; - Double_t out = TMath::Abs(trackpair->GetQOutLCMS()); - Double_t side = TMath::Abs(trackpair->GetQSideLCMS()); - Double_t lon = TMath::Abs(trackpair->GetQLongLCMS()); + Double_t out = trackpair->GetQOutLCMS(); + Double_t side = trackpair->GetQSideLCMS(); + Double_t lon = trackpair->GetQLongLCMS(); + + if (fAbs) + { + out = TMath::Abs(out); + side = TMath::Abs(side); + lon = TMath::Abs(lon); + } fNumerator->Fill(out,side,lon,weight);//here we fill in q's corresponding to track pair //weight calculated for the simulated one @@ -509,11 +516,18 @@ void AliHBTWeightQOutSQideQLongFctn::ProcessDiffEventParticles(AliHBTPair* track // partpair = CheckPair(partpair); if ( trackpair && partpair) { - Double_t out = TMath::Abs(trackpair->GetQOutLCMS()); - Double_t side = TMath::Abs(trackpair->GetQSideLCMS()); - Double_t lon = TMath::Abs(trackpair->GetQLongLCMS()); + Double_t out = trackpair->GetQOutLCMS(); + Double_t side = trackpair->GetQSideLCMS(); + Double_t lon = trackpair->GetQLongLCMS(); + + if (fAbs) + { + out = TMath::Abs(out); + side = TMath::Abs(side); + lon = TMath::Abs(lon); + } - fDenominator->Fill(out,side,lon); + fDenominator->Fill(out,side,lon); } } /*************************************************************/ diff --git a/HBTAN/AliHBTWeightTheorFctn.cxx b/HBTAN/AliHBTWeightTheorFctn.cxx index 2461859db4d..e7e0e3e1a2d 100644 --- a/HBTAN/AliHBTWeightTheorFctn.cxx +++ b/HBTAN/AliHBTWeightTheorFctn.cxx @@ -210,15 +210,31 @@ AliHBTWeightTheorOSLFctn::AliHBTWeightTheorOSLFctn(Int_t nXbins, Double_t maxXva /*************************************************************/ +void AliHBTWeightTheorOSLFctn::GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const +{ +//returns values of a functions for a given pair of particles + x=pair->GetQOutLCMS(); + y=pair->GetQSideLCMS(); + z=pair->GetQLongLCMS(); + + if (fAbs) + { + x = TMath::Abs(x); + y = TMath::Abs(y); + z = TMath::Abs(z); + } + +} + void AliHBTWeightTheorOSLFctn::ProcessSameEventParticles(AliHBTPair* partpair) { //Fills numerator partpair = CheckPair(partpair); if (partpair == 0x0) return; Double_t weight = partpair->GetWeight(); - Double_t out = TMath::Abs(partpair->GetQOutLCMS()); - Double_t side = TMath::Abs(partpair->GetQSideLCMS()); - Double_t lon = TMath::Abs(partpair->GetQLongLCMS()); + Double_t out, side, lon; + + GetValues(partpair, out, side, lon); /* if (out < 0.01) diff --git a/HBTAN/AliHBTWeightTheorFctn.h b/HBTAN/AliHBTWeightTheorFctn.h index 79f964a8ca9..18913a44356 100644 --- a/HBTAN/AliHBTWeightTheorFctn.h +++ b/HBTAN/AliHBTWeightTheorFctn.h @@ -122,8 +122,7 @@ class AliHBTWeightTheorOSLFctn: public AliHBTOnePairFctn3D, public AliHBTCorrelF void ProcessSameEventParticles(AliHBTPair* partpair); protected: - void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const - { x=TMath::Abs(pair->GetQOutLCMS()); y=TMath::Abs(pair->GetQSideLCMS()); z=TMath::Abs(pair->GetQLongLCMS());} + void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const; ClassDef(AliHBTWeightTheorOSLFctn,2) }; diff --git a/HBTAN/HBTAnalysisLinkDef.h b/HBTAN/HBTAnalysisLinkDef.h index 374004b18b1..d23ef2cff1f 100644 --- a/HBTAN/HBTAnalysisLinkDef.h +++ b/HBTAN/HBTAnalysisLinkDef.h @@ -41,8 +41,13 @@ #pragma link C++ class AliHBTQSideLCMSCorrelFctn+; #pragma link C++ class AliHBTQtLCMSCorrelFctn+; #pragma link C++ class AliHBTQtCorrelFctn+; +#pragma link C++ class AliHBTQOutQSideFctn+; +#pragma link C++ class AliHBTQOutQLongFctn+; +#pragma link C++ class AliHBTQSideQLongFctn+; + #pragma link C++ class AliHBTAvSeparCorrelFctn+; +#pragma link C++ class AliHBTAvSeparVsQInvCorrelFctn+; #pragma link C++ class AliHBTasCorrFctn+; //gg #pragma link C++ class AliHBTQOutasCorrFctn+; @@ -179,5 +184,8 @@ #pragma link C++ class AliHBTAnalysisStavinskyMixing+; +#pragma link C++ class AliHBTMonSplittingQosl+; +#pragma link C++ class AliHBTMonSplittingDptDthetaDphi+; + //#pragma link C++ class AliHBTGoComPair+; #endif diff --git a/HBTAN/libHBTAN.pkg b/HBTAN/libHBTAN.pkg index 4b182aaa7ed..b32b4078fdc 100644 --- a/HBTAN/libHBTAN.pkg +++ b/HBTAN/libHBTAN.pkg @@ -9,7 +9,8 @@ AliHBTWeightsPID.cxx AliHBTWeightTheorFctn.cxx \ AliHBTPositionRandomizer.cxx \ AliHBTCorrFitFctn.cxx AliHBTPIDPurityFctns.cxx \ AliHBTCorrectQInvCorrelFctn.cxx AliHBTCorrectOSLCorrelFctn.cxx \ -AliHBTasCorrFctn.cxx AliHBTWeightasCorrFctn.cxx +AliHBTasCorrFctn.cxx AliHBTWeightasCorrFctn.cxx \ +AliHBTMonSplitting.cxx FSRCS = fsiini.F fsiw.F led_bldata.F ltran12.F -- 2.43.0