1 PHOS (Int_t event_number=0,Float_t SignalStep=0.001,Int_t SignalMin=15)
5 // Dynamically link some shared libs
6 if (gClassTable->GetID("AliRun") < 0) {
7 gSystem->Load("libGeant3Dummy.so"); // a dummy version of Geant3
8 gSystem->Load("PHOS/libPHOSreconstruction.so"); // the standard Alice classes
9 gSystem->Load("libgalice.so"); // the standard Alice classes
12 // Connect the Root Galice file containing Geometry, Kine and Hits
13 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
14 if (!file) file = new TFile("galice.root");
16 // Get AliRun object from file or create it if not on file
18 gAlice = (AliRun*)file->Get("gAlice");
19 if (gAlice) printf("AliRun object found on file\n");
20 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
22 ////////////////////////////////
24 AliPHOS *PHOS= gAlice->GetDetector("PHOS");
27 cout << "Can't find PHOS detector!\n";
31 PHOS->SetTreeAddress();
33 if( 0==PHOS->fTreePHOS->GetEvent(event_number) )
35 printf("Cannot read event number %d\n",event_number);
39 printf("This is event number %d from %d\n",
40 event_number,PHOS->fTreePHOS->GetEntries());
42 for( int i=0; i<PHOS->fCradles->GetEntries(); i++ )
44 AliPHOSCradle &cradle = PHOS->GetCradle(i);
45 printf("===============================================================\n");
46 printf("Cradle %d\n",i+1);
51 cradle.Reconstruction(SignalStep,SignalMin);
53 printf("It were %d particles in that cradle\n",cradle.GetParticles().GetEntries());
54 for( int j=0; j<cradle.GetParticles().GetEntries(); j++ )
56 TObjArray &pp = cradle.GetParticles();
57 AliPHOSgamma *g = (AliPHOSgamma *) pp.At(j);
62 printf("\nReconstruction: %d gammas\n",cradle.GetGammasReconstructed().GetEntries());
63 for( int j=0; j<cradle.GetGammasReconstructed().GetEntries(); j++ )
65 TObjArray &pp = cradle.GetGammasReconstructed();
66 AliPHOSgamma *g = (AliPHOSgamma *) pp.At(j);
75 ////////////////////////////////////////////////////////////////////////////////