- A: The error is in the reading code.
meff4jValues
is a vector of floats. And meff4jChannels
is a vector of strings. So what you do in your code above is printing the character of the strings.
For particles, e.g. for a jet, you get a
jetChannels
branch, formatted as
vector of vector of strings, because you have many particles in each event. But for branches defined in the "=userD3PDBranchesToFill=" dictionary you get only one entry per event, and thus you have a
vector of strings to store the channels name whose sets of particles were used to compute the quantity.
Below a python example of the reading code is provided:
Source code
----------------
for val in enumerate(t.meff4jValues): # --> it actually stores only one value
print "val: ", val
for chan in t.meff4jChannels:
print "chan: ", chan
Output
--------
val: 315487.78125
chan: 4j1lepCSC
chan: 4j0lepCSC
chan: 3j1lepMediumCutsMTSmaller100GeV
chan: 3j0lepMediumCuts
chan: DEFAULT
chan: 3j1lepMediumCutsMTBigger100GeV
chan: 2j0lepCSC
chan: 3j0lepCSC
chan: 1lep
Instead,
the example below reproduces the error:
Source Code
-----------------
for i,val in enumerate(t.meff4jValues):
print "val: ", val
for pr in t.meff4jChannels[i]:
print "pr: ", pr
Output
---------
val: 315487.78125
pr: 1
pr: l
pr: e
pr: p
--
RiccardoMariaBianchi - 04 Mar 2009