3 /////////////////////////////////////////////////////////////////////////
5 // Creates cluster from the hit information (fast simulator).
6 // An additional hit-tree is added to the input file.
8 /////////////////////////////////////////////////////////////////////////
10 // Dynamically link some shared libs
11 if (gClassTable->GetID("AliRun") < 0) {
12 gROOT->LoadMacro("loadlibs.C");
16 // Input (and output) file name
17 Char_t *alifile = "galice_c_v0.root";
22 // Connect the AliRoot file containing Geometry, Kine, Hits, and Digits
23 TFile *gafl = (TFile*) gROOT->GetListOfFiles()->FindObject(alifile);
25 cout << "Open the ALIROOT-file " << alifile << endl;
26 gafl = new TFile(alifile,"UPDATE");
29 cout << alifile << " is already open" << endl;
32 // Get AliRun object from file or create it if not on file
34 gAlice = (AliRun*) gafl->Get("gAlice");
36 cout << "AliRun object found on file" << endl;
38 gAlice = new AliRun("gAlice","Alice test program");
41 // Import the Trees for the event nEvent in the file
42 Int_t nparticles = gAlice->GetEvent(nEvent);
43 if (nparticles <= 0) break;
45 // Get the pointer to the detector classes
46 AliTRDv0 *TRD = (AliTRDv0*) gAlice->GetDetector("TRD");
48 // Create the clusters
51 // Write the new tree into the input file
52 cout << "Entries in digits tree = " << gAlice->TreeD()->GetEntries() << endl;
54 sprintf(treeName,"TreeD%d",nEvent);
55 gAlice->TreeD()->Write(treeName);