Print

Print


Commit in GeomConverter/src/org/lcsim/geometry/compact/converter/pandora on MAIN
Main.java+18-31.17 -> 1.18
finish adding muon systems.

GeomConverter/src/org/lcsim/geometry/compact/converter/pandora
Main.java 1.17 -> 1.18
diff -u -r1.17 -r1.18
--- Main.java	15 Jun 2010 21:36:53 -0000	1.17
+++ Main.java	15 Jun 2010 22:05:01 -0000	1.18
@@ -55,7 +55,7 @@
  * geometry input format.
  * 
  * @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: Main.java,v 1.17 2010/06/15 21:36:53 ngraf Exp $
+ * @version $Id: Main.java,v 1.18 2010/06/15 22:05:01 ngraf Exp $
  */
 public class Main implements Converter
 {
@@ -311,11 +311,11 @@
 
             String emName = null;
             String hadName = null;
-            if (calorimeter.getCalorimeterType() == CalorimeterType.EM_BARREL || calorimeter.getCalorimeterType() == CalorimeterType.HAD_BARREL)
+            if (calorimeter.getCalorimeterType() == CalorimeterType.EM_BARREL || calorimeter.getCalorimeterType() == CalorimeterType.HAD_BARREL || calorimeter.getCalorimeterType() == CalorimeterType.MUON_BARREL)
             {
                 emName = "EMBarrel_SF";
                 hadName = "HadBarrel_SF";
-            } else if (calorimeter.getCalorimeterType() == CalorimeterType.EM_ENDCAP || calorimeter.getCalorimeterType() == CalorimeterType.HAD_ENDCAP)
+            } else if (calorimeter.getCalorimeterType() == CalorimeterType.EM_ENDCAP || calorimeter.getCalorimeterType() == CalorimeterType.HAD_ENDCAP || calorimeter.getCalorimeterType() == CalorimeterType.MUON_ENDCAP)
             {
                 emName = "EMEndcap_SF";
                 hadName = "HadEndcap_SF";
@@ -361,6 +361,11 @@
             {
                 samplingIndex = (new StringTokenizer(conditions.getString("ECalLayering"), ",").countTokens());
             }
+            if (calorimeter.getCalorimeterType() == MUON_BARREL || calorimeter.getCalorimeterType() == MUON_ENDCAP)
+            {
+                samplingIndex = (new StringTokenizer(conditions.getString("ECalLayering"), ",").countTokens());
+                samplingIndex += (new StringTokenizer(conditions.getString("HCalLayering"), ",").countTokens());
+            }
 
             // Create the SamplingLayerRange list.
             samplingLayers = new SamplingLayers();
@@ -404,6 +409,12 @@
                 mipCondition = "HCalMip_MPV";
                 mipSigmaCondition = "HCalMip_sig";
                 mipCutCondition = "HCalMip_Cut";
+            }else if (calorimeter.getCalorimeterType() == CalorimeterType.MUON_BARREL
+                    || calorimeter.getCalorimeterType() == CalorimeterType.MUON_ENDCAP)
+            {
+                mipCondition = "MuonMip_MPV";
+                mipSigmaCondition = "MuonMip_sig";
+                mipCutCondition = "MuonMip_Cut";
             }
             mipEnergy = conditions.getDouble(mipCondition);
             mipSigma = conditions.getDouble(mipSigmaCondition);
@@ -620,6 +631,10 @@
                             {
                                 layerElem.setAttribute("samplingFraction", xfrac.format(layerRange.getHADSampling()));
                             }
+                            if (calType == MUON_BARREL || calType == MUON_ENDCAP)
+                            {
+                                layerElem.setAttribute("samplingFraction", xfrac.format(layerRange.getHADSampling()));
+                            }
                             layerElem.setAttribute("emSamplingFraction", xfrac.format(layerRange.getEMSampling()));
                             layerElem.setAttribute("hadSamplingFraction", xfrac.format(layerRange.getHADSampling()));
                         } // Set from base SamplingFraction conditions.
CVSspam 0.2.8