#include "AliHBTReaderInternal.h"
+//_________________________________________________________________________
+///////////////////////////////////////////////////////////////////////////
+// //
+// class AliHBTReaderInternal //
+// //
+// Multi file reader for Internal Data Format //
+// //
+// This reader reads data created by itself //
+// (method AliHBTReaderInternal::Write) //
+// Data are stored in form of tree of TClonesArray of AliHBTParticle's //
+// //
+// Piotr.Skowronski@cern.ch //
+// more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html //
+// //
+///////////////////////////////////////////////////////////////////////////
#include <TTree.h>
#include <TFile.h>
fPartBranch(0x0),
fTrackBranch(0x0),
fTree(0x0),
- fFile(0x0)
+ fFile(0x0),
+ fPartBuffer(0x0),
+ fTrackBuffer(0x0)
{
//Defalut constructor
}
fPartBranch(0x0),
fTrackBranch(0x0),
fTree(0x0),
- fFile(0x0)
+ fFile(0x0),
+ fPartBuffer(0x0),
+ fTrackBuffer(0x0)
{
//constructor
//filename - name of file to open
fPartBranch(0x0),
fTrackBranch(0x0),
fTree(0x0),
- fFile(0x0)
+ fFile(0x0),
+ fPartBuffer(0x0),
+ fTrackBuffer(0x0)
{
//ctor
//dirs contains strings with directories to look data in
counter = 0;
if (fPartBranch && fTrackBranch)
{
+ Info("ReadNext","Found %d tracks in total.",fTrackBuffer->GetEntries());
+ Info("ReadNext","Found %d particles in total.",fPartBuffer->GetEntries());
for(i = 0; i < fPartBuffer->GetEntries(); i++)
{
tpart = dynamic_cast<AliHBTParticle*>(fPartBuffer->At(i));
if( tpart == 0x0 ) continue; //if returned pointer is NULL
if( ttrack == 0x0 ) continue; //if returned pointer is NULL
-
+
+ if (AliHBTParticle::GetDebug() > 9)
+ {
+ Info("ReadNext","Particle:");
+ tpart->Print();
+ Info("ReadNext","Track:");
+ ttrack->Print();
+ }
if (ttrack->GetUID() != tpart->GetUID())
{
Error("ReadNext","Sth. is wrong: Track and Particle has different UID.");
Error("ReadNext","They probobly do not correspond to each other.");
}
-
+
for (Int_t s = 0; s < ttrack->GetNumberOfPids(); s++)
{
- if( pdgdb->GetParticle(ttrack->GetNthPid(s)) == 0x0 ) continue; //if particle has crazy PDG code (not known to our database)
- if( Pass(ttrack->GetNthPid(s)) ) continue; //check if we are intersted with particles of this type
- //if not take next partilce
-
- AliHBTParticle* track = new AliHBTParticle(*ttrack);
-
- //apart of setting PDG code of an incarnation
- //it is necessary tu recalculate energy on the basis of
- //new PDG code (mass) hypothesis
+ //check if we are intersted with particles of this type
+ //if not take next partilce
+ if( Pass(ttrack->GetNthPid(s)) )
+ {
+ if (AliHBTParticle::GetDebug() > 9)
+ Info("ReadNext","Track Incarnation %d did not pass PID cut.",ttrack->GetNthPid(s));
+ continue;
+ }
TParticlePDG* pdgp = pdgdb->GetParticle(ttrack->GetNthPid(s));
if (pdgp == 0x0)//PDG part corresponding to new incarnation
{
Error("ReadNext","Particle code unknown to PDG DB.");
continue;
}
+
+ AliHBTParticle* track = new AliHBTParticle(*ttrack);
+
+ //apart of setting PDG code of an incarnation
+ //it is necessary tu recalculate energy on the basis of
+ //new PDG code (mass) hypothesis
Double_t mass = pdgp->Mass();//mass of new incarnation
Double_t tEtot = TMath::Sqrt( ttrack->Px()*ttrack->Px() +
ttrack->Py()*ttrack->Py() +
if( Pass(track) )
{
+ if (AliHBTParticle::GetDebug() > 9)
+ Info("ReadNext","Track Incarnation %d did not pass cut.",ttrack->GetNthPid(s));
delete track;
continue;
}
if (fTrackBranch)
{
+ Info("ReadNext","Found %d tracks in total.",fTrackBuffer->GetEntries());
for(i = 0; i < fTrackBuffer->GetEntries(); i++)
{
ttrack = dynamic_cast<AliHBTParticle*>(fTrackBuffer->At(i));
for (Int_t s = 0; s < ttrack->GetNumberOfPids(); s++)
{
- if( pdgdb->GetParticle(ttrack->GetNthPid(s)) == 0x0 ) continue; //if particle has crazy PDG code (not known to our database)
if( Pass(ttrack->GetNthPid(s)) ) continue; //check if we are intersted with particles of this type
- //if not take next partilce
- AliHBTParticle* track = new AliHBTParticle(*ttrack);
-
- //apart of setting PDG code of an incarnation
- //it is necessary tu recalculate energy on the basis of
- //new PDG code (mass) hypothesis
+ //if not take next partilce
TParticlePDG* pdgp = pdgdb->GetParticle(ttrack->GetNthPid(s));
if (pdgp == 0x0)//PDG part corresponding to new incarnation
{
Error("ReadNext","Particle code unknown to PDG DB.");
continue;
}
+ AliHBTParticle* track = new AliHBTParticle(*ttrack);
+
+ //apart of setting PDG code of an incarnation
+ //it is necessary tu recalculate energy on the basis of
+ //new PDG code (mass) hypothesis
Double_t mass = pdgp->Mass();//mass of new incarnation
Double_t tEtot = TMath::Sqrt( ttrack->Px()*ttrack->Px() +
ttrack->Py()*ttrack->Py() +
Info("OpenNextFile","________________________________________________________");
Info("OpenNextFile","Found %d event(s) in directory %s",
- (Int_t)fTree->GetEntries(),GetDirName(fCurrentEvent).Data());
+ (Int_t)fTree->GetEntries(),GetDirName(fCurrentDir).Data());
fCurrentEvent = 0;