]>
Commit | Line | Data |
---|---|---|
3120fe5b | 1 | void DoRunPid() |
2 | { | |
3 | //Example to use PID analysis with ESDs | |
4 | //Prints in screen PID weight values | |
5 | ||
6 | TFile *file = TFile::Open("AliESDs.root"); | |
7 | TTree *tree = (TTree*)file->Get("esdTree"); | |
8 | ||
9 | AliESD *esd = 0; | |
10 | tree->SetBranchAddress("ESD", &esd); | |
11 | Int_t nEvents = (Int_t)tree->GetEntries(); | |
12 | ||
13 | AliEMCALPID *pid = new AliEMCALPID; | |
14 | pid->SetPrintInfo(kTRUE); | |
15 | for (Int_t iev = 0; iev < nEvents: iev++) { | |
16 | tree->GetEntry(iev); | |
17 | pid->RunPID(esd); | |
18 | } | |
19 | ||
20 | file->Close(); | |
21 | } |