]>
Commit | Line | Data |
---|---|---|
811dc103 | 1 | //******************************************************************** |
2 | // Example (very naive for the moment) of the data analysis | |
3 | // using the ESD classes | |
4 | // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch | |
5 | // Modified by Basanta K. Nandi for PMD analysis | |
6 | //******************************************************************** | |
7 | ||
8 | #if !defined( __CINT__) || defined(__MAKECINT__) | |
9 | #include <Riostream.h> | |
10 | #include "TKey.h" | |
11 | #include "TFile.h" | |
12 | #include "TH1F.h" | |
13 | #include "TCanvas.h" | |
14 | #include "TStyle.h" | |
15 | #include "TStopwatch.h" | |
16 | ||
17 | #include "AliESD.h" | |
18 | #endif | |
19 | ||
20 | extern TStyle *gStyle; | |
21 | ||
22 | Int_t AliPMDesdanal() { | |
23 | TStopwatch timer; | |
24 | ||
25 | gStyle->SetOptStat(111110); | |
26 | gStyle->SetOptFit(1); | |
27 | ||
28 | //****** File with the ESD | |
29 | TFile *ef=TFile::Open("AliESDcheck.root"); | |
30 | if (!ef || !ef->IsOpen()) {cerr<<"Can't AliESDs.root !\n"; return 1;} | |
31 | ||
32 | Int_t n=0; | |
33 | TKey *key=0; | |
34 | TIter next(ef->GetListOfKeys()); | |
35 | ||
36 | //******* The loop over events | |
37 | while ((key=(TKey*)next())!=0) { | |
38 | cout<<endl<<"Processing event number : "<<n++<<endl; | |
39 | ||
40 | AliESD *event=(AliESD*)key->ReadObj(); | |
41 | ||
42 | ||
43 | Int_t npmdcl=event->GetNumberOfPmdTracks(); | |
44 | cout<<"Number of PMD tracks : "<<npmdcl<<endl; | |
45 | ||
46 | //****** The loop over PMD clusters | |
47 | while (npmdcl--) { | |
48 | AliESDPmdTrack *pmdtr = event->GetPmdTrack(npmdcl); | |
49 | ||
50 | Int_t det = pmdtr->GetDetector(); | |
51 | Float_t theta = pmdtr->GetTheta(); | |
52 | Float_t phi = pmdtr->GetPhi(); | |
53 | Float_t adc = pmdtr->GetClusterADC(); | |
54 | Float_t pid = pmdtr->GetClusterPID(); | |
55 | ||
56 | } | |
57 | } | |
58 | timer.Stop(); | |
59 | timer.Print(); | |
60 | ||
61 | return 0; | |
62 | } |