1 package org.lcsim.recon.tracking.trfbase; 2 import org.lcsim.recon.tracking.trfutil.RandomGenerator; 3 4 /** Abtract interface for class to generate a cluster from a VTrack. 5 * The track is already at the the appropriate surface. Its position 6 * is smeared to generate the hit. 7 * 8 * This class is used to generate simulated clusters which are used 9 * to create hits. Note that it inherits from RandomGenerator and 10 * the member _rand may be used to generate random numbers (e.g. 11 * _rand.gauss(mean)). 12 * 13 * @author Norman A. Graf 14 * @version 1.0 15 */ 16 17 public abstract class HitGenerator extends RandomGenerator 18 { 19 20 21 22 // 23 24 /** 25 *Constructor. 26 * 27 */ 28 public HitGenerator() 29 { 30 super(); 31 } 32 33 // 34 35 /** 36 *Constructor from seed. 37 * 38 * @param seed Seed for this generator 39 */ 40 public HitGenerator(long seed) 41 { 42 super(seed); 43 } 44 45 // 46 47 /** 48 *Copy constructor. 49 * 50 * @param hg HitGenerator to replicate 51 */ 52 public HitGenerator( HitGenerator hg) 53 { 54 super(hg); 55 } 56 57 // 58 59 /** 60 *Return the surface to which track should be propagated. 61 * 62 * @return surface to which track should be propagated 63 */ 64 public abstract Surface surface(); 65 66 // 67 68 /** 69 *Generate a new cluster from a track. 70 * mcid identifies which particle created it 71 * Null is returned if cluster was not created (e.g. if track is 72 * not at surface). 73 * 74 * @param trv VTrack for which to generate a Cluster 75 * @param mcid MC ID to associate with this Cluster 76 * @return Cluster for this VTrack 77 */ 78 public abstract Cluster newCluster( VTrack trv, int mcid ); 79 80 }