Hello,
I am using ROOT 5.14/00b (not at CERN, but installed at Nevis Labs).
I load a root ntuple withe the following command
root -l a.root
The ntuple contains various trees:
If I type
.ls
I get
TFile** a.root
TFile* a.root
KEY: AttributeListLayout Schema;1
KEY: TDirectory TruthHistogram;1 TruthHistogram
KEY: TDirectory RecoHistogram;1 RecoHistogram
KEY: TTree CollectionTree;1 CollectionTree
KEY: TTree Trigger0;1 Trigger0
KEY: TTree Truth0;1 Truth0
KEY: TTree FullReco0;1 FullReco0
KEY: TTree FastSim0;1 FastSim0
KEY: TTree TruthAna0;1 TruthAna0
KEY: TTree FullRecoAna0;1 FullRecoAna0
KEY: TTree FastSimAna0;1 FastSimAna0
The two ntuples contain a variable with the same name (LepTop_N), but different content.
In fact if I scan:
FullRecoAna0->Scan(“LepTop_N”)
TruthAna0->Scan(“LepTop_N”)
I get two different non-zero series on fumbers.
I would like to scan them together or plot one against the other
FullRecoAna0.LepTop_N vs TruthAna0.LepTop_N
So I write:
FullRecoAna0->AddFriend(“TruthAna0”)
and I get
(class TFriendElement*)0xa12b5f8
then I try to do
FullRecoAna0->Scan(“TruthAna0.LepTop_N”)
and I get an empty list.
- Row * TruthAna0 *
-
0 * * -
1 * * -
2 * * -
3 * * -
4 * * -
5 * * -
6 * * -
7 * * -
8 * * -
9 * * -
10 * * -
11 * * -
12 * * -
13 * * -
14 * * -
15 * * -
16 * * -
17 * * -
18 * * -
19 * * -
20 * * -
21 * * -
22 * * -
23 * * -
24 * *
while If I try to do:
FullRecoAna0->Scan(“LepTop_N”) I just get what i was getting before i.e. FullRecoAna0- sees its own variable (as expected).
I also tried FullRecoAna0->Draw(“TruthAna0.LepTop_N”) and the canvas is completely empty, in the sense that no acis or anything is drawn on it. i only see the gray background.
So what is wrong? Why am I not able to see the variable of the befriended tree?
Does anyone have an explanation?
Cheers,
Francesco