/****** filling numerators ********/
/***************************************/
if ( (j%fDisplayMixingInfo) == 0)
- Info("ProcessTracksAndParticles",
+ Info("ProcessRecAndSim",
"Mixing particle %d with particles from the same event",j);
part1= partEvent->GetParticle(j);
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; l<partEvent2->GetNumberOfParticles();l++) // ... on all particles
if ( !partEvent )
{
- Error("ProcessRecAndSim","Can not get event");
+ Error("ProcessSim","Can not get event");
return 1;
}
for (Int_t j = 0; j<partEvent->GetNumberOfParticles() ; 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; ii<fNParticleMonitorFunctions; ii++)
- fParticleMonitorFunctions[ii]->Process(part1);
+ if (firstcut) continue;
- if ( fNParticleFunctions == 0 ) continue;
+ for(ii = 0; ii<fNParticleMonitorFunctions; ii++)
+ fParticleMonitorFunctions[ii]->Process(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;ii<fNParticleFunctions;ii++)
- fParticleFunctions[ii]->ProcessSameEventParticles(tmppartpair);
+ for(ii = 0;ii<fNParticleFunctions;ii++)
+ fParticleFunctions[ii]->ProcessSameEventParticles(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; l<partEvent2->GetNumberOfParticles();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; l<partEvent2->GetNumberOfParticles();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;ii<fNParticleFunctions;ii++)
+ fParticleFunctions[ii]->ProcessDiffEventParticles(tmppartpair);
+
+ }//for(Int_t l = 0; l<N2;l++) // ... on all particles
+ }
+ }
- 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;ii<fNParticleFunctions;ii++)
- fParticleFunctions[ii]->ProcessDiffEventParticles(tmppartpair);
-
- }//for(Int_t l = 0; l<N2;l++) // ... on all particles
- }
- }
+
delete fPartBuffer->Push(partEvent1);
//end of loop over events
return 0;
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
}
/*************************************************************************************/
+
+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;
+}
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)
};
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
+
+
+
AliHBTFunction::AliHBTFunction():
fPairCut(new AliAODPairEmptyCut()), //dummy cut
- fWriteNumAndDen(kFALSE)
+ fWriteNumAndDen(kFALSE),
+ fAbs(kFALSE)
{
//Default constructor
}
AliHBTFunction::AliHBTFunction(const char* name,const char* title):
TNamed(name,title),
fPairCut(new AliAODPairEmptyCut()), //dummy cut
- fWriteNumAndDen(kFALSE)
+ fWriteNumAndDen(kFALSE),
+ fAbs(kFALSE)
{
//Constructor
}
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
}
// Assignment needed by the coding conventions
delete fPairCut;
fPairCut = (AliAODPairCut*)source.fPairCut->Clone();
+ fAbs = source.fAbs;
return * this;
}
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;}
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)
};
/******************************************************************/
--- /dev/null
+#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
+}
--- /dev/null
+#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
// 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);
}
/*************************************************************/
// 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);
}
/******************************************************************/
// 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);
}
/*************************************************************/
// 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);
}
/******************************************************************/
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);
}
/*************************************************************/
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);
}
/*************************************************************/
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),
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),
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),
{
//dtor
delete fReader;
- delete fRandomizer;
+ delete fRandomizers;
+ delete [] fPids;
}
/*********************************************************************/
AliHBTPositionRandomizer& AliHBTPositionRandomizer::operator=(const AliHBTPositionRandomizer& in)
{
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;
}
/*********************************************************************/
-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);
}
/*********************************************************************/
}
-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);
}
/*********************************************************************/
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
}
/*********************************************************************/
-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);
+
}
/*********************************************************************/
//_____________________________________________________________________
// //
///////////////////////////////////////////////////////////////////////
-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);
/*********************************************************************/
/*********************************************************************/
-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;
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:
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
ClassDef(AliHBTRndmCyllSurf,1)
};
+/*********************************************************************/
+/*********************************************************************/
+/*********************************************************************/
+
class AliHBTRndmEllipse: public AliHBTRndm
{
public:
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)
};
{
//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);
+ }
}
/******************************************************************/
{
//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);
+ }
+
}
/******************************************************************/
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
// 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);
}
}
/*************************************************************/
/*************************************************************/
+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)
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)
};
#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+;
#pragma link C++ class AliHBTAnalysisStavinskyMixing+;
+#pragma link C++ class AliHBTMonSplittingQosl+;
+#pragma link C++ class AliHBTMonSplittingDptDthetaDphi+;
+
//#pragma link C++ class AliHBTGoComPair+;
#endif
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