Forum: Hypernews Testing Not Logged In (login)
Show subscribers

This is a test forum, to test posting and responses to hypernews. Anyone can use this forum to test the system, and gain a better understanding on how the Hypernews system actually works.

The email gateway for this forum is: Geant4Test-g4hn@slac.stanford.edu


Inline Depth:
 0 0
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

None Re: adding a command in G4UserPhysicsListMessenger  by Paul Nicholas Colin Gloster <Paul Nicholas Colin Gloster>,   Sep 29, 04:29
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323328-1626227865-1254161133=:14611
Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8BIT
Content-ID: <alpine.LNX.2.00.0909291225421.12672@Bluewhite64.example.net>

On Mon, 21 Sep 2009, M. Trocmé submitted:

|--------------------------------------------------------------------------------------------------------------------------------------------------|
|"*** Discussion title: Run Management                                                                                                             |
|                                                                                                                                                  |
|Hi there,                                                                                                                                         |
|                                                                                                                                                  |
|I like playing with cuts for each of my particles and I'm a bit tired of creating a new PhysicsListMessenger each time.                           |
|Could it be possible to add the following command to G4UserPhysicsListMessenger?                                                                  |
|(I tested it by recompiling my g4.3.9.b01. No probs.)                                                                                             |
|                                                                                                                                                  |
|G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(G4VUserPhysicsList* pParticleList):thePhysicsList(pParticleList)                           |
|{                                                                                                                                                 |
|//...                                                                                                                                             |
|                                                                                                                                                  |
|// /run/setCutForAGivenParticle command                                                                                                           |
|  setCutForAGivenParticleCmd = new G4UIcommand("/run/setCutForAGivenParticle",this) ;                                                             |
|  setCutForAGivenParticleCmd->SetGuidance("Set a cut value to a specific particle") ;                                                             |
|  setCutForAGivenParticleCmd->SetGuidance("Usage: /run/setCutForAGivenParticle  gamma  1. mm") ;                                                  |
|    param = new G4UIparameter("particleName",'s',false) ;                                                                                         |
|      param->SetGuidance("To get the list of available particles, you can type: /particle/list all") ;                                            |
|      setCutForAGivenParticleCmd->SetParameter(param) ;                                                                                           |
|    param = new G4UIparameter("cut",'d',false) ;                                                                                                  |
|      param->SetDefaultValue("1.") ;                                                                                                              |
|      param->SetParameterRange("cut>0.0") ;                                                                                                       |
|      setCutForAGivenParticleCmd->SetParameter(param) ;                                                                                           |
|    param = new G4UIparameter("unit",'s',false) ;                                                                                                 |
|      param->SetDefaultValue("mm") ;                                                                                                              |
|      setCutForAGivenParticleCmd->SetParameter(param) ;                                                                                           |
|  setCutForAGivenParticleCmd->AvailableForStates(G4State_PreInit,G4State_Idle);                                                                   |
|                                                                                                                                                  |
|//...                                                                                                                                             |
|}                                                                                                                                                 |
|                                                                                                                                                  |
|G4UserPhysicsListMessenger::~G4UserPhysicsListMessenger()                                                                                         |
|{                                                                                                                                                 |
|// ...                                                                                                                                            |
|  delete setCutForAGivenParticleCmd;                                                                                                              |
|// ...                                                                                                                                            |
|}                                                                                                                                                 |
|                                                                                                                                                  |
|void G4UserPhysicsListMessenger::SetNewValue(G4UIcommand * command,G4String newValue)                                                             |
|{                                                                                                                                                 |
|// ...                                                                                                                                            |
|  } else if( command==setCutForAGivenParticleCmd ){                                                                                               |
|    G4String particleName, unit ; G4double cut ;                                                                                                  |
|    std::istringstream str (newValue) ;                                                                                                           |
|    str >> particleName >> cut >> unit ;                                                                                                          |
|    if ( (G4ParticleTable::GetParticleTable())->FindParticle(particleName) == NULL ) {                                                            |
|      G4Exception( G4String("\n!!!\n!!! Error in /run/setCutForAGivenParticle: Particle '" + particleName + "' is not defined! \n!!!").c_str() ) ;|
|    } else {                                                                                                                                      |
|      thePhysicsList->SetCutValue(cut*G4UIcommand::ValueOf(unit), particleName) ;                                                                 |
|    }                                                                                                                                             |
|  } // else if ...                                                                                                                                |
|}                                                                                                                                                 |
|                                                                                                                                                  |
|Thanks,                                                                                                                                           |
|Mathieu                                                                                                                                           |
|                                                                                                                                                  |
|-------------------------------------------------------------                                                                                     |
|Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or unsubscribe) at:                                                            |
|http://hypernews.slac.stanford.edu/HyperNews/geant4/get/runmanage/259.html "                                                                      |
|--------------------------------------------------------------------------------------------------------------------------------------------------|

