-#include "TH2D.h"
-#include "TH3D.h"
#include "AliHBTAnalysis.h"
#include "AliHBTRun.h"
#include "AliHBTEvent.h"
for (Int_t k =j+1; k < partEvent->GetNumberOfParticles() ; k++)
{
part2= partEvent->GetParticle(k);
+ if (part1->GetUID() == part2->GetUID()) continue;
partpair->SetParticles(part1,part2);
track2= trackEvent->GetParticle(k);
}
}
- /***************************************/
+
/***** Filling denominators *********/
/***************************************/
if (fBufferSize != 0)
for (Int_t k =j+1; k < trackEvent->GetNumberOfParticles() ; k++)
{
- track2= trackEvent->GetParticle(k);
+ track2= trackEvent->GetParticle(k);
+ if (track1->GetUID() == track2->GetUID()) continue;
+
trackpair->SetParticles(track1,track2);
if(fPairCut->Pass(trackpair)) //check pair cut
{ //do not meets crietria of the
for (Int_t k =j+1; k < partEvent->GetNumberOfParticles() ; k++)
{
part2= partEvent->GetParticle(k);
+ if (part1->GetUID() == part2->GetUID()) continue; //this is the same particle but different incarnation (PID)
partpair->SetParticles(part1,part2);
if( fPairCut->Pass(partpair) ) //check pair cut
for (Int_t k = 0; k < partEvent2->GetNumberOfParticles() ; k++)
{
part2= partEvent2->GetParticle(k);
+ if (part1->GetUID() == part2->GetUID()) continue;//this is the same particle but with different PID
partpair->SetParticles(part1,part2);
track2= trackEvent2->GetParticle(k);
AliHBTEvent * trackEvent2=0x0;
AliHBTEvent * trackEvent3=0x0;
+
AliHBTEvent * rawtrackEvent;
Int_t nev = fReader->GetNumberOfTrackEvents();
for (Int_t k = 0; k < trackEvent2->GetNumberOfParticles() ; k++)
{
track2= trackEvent2->GetParticle(k);
+ if (track1->GetUID() == track2->GetUID()) continue;//this is the same particle but with different PID
trackpair->SetParticles(track1,track2);
for (Int_t k = 0; k < partEvent2->GetNumberOfParticles() ; k++)
{
part2= partEvent2->GetParticle(k);
+ if (part1->GetUID() == part2->GetUID()) continue;//this is the same particle but with different PID
partpair->SetParticles(part1,part2);
if(fPairCut->PassPairProp(partpair) ) //check pair cut
AliHBTEvent::AliHBTEvent()
{
- if(fgkInitEventSize<1)
- {
- Fatal("AliHBTEvent::AliHBTEvent()",
- "fgkInitEventSize has a stiupid value (%d). Change it to positive number and recompile",
- fgkInitEventSize);
-
- }
- fSize=fgkInitEventSize;
- fParticles = new AliHBTParticle* [fSize];
- fNParticles = 0;
- fOwner = kTRUE;
+//default constructor
+ if(fgkInitEventSize<1)
+ {
+ Fatal("AliHBTEvent::AliHBTEvent()",
+ "fgkInitEventSize has a stiupid value (%d). Change it to positive number and recompile",
+ fgkInitEventSize);
+
+ }
+ fSize=fgkInitEventSize;
+ fParticles = new AliHBTParticle* [fSize];
+ fNParticles = 0;
+ fOwner = kTRUE;
}
/**************************************************************************/
AliHBTEvent::~AliHBTEvent()
{
- this->Reset();//delete all particles
- if(fParticles)
- {
- delete [] fParticles; //and delete array itself
- }
- fParticles = 0x0;
+//destructor
+ this->Reset();//delete all particles
+ if(fParticles)
+ {
+ delete [] fParticles; //and delete array itself
+ }
+ fParticles = 0x0;
}
/**************************************************************************/
void AliHBTEvent::Reset()
}
fNParticles = 0;
}
+/**************************************************************************/
AliHBTParticle* AliHBTEvent::GetParticleSafely(Int_t n)
- {
- if( (n<0) || (fNParticles<=n) ) return 0x0;
- else return fParticles[n];
-
- }
+{
+ //returns nth particle with range check
+ if( (n<0) || (fNParticles<=n) ) return 0x0;
+ else return fParticles[n];
+}
/**************************************************************************/
void AliHBTEvent:: AddParticle(AliHBTParticle* hbtpart)
- {
- //Adds new perticle to the event
- if ( fNParticles+1 >= fSize) Expand(); //if there is no space in array, expand it
- fParticles[fNParticles++] = hbtpart; //add a pointer
- }
-
+{
+ //Adds new perticle to the event
+ if ( fNParticles+1 >= fSize) Expand(); //if there is no space in array, expand it
+ fParticles[fNParticles++] = hbtpart; //add a pointer
+}
/**************************************************************************/
+
void AliHBTEvent::AddParticle(TParticle* part, Int_t idx)
- {
- AddParticle( new AliHBTParticle(*part,idx) );
- }
+{
+ //Adds TParticle to event
+ AddParticle( new AliHBTParticle(*part,idx) );
+}
/**************************************************************************/
-void AliHBTEvent::
-AddParticle(Int_t pdg, Int_t idx, Double_t px, Double_t py, Double_t pz, Double_t etot,
- Double_t vx, Double_t vy, Double_t vz, Double_t time)
- {
- AddParticle(new AliHBTParticle(pdg,idx,px,py,pz,etot,vx,vy,vz,time) );
- }
+void AliHBTEvent::AddParticle(Int_t pdg, Int_t idx,
+ Double_t px, Double_t py, Double_t pz, Double_t etot,
+ Double_t vx, Double_t vy, Double_t vz, Double_t time)
+{
+ //adds particle to event
+ AddParticle(new AliHBTParticle(pdg,idx,px,py,pz,etot,vx,vy,vz,time) );
+}
/**************************************************************************/
void AliHBTEvent::Expand()
- {
- //expands the array with pointers to particles
- //about the size defined in fgkInitEventSize
-
- fSize+=fgkInitEventSize;
- AliHBTParticle** tmpParticles = new AliHBTParticle* [fSize]; //create new array of pointers
- //check if we got memory / if not Abort
- if (!tmpParticles) Fatal("AliHBTEvent::Expand()","No more space in memory");
-
-
- for(Int_t i = 0; i<fNParticles ;i++)
- //copy pointers to the new array
- {
- tmpParticles[i] = fParticles[i];
- }
- delete [] fParticles; //delete old array
- fParticles = tmpParticles; //copy new pointer to the array of pointers to particles
-
- }
-
-
-
+{
+//expands the array with pointers to particles
+//about the size defined in fgkInitEventSize
+
+ fSize+=fgkInitEventSize;
+ AliHBTParticle** tmpParticles = new AliHBTParticle* [fSize]; //create new array of pointers
+ //check if we got memory / if not Abort
+ if (!tmpParticles) Fatal("AliHBTEvent::Expand()","No more space in memory");
+
+
+ for(Int_t i = 0; i<fNParticles ;i++)
+ //copy pointers to the new array
+ {
+ tmpParticles[i] = fParticles[i];
+ }
+ delete [] fParticles; //delete old array
+ fParticles = tmpParticles; //copy new pointer to the array of pointers to particles
+}