Muon production in particle accelerator PAMELA is a particle accelerator which have two concentric rings, protons are accelerated in the inside ring.
At ISIS muons are produced when a 800 MeV proton beam collides with a graphite target(carbon 12) can the same be done with this device?
The accelerated protons from inside may be sent to the outside ring which will have slow carbon atoms and the collision will produce pions which will decay into muons. Do pions have any magnetic properties which can help to contain them after production?.
 A: 
can the same be done with this device?

Pamela seems to have up to 250 MeV protons (I guess that's momentum) and up to 400 MeV per nucleon for the Carbon ions. 
A carbon target has typically a higher density than a carbon beam (depending on how well the beam is focused however), so while one gets a higher center of mass energy in case of a carbon beam I claim that the collision rates would be much lower than for the target.
Wikipedia says that the ISIS neutron source is driven by a 160 kW proton beam (not the entire beam is used for muon production though). I doubt that a medical accelerator such as Pamela will have as much beam power or proton current. After all, beams in medical accelerators are shot onto patients...

do pions have any magnetic properties which can help to contain them after production?

charged pions are charged as their name implies and thus can be bent and focused like any other charged particle in dipole and quadrupole magnets. However, they have a lifetime of 26 nanoseconds which makes 'containment' very difficult...
A: From the tagging I suspect that you are thinking about muon catalyzed fusion. That poses some challenges beyond the ones you ask about, and I'll try to address those as well.


*

*Generate and focus the pions. Without at least 140 MeV energy in the CoM frame there isn't enough energy to generate on-shell charged pions, but we also need them to have a non-trivial velocity in the lab frame so that they can be focused by a "horn" using magnetic fields (which actually couple primarily to the pion's charge, not it magnetic moment) and to extend their rather brief lifetime enough that they can navigating the focusing region before decaying.
This step requires a lot of power and most of it is lost because the horn only focuses a fraction of the pions and some non-trivial energy goes into other particles unless you arrange for enough energy to make pions but not enough to make other hardrons. Even then you lose energy to uncharged pions, charged pions of the "wrong" sign and excited nuclear states.

*Collect and cool accelerate the muons at high energy. Even after leaving the horn the pions are only roughly focused, and when they decay the muons pick up a further spread in both momentum and direction. This mess needs to be captured and collected into a beam. Doing that before they decay requires that they continue to have high enough energy to keep them relativistic.
More power for running the accelerator and the beam line magnets and more losses because despite your best efforts some the muons will escape and others will decay before...

*Bring the muons and ions together to form a neutral particle beam.
This step is reasonable straight forward.

*Arrange for that beam to be dense enough to fuse at a non-trivial rate. This is hard, because the charged beam suffer from "space charge effects" by which we mean that putting a lot of charged particles into a single beam bunch causes them to want to fly apart due to the electrostatic repulsion of the particles.
You may be able to partly overcome the space charge effects by running the pions and ions counter to each other in a single beam line, but that doesn't solve the problem, it just reduces it.
And now we need to try to recover the generated energy from a relativistic, neutral particle beam. I'm not quite sure how to go about that. Dump it into a big thermal mass, maybe. Anyway, this is a non-trivial engineering problem for itself.
In other words, the proposed projects is very hard, would need to make a lot of fusion to pay, and almost certainly requires a built-to-order facility rather than trying to force a machine carefully engineered for other purposes to do the work.
