backport new code which did not get merged into branch
Merge pull request #1731 from apfeiffer1/ap-backport-ctor

ROOT6 -- Backport new code which did not get merged into branch