part1= partEvent->GetParticle(j);
track1= trackEvent->GetParticle(j);
-
- if( part1->GetPdgCode() != track1->GetPdgCode() )
- {
- Fatal("ProcessTracksAndParticles",
- "Event %d: Particle %d: PID of simulated particle (%d) not the same of reconstructed track (%d)",
- i,j, part1->GetPdgCode(),track1->GetPdgCode() );
- return;
- }
+
+//PID imperfections ???
+// if( part1->GetPdgCode() != track1->GetPdgCode() )
+// {
+// Fatal("ProcessTracksAndParticles",
+// "Event %d: Particle %d: PID of simulated particle (%d) not the same of reconstructed track (%d)",
+// i,j, part1->GetPdgCode(),track1->GetPdgCode() );
+// return;
+// }
Bool_t firstcut = fPairCut->GetFirstPartCut()->Pass(part1);
if (part1->GetUID() == part2->GetUID()) continue;
partpair->SetParticles(part1,part2);
- track2= trackEvent->GetParticle(k);
+ track2= trackEvent->GetParticle(k);
trackpair->SetParticles(track1,track2);
if(fPairCut->Pass(partpair) ) //check pair cut
part1= partEvent1->GetParticle(j);
track1= trackEvent1->GetParticle(j);
-
- if( part1->GetPdgCode() != track1->GetPdgCode() )
- {
- Fatal("ProcessTracksAndParticlesNonIdentAnal",
- "Event %d: Particle %d: PID of simulated particle (%d) not the same of reconstructed track (%d)",
- i,j, part1->GetPdgCode(),track1->GetPdgCode() );
- return;
- }
+
+//PID reconstruction imperfections
+// if( part1->GetPdgCode() != track1->GetPdgCode() )
+// {
+// Fatal("ProcessTracksAndParticlesNonIdentAnal",
+// "Event %d: Particle %d: PID of simulated particle (%d) not the same of reconstructed track (%d)",
+// i,j, part1->GetPdgCode(),track1->GetPdgCode() );
+// return;
+// }
for(ii = 0; ii<fNParticleMonitorFunctions; ii++)
fParticleMonitorFunctions[ii]->Process(part1);
//
Info("Read","");
- if (!particles) //check if an object is instatiated
+ if ( ReadsParticles() && (particles == 0x0) ) //check if an object is instatiated
{
Error("Read"," particles object must be instatiated before passing it to the reader");
return 1;
}
- if (!tracks) //check if an object is instatiated
+ if ( ReadsTracks() && (tracks == 0x0) ) //check if an object is instatiated
{
Error("Read"," tracks object must be instatiated before passing it to the reader");
return 1;
}
- particles->Reset();//clear runs == delete all old events
- tracks->Reset();
+
+ if (ReadsParticles()) particles->Reset();//clear runs == delete all old events
+ if (ReadsTracks()) tracks->Reset();
Rewind();
if (fTree == 0x0)
if( (i=OpenNextFile()) )
{
- Error("ReadNext","Skippimg directory due to problems with opening files. Errorcode %d",i);
+ Error("ReadNext","Skipping directory due to problems with opening files. Errorcode %d",i);
fCurrentDir++;
continue;
}
return 0;
- }while(fCurrentEvent < GetNumberOfDirs());
+ }while(fCurrentDir < GetNumberOfDirs());
return 1;//no more directories to read
}
Int_t AliHBTReaderInternal::OpenNextFile()
{
//open file in current directory
- const TString& dirname = GetDirName(fCurrentEvent);
+ const TString& dirname = GetDirName(fCurrentDir);
if (dirname == "")
{
Error("OpenNextFile","Can not get directory name");
gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libHBTAN");
cout<<"AliHBTWriteInternFormat.C: ..... Loaded\n";
-
+ Bool_t multcheck = kTRUE;
/***********************************************************/
AliHBTReader* reader;
{
reader = new AliHBTReaderKineTree();
processopt="Particles"; //this reader by definition reads only simulated particles
+ multcheck = kFALSE;
}
else if(!ESD)
{
AliHBTReaderESD* esdreader = new AliHBTReaderESD();
esdreader->ReadParticles(kTRUE);
reader = esdreader;
+ multcheck = kTRUE;
}
else if(!TPC)
{
cout<<"AliHBTWriteInternFormat.C: Creating Reader TPC .....\n";
reader = new AliHBTReaderTPC();
+ multcheck = kFALSE;
cout<<"AliHBTWriteInternFormat.C: ..... Created\n";
}
else if(!ITSv1)
{
reader = new AliHBTReaderITSv1();
+ multcheck = kFALSE;
}
else if(!ITSv2)
{
cout<<"AliHBTWriteInternFormat.C: Creating Reader ITSv2 .....\n";
reader = new AliHBTReaderITSv2();
+ multcheck = kFALSE;
cout<<"AliHBTWriteInternFormat.C: ..... Created\n";
}
else if(!intern)
{
reader = new AliHBTReaderInternal("data.root");
+ multcheck = kTRUE;
}
else
{
reader->SetDirs(dirs);
cout<<"AliHBTWriteInternFormat.C: P R O C S E S S I N G .....\n\n";
- AliHBTReaderInternal::Write(reader,outfile);
+ AliHBTReaderInternal::Write(reader,outfile,multcheck);
cout<<"\n\nAliHBTWriteInternFormat.C: F I N I S H E D\n";
if (dirs) delete dirs;