| Message: the proper time goes back | Not Logged In (login) |
|
Hello,
I am trying to put an Electromagnetic field (in a localized volume) after an Tungsten target. I have followed the recommendation gave by Peter Gumplinger http://tinyurl.com/nfpk7t So inside my DetectorConstruction I have
G4ThreeVector positionTarget= G4ThreeVector(0,0,samplerLength+targetSizeZ/2);
G4Box* solidTarget = new G4Box("Target",targetSizeXY/2.,targetSizeXY/2.,targetSizeZ/2.);
G4LogicalVolume* logicTarget = new G4LogicalVolume(solidTarget, aMaterial,"Target");
pTarget = new G4PVPlacement(0,positionTarget,logicTarget,"Target",lWorld,false,0);
G4VisAttributes* LogVisAttTarget= new G4VisAttributes(G4Colour(.0,1.,0.));
logicTarget ->SetVisAttributes(LogVisAttTarget);
// register logical Volume in PolarizationManager with zero polarization
G4PolarizationManager * polMgr = G4PolarizationManager::GetInstance();
polMgr->SetVolumePolarization(logicTarget,G4ThreeVector(0.,0.,0.));
//Target Calo
PPSTargetCaloSD* TargetCaloSD= new PPSTargetCaloSD("TargetCaloSD",this);
SDman->AddNewDetector(TargetCaloSD);
logicTarget->SetSensitiveDetector(TargetCaloSD);
static G4bool fieldIsInitialized = false;
if(!fieldIsInitialized)
{
Field = new PPSField();
pEquation = new G4EqMagElectricField(Field);
pStepper = new G4ClassicalRK4 (pEquation);
pFieldMgr = new G4FieldManager();
//pFieldMgr = G4TransportationManager::GetTransportationManager()->GetFieldManager();
pIntgrDriver = new G4MagInt_Driver(0.000001*mm,pStepper,pStepper->GetNumberOfVariables() );
pChordFinder = new G4ChordFinder(pIntgrDriver);
pFieldMgr->SetChordFinder( pChordFinder );
pFieldMgr->SetDetectorField(Field);
fieldIsInitialized = true;
}
G4ThreeVector positionCapture= G4ThreeVector(0,0,targetSizeZ+CaptureLength/2.);
G4Box *solidCapture = new G4Box("CaptureBox",AMD_XY_size,AMD_XY_size,CaptureLength/2);
G4LogicalVolume* logicCapture = new G4LogicalVolume(solidCapture,Vacuum,"theCaptureBox");
pCapture=new G4PVPlacement(0,positionCapture,logicCapture,"CaptureBox",lWorld,false,0);
G4VisAttributes* LogVisAttCapture= new G4VisAttributes(G4Colour(1.0,0.5,0.5));
logicCapture ->SetVisAttributes(LogVisAttCapture);
logicCapture->SetFieldManager(pFieldMgr,true);
And my PPSField class is only:
PPSField::PPSField()
{ }
void PPSField::GetFieldValue(const double point[4], double *Bfield ) const
{
// Magnetic field
Bfield[0] = 0;
Bfield[1] = 0;
Bfield[2] = 0.5*tesla;
// Electric field Bfield[3] = 0; Bfield[4] = 0; Bfield[5] = 17.*megavolt/m; } When I run a electron beam of Several MeV impinging on my target I have those following error:
G4ParticleChange::CheckIt : the global time goes back !!
Difference: 0.074773488261472[ns]
G4ParticleChange::CheckIt : the proper time goes back !!
Difference: 0.0026325540767444[ns]
G4ParticleChange::CheckIt
-----------------------------------------------
G4ParticleChange Information
-----------------------------------------------
# of 2ndaries : 0
-----------------------------------------------
Energy Deposit (MeV): 0
Non-ionizing Energy Deposit (MeV): 0
Track Status : Alive
True Path Length (mm) : 11.1
Stepping Control : 0
Mass (GeV) : 0
Charge (eplus) : 0
MagneticMoment : 0
: = 0*[e hbar]/[2 m]
Position - x (mm) : -9
Position - y (mm) : -2.96
Position - z (mm) : 14.9
Time (ns) : 0
Proper Time (ns) : -0.00249
Momentum Direct - x : -0.795
Momentum Direct - y : -0.55
Momentum Direct - z : 0.255
Kinetic Energy (MeV): 14
Polarization - x : 0
Polarization - y : 0
Polarization - z : 0
Touchable (pointer) : 0x4dbd0a0
Do you have an idea of what I am doing wrong ? by advance thank you Olivier
|
| Inline Depth: | Outline Depth: | Add message: |
|
to: |