[Gate-users] Problem with backtoback gammas in Gate v6 p01

Michael Rissi mrissi at fys.uio.no
Fri Nov 26 14:20:27 CET 2010


Hello Gaters,

I encountered the problem when simulating our COMPET scanner using
backtoback gammas.
I seems that their angle was not 180 deg, but arbitrary. As stated
before in the mailing list,
I tried:
/gate/source/twogamma/setAccolinearityFlag true
/gate/source/twogamma/setAccoValue 0.001 deg

which did not help. Looking at the source code GateBackToBack.cc, I
realised that
in the function:
void GateVSource::GeneratePrimariesForBackToBackSource(G4Event* event)
the momentum of one of the primary particles is inverted and the other gamma
stays untouched.
 iI exchanged this code with:

 void GateBackToBack::GenerateVertex( G4Event* aEvent, G4bool
accolinearityFlag )
{
  //  G4cout << "Generating vertex : " <<G4endl;
     m_source->GeneratePrimaryVertex( aEvent );
  G4PrimaryParticle* particle1 = aEvent->GetPrimaryVertex( 0 )->GetPrimary( 1 );
  G4PrimaryParticle* particle2 = aEvent->GetPrimaryVertex( 0 )->GetPrimary( 0 );
  if(accolinearityFlag == true )
    {
      G4double dev = CLHEP::RandGauss::shoot( 0.,
                                              m_source->GetAccoValue() / 3.35 );
      G4double Phi1 = ( twopi * G4UniformRand() )/2. ;
      G4ThreeVector DirectionPhoton( sin( dev ) * cos( Phi1 ),
                                     sin( dev ) * sin( Phi1 ), cos( dev ) );
      DirectionPhoton.rotateUz( particle1->GetMomentum() );
      particle2->SetMomentum( -DirectionPhoton.x(),
                             -DirectionPhoton.y(), -DirectionPhoton.z() );
    }
  else
    {
      G4ThreeVector gammaMom = -particle1->GetMomentum();
      particle2->SetMomentum( gammaMom.x(),gammaMom.y(),gammaMom.z() );
    }
}


and the gammas seem to be (in the event display) now back to back!


Best regards,
Michael Rissi




-- 




Dr. Michael Rissi
COMPET project
room ø385A
Sem Sælandsvei 24
N-0316 Oslo

Universitetet i Oslo
NORWAY


More information about the Gate-users mailing list