Message: ConstructParticles needed? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback ConstructParticles needed? 

Forum: Particles
Date: 25 Sep, 2001
From: Isidro Gonzalez <Isidro Gonzalez>


While looking at the documentation on particles I found in

the following lines:

"Particles are static objects of individual particle classes. This means that these objects will be instantiated automatically before the main() routine is executed. However, you must explicitly declare the particle classes you want somewhere in your program, otherwise the compiler can not recognize which classes you need, and no particle classes will be instantiated."

However I looked into the code and I could not find a reason why these particles should be declared somewhere in order to be instantiated. They are created independently of wether you use them or not. I tested this (in Linux RH6.2) by not declaring any single particle and calling:


somewhere in my code. I had the complete list of particles. If this is the case, many lines in the examples (those in PhysicsList::ConstructParticles() ) can be ommited.

Or... I missed something?



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

1 Feedback: Re: ConstructParticles needed?   (Hisaya Kurashige - 27 Sep, 2001)
 Add Message Add Message
to: "ConstructParticles needed?"

 Subscribe Subscribe

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 ]