This should be:

```c++
return Composition::Ptr(new Composition(tot_decay, decay_line_));
```

Composition::Ptr is a smart pointer - so we want to call its constructor.  A static cast is wrong.