Dear colleagues,
Could you please give an advice on the following.
I need manually add track in VMC simulation in detector class. I’m trying to do it using:
gMC->GetStack()->PushTrack(1, 0, thirdIonPDG,
pThirdIon->pX(),pThirdIon->pY(),pThirdIon->pZ(),
pThirdIon->E(), curPos.X(), curPos.Y(), curPos.Z(),
gMC->TrackTime(), 0., 0., 0.,
kPDecay, newTrackNb, pThirdIon->GetMass(), 0);
Its works with TGeant3 simulation engine and don
t works with TGeant4.
In both cases track is in stack. But in Geant4 case it is not propagated.
Could you please have a look, what can be wrong?
ivana
April 18, 2016, 8:50am
2
Dear Vitally,
When running with Geant4, you have to activate the “stackPopper” special process;
see more details how to do this here:
root.cern.ch/physics-list
Please, note also, there that VMC has its dedicated mailing list:
root-vmc@cern.ch
Best regards,
Ivana Hrivnacova
Dear Ivana,
I have tried to add stackPopper special process to configuration:
TG4RunConfiguration* runConfiguration
= new TG4RunConfiguration("geomRoot", "QBBC", "stepLimiter+specialCuts+specialControls+stackPopper");
But it was not helpful.
I have checked creating of special process in my log file:
[code]### Hadron physics constructed.
Processes mapped to VMC controls ok.
Step limiter physics constructed.
Special Cuts constructed.
Stack popper physics constructed.
User particles physics constructed.
Processes mapped to VMC codes ok.[/code]
ivana
April 18, 2016, 4:20pm
5
Please, have a look in E06 example, which includes a stackPopper test.
To run the example with user defined tracks during event processing:
.x load_g4.C
.x test_E06_2.C("g4Config1.C", kFALSE)
See Ex06MCApplication::GenerateFeedback() and Ex06MCApplication::Stepping() functions where adding tracks to the stack is implemented.