View Javadoc

1   package org.lcsim.event;
2   
3   /**
4    * Represents one simulated hit in a calorimeter.  It extends the 
5    * {@link org.lcsim.event.CalorimeterHit} interface and adds 
6    * methods for accessing MC data.
7    * 
8    * @author Jeremy McCormick
9    * @author Tony Johnson
10   * @version $Id: SimCalorimeterHit.java,v 1.7 2011/08/24 18:51:17 jeremy Exp $ 
11   */
12  public interface SimCalorimeterHit extends CalorimeterHit
13  {
14      /**
15       * Get the number of MC contributions to the hit.
16       * The name of this method is misleading if granular contributions
17       * were selected, in which case it corresponds to the total number
18       * of MC contributions to this hit.  It can be used to find the 
19       * maximum index number for iteration over contributions using the methods 
20       * {@link #getContributedEnergy(int)}, {@link #getContributedTime(int), 
21       * {@link #getMCParticle(int)}, and {@linke #getStepPosition(int)}.
22       * @return The number of MCParticle contributions.
23       */
24      int getMCParticleCount();
25  
26      /**
27       * Get the MCParticle that caused the shower responsible for this
28       * contribution to the hit.
29       * @return The MCParticle of the hit contribution.
30       */
31      MCParticle getMCParticle(int index);
32  
33      /**
34       * Get the energy in GeV of the i-th contribution to the hit.
35       * @return The energy of a contribution.
36       */
37      double getContributedEnergy(int index);
38  
39      /**
40       * Get the time in ns of the i-th contribution to the hit.
41       * @return The time of the contribution.
42       */
43      double getContributedTime(int index);
44  
45      /**
46       * Get the PDG code of the shower particle that caused this
47       * contribution.  May be different from the MCParticle's PDG code.
48       * @return The shower contribution particle's PDG ID.
49       */
50      int getPDG(int index);
51  
52      /**
53       * Get the step position of an MCParticle contribution in Cartesian coordinates.     
54       * @param index The index of the contribution.
55       * @return The step position in Cartesian coordinates as a float array of length 3.
56       */
57      float[] getStepPosition(int index);
58  }