Corrected the FMD3 mother volume. I had defined it with decreasing
[u/mrichter/AliRoot.git] / FMD / scripts / ShowDigits.C
CommitLineData
d389af40 1//
2// Script to digit multiplicity information to std::cout.
3//
4void
5ShowDigits()
6{
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->LoadDigits("READ");
14
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* digits = 0;
20 TTree* treeD = fmdLoader->TreeD();
21 TBranch* branch = treeD->GetBranch("FMD");
22 branch->SetAddress(&digits);
23
24 Int_t total = 0;
25 Int_t nEntries = treeD->GetEntries();
26 for (Int_t entry = 0; entry < nEntries; entry++) {
27 cout << " Entry # " << entry << endl;
28 treeD->GetEntry(entry);
29
30 Int_t nDigits = digits->GetLast();
31 for (Int_t i = 0; i < nDigits; i++) {
32 // cout << " Digit # " << i << endl;
33 AliFMDDigit* digit = static_cast<AliFMDDigit*>(digits->UncheckedAt(i));
34 if (digit->Counts() > 12) {
35 digit->Print();
36 total++;
37 }
38 }
39 }
40 cout << "Total number of digits: " << total << endl;
41 }
42}