#include "AliHBTParticle.h"
#include "AliHBTParticleCut.h"
-#include <iostream.h>
+#include <Riostream.h>
#include <TROOT.h>
#include <TFile.h>
delete iotrack;
return 1;
}
- TFile *file = OpenTrackFile(currentdir);
- if(file == 0x0)
- {
- Error("Read","Can not open the file with ITS tracks V1");
- delete iotrack;
- return 2;
- }
-
if (gAlice->TreeE())//check if tree E exists
{
Nevents = (Int_t)gAlice->TreeE()->GetEntries();//if yes get number of events in gAlice
delete iotrack;
return 4;
}
+
+ TFile *file = OpenTrackFile(currentdir);
+ if(file == 0x0)
+ {
+ Error("Read","Can not open the file with ITS tracks V1");
+ delete iotrack;
+ return 2;
+ }
Int_t naccepted = 0;
char tname[30];
if (label < 0)
{
continue;
- delete iotrack;
}
+
TParticle *p = (TParticle*)gAlice->Particle(label);
if(!p)
{
if(Pass(p->GetPdgCode())) continue; //check if we are intersted with particles of this type
//if not take next partilce
- AliHBTParticle* part = new AliHBTParticle(*p);
+ AliHBTParticle* part = new AliHBTParticle(*p,i);
if(Pass(part)) { delete part; continue;}//check if meets all criteria of any of our cuts
//if it does not delete it and take next good track
Double_t y= iotrack->GetY();
Double_t z= iotrack->GetZ();
- AliHBTParticle* track = new AliHBTParticle(p->GetPdgCode(), px, py , pz, tEtot, x, y, z, 0.);
+ AliHBTParticle* track = new AliHBTParticle(p->GetPdgCode(), i, px, py , pz, tEtot, x, y, z, 0.);
if(Pass(track)) { delete track;continue;}//check if meets all criteria of any of our cuts
//if it does not delete it and take next good track
return 0x0;
}
TString filename = dirname + "/" + fITSTracksFileName;
- TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(filename.Data());
- if (!file) file = new TFile(filename.Data());
-
+
+ TFile *file = TFile::Open(filename.Data());
if (!file)
{
Error("Read","Can not open file %s",filename.Data());