View Javadoc

1   package org.lcsim.detector.converter.compact;
2   
3   import org.lcsim.detector.IDetectorElement;
4   import org.lcsim.detector.DetectorIdentifierHelper.SystemMap;
5   import org.lcsim.detector.identifier.IIdentifierHelper;
6   import org.lcsim.geometry.compact.Detector;
7   import org.lcsim.geometry.compact.Subdetector;
8   
9   /**
10   * Converts a {@link org.lcsim.geometry.Subdetector} into the detailed geometry
11   * description defined by the {@link org.lcsim.detector} package.
12   */
13  public interface ISubdetectorConverter
14  {
15      /**
16       * This is the primary conversion method for building the detailed geometry and the
17       * hierarchy of DetectorElement nodes.
18       * 
19       * @param subdet
20       * @param detector
21       */
22      public void convert( Subdetector subdet, Detector detector );
23  
24      /**
25       * Get the type of Subdetector handled by this converter.
26       * 
27       * @return The type of Subdetector handled by this converter.
28       */
29      public Class getSubdetectorType();
30  
31      /**
32       * Create the top-level {@link org.lcsim.detector.IDetectorElement} for this
33       * Subdetector. This node will be assigned the
34       * {@link org.lcsim.detector.identifier.IIdentifierHelper} created by
35       * {@link #makeIdentifierHelper(Subdetector, SystemMap)}.
36       * 
37       * @param detector
38       * @param subdetector
39       * @return
40       */
41      public IDetectorElement makeSubdetectorDetectorElement( Detector detector, Subdetector subdetector );
42  
43      /**
44       * This method is called after {@link #convert(Subdetector, Detector)} to define the
45       * appropriate IdentifierContext objects in the IdentifierDictionary.
46       * 
47       * @param subdet The Subdetector.
48       */
49      //public void makeIdentifierContext( Subdetector subdet );
50  
51      /**
52       * Create the appropriate type of
53       * {@link org.lcsim.detector.identifier.IIdentifierHelper} for this subdetector type.
54       * 
55       * @param subdetector
56       * @param systemMap
57       * @return
58       */
59      public IIdentifierHelper makeIdentifierHelper( Subdetector subdetector, SystemMap systemMap );
60  
61      /**
62       * Creates the hierarchy of Identifiers in this Subdetector.
63       */
64      public void makeIdentifiers( Subdetector subdetector );
65  }