View Javadoc

1   package org.lcsim.recon.tracking.trflayer;
2   import org.lcsim.recon.tracking.trfutil.RandomSimulator;
3   import org.lcsim.recon.tracking.trfbase.VTrack;
4   
5   /**
6    * A layer simulator generates hits for a layer using a track (VTrack)
7    * as input.  It is a simulator (i.e. inherits from class RandomSimulator)
8    * so it must return a list of the generators (class RandomGenerator) used
9    * to generate the hits.
10   *<p>
11   * This class is abstract.  A typical implementation would include the
12   * layer, hit generators for each active surface in the layer and a
13   * propagator.
14   *
15   *@author Norman A. Graf
16   *@version 1.0
17   *
18   **/
19  
20  public abstract class LayerSimulator extends RandomSimulator
21  {
22      
23      // attibutes
24      
25      // layer
26      private Layer _lyr;
27      
28      // methods
29      
30      // constructor from the layer
31      protected LayerSimulator(Layer lyr)
32      {
33          _lyr = lyr;
34      }
35      
36      // methods
37      
38      //
39      
40      /**
41       *Return the layer associated with this simulator.
42       *
43       * @return Layer for this simulator
44       */
45      public Layer layer()
46      {
47          return _lyr;
48      }
49      
50      //
51      
52      /**
53       *Generate clusters from a track and add them to the layer.
54       *
55       * @param   trv VTrack to simulate interactions
56       * @param   mcid MC track ID to asociate with VTrack
57       */
58      public abstract void addClusters( VTrack trv, int mcid);
59      
60      //
61      
62      /**
63       *drop the clusters from the layer
64       * The default method here invokes the layer drop_clusters method().
65       * In unusual cases subclass may want to override.
66       *
67       */
68      public void dropClusters()
69      {
70          layer().dropClusters();
71      }
72      
73  }