Hi,

Maybe you would like to try
HTTP://FisMed.Ciemat.Es/GAMOS/GAMOS_doc/GAMOS.2.0.1/node68.html

Regards,
Nicholas Paul Caileán de Gloucester
--8323328-1626227865-1254161133=:14611--

1 None: Re: adding a command in G4UserPhysicsListMessenger   (Mathieu Trocmé - Sep 29, 07:23)
None TEST TEST TEST  by Charlotte Hee <Charlotte Hee>,   Sep 28, 09:30
this is a test

None Ignore - testing   by Charlotte Hee <Charlotte Hee>,   Aug 04, 13:26
testing testing email from alpine

1 None: Please ignore - testing   (Terry Hung - Aug 04, 18:45)
None third test message, please ignore  by Charlotte Hee <Charlotte Hee>,   Aug 03, 10:07
   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2009/08/03/10.04-57968-patch.bug1

None second test posted from browser, test,test,test  by Charlotte Hee <Charlotte Hee>,   Aug 03, 10:03
please ignore this test

None test  by Kirill Skovpen <Kirill Skovpen>,   26 Nov, 2008
test

None testing geant4 hn  by Charlotte Hee <Charlotte Hee>,   12 Aug, 2008
testing geant4 hn. please ignore this message

None test, ignore. 18:16 (via email)  by Terry Hung <Terry Hung>,   11 Jun, 2008
test, ignore. 18:16 (via email)

None test, ignore. 18:45  by Terry Hung <Terry Hung>,   09 Jun, 2008
test ignore. 18:45

1 None: test, ignore. 18:15   (Terry Hung - 11 Jun, 2008)
None test, ignore 2:47  by Terry Hung <Terry Hung>,   06 Jun, 2008
test, ignore 2:47

None test, ignore  by Terry Hung <Terry Hung>,   05 Jun, 2008
test, ignore

1 None: Re: test, ignore   (Terry Hung - 05 Jun, 2008)
None test1  by Valery Taranenko <Valery Taranenko>,   14 Apr, 2007
test1
1 None: RE: test1   (Valery Taranenko - 14 Apr, 2007)
None hello  by Douglas Smith <Douglas Smith>,   14 Sep, 2006

testing posting.

Douglas

None testing  by Douglas Smith <Douglas Smith>,   15 Aug, 2006

hello world...

Question another test  Keywords: a test
by Guillaume Potdevin <guillaume.potdevin@esrf.fr>,   03 Jan, 2005

Let's test

and retest...

None Account test  Keywords: account testing
by David Huber <David Huber>,   15 May, 2004

This is just to test my new account.

1 None: Re: Account test   (bla@bla.com - 07 Nov, 2007)
None test  by Charlotte Hee <Charlotte Hee>,   08 Mar, 2004

test

1 None: Re: test   (bla@bla.com - 28 Dec, 2007)
None Untitled  by Vladimir Ivanchenko <Vladimir Ivanchenko>,   13 Nov, 2003

Test

None Test  by <perl@stanford.edu>,   12 Mar, 2003

test

None Test this  by Douglas Smith <Douglas Smith>,   05 Apr, 2002

Does this work

1 None: Re: Test this   (Douglas Smith - 29 Jul, 2002)
 Add Message Add Message
to: "Hypernews Testing"

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]