_ROOT Version: 6.12.06
_Platform: ubuntu 17.04
_Compiler:GCC
I have a very basic tree from which I am trying to create a new tree with more detailed information with various conversions and derived quantities. In the original tree, if there is no signal registered for a particular detector, that branch is simpy not included in the given event. I would like to duplicate this behavior.
I have defined my new tree and the various branches and the new tree values are filled with each event, but if there is no signal the branch is filled with ‘0’ (my reset condition). This is leading to huge amounts of 0’s in the branches. I want to figure out a way to fill only the branches with real signals in a given event. Right now I just use
mytree->Fill()
One thought I had was that I specify within the fill command the branch name
if (mybranch!=0){
mytree->Fill(mybranch)
}
but in looking at the source for Tree->Fill() I saw no indication that it supported this behavior. Thanks.