View Javadoc

1   package org.lcsim.recon.tracking.vsegment.mctruth;
2   
3   import java.util.*;
4   
5   import org.lcsim.event.EventHeader;
6   import org.lcsim.recon.cat.util.NoSuchParameterException;
7   import org.lcsim.util.Driver;
8   
9   import org.lcsim.recon.tracking.vsegment.geom.Sensor;
10  
11  /**
12   * If this driver is added to the processing chain, an {@link MCTruth} object will
13   * be created and put into the event. This object can later be retrieved by other
14   * drivers through a call to <tt>event.get("MCTruth")</tt>, and used to access Monte
15   * Carlo truth information. Some drivers, like <tt>DigitizationDriver</tt>, will 
16   * automatically check for the presence of an <tt>MCTruth</tt> object in the event,
17   * and if present, they will use it to store relations between objects they create
18   * and objects created by the simulator, like <tt>MCParticles</tt> and <tt>SimTrackerHits</tt>.
19   *
20   * @author D. Onoprienko
21   * @version $Id: MCTruthDriver.java,v 1.1 2008/12/06 21:53:44 onoprien Exp $
22   */
23  public class MCTruthDriver extends Driver {
24    
25  // -- Constructors :  ----------------------------------------------------------
26    
27    public MCTruthDriver() {
28    }
29  // -- Event processing :  ------------------------------------------------------
30    
31    public void process(EventHeader event) {
32      
33      // Process children if any
34      
35      super.process(event);
36      
37      // Create MCTruth object and attach it to the event
38      
39      MCTruth mcTruth = new MCTruth(this, event);
40      event.put("MCTruth", mcTruth);
41      
42    }
43    
44  // -- Private parts :  ---------------------------------------------------------
45    
46  }