void TestReconstruction (Int_t vol=1, const Int_t nRings=128, const Int_t nSectors=20) { // Dynamically link some shared libs if (gClassTable->GetID("AliRun") < 0) { gROOT->LoadMacro("loadlibs.C"); loadlibs(); } // Connect the Root Galice file containing Geometry, Kine and Hits char filename[]="galice.root"; TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(filename); if (!file) file = new TFile(filename); // Get AliRun object from file or create it if not on file if (!gAlice) { gAlice = (AliRun*)file->Get("gAlice"); if (gAlice) printf("\nAliRun object found on file\n"); if (!gAlice) gAlice = new AliRun("gAlice","Alice test program"); } Int_t nbytes = 0; Int_t ipart; Int_t volume; Int_t np[nRings][nSectors]; for (int i=0;iGetEvent(0); if (nparticles <= 0) return; printf("\nnparticles=%d\n",nparticles); gAlice->TreeR()->GetEvent(0); AliFMD *FMD = (AliFMD*)gAlice->GetDetector("FMD"); TClonesArray *Particles = gAlice->Particles(); TParticle *particle; AliFMDhit *fmdHit; AliFMDReconstParticles *fmdRP; if (FMD) { TClonesArray *FMDhits = FMD->Hits(); TClonesArray *FMDrec = FMD->ReconParticles(); TTree *TH = gAlice->TreeH(); Int_t ntracks = TH->GetEntries(); if (ntracks<=0) return; Int_t nPads=FMDrec->GetEntries(); #ifdef DEBUG cout<<"\n(AliFMDReconstParticles*)FMDrec->UncheckedAt(0)="<<(AliFMDReconstParticles*)FMDrec->UncheckedAt(0); cout<<"\nFMDrec->UncheckedAt(0)="<UncheckedAt(0); #endif for (Int_t track=0; trackResetHits(); nbytes += TH->GetEvent(track);//? particle=(TParticle*)Particles->UncheckedAt(track); // Int_t numpart=particle->GetKF(); //Float_t eta=particle->GetEta(); Int_t nhits=FMDhits->GetEntriesFast(); for (Int_t hit=0;hitUncheckedAt(hit); volume=fmdHit->Volume(); if(volume==vol) { np[fmdHit->NumberOfRing()-1][fmdHit->NumberOfSector()-1]++; } } } //Int_t nRecPart=FMDrec->GetEntriesFast(); Int_t nDeterm=0; Int_t nReal=0; for (Int_t pad=0;padUncheckedAt(pad); volume=fmdRP->GetVolume(); if(volume==vol) { ; #ifdef DEBUG fmdDigit = (AliFMDdigit*)FMDdig->UncheckedAt(pad); cout<<"\nfmdDigit->ADCsignal()="<ADCsignal(); cout<<"\nfmdDigit->NumberOfRing()="<NumberOfRing(); cout<<"\nfmdDigit->NumberOfSector()="<NumberOfSector(); #endif nDeterm+=fmdRP->GetNumberOfReconstParticles(); nReal+=np[fmdRP->GetNumberOfRing()-1][fmdRP->GetNumberOfSector()-1]; //-1=? Int_t RecRing=fmdRP->GetNumberOfRing()-1; Int_t RecSector=fmdRP->GetNumberOfSector()-1; hNReal->Fill(np[RecRing][RecSector]); hNRec->Fill(fmdRP->GetNumberOfReconstParticles()); } } } cout<<"\nReal="<SetFillColor(2); hNReal->Draw(); hNRec->SetFillColor(4); hNRec->Draw("same"); }