Dear everybody,
I am working with pyROOT and I find an particular problem when I tried to define and declare multi-histogram.
Firslty I defined a list as following:
nuanus = ['nu', 'anu']
nutypes = ['mu', 'e', 'tau']
currents_weak = ['_CC', '_NC']
I made a cycle for to have all combinations:
flavours = []
for nuanu in nuanus:
for nutype in nutypes:
for current in currents_weak:
flavours.append( nuanu + nutype + current )
Defined a general histogram:
h_Ntot_cos_ = {}
Finally I defined all histogram:
for flavour in flavours:
h_Ntot_cos_[flavour] = ROOT.TH2D( "h_Ntot_cos_" +flavour, "TOTAL rate of cosmic neutrinos (NOCUTS AT ALL), 1 building block, 1 yr, "+flavour, nbinsx, bin_minX, bin_maxX, nbinsr, rmin, rmax )
Where in my opinion I considered all combination (printing I found that was correct).
But If I do a simple operation like (outside the cycle):
h_Ntot_cos_numu_CC. Add(h_Ntot_cos_numu_CC,h_Ntot_cos_anumu_CC,1.0,1.0)
I mean, why I cannot considering one specific histogram, if was declared???