View Javadoc

1   package org.lcsim.event;
2   
3   import hep.physics.particle.Particle;
4   import hep.physics.vec.Hep3Vector;
5   import java.util.List;
6   
7   /**
8    * A simulated track.
9    * 
10   * @author Tony Johnson
11   * @author Jeremy McCormick
12   * @version $Id: MCParticle.java,v 1.7 2011/08/24 18:51:17 jeremy Exp $
13   */
14  public interface MCParticle extends Particle
15  {
16      /**
17       * Get the parents of this particle.
18       * @return The particle's parents.
19       */
20      List<MCParticle> getParents();
21  
22      /**
23       * Get the daughters of this particle.
24       * @return The particle daughters.
25       */
26      List<MCParticle> getDaughters();
27  
28      /**
29       * If this event has been simulated by Geant4 this method will return the
30       * simulation status.
31       * @return The particle's simulator status.
32       */
33      SimulatorStatus getSimulatorStatus();
34  
35      /**
36       * The endpoint of the simulated track.
37       * @throws RuntimeException
38       *             if endpoint is not available.
39       * @return The particle's end point.
40       */
41      Hep3Vector getEndPoint();
42  
43      /**
44       * Get the X, Y, and Z spin components of this particle.
45       * @return The particle's spin components.
46       */
47      float[] getSpin();
48  
49      /**
50       * Get the color flow of particle.
51       * @return The particle's color flow.
52       */
53      int[] getColorFlow();
54  
55      /**
56       * Simulation flags.
57       */
58      public interface SimulatorStatus
59      {
60          /**
61           * Get the raw undecoded simulator status
62           */
63          int getValue();
64  
65          /**
66           * True if the particle has been created by the simulation program
67           * (rather than the generator).
68           */
69          boolean isCreatedInSimulation();
70  
71          /**
72           * True if the particle was created by the simulator as a result of an
73           * interaction or decay in non-tracking region, e.g. a calorimeter. By
74           * convention, such particles are not saved. However, if this particle
75           * creates a tracker hit, the particle is added to the MCParticle list
76           * with this flag set, and the parent set to the particle that initially
77           * decayed or interacted in a non-tracking region.
78           */
79          boolean isBackscatter();
80  
81          /**
82           * True if the particle was created as a result of a continuous process
83           * where the parent particle continues, i.e. hard ionization,
84           * Bremsstrahlung, elastic interactions, etc.
85           */
86          boolean vertexIsNotEndpointOfParent();
87  
88          /**
89           * True if the particle decayed or interacted in a tracking region.
90           */
91          boolean isDecayedInTracker();
92  
93          /**
94           * True if the particle decayed or interacted (non-continuous
95           * interaction, particle terminated) in non-tracking region.
96           */
97          boolean isDecayedInCalorimeter();
98  
99          /**
100          * True if the particle left the world volume undecayed.
101          */
102         boolean hasLeftDetector();
103 
104         /**
105          * True if the particle lost all kinetic energy inside the world volume
106          * and did not decay.
107          */
108         boolean isStopped();
109     }
110 }