2 // Script to dump multiplicity information to std::cout.
7 AliRunLoader* runLoader = AliRunLoader::Open("galice.root");
8 runLoader->LoadgAlice();
9 runLoader->LoadHeader();
10 gAlice = runLoader->GetAliRun();
11 AliFMD* fmd = static_cast<AliFMD*>(gAlice->GetDetector("FMD"));
12 AliLoader* fmdLoader = runLoader->GetLoader("FMDLoader");
13 fmdLoader->LoadRecPoints("READ");
15 Int_t nEvents = runLoader->TreeE()->GetEntries();
16 for (Int_t event = 0; event < nEvents; event++) {
17 cout << "Event # " << event << endl;
18 runLoader->GetEvent(event);
19 TClonesArray* multStrips = 0;
20 TClonesArray* multRegions = 0;
21 TTree* treeR = fmdLoader->TreeR();
22 TBranch* branchRegions = treeR->GetBranch("FMDPoisson");
23 TBranch* branchStrips = treeR->GetBranch("FMDNaiive");
24 branchRegions->SetAddress(&multRegions);
25 branchStrips->SetAddress(&multStrips);
28 Int_t nEntries = treeR->GetEntries();
29 for (Int_t entry = 0; entry < nEntries; entry++) {
30 cout << " Entry # " << entry << endl;
31 treeR->GetEntry(entry);
33 Int_t nMults = multStrips->GetLast();
34 for (Int_t i = 0; i < nMults; i++) {
35 // cout << " Digit # " << i << endl;
36 AliFMDMultStrip* mult =
37 static_cast<AliFMDMultStrip*>(multStrips->UncheckedAt(i));
38 if (mult->Particles() > 0) mult->Print();
41 nMults = multRegions->GetLast();
42 for (Int_t i = 0; i < nMults; i++) {
43 // cout << " Digit # " << i << endl;
44 AliFMDMultStrip* mult =
45 static_cast<AliFMDMultStrip*>(multRegions->UncheckedAt(i));
46 if (mult->Particles() > 0) mult->Print